VirtualBox

Ignore:
Timestamp:
Mar 18, 2009 4:53:59 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: 3627: Shorten error dialogs. Added support for chained-messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/QIMessageBox.h

    r17108 r18071  
    2828
    2929/* Qt includes */
     30#include <QCheckBox>
    3031#include <QMessageBox>
    31 #include <QCheckBox>
    3232#include <QTextEdit>
    3333
     
    4242class QPushButton;
    4343class QSpacerItem;
    44 class QToolButton;
    45 class QVBoxLayout;
    46 
    47 /** @class QIArrowButton
    48  *
    49  *  The QIArrowButton class is an arrow tool-botton with text-label.
    50  *  It is declared here until moved into separate file in case
    51  *  of it will be used somewhere except problem-reporter dialog.
    52  */
    53 class QIArrowButton : public QWidget
    54 {
    55     Q_OBJECT;
    56 
    57 public:
    58 
    59     QIArrowButton (const QString &aName, QWidget *aParent = 0);
    60 
    61     bool isExpanded() const;
    62 
    63     void animateClick();
    64 
    65 signals:
    66 
    67     void clicked();
    68 
    69 private slots:
    70 
    71     void buttonClicked();
    72 
    73 private:
    74 
    75     void updateIcon();
    76 
    77     bool eventFilter (QObject *aObject, QEvent *aEvent);
    78 
    79     void paintEvent (QPaintEvent *aEvent);
    80 
    81     bool mIsExpanded;
    82     QToolButton *mButton;
    83     QLabel *mLabel;
    84 };
    85 
    86 /** @class QIArrowSplitter
    87  *
    88  *  The QIArrowSplitter class is a folding widget placeholder.
    89  *  It is declared here until moved into separate file in case
    90  *  of it will be used somewhere except problem-reporter dialog.
    91  */
    92 class QIArrowSplitter : public QWidget
    93 {
    94     Q_OBJECT;
    95 
    96 public:
    97 
    98     QIArrowSplitter (QWidget *aParent = 0);
    99 
    100     void addWidget (const QString &aName, QWidget *aWidget);
    101 
    102 public slots:
    103 
    104     void toggleWidget();
    105 
    106 private:
    107 
    108     bool eventFilter (QObject *aObject, QEvent *aEvent);
    109 
    110     QVBoxLayout *mMainLayout;
    111     QList <QIArrowButton*> mButtonsList;
    112     QList <QWidget*> mWidgetsList;
    113 };
    11444
    11545/** @class QIMessageBox
     
    16292    void setDetailsText (const QString &aText);
    16393
    164     bool isDetailsShown() const { return mDetailsVBox->isVisible(); }
    165     void setDetailsShown (bool aShown);
    166 
    16794    QPixmap standardPixmap (QIMessageBox::Icon aIcon);
    16895
     
    174101    void showEvent (QShowEvent *e);
    175102
     103    void refreshDetails();
     104    void setDetailsShown (bool aShown);
     105
    176106private slots:
     107
     108    void detailsBack();
     109    void detailsNext();
    177110
    178111    void done0() { mWasDone = true; done (mButton0 & ButtonMask); }
     
    194127    QSpacerItem *mSpacer;
    195128    QIDialogButtonBox *mButtonBox;
     129    QString mText;
     130    QList < QPair <QString, QString> > mDetailsList;
     131    int mDetailsIndex;
    196132    bool mWasDone : 1;
    197133    bool mWasPolished : 1;
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