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 9dfb2af..3654639 100644 --- a/noncore/settings/usermanager/userdialog.cpp +++ b/noncore/settings/usermanager/userdialog.cpp | |||
@@ -1,39 +1,40 @@ | |||
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/odebug.h> | 14 | #include <opie2/odebug.h> |
15 | #include <opie2/odevice.h> | 15 | #include <opie2/odevice.h> |
16 | #include <opie2/oresource.h> | ||
16 | #include <qpe/qpeapplication.h> | 17 | #include <qpe/qpeapplication.h> |
17 | using namespace Opie::Core; | 18 | using namespace Opie::Core; |
18 | using namespace Opie::Ui; | 19 | using namespace Opie::Ui; |
19 | 20 | ||
20 | /* QT */ | 21 | /* QT */ |
21 | #include <qlayout.h> | 22 | #include <qlayout.h> |
22 | #include <qlabel.h> | 23 | #include <qlabel.h> |
23 | #include <qmessagebox.h> | 24 | #include <qmessagebox.h> |
24 | #include <qfile.h> | 25 | #include <qfile.h> |
25 | 26 | ||
26 | /* STD */ | 27 | /* STD */ |
27 | #include <sys/types.h> | 28 | #include <sys/types.h> |
28 | #include <sys/wait.h> | 29 | #include <sys/wait.h> |
29 | #include <unistd.h> | 30 | #include <unistd.h> |
30 | #include <signal.h> | 31 | #include <signal.h> |
31 | 32 | ||
32 | /** | 33 | /** |
33 | * 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. |
34 | * | 35 | * |
35 | */ | 36 | */ |
36 | UserDialog::UserDialog(int viewmode, QWidget* parent, const char* name, bool modal, WFlags fl) : QDialog(parent, name, modal, fl) | 37 | UserDialog::UserDialog(int viewmode, QWidget* parent, const char* name, bool modal, WFlags fl) : QDialog(parent, name, modal, fl) |
37 | { | 38 | { |
38 | vm=viewmode; | 39 | vm=viewmode; |
39 | QVBoxLayout *layout = new QVBoxLayout(this); | 40 | QVBoxLayout *layout = new QVBoxLayout(this); |
@@ -57,49 +58,49 @@ UserDialog::UserDialog(int viewmode, QWidget* parent, const char* name, bool mod | |||
57 | } | 58 | } |
58 | 59 | ||
59 | /** | 60 | /** |
60 | * Empty destructor. | 61 | * Empty destructor. |
61 | * | 62 | * |
62 | */ | 63 | */ |
63 | UserDialog::~UserDialog() | 64 | UserDialog::~UserDialog() |
64 | {} | 65 | {} |
65 | 66 | ||
66 | /** | 67 | /** |
67 | * Creates the first tab, all userinfo is here. | 68 | * Creates the first tab, all userinfo is here. |
68 | * | 69 | * |
69 | */ | 70 | */ |
70 | void UserDialog::setupTab1() | 71 | void UserDialog::setupTab1() |
71 | { | 72 | { |
72 | QPixmap mypixmap; | 73 | QPixmap mypixmap; |
73 | QWidget *tabpage = new QWidget(myTabWidget,"page1"); | 74 | QWidget *tabpage = new QWidget(myTabWidget,"page1"); |
74 | QVBoxLayout *layout = new QVBoxLayout(tabpage); | 75 | QVBoxLayout *layout = new QVBoxLayout(tabpage); |
75 | layout->setMargin(5); | 76 | layout->setMargin(5); |
76 | 77 | ||
77 | // Picture | 78 | // Picture |
78 | picturePushButton = new QPushButton(tabpage,"Label"); | 79 | picturePushButton = new QPushButton(tabpage,"Label"); |
79 | picturePushButton->setMinimumSize(48,48); | 80 | picturePushButton->setMinimumSize(48,48); |
80 | picturePushButton->setMaximumSize(48,48); | 81 | picturePushButton->setMaximumSize(48,48); |
81 | picturePushButton->setPixmap(Resource::loadPixmap("usermanager/usericon")); // Load default usericon. | 82 | picturePushButton->setPixmap(Opie::Core::OResource::loadPixmap("usermanager/usericon")); // Load default usericon. |
82 | connect(picturePushButton,SIGNAL(clicked()),this,SLOT(clickedPicture())); // Clicking the picture should invoke pictureselector. | 83 | connect(picturePushButton,SIGNAL(clicked()),this,SLOT(clickedPicture())); // Clicking the picture should invoke pictureselector. |
83 | 84 | ||
84 | // Login | 85 | // Login |
85 | QLabel *loginLabel=new QLabel(tabpage,"Login: "); | 86 | QLabel *loginLabel=new QLabel(tabpage,"Login: "); |
86 | loginLabel->setText("Login: "); | 87 | loginLabel->setText("Login: "); |
87 | loginLineEdit=new QLineEdit(tabpage,"Login: "); | 88 | loginLineEdit=new QLineEdit(tabpage,"Login: "); |
88 | 89 | ||
89 | // UID | 90 | // UID |
90 | QLabel *uidLabel=new QLabel(tabpage,"uid: "); | 91 | QLabel *uidLabel=new QLabel(tabpage,"uid: "); |
91 | uidLabel->setText("UserID: "); | 92 | uidLabel->setText("UserID: "); |
92 | uidLineEdit=new QLineEdit(tabpage,"uid: "); | 93 | uidLineEdit=new QLineEdit(tabpage,"uid: "); |
93 | uidLineEdit->setEnabled(false); | 94 | uidLineEdit->setEnabled(false); |
94 | 95 | ||
95 | // Username (gecos) | 96 | // Username (gecos) |
96 | QLabel *gecosLabel=new QLabel(tabpage,"gecos"); | 97 | QLabel *gecosLabel=new QLabel(tabpage,"gecos"); |
97 | gecosLabel->setText("Username: "); | 98 | gecosLabel->setText("Username: "); |
98 | gecosLineEdit=new QLineEdit(tabpage,"gecos"); | 99 | gecosLineEdit=new QLineEdit(tabpage,"gecos"); |
99 | 100 | ||
100 | // Password | 101 | // Password |
101 | QLabel *passwordLabel=new QLabel(tabpage,"password"); | 102 | QLabel *passwordLabel=new QLabel(tabpage,"password"); |
102 | passwordLabel->setText("Password: "); | 103 | passwordLabel->setText("Password: "); |
103 | passwordLineEdit=new QLineEdit(tabpage,"password"); | 104 | passwordLineEdit=new QLineEdit(tabpage,"password"); |
104 | passwordLineEdit->setEchoMode(QLineEdit::Password); | 105 | passwordLineEdit->setEchoMode(QLineEdit::Password); |
105 | 106 | ||