summaryrefslogtreecommitdiff
path: root/noncore/settings/usermanager/usermanager.h
blob: 678d1f982c420730a710c579a987430398410229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef USERCONFIG_H
#define USERCONFIG_H

#include <qmainwindow.h>
#include <qtabwidget.h>
#include <qlistview.h>
#include <qpopupmenu.h>                       
#include <qtoolbutton.h>

#include <qtoolbar.h>

#include "userdialog.h"
#include "groupdialog.h"
#include "passwd.h"

class UserConfig : public QMainWindow
{
	Q_OBJECT
	
public:
	static QString appName() { return QString::fromLatin1("usermanager"); }
	UserConfig( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
	~UserConfig();

private:
	QToolButton *adduserToolButton;
	QToolButton *edituserToolButton;
	QToolButton *deleteuserToolButton;
	QToolButton *addgroupToolButton;
	QToolButton *editgroupToolButton;
	QToolButton *deletegroupToolButton;
	QTabWidget *myTabWidget;
	QListView *usersIconView;
	QListView *usersListView;
	QListView *groupsListView;
	QPopupMenu userPopupMenu;
	QPopupMenu groupPopupMenu;
	int availableUID;
	int availableGID;
	void setupTabAccounts();
	void setupTabAllUsers();
	void setupTabAllGroups();
	void setupTabPrefs();
	void setupTabAbout();
	void getUsers();
	void getGroups();
	
private slots:
	void addUser();
	void editUser();
	void delUser();
	void addGroup();
	void editGroup();
	void delGroup();
	void showUserMenu(QListViewItem *item);
};

#endif // USERCONFIG_H