Mercurial > trustbridge
comparison ui/certificateitemwidget.h @ 701:31c3d2bc9880
(Issue22) Fix painting problems with fixed size in windows style.
We now use fusion style also on Windows for the combobox to
let it be shown in the same way as we do on GNU/Linux.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 02 Jul 2014 11:26:42 +0200 |
parents | 973a7ce19658 |
children | 9c4543128666 |
comparison
equal
deleted
inserted
replaced
700:bf87feccb26c | 701:31c3d2bc9880 |
---|---|
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); |