Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / kdepasswd / kcm / main.h
blob5fab9ff77bdfd81198a718d97294696e5319d8cb
2 /**
3 * Copyright (C) 2004 Frans Englich <frans.englich@telia.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (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 General Public License
16 * along with this program; if not, write to the Free Software
19 #ifndef MAIN_H
20 #define MAIN_H
22 #include <kcmodule.h>
23 #include <kemailsettings.h>
25 #include "ui_main_widget.h"
27 #include "chfacedlg.h"
29 class KUser;
30 class QEvent;
31 class QObject;
32 class KUrl;
34 class MainWidget : public QWidget, public Ui::MainWidget
36 public:
37 MainWidget( QWidget *parent ) : QWidget( parent ) {
38 setupUi( this );
43 /**
44 * Please see the README
46 class KCMUserAccount : public KCModule
48 Q_OBJECT
50 public:
51 explicit KCMUserAccount(QWidget* parent, const QVariantList& list=QVariantList());
52 ~KCMUserAccount();
54 /**
55 * The user data is loaded from chfn(/etc/password) and then
56 * written back as well as to KDE's own(KEmailSettings).
57 * The user won't notice this(assuming they change the KDE settings via
58 * this KCM) and will make KDE play nice with enviroments which uses
59 * /etc/password.
61 void load();
63 void save();
65 /**
66 * For the face button
68 bool eventFilter(QObject *, QEvent *e);
70 private Q_SLOTS:
71 void slotChangePassword();
72 //void configChanged() { emit changed(true); };
73 void slotFaceButtonClicked();
75 private:
76 void changeFace(const QPixmap& pix);
77 inline KUrl* decodeImgDrop(QDropEvent *e, QWidget *wdg);
79 KEMailSettings *_kes;
80 KUser *_ku;
81 MainWidget *_mw;
82 FacePerm _facePerm;
83 QPixmap _facePixmap;
87 #endif // MAIN_H