add more spacing
[personal-kdebase.git] / apps / kdepasswd / kcm / chfacedlg.h
blobc389e49bf53ff3b79fd2190362ca015156f1bbd7
1 /**
2 * Copyright 2003 Braden MacDonald <bradenm_k@shaw.ca>
3 * Copyright 2003 Ravikiran Rajagopal <ravi@ee.eng.ohio-state.edu>
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 * Please see the README
23 /**
24 * @file UserInfo-chface: Dialog for choosing a new face for your user.
25 * @author Braden MacDonald
28 #ifndef CHFACEDLG_H
29 #define CHFACEDLG_H
31 #include <QtCore/QObject>
32 #include <QtGui/QPixmap>
34 #include <KDialog>
36 #include "ui_faceDlg.h"
38 enum FacePerm { adminOnly = 1, adminFirst = 2, userFirst = 3, userOnly = 4};
40 class ChFaceDlg : public KDialog
42 Q_OBJECT
43 public:
46 explicit ChFaceDlg(const QString& picsdirs,
47 QWidget *parent=0);
50 QPixmap getFaceImage() const
52 if(ui.m_FacesWidget->currentItem())
53 return ui.m_FacesWidget->currentItem()->icon().pixmap(64);
54 else
55 return QPixmap();
58 private Q_SLOTS:
59 void slotFaceWidgetSelectionChanged( QListWidgetItem *item )
60 { enableButton( Ok, !item->icon().isNull() ); }
62 void slotGetCustomImage();
63 //void slotSaveCustomImage();
65 private:
66 void addCustomPixmap( const QString &imPath, bool saveCopy );
68 Ui::faceDlg ui;
71 #endif // CHFACEDLG_H