merge in my changes from soc-krdc branch
[kdenetwork.git] / krdc / maindialogwidget.h
bloba1d38215c87ccfda84fa6b35a4ff615929bc07ba
1 /* This file is part of the KDE project
2 Copyright (C) 2002-2003 Tim Jansen <tim@tjansen.de>
3 Copyright (C) 2003-2004 Nadeem Hasan <nhasan@kde.org>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or ( at your option ) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; see the file COPYING. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
21 #ifndef MAINDIALOGWIDGET_H
22 #define MAINDIALOGWIDGET_H
24 #include "kservicelocator.h"
25 #include <dnssd/servicebrowser.h>
26 #include <dnssd/remoteservice.h>
27 #include "smartptr.h"
28 #include "ui_maindialogbase.h"
30 class MainDialogWidget : public QWidget, public Ui::MainDialogBase
32 Q_OBJECT
34 public:
35 MainDialogWidget( QWidget *parent );
36 ~MainDialogWidget() {}
38 void setRemoteHost( const QString & );
39 QString remoteHost();
40 void save();
42 protected:
43 void enableBrowsingArea( bool enable );
44 bool ensureLocatorOpen();
45 void errorScanning();
46 void finishScanning();
48 signals:
49 void hostValid( bool b );
50 void accept();
52 protected slots:
53 void hostChanged( const QString & text);
54 void toggleBrowsingArea();
55 void itemSelected( Q3ListViewItem * item );
56 void itemDoubleClicked( Q3ListViewItem * item );
57 void scopeSelected( const QString & scope);
58 void rescan();
60 void foundService( QString url, int );
61 void lastSignalServices( bool success );
62 void foundScopes( QStringList scopeList );
63 void addedService( DNSSD::RemoteService::Ptr );
64 void removedService( DNSSD::RemoteService::Ptr );
65 void languageChange();
67 void exampleWhatsThis(const QString & link);
69 protected:
70 QString m_scope;
71 bool m_scanning;
72 SmartPtr<KServiceLocator> m_locator;
73 DNSSD::ServiceBrowser *m_locator_dnssd_rfb;
74 DNSSD::ServiceBrowser *m_locator_dnssd_vnc;
77 #endif // MAINDIALOGWIDGET_H