00001 /*************************************************************************** 00002 * * 00003 * This program is free software; you can redistribute it and/or modify * 00004 * it under the terms of the GNU General Public License as published by * 00005 * the Free Software Foundation; either version 2 of the License, or * 00006 * (at your option) any later version. * 00007 * * 00008 ***************************************************************************/ 00009 00010 #ifndef USERCONFIG_H 00011 #define USERCONFIG_H 00012 00013 #include <qmainwindow.h> 00014 #include <qtabwidget.h> 00015 #include <qlistview.h> 00016 #include <qpopupmenu.h> 00017 #include <qtoolbutton.h> 00018 00019 #include <qtoolbar.h> 00020 00021 #include "userdialog.h" 00022 #include "groupdialog.h" 00023 #include "passwd.h" 00024 00025 class UserConfig : public QMainWindow 00026 { 00027 Q_OBJECT 00028 00029 public: 00030 static QString appName() { return QString::fromLatin1("usermanager"); } 00031 UserConfig( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 00032 ~UserConfig(); 00033 00034 private: 00035 QToolButton *adduserToolButton; 00036 QToolButton *edituserToolButton; 00037 QToolButton *deleteuserToolButton; 00038 QToolButton *addgroupToolButton; 00039 QToolButton *editgroupToolButton; 00040 QToolButton *deletegroupToolButton; 00041 QTabWidget *myTabWidget; 00042 QListView *usersIconView; 00043 QListView *usersListView; 00044 QListView *groupsListView; 00045 QPopupMenu userPopupMenu; 00046 QPopupMenu groupPopupMenu; 00047 int availableUID; 00048 int availableGID; 00049 void setupTabAccounts(); 00050 void setupTabAllUsers(); 00051 void setupTabAllGroups(); 00052 void setupTabPrefs(); 00053 void setupTabAbout(); 00054 void getUsers(); 00055 void getGroups(); 00056 00057 private slots: 00058 void addUser(); 00059 void editUser(); 00060 void delUser(); 00061 void addGroup(); 00062 void editGroup(); 00063 void delGroup(); 00064 void showUserMenu(QListViewItem *item); 00065 }; 00066 00067 #endif // USERCONFIG_H
1.4.2