HEAD: merged from taskmaster branch.
[wvapps.git] / unikonf / ukconfig.h
blob247de1901b1845494356c767c211c81f9750fae6
1 /*
2 * ** Copyright (C) 2002 Net Integration Technologies Inc.
3 * **
4 * ** This program is free software; you can redistribute it and/or modify
5 * ** it under the terms of the GNU Lesser General Public License as published by
6 * ** the Free Software Foundation; either version 2 of the License, or
7 * ** (at your option) any later version.
8 * **
9 * ** This program is distributed in the hope that it will be useful,
10 * ** but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * ** GNU General Public License for more details.
13 * **
14 * ** You should have received a copy of the GNU Lesser General Public License
15 * ** along with this program; if not, write to the Free Software
16 * ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 * */
19 #ifndef UNIKONFCFG_H
20 #define UNIKONFCFG_H
22 #include <kmessagebox.h>
23 #include <klocale.h>
24 #include <ktabctl.h>
25 #include <kstddirs.h>
26 #include <kdialogbase.h>
27 #include <kiconloader.h>
28 #include <ksimpleconfig.h>
30 #include <klistbox.h>
31 #include <klineedit.h>
32 #include <qbuttongroup.h>
33 #include <qlayout.h>
34 #include <kpushbutton.h>
35 #include <qradiobutton.h>
36 #include <qcheckbox.h>
37 #include <qgroupbox.h>
38 #include <qlabel.h>
40 class UniKonfCfgPage : public QWidget
42 Q_OBJECT
43 public:
44 UniKonfCfgPage( QWidget * parent=0, const char * name=0 )
45 : QWidget( parent, name ) {}
46 ~UniKonfCfgPage() {};
48 void setPageIndex( int aPageIndex ) { mPageIndex = aPageIndex; }
49 int pageIndex() const { return mPageIndex; }
51 protected:
52 int mPageIndex;
56 class UniKonfAddMount : public KDialog
58 Q_OBJECT
59 public:
60 UniKonfAddMount(QWidget *parent = 0, const char *name = 0, KSimpleConfig *_config = 0);
61 UniKonfAddMount(QString *_mountpoint, QWidget *parent = 0, const char *name = 0, KSimpleConfig *_config = 0);
62 virtual ~UniKonfAddMount();
64 KSimpleConfig *config;
66 public slots:
67 void createnew();
68 void modify();
70 private:
71 QGridLayout *aslayout;
72 QLabel *monikerl;
73 KLineEdit *moniker;
74 QLabel *mountpointl;
75 KLineEdit *mountpoint;
76 KPushButton *ok;
77 KPushButton *close;
78 KPushButton *help;
79 QString old_mount;
82 class UniKonfCfgConn : public UniKonfCfgPage
84 Q_OBJECT
85 public:
86 UniKonfCfgConn(QWidget *parent = 0, const char *name = 0, KSimpleConfig *_config = 0);
87 virtual ~UniKonfCfgConn();
89 QString *servername;
90 KSimpleConfig *config;
92 QString helpAnchor();
93 void apply();
95 public slots:
97 protected slots:
98 void fillwindow();
99 void addMountPoint();
100 void modMountPoint();
101 void delMountPoint();
102 void setMountPoint(const QString &);
104 private:
105 QWidget *connecttab;
106 QGridLayout *connectlayout;
107 KListBox *connectwindow;
108 KPushButton *connect_add;
109 KPushButton *connect_mod;
110 KPushButton *connect_del;
113 class UniKonfCfg : public KDialogBase
115 Q_OBJECT
116 public:
117 UniKonfCfg(QWidget *parent = 0, const char *name = 0, KSimpleConfig *_config = 0);
118 virtual ~UniKonfCfg();
120 public slots:
121 virtual void slotHelp();
122 virtual void slotApply();
123 virtual void slotOk();
125 protected:
126 void apply(bool);
128 private:
129 UniKonfCfgConn *connwidget;
130 QGridLayout *prefslayout;
133 #endif // UNIKONFCFG_H