Mercurial > trustbridge
comparison ui/certificateitemwidget.h @ 706:6bb3018b966d
Merged
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Wed, 02 Jul 2014 11:57:32 +0200 |
parents | 31c3d2bc9880 |
children | 9c4543128666 |
comparison
equal
deleted
inserted
replaced
705:ff2efc1cb8fa | 706:6bb3018b966d |
---|---|
15 #include <QWidget> | 15 #include <QWidget> |
16 #include <QLabel> | 16 #include <QLabel> |
17 #include <QComboBox> | 17 #include <QComboBox> |
18 | 18 |
19 #include "certificate.h" | 19 #include "certificate.h" |
20 /** @brief A combo box that shows the text only in the popup | |
21 * | |
22 * The text shown is the data set as Qt::UserRole | |
23 */ | |
24 class IconOnlyTextPopupBox : public QComboBox | |
25 { | |
26 protected: | |
27 virtual void showPopup(); | |
28 virtual void hidePopup(); | |
29 }; | |
30 | |
20 | 31 |
21 class CertificateItemWidget : public QWidget | 32 class CertificateItemWidget : public QWidget |
22 { | 33 { |
23 Q_OBJECT | 34 Q_OBJECT |
24 public: | 35 public: |
39 | 50 |
40 Certificate mCertificate; | 51 Certificate mCertificate; |
41 bool mState; | 52 bool mState; |
42 bool mEditable; | 53 bool mEditable; |
43 QLabel *mLabel; | 54 QLabel *mLabel; |
44 QComboBox *mComboBox; | 55 IconOnlyTextPopupBox *mComboBox; |
45 QString mInstallLabel; | 56 QString mInstallLabel; |
46 QString mRemoveLabel; | 57 QString mRemoveLabel; |
47 | 58 |
48 private slots: | 59 private slots: |
49 void currentStateChanged(int ndx); | 60 void currentStateChanged(int ndx); |