Diffstat (limited to 'noncore/settings/usermanager/userdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/usermanager/userdialog.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/settings/usermanager/userdialog.cpp b/noncore/settings/usermanager/userdialog.cpp index eb9a289..5854fe0 100644 --- a/noncore/settings/usermanager/userdialog.cpp +++ b/noncore/settings/usermanager/userdialog.cpp | |||
@@ -1,68 +1,69 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * This program is free software; you can redistribute it and/or modify * | 3 | * This program is free software; you can redistribute it and/or modify * |
4 | * it under the terms of the GNU General Public License as published by * | 4 | * it under the terms of the GNU General Public License as published by * |
5 | * the Free Software Foundation; either version 2 of the License, or * | 5 | * the Free Software Foundation; either version 2 of the License, or * |
6 | * (at your option) any later version. * | 6 | * (at your option) any later version. * |
7 | * * | 7 | * * |
8 | ***************************************************************************/ | 8 | ***************************************************************************/ |
9 | 9 | ||
10 | #include "userdialog.h" | 10 | #include "userdialog.h" |
11 | #include "passwd.h" | 11 | #include "passwd.h" |
12 | 12 | ||
13 | /* OPIE */ | 13 | /* OPIE */ |
14 | #include <opie2/odevice.h> | 14 | #include <opie2/odevice.h> |
15 | #include <qpe/qpeapplication.h> | 15 | #include <qpe/qpeapplication.h> |
16 | 16 | ||
17 | /* QT */ | 17 | /* QT */ |
18 | #include <qlayout.h> | 18 | #include <qlayout.h> |
19 | #include <qlabel.h> | 19 | #include <qlabel.h> |
20 | #include <qmessagebox.h> | 20 | #include <qmessagebox.h> |
21 | #include <qfile.h> | 21 | #include <qfile.h> |
22 | 22 | ||
23 | /* STD */ | 23 | /* STD */ |
24 | #include <sys/types.h> | 24 | #include <sys/types.h> |
25 | #include <sys/wait.h> | 25 | #include <sys/wait.h> |
26 | #include <unistd.h> | 26 | #include <unistd.h> |
27 | #include <signal.h> | 27 | #include <signal.h> |
28 | 28 | ||
29 | 29 | ||
30 | using namespace Opie; | 30 | using namespace Opie::Core; |
31 | 31 | ||
32 | 32 | ||
33 | /** | 33 | /** |
34 | * UserDialog constructor. Setup the dialog, fill the groupComboBox & groupsListView with all groups. | 34 | * UserDialog constructor. Setup the dialog, fill the groupComboBox & groupsListView with all groups. |
35 | * | 35 | * |
36 | */ | 36 | */ |
37 | using namespace Opie::Ui; | ||
37 | UserDialog::UserDialog(int viewmode, QWidget* parent, const char* name, bool modal, WFlags fl) : QDialog(parent, name, modal, fl) | 38 | UserDialog::UserDialog(int viewmode, QWidget* parent, const char* name, bool modal, WFlags fl) : QDialog(parent, name, modal, fl) |
38 | { | 39 | { |
39 | vm=viewmode; | 40 | vm=viewmode; |
40 | QVBoxLayout *layout = new QVBoxLayout(this); | 41 | QVBoxLayout *layout = new QVBoxLayout(this); |
41 | myTabWidget=new QTabWidget(this,"User Tab Widget"); | 42 | myTabWidget=new QTabWidget(this,"User Tab Widget"); |
42 | layout->addWidget(myTabWidget); | 43 | layout->addWidget(myTabWidget); |
43 | setupTab1(); | 44 | setupTab1(); |
44 | setupTab2(); | 45 | setupTab2(); |
45 | 46 | ||
46 | accounts->groupStringList.sort(); | 47 | accounts->groupStringList.sort(); |
47 | // And also fill the listview & the combobox with all available groups. | 48 | // And also fill the listview & the combobox with all available groups. |
48 | for( QStringList::Iterator it = accounts->groupStringList.begin(); it!=accounts->groupStringList.end(); ++it) | 49 | for( QStringList::Iterator it = accounts->groupStringList.begin(); it!=accounts->groupStringList.end(); ++it) |
49 | { | 50 | { |
50 | accounts->splitGroupEntry(*it); | 51 | accounts->splitGroupEntry(*it); |
51 | if(accounts->gr_name.find(QRegExp("^#"),0)) | 52 | if(accounts->gr_name.find(QRegExp("^#"),0)) |
52 | { // Skip commented lines. | 53 | { // Skip commented lines. |
53 | new QCheckListItem(groupsListView,accounts->gr_name,QCheckListItem::CheckBox); | 54 | new QCheckListItem(groupsListView,accounts->gr_name,QCheckListItem::CheckBox); |
54 | groupComboBox->insertItem(accounts->gr_name); | 55 | groupComboBox->insertItem(accounts->gr_name); |
55 | } | 56 | } |
56 | } | 57 | } |
57 | QPEApplication::showDialog( this ); | 58 | QPEApplication::showDialog( this ); |
58 | } | 59 | } |
59 | 60 | ||
60 | /** | 61 | /** |
61 | * Empty destructor. | 62 | * Empty destructor. |
62 | * | 63 | * |
63 | */ | 64 | */ |
64 | UserDialog::~UserDialog() | 65 | UserDialog::~UserDialog() |
65 | {} | 66 | {} |
66 | 67 | ||
67 | /** | 68 | /** |
68 | * Creates the first tab, all userinfo is here. | 69 | * Creates the first tab, all userinfo is here. |