kgpg
keyinfodialog.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KGPGKEYINFODIALOG_H
00019 #define KGPGKEYINFODIALOG_H
00020
00021 #include <QPixmap>
00022 #include <QString>
00023 #include <QLabel>
00024 #include <QColor>
00025 #include <QDate>
00026
00027 #include <KComboBox>
00028 #include <KDialog>
00029
00030 class QCheckBox;
00031 class QGroupBox;
00032
00033 class KDatePicker;
00034 class KUrlLabel;
00035
00036 class KgpgInterface;
00037
00038 class KgpgTrustLabel : public QWidget
00039 {
00040 Q_OBJECT
00041
00042 public:
00043 explicit KgpgTrustLabel(QWidget *parent = 0, const QString &text = QString(), const QColor &color = QColor());
00044
00045 void setText(const QString &text);
00046 void setColor(const QColor &color);
00047
00048 QString text() const;
00049 QColor color() const;
00050
00051 private:
00052 void change();
00053
00054 QLabel *m_text_w;
00055 QLabel *m_color_w;
00056
00057 QString m_text;
00058 QColor m_color;
00059 };
00060
00061 class KgpgDateDialog : public KDialog
00062 {
00063 Q_OBJECT
00064
00065 public:
00066 explicit KgpgDateDialog(QWidget *parent = 0, const bool &unlimited = false, QDate date = QDate::currentDate());
00067
00068 QDate date() const;
00069 bool unlimited() const;
00070
00071 private slots:
00072 void slotCheckDate(const QDate &date);
00073 void slotEnableDate(const bool &ison);
00074
00075 private:
00076 QCheckBox *m_unlimited;
00077 KDatePicker *m_datepicker;
00078 };
00079
00080 class KgpgKeyInfo : public KDialog
00081 {
00082 Q_OBJECT
00083
00084 public:
00085 explicit KgpgKeyInfo(const QString &keyid, QWidget *parent = 0);
00086
00087 signals:
00088 void keyNeedsRefresh(const QString &keyid);
00089
00090 private:
00091 QGroupBox *_keypropertiesGroup(QWidget *parent);
00092 QGroupBox *_photoGroup(QWidget *parent);
00093 QGroupBox *_buttonsGroup(QWidget *parent);
00094 QGroupBox *_fingerprintGroup(QWidget *parent);
00095
00096 void loadKey();
00097
00098 private slots:
00099 void slotPreOk();
00100 void slotOpenUrl(const QString &url) const;
00101
00102 void slotChangeDate();
00103 void slotInfoExpirationChanged(const int &res, KgpgInterface *interface);
00104
00105 void slotDisableKey(const bool &ison);
00106 void slotDisableKeyFinished(KgpgInterface *interface, int);
00107
00108 void slotChangePass();
00109 void slotInfoPasswordChanged(const int &res, KgpgInterface *interface);
00110
00111 void slotChangeTrust(const int &newtrust);
00112 void slotInfoTrustChanged(KgpgInterface *interface);
00113
00114 void slotLoadPhoto(const QString &uid);
00115 void slotSetPhoto(const QPixmap &pixmap, KgpgInterface *interface);
00116
00117 private:
00118 QString m_keyid;
00119 QDate m_expirationdate;
00120
00121 QCheckBox *m_disable;
00122 QLabel *m_name;
00123 QLabel *m_id;
00124 QLabel *m_comment;
00125 QLabel *m_creation;
00126 QLabel *m_expiration;
00127 QLabel *m_algorithm;
00128 QLabel *m_length;
00129 QLabel *m_fingerprint;
00130 QLabel *m_photo;
00131
00132 KUrlLabel *m_email;
00133 KComboBox *m_photoid;
00134 KComboBox *m_owtrust;
00135
00136 KgpgTrustLabel *m_trust;
00137
00138 bool m_hasphoto;
00139 bool m_isunlimited;
00140 bool m_keywaschanged;
00141 };
00142
00143 #endif // KGPGKEYINFODIALOG_H