VirtualBox

Ignore:
Timestamp:
Apr 18, 2013 1:09:08 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: Popup-center, popup-pane: Implementing main framework stuff (part 7).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.h

    r45592 r45605  
    2222/* Qt includes: */
    2323#include <QWidget>
     24#include <QMap>
    2425
    2526/* GUI includes: */
     
    3031class QLabel;
    3132class QPushButton;
    32 class QIDialogButtonBox;
    3333class UIPopupPane;
    3434class UIPopupPaneFrame;
    3535class UIPopupPaneTextPane;
     36class UIPopupPaneButtonPane;
    3637
    3738/* UIAnimationFramework namespace: */
     
    6869public:
    6970
    70     /* Constructor/destructor: */
     71    /* Constructor: */
    7172    UIPopupPane(QWidget *pParent, const QString &strId,
    7273                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);
    7675
    7776    /* API: Id stuff: */
     
    8483private slots:
    8584
    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);
    9087
    9188    /* Handler: Layout stuff: */
     
    9491private:
    9592
    96     /* Helpers: Prepare/cleanup stuff: */
     93    /* Helpers: Prepare stuff: */
    9794    void prepare();
    98     void cleanup();
     95    void prepareContent();
    9996
    10097    /* Handler: Event-filter stuff: */
     
    104101    virtual void showEvent(QShowEvent *pEvent);
    105102    virtual void polishEvent(QShowEvent *pEvent);
    106     virtual void keyPressEvent(QKeyEvent *pEvent);
    107103
    108104    /* Helper: Layout stuff: */
     
    113109    void updateLayout();
    114110
    115     /* Helpers: Prepare stuff: */
    116     void prepareContent();
    117     void prepareButtons();
    118 
    119111    /* Helper: Complete stuff: */
    120112    void done(int iButtonCode);
     
    122114    /* Static helpers: Prepare stuff: */
    123115    static int parentStatusBarHeight(QWidget *pParent);
    124     static QList<QPushButton*> createButtons(QIDialogButtonBox *pButtonBox, const QList<int> description);
    125     static QPushButton* createButton(QIDialogButtonBox *pButtonBox, int iButton);
    126116
    127117    /* Variables: */
     
    139129
    140130    /* 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;
    144132
    145133    /* Variables: Animation stuff: */
     
    150138    UIPopupPaneFrame *m_pMainFrame;
    151139    UIPopupPaneTextPane *m_pTextPane;
    152     QIDialogButtonBox *m_pButtonBox;
    153     QPushButton *m_pButton1, *m_pButton2, *m_pButton3;
     140    UIPopupPaneButtonPane *m_pButtonPane;
    154141};
    155142
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette