summaryrefslogtreecommitdiff
path: root/noncore/settings/usermanager
Unidiff
Diffstat (limited to 'noncore/settings/usermanager') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/usermanager/userdialog.cpp2
-rw-r--r--noncore/settings/usermanager/userdialog.h1
-rw-r--r--noncore/settings/usermanager/usermanager.cpp2
-rw-r--r--noncore/settings/usermanager/usermanager.pro2
4 files changed, 4 insertions, 3 deletions
diff --git a/noncore/settings/usermanager/userdialog.cpp b/noncore/settings/usermanager/userdialog.cpp
index c06f639..19b0e84 100644
--- a/noncore/settings/usermanager/userdialog.cpp
+++ b/noncore/settings/usermanager/userdialog.cpp
@@ -416,25 +416,25 @@ void UserDialog::accept() {
416 if(loginLineEdit->text().isEmpty()) { 416 if(loginLineEdit->text().isEmpty()) {
417 QMessageBox::information(0,"Empty Login","Please enter a login."); 417 QMessageBox::information(0,"Empty Login","Please enter a login.");
418 return; 418 return;
419 } 419 }
420 QDialog::accept(); 420 QDialog::accept();
421} 421}
422 422
423/** 423/**
424 * This slot is called when the usericon is clicked, this loads (should) the iconselector. 424 * This slot is called when the usericon is clicked, this loads (should) the iconselector.
425 * 425 *
426 */ 426 */
427void UserDialog::clickedPicture() { 427void UserDialog::clickedPicture() {
428 QString filename=OFileDialog::getOpenFileName(OFileSelector::EXTENDED,"/opt/QtPalmtop/pics"); 428 QString filename=OFileDialog::getOpenFileName(OFileSelector::EXTENDED, QString::null);
429 if(!(filename.isEmpty())) { 429 if(!(filename.isEmpty())) {
430 userImage.reset(); 430 userImage.reset();
431 if(!(userImage.load(filename))) { 431 if(!(userImage.load(filename))) {
432 QMessageBox::information(0,"Sorry!","That icon could not be loaded.\nLoading failed on: "+filename); 432 QMessageBox::information(0,"Sorry!","That icon could not be loaded.\nLoading failed on: "+filename);
433 } else { 433 } else {
434 // userImage=userImage.smoothScale(48,48); 434 // userImage=userImage.smoothScale(48,48);
435 QPixmap *picture; 435 QPixmap *picture;
436 picture=(QPixmap *)picturePushButton->pixmap(); 436 picture=(QPixmap *)picturePushButton->pixmap();
437 picture->convertFromImage(userImage,0); 437 picture->convertFromImage(userImage,0);
438 picturePushButton->update(); 438 picturePushButton->update();
439 } 439 }
440 } 440 }
diff --git a/noncore/settings/usermanager/userdialog.h b/noncore/settings/usermanager/userdialog.h
index b7b925d..3272afc 100644
--- a/noncore/settings/usermanager/userdialog.h
+++ b/noncore/settings/usermanager/userdialog.h
@@ -7,24 +7,25 @@
7 * * 7 * *
8 ***************************************************************************/ 8 ***************************************************************************/
9#ifndef USERDIALOG_H 9#ifndef USERDIALOG_H
10#define USERDIALOG_H 10#define USERDIALOG_H
11 11
12#include <qdialog.h> 12#include <qdialog.h>
13#include <qlineedit.h> 13#include <qlineedit.h>
14#include <qcombobox.h> 14#include <qcombobox.h>
15#include <qlistview.h> 15#include <qlistview.h>
16#include <qtabwidget.h> 16#include <qtabwidget.h>
17#include <qpushbutton.h> 17#include <qpushbutton.h>
18#include <qcheckbox.h> 18#include <qcheckbox.h>
19#include <qlabel.h>
19 20
20#include <qpe/resource.h> 21#include <qpe/resource.h>
21 22
22#include <opie/ofiledialog.h> 23#include <opie/ofiledialog.h>
23 24
24class UserDialog : public QDialog 25class UserDialog : public QDialog
25{ 26{
26 Q_OBJECT 27 Q_OBJECT
27private: 28private:
28 QTabWidget *myTabWidget; 29 QTabWidget *myTabWidget;
29 QPushButton *picturePushButton; 30 QPushButton *picturePushButton;
30 QLineEdit *loginLineEdit; 31 QLineEdit *loginLineEdit;
diff --git a/noncore/settings/usermanager/usermanager.cpp b/noncore/settings/usermanager/usermanager.cpp
index 1946013..65bbd8b 100644
--- a/noncore/settings/usermanager/usermanager.cpp
+++ b/noncore/settings/usermanager/usermanager.cpp
@@ -18,25 +18,25 @@
18 18
19#include <qregexp.h> 19#include <qregexp.h>
20 20
21/** 21/**
22 * The mainwindow constructor. 22 * The mainwindow constructor.
23 * 23 *
24 * @param QWidget *parent 24 * @param QWidget *parent
25 * @param const char *name 25 * @param const char *name
26 * @ param WFlags fl 26 * @ param WFlags fl
27 * 27 *
28 */ 28 */
29UserConfig::UserConfig(QWidget* parent, const char* name, WFlags fl) : QMainWindow(parent, name, fl) { 29UserConfig::UserConfig(QWidget* parent, const char* name, WFlags fl) : QMainWindow(parent, name, fl) {
30 setCaption(tr("OPIE User Manager")); 30 setCaption(tr("Opie User Manager"));
31 31
32 // Create an instance of the global object 'accounts'. This holds all user/group info, and functions to modify them. 32 // Create an instance of the global object 'accounts'. This holds all user/group info, and functions to modify them.
33 accounts=new Passwd(); 33 accounts=new Passwd();
34 accounts->open();// This actually loads the files /etc/passwd & /etc/group into memory. 34 accounts->open();// This actually loads the files /etc/passwd & /etc/group into memory.
35 35
36 // Create the toolbar. 36 // Create the toolbar.
37 QPEToolBar *toolbar = new QPEToolBar(this,"Toolbar"); 37 QPEToolBar *toolbar = new QPEToolBar(this,"Toolbar");
38 toolbar->setHorizontalStretchable(1); // Is there any other way to get the toolbar to stretch of the full screen!? 38 toolbar->setHorizontalStretchable(1); // Is there any other way to get the toolbar to stretch of the full screen!?
39 adduserToolButton = new QToolButton(Resource::loadPixmap("usermanager/adduser"),"Add User",0,this,SLOT(addUser()),toolbar,"Add User"); 39 adduserToolButton = new QToolButton(Resource::loadPixmap("usermanager/adduser"),"Add User",0,this,SLOT(addUser()),toolbar,"Add User");
40 edituserToolButton = new QToolButton(Resource::loadPixmap("usermanager/edituser"),"Edit User",0,this,SLOT(editUser()),toolbar,"Edit User"); 40 edituserToolButton = new QToolButton(Resource::loadPixmap("usermanager/edituser"),"Edit User",0,this,SLOT(editUser()),toolbar,"Edit User");
41 deleteuserToolButton = new QToolButton(Resource::loadPixmap("usermanager/deleteuser"),"Delete User",0,this,SLOT(delUser()),toolbar,"Delete User"); 41 deleteuserToolButton = new QToolButton(Resource::loadPixmap("usermanager/deleteuser"),"Delete User",0,this,SLOT(delUser()),toolbar,"Delete User");
42 QToolButton *userstext = new QToolButton(0,"User",0,0,0,toolbar,"User"); 42 QToolButton *userstext = new QToolButton(0,"User",0,0,0,toolbar,"User");
diff --git a/noncore/settings/usermanager/usermanager.pro b/noncore/settings/usermanager/usermanager.pro
index 576a233..1baccb6 100644
--- a/noncore/settings/usermanager/usermanager.pro
+++ b/noncore/settings/usermanager/usermanager.pro
@@ -1,17 +1,17 @@
1 TEMPLATE= app 1 TEMPLATE= app
2 #CONFIG = qt warn_on debug 2 #CONFIG = qt warn_on debug
3 CONFIG = qt warn_on release 3 CONFIG = qt warn_on release
4 HEADERS = usermanager.h userdialog.h groupdialog.h passwd.h 4 HEADERS = usermanager.h userdialog.h groupdialog.h passwd.h
5 SOURCES = usermanager.cpp userdialog.cpp groupdialog.cpp passwd.cpp main.cpp 5 SOURCES = usermanager.cpp userdialog.cpp groupdialog.cpp passwd.h main.cpp
6 INCLUDEPATH+= $(OPIEDIR)/include 6 INCLUDEPATH+= $(OPIEDIR)/include
7 DEPENDPATH+= $(OPIEDIR)/include 7 DEPENDPATH+= $(OPIEDIR)/include
8LIBS += -lqpe -lopie -lcrypt 8LIBS += -lqpe -lopie -lcrypt
9 TARGET = usermanager 9 TARGET = usermanager
10DESTDIR = $(OPIEDIR)/bin 10DESTDIR = $(OPIEDIR)/bin
11 11
12TRANSLATIONS = ../../../i18n/de/usermanager.ts \ 12TRANSLATIONS = ../../../i18n/de/usermanager.ts \
13 ../../../i18n/nl/usermanager.ts \ 13 ../../../i18n/nl/usermanager.ts \
14 ../../../i18n/xx/usermanager.ts \ 14 ../../../i18n/xx/usermanager.ts \
15 ../../../i18n/en/usermanager.ts \ 15 ../../../i18n/en/usermanager.ts \
16 ../../../i18n/es/usermanager.ts \ 16 ../../../i18n/es/usermanager.ts \
17 ../../../i18n/fr/usermanager.ts \ 17 ../../../i18n/fr/usermanager.ts \