1 /***************************************************************************
2 * Copyright (C) 2007 by Juan González Aguilera *
3 * (kde_devel@opsiland.info) *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU Library General Public License as *
7 * published by the Free Software Foundation; either version 2 of the *
8 * License, or (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU Library General Public *
16 * License along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
24 #include <QMainWindow>
25 #include "ui_usermanager.h"
29 * Application to manage RFID-based users.
30 * This class allows to:
31 * - Add users to the system database.
32 * - Edit an existing user from the system database.
33 * - Remove a existeing user from the system database.
34 * It uses the standard system tools to do this, and so it can be easily adapted
35 * to use different backends (like LDAP).
36 * \author Juan González Aguilera <kde_devel@opsiland.info>
38 class UserManager
: public QMainWindow
, private Ui::MainWindow
44 * Checks if it has been executed as root, if so it connects all signals and reads defaults.
45 * There is a "configured" parameter in the program settings file used to check if the user
46 * has already configured the RFID users system, if it's not set this application will show
47 * an OptionsDialog.to configure it.
48 * @param parent of this widget
49 * @param fl for this widget
51 UserManager ( QWidget
* parent
= 0, Qt::WFlags fl
= 0 );
57 /// Used to read/write the program settings. These settings are stored in a per-user way.
60 * Updates the user list when the user does any action that may change the user database.
62 void updateUserList();
65 * Shows a dialog so the user can introduce the data for a new account.
66 * \see UserPreferences
70 * Shows a dialog filled with the information of the selected user which lets
71 * the user to modify that user's data.
72 * \see UserPreferences
76 * Called when the user wants to remove an existing user from the system.
77 * It asks the user to confirm the user removal, and once confirmed asks about
78 * removing the user's home folder too.
82 * Shows a dialog allowing the user to modify the program's preferences.
84 void preferencesSlot();
86 * Called when the user selection changes in some way.
87 * It enables/disables buttons (edituser&rmuser) depending on the current selection.
89 void activateButtonsSlot();