summaryrefslogtreecommitdiff
path: root/noncore/settings/usermanager/usermanager.cpp
Unidiff
Diffstat (limited to 'noncore/settings/usermanager/usermanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/usermanager/usermanager.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/settings/usermanager/usermanager.cpp b/noncore/settings/usermanager/usermanager.cpp
index 5c90525..5411995 100644
--- a/noncore/settings/usermanager/usermanager.cpp
+++ b/noncore/settings/usermanager/usermanager.cpp
@@ -1,61 +1,60 @@
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 "usermanager.h" 10#include "usermanager.h"
11 11
12#include <qlayout.h> 12#include <qlayout.h>
13#include <stdio.h>
14 13
15#include <qmessagebox.h> 14#include <qmessagebox.h>
16#include <qfile.h> 15#include <qfile.h>
17#include <qpe/resource.h> 16#include <qpe/resource.h>
18 17
19#include <qregexp.h> 18#include <qregexp.h>
20 19
21/** 20/**
22 * The mainwindow constructor. 21 * The mainwindow constructor.
23 * 22 *
24 * @param QWidget *parent 23 * @param QWidget *parent
25 * @param const char *name 24 * @param const char *name
26 * @ param WFlags fl 25 * @ param WFlags fl
27 * 26 *
28 */ 27 */
29UserConfig::UserConfig(QWidget* parent, const char* name, WFlags fl) : QMainWindow(parent, name, fl) { 28UserConfig::UserConfig(QWidget* parent, const char* name, WFlags fl) : QMainWindow(parent, name, fl) {
30 setCaption(tr("Opie User Manager")); 29 setCaption(tr("Opie User Manager"));
31 30
32 // Create an instance of the global object 'accounts'. This holds all user/group info, and functions to modify them. 31 // Create an instance of the global object 'accounts'. This holds all user/group info, and functions to modify them.
33 accounts=new Passwd(); 32 accounts=new Passwd();
34 accounts->open();// This actually loads the files /etc/passwd & /etc/group into memory. 33 accounts->open();// This actually loads the files /etc/passwd & /etc/group into memory.
35 34
36 // Create the toolbar. 35 // Create the toolbar.
37 QToolBar *toolbar = new QToolBar(this,"Toolbar"); 36 QToolBar *toolbar = new QToolBar(this,"Toolbar");
38 toolbar->setHorizontalStretchable(1); // Is there any other way to get the toolbar to stretch of the full screen!? 37 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"); 38 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"); 39 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"); 40 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"); 41 QToolButton *userstext = new QToolButton(0,"User",0,0,0,toolbar,"User");
43 userstext->setUsesTextLabel(true); 42 userstext->setUsesTextLabel(true);
44 toolbar->addSeparator(); 43 toolbar->addSeparator();
45 addgroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/addgroup"),"Add Group",0,this,SLOT(addGroup()),toolbar,"Add Group"); 44 addgroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/addgroup"),"Add Group",0,this,SLOT(addGroup()),toolbar,"Add Group");
46 editgroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/editgroup"),"Edit Group",0,this,SLOT(editGroup()),toolbar,"Edit Group"); 45 editgroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/editgroup"),"Edit Group",0,this,SLOT(editGroup()),toolbar,"Edit Group");
47 deletegroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/deletegroup"),"Delete Group",0,this,SLOT(delGroup()),toolbar,"Delete Group"); 46 deletegroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/deletegroup"),"Delete Group",0,this,SLOT(delGroup()),toolbar,"Delete Group");
48 QToolButton *groupstext = new QToolButton(0,"Group",0,0,0,toolbar,"Group"); 47 QToolButton *groupstext = new QToolButton(0,"Group",0,0,0,toolbar,"Group");
49 groupstext->setUsesTextLabel(true); 48 groupstext->setUsesTextLabel(true);
50 addToolBar(toolbar,"myToolBar"); 49 addToolBar(toolbar,"myToolBar");
51 50
52 // Add a tabwidget and all the tabs. 51 // Add a tabwidget and all the tabs.
53 myTabWidget = new QTabWidget(this,"My Tab Widget"); 52 myTabWidget = new QTabWidget(this,"My Tab Widget");
54 setupTabAccounts(); 53 setupTabAccounts();
55 setupTabAllUsers(); 54 setupTabAllUsers();
56 setupTabAllGroups(); 55 setupTabAllGroups();
57 userPopupMenu.insertItem("Copy",0); 56 userPopupMenu.insertItem("Copy",0);
58 57
59 getUsers(); // Fill out the iconview & listview with all users. 58 getUsers(); // Fill out the iconview & listview with all users.
60 getGroups(); // Fill out the group listview with all groups. 59 getGroups(); // Fill out the group listview with all groups.
61 60