Proof-reading - fixed one usage of the i18n plural form (it wasn't doing before,...
[kdeadmin.git] / kuser / ku_mainview.h
blob838332a1db367f1baf8f146abe23a0c8aaf35c64
1 /*
2 * Copyright (c) 1998 Denis Perchine <dyp@perchine.com>
3 * Copyright (c) 2004 Szombathelyi GyĂśrgy <gyurco@freemail.hu>
4 * Maintained by Adriaan de Groot <groot@kde.org>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public
8 * License version 2 or at your option version 3 as published by
9 * the Free Software Foundation.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 **/
22 #ifndef _KU_MAINVIEW_H_
23 #define _KU_MAINVIEW_H_
25 #include <stdlib.h>
27 #include <QTreeView>
29 #include <ktabwidget.h>
31 #include "ku_usermodel.h"
32 #include "ku_groupmodel.h"
34 class KU_MainView : public KTabWidget {
35 Q_OBJECT
36 public:
37 KU_MainView(QWidget *parent = 0);
38 ~KU_MainView();
40 void init();
41 void setShowSys( bool b ) { mShowSys = b; }
43 bool queryClose();
45 void clearUsers();
46 void clearGroups();
47 void reloadUsers();
48 void reloadGroups();
50 public slots:
51 void slotTabChanged();
53 void userSelected();
54 void groupSelected();
56 void useradd();
57 void useredit();
58 void userdel();
60 void grpadd();
61 void grpedit();
62 void grpdel();
64 void setpwd();
66 signals:
67 void userSelected(bool);
68 void groupSelected(bool);
70 protected:
71 bool updateUsers();
72 bool updateGroups();
74 QTreeView *userview;
75 QTreeView *groupview;
77 KU_UserModel *usermodel;
78 KU_UserSortingProxyModel userproxymodel;
80 KU_GroupModel *groupmodel;
81 KU_GroupSortingProxyModel groupproxymodel;
83 bool mShowSys;
85 KU_Groups *groups;
86 KU_Users *users;
89 #endif // _KU_MAINVIEW_H_