Contact cannot be a null ptr, and it is accessed before anyway. Disscussed with kedge.
[kdenetwork.git] / kppp / acctselect.h
blobe73a18b231de6b903f04953516c88c1a17f9c3b3
1 //---------------------------------------------------------------------------
2 //
3 // kPPP: A pppd front end for the KDE project
4 //
5 //---------------------------------------------------------------------------
6 //
7 // (c) 1997-1998 Bernd Johannes Wuebben <wuebben@kde.org>
8 // (c) 1997-1999 Mario Weilguni <mweilguni@kde.org>
9 // (c) 1998-1999 Harri Porten <porten@kde.org>
11 // derived from Jay Painters "ezppp"
13 //---------------------------------------------------------------------------
14 //
15 // $Id$
17 //---------------------------------------------------------------------------
18 //
19 // This program is free software; you can redistribute it and-or
20 // modify it under the terms of the GNU Library General Public
21 // License as published by the Free Software Foundation; either
22 // version 2 of the License, or (at your option) any later version.
23 //
24 // This program is distributed in the hope that it will be useful,
25 // but WITHOUT ANY WARRANTY; without even the implied warranty of
26 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 // Library General Public License for more details.
28 //
29 // You should have received a copy of the GNU Library General Public
30 // License along with this program; if not, write to the Free
31 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33 //---------------------------------------------------------------------------
35 #ifndef __ACCTSELECT__H__
36 #define __ACCTSELECT__H__
38 #include <qwidget.h>
39 #include <qpixmap.h>
40 #include <qdir.h>
41 //Added by qt3to4:
42 #include <QLabel>
44 class QCheckBox;
45 class QComboBox;
46 class QLabel;
47 class Q3ListView;
48 class Q3ListViewItem;
50 class AccountingSelector : public QWidget {
51 Q_OBJECT
52 public:
53 explicit AccountingSelector(QWidget *parent = 0, bool _isnewaccount = false, const char *name = 0);
54 ~AccountingSelector() {}
56 bool save();
58 private:
59 Q3ListViewItem *findByName(QString name);
60 void setupTreeWidget();
61 void insertDir(QDir, Q3ListViewItem * = 0);
62 QString fileNameToName(QString);
63 QString nameToFileName(QString);
65 private slots:
66 void openUrl(const QString &);
67 void enableItems(bool);
68 void slotSelectionChanged(Q3ListViewItem* i);
70 private:
71 QCheckBox *enable_accounting;
72 Q3ListView *tl;
73 QComboBox *use_vol;
74 QPixmap pmfolder, pmfile;
75 QLabel *selected;
77 Q3ListViewItem *edit_item;
78 QString edit_s;
79 bool isnewaccount;
82 #endif