Changeset 45605 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.h
- Timestamp:
- Apr 18, 2013 1:09:08 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.h
r45592 r45605 22 22 /* Qt includes: */ 23 23 #include <QWidget> 24 #include <QMap> 24 25 25 26 /* GUI includes: */ … … 30 31 class QLabel; 31 32 class QPushButton; 32 class QIDialogButtonBox;33 33 class UIPopupPane; 34 34 class UIPopupPaneFrame; 35 35 class UIPopupPaneTextPane; 36 class UIPopupPaneButtonPane; 36 37 37 38 /* UIAnimationFramework namespace: */ … … 68 69 public: 69 70 70 /* Constructor /destructor: */71 /* Constructor: */ 71 72 UIPopupPane(QWidget *pParent, const QString &strId, 72 73 const QString &strMessage, const QString &strDetails, 73 int iButton1, int iButton2, int iButton3, 74 const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3); 75 ~UIPopupPane(); 74 const QMap<int, QString> &buttonDescriptions); 76 75 77 76 /* API: Id stuff: */ … … 84 83 private slots: 85 84 86 /* Handlers: Done slot variants for every button: */ 87 void done1() { done(m_iButton1 & AlertButtonMask); } 88 void done2() { done(m_iButton2 & AlertButtonMask); } 89 void done3() { done(m_iButton3 & AlertButtonMask); } 85 /* Handler: Button stuff: */ 86 void sltButtonClicked(int iButtonID); 90 87 91 88 /* Handler: Layout stuff: */ … … 94 91 private: 95 92 96 /* Helpers: Prepare /cleanupstuff: */93 /* Helpers: Prepare stuff: */ 97 94 void prepare(); 98 void cleanup();95 void prepareContent(); 99 96 100 97 /* Handler: Event-filter stuff: */ … … 104 101 virtual void showEvent(QShowEvent *pEvent); 105 102 virtual void polishEvent(QShowEvent *pEvent); 106 virtual void keyPressEvent(QKeyEvent *pEvent);107 103 108 104 /* Helper: Layout stuff: */ … … 113 109 void updateLayout(); 114 110 115 /* Helpers: Prepare stuff: */116 void prepareContent();117 void prepareButtons();118 119 111 /* Helper: Complete stuff: */ 120 112 void done(int iButtonCode); … … 122 114 /* Static helpers: Prepare stuff: */ 123 115 static int parentStatusBarHeight(QWidget *pParent); 124 static QList<QPushButton*> createButtons(QIDialogButtonBox *pButtonBox, const QList<int> description);125 static QPushButton* createButton(QIDialogButtonBox *pButtonBox, int iButton);126 116 127 117 /* Variables: */ … … 139 129 140 130 /* Variables: Button stuff: */ 141 int m_iButton1, m_iButton2, m_iButton3; 142 QString m_strButtonText1, m_strButtonText2, m_strButtonText3; 143 int m_iButtonEsc; 131 QMap<int, QString> m_buttonDescriptions; 144 132 145 133 /* Variables: Animation stuff: */ … … 150 138 UIPopupPaneFrame *m_pMainFrame; 151 139 UIPopupPaneTextPane *m_pTextPane; 152 QIDialogButtonBox *m_pButtonBox; 153 QPushButton *m_pButton1, *m_pButton2, *m_pButton3; 140 UIPopupPaneButtonPane *m_pButtonPane; 154 141 }; 155 142
Note:
See TracChangeset
for help on using the changeset viewer.