VirtualBox

Changeset 45303 in vbox for trunk/src


Ignore:
Timestamp:
Apr 3, 2013 10:21:45 AM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: QIMessageBox cleanup/rework (part 4).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/extensions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp

    r45297 r45303  
    77
    88/*
    9  * Copyright (C) 2006-2012 Oracle Corporation
     9 * Copyright (C) 2006-2013 Oracle Corporation
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4040#endif /* Q_WS_MAC */
    4141
    42 QIMessageBox::QIMessageBox(const QString &strCaption, const QString &strMessage, AlertIconType icon,
     42QIMessageBox::QIMessageBox(const QString &strCaption, const QString &strMessage, AlertIconType iconType,
    4343                           int iButton1 /*= 0*/, int iButton2 /*= 0*/, int iButton3 /*= 0*/, QWidget *pParent /*= 0*/)
    4444    : QIDialog(pParent)
    45     , mButton1(iButton1)
    46     , mButton2(iButton2)
    47     , mButton3(iButton3)
     45    , m_iButton1(iButton1)
     46    , m_iButton2(iButton2)
     47    , m_iButton3(iButton3)
     48    , m_iButtonEsc(0)
     49    , m_iconType(iconType)
    4850    , m_strMessage(strMessage)
    4951    , m_iDetailsIndex(-1)
    5052    , m_fDone(false)
    5153{
    52     /* Set alert caption: */
     54    /* Set caption: */
    5355    setWindowTitle(strCaption);
    5456
    55     QVBoxLayout *layout = new QVBoxLayout (this);
    56 #ifdef Q_WS_MAC
    57     layout->setContentsMargins (40, 11, 40, 11);
    58 #else /* !Q_WS_MAC */
    59     VBoxGlobal::setLayoutMargin (layout, 11);
    60 #endif /* !Q_WS_MAC */
    61     layout->setSpacing (10);
    62     layout->setSizeConstraint (QLayout::SetMinimumSize);
    63 
    64     QWidget *main = new QWidget();
    65 
    66     QHBoxLayout *hLayout = new QHBoxLayout (main);
    67     VBoxGlobal::setLayoutMargin (hLayout, 0);
    68     hLayout->setSpacing (10);
    69     layout->addWidget (main);
    70 
    71     mIconLabel = new QLabel();
    72     mIconLabel->setPixmap (standardPixmap (icon));
    73     mIconLabel->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Minimum);
    74     mIconLabel->setAlignment (Qt::AlignHCenter | Qt::AlignTop);
    75     hLayout->addWidget (mIconLabel);
    76 
    77     QVBoxLayout* messageVBoxLayout = new QVBoxLayout();
    78     VBoxGlobal::setLayoutMargin (messageVBoxLayout, 0);
    79     messageVBoxLayout->setSpacing (10);
    80     hLayout->addLayout (messageVBoxLayout);
    81 
    82     mTextLabel = new QILabel (m_strMessage);
    83     mTextLabel->setAlignment (Qt::AlignLeft | Qt::AlignTop);
    84     mTextLabel->setWordWrap (true);
    85     QSizePolicy sp (QSizePolicy::Minimum, QSizePolicy::Minimum);
    86     sp.setHeightForWidth (true);
    87     mTextLabel->setSizePolicy (sp);
    88     messageVBoxLayout->addWidget (mTextLabel);
    89 
    90     mFlagCB_Main = new QCheckBox();
    91     mFlagCB_Main->hide();
    92     messageVBoxLayout->addWidget (mFlagCB_Main);
    93 
    94     mDetailsVBox = new QWidget();
    95     layout->addWidget (mDetailsVBox);
    96 
    97     QVBoxLayout* detailsVBoxLayout = new QVBoxLayout (mDetailsVBox);
    98     VBoxGlobal::setLayoutMargin (detailsVBoxLayout, 0);
    99     detailsVBoxLayout->setSpacing (10);
    100 
    101     mDetailsText = new QTextEdit();
    102     {
    103         /* Calculate the minimum size dynamically, approx.
    104          * for 40 chars, 4 lines & 2 <table> margins */
    105         QFontMetrics fm = mDetailsText->fontMetrics();
    106         mDetailsText->setMinimumSize (fm.width ('m') * 40,
    107                                       fm.lineSpacing() * 4 + 4 * 2);
    108     }
    109     mDetailsText->setReadOnly (true);
    110     mDetailsText->setSizePolicy (QSizePolicy::Expanding,
    111                                  QSizePolicy::MinimumExpanding);
    112     mDetailsSplitter = new QIArrowSplitter (mDetailsText);
    113     connect (mDetailsSplitter, SIGNAL (showBackDetails()), this, SLOT (detailsBack()));
    114     connect (mDetailsSplitter, SIGNAL (showNextDetails()), this, SLOT (detailsNext()));
    115     connect (mDetailsSplitter, SIGNAL (sigSizeChanged()), this, SLOT (sltUpdateSize()));
    116     detailsVBoxLayout->addWidget (mDetailsSplitter);
    117 
    118     mFlagCB_Details = new QCheckBox();
    119     mFlagCB_Details->hide();
    120     detailsVBoxLayout->addWidget (mFlagCB_Details);
    121 
    122     mSpacer = new QSpacerItem (0, 0);
    123     layout->addItem (mSpacer);
    124 
    125     mButtonBox = new QIDialogButtonBox;
    126     mButtonBox->setCenterButtons (true);
    127     layout->addWidget (mButtonBox);
    128 
    129     mButtonEsc = 0;
    130 
    131     mButton0PB = createButton (iButton1);
    132     if (mButton0PB)
    133         connect (mButton0PB, SIGNAL (clicked()), SLOT (done0()));
    134     mButton1PB = createButton (iButton2);
    135     if (mButton1PB)
    136         connect (mButton1PB, SIGNAL (clicked()), SLOT (done1()));
    137     mButton2PB = createButton (iButton3);
    138     if (mButton2PB)
    139         connect (mButton2PB, SIGNAL (clicked()), SLOT (done2()));
    140 
    141     /* If this is an error message add an "Copy to clipboard" button for easier
    142      * bug reports. */
    143     if (icon == AlertIconType_Critical)
    144     {
    145         QPushButton *pCopyButton = createButton(AlertButton_Copy);
    146         pCopyButton->setToolTip(tr("Copy all errors to the clipboard"));
    147         connect(pCopyButton, SIGNAL(clicked()), SLOT(copy()));
    148     }
    149 
    150     /* this call is a must -- it initializes mFlagCB and mSpacer */
    151     setDetailsShown (false);
     57    /* Set focus to dialog initially: */
     58    setFocus();
     59
     60    /* Prepare content: */
     61    prepareContent();
    15262}
    15363
     
    16272    switch (aButton)
    16373    {
    164         case 0: if (mButton0PB) return mButton0PB->text(); break;
    165         case 1: if (mButton1PB) return mButton1PB->text(); break;
    166         case 2: if (mButton2PB) return mButton2PB->text(); break;
     74        case 0: if (m_pButton1) return m_pButton1->text(); break;
     75        case 1: if (m_pButton2) return m_pButton2->text(); break;
     76        case 2: if (m_pButton3) return m_pButton3->text(); break;
    16777        default: break;
    16878    }
     
    18292    switch (aButton)
    18393    {
    184         case 0: if (mButton0PB) mButton0PB->setText (aText); break;
    185         case 1: if (mButton1PB) mButton1PB->setText (aText); break;
    186         case 2: if (mButton2PB) mButton2PB->setText (aText); break;
     94        case 0: if (m_pButton1) m_pButton1->setText (aText); break;
     95        case 1: if (m_pButton2) m_pButton2->setText (aText); break;
     96        case 2: if (m_pButton3) m_pButton3->setText (aText); break;
    18797        default: break;
    18898    }
     
    206116    if (aText.isNull())
    207117    {
    208         mFlagCB->hide();
     118        m_pFlagCheckBox->hide();
    209119    }
    210120    else
    211121    {
    212         mFlagCB->setText (aText);
    213         mFlagCB->show();
    214         mFlagCB->setFocus();
    215     }
    216 }
    217 
    218 /** @fn QIMessageBox::isFlagChecked() const
    219  *
    220  *  Returns true if the optional message box flag is checked and false
    221  *  otherwise. By default, the flag is not checked.
    222  *
    223  *  @see #setFlagChecked()
    224  *  @see #setFlagText()
    225  */
    226 
    227 /** @fn QIMessageBox::setFlagChecked (bool)
    228  *
    229  *  Sets the state of the optional message box flag to a value of the argument.
    230  *
    231  *  @see #isFlagChecked()
    232  *  @see #setFlagText()
    233  */
     122        m_pFlagCheckBox->setText (aText);
     123        m_pFlagCheckBox->show();
     124        m_pFlagCheckBox->setFocus();
     125    }
     126}
     127
     128void QIMessageBox::prepareContent()
     129{
     130    /* Create main-layout: */
     131    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
     132    {
     133        /* Create top-layout: */
     134        QHBoxLayout *pTopLayout = new QHBoxLayout;
     135        {
     136            /* Create icon-label: */
     137            m_pIconLabel = new QLabel;
     138            {
     139                /* Configure label: */
     140                m_pIconLabel->setPixmap(standardPixmap(m_iconType));
     141                m_pIconLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
     142                m_pIconLabel->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
     143            }
     144            /* Create top-right layout: */
     145            QVBoxLayout *pTopRightLayout = new QVBoxLayout;
     146            {
     147                /* Create text-label: */
     148                m_pTextLabel = new QILabel(m_strMessage);
     149                {
     150                    /* Configure label: */
     151                    m_pTextLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop);
     152                    m_pTextLabel->setWordWrap(true);
     153                    QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
     154                    sizePolicy.setHeightForWidth(true);
     155                    m_pTextLabel->setSizePolicy(sizePolicy);
     156                }
     157                /* Create main check-box: */
     158                m_pFlagCheckBox_Main = new QCheckBox;
     159                {
     160                    /* Configure check-box: */
     161                    m_pFlagCheckBox_Main->hide();
     162                    m_pFlagCheckBox_Main->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
     163                }
     164                /* Configure layout: */
     165                VBoxGlobal::setLayoutMargin(pTopRightLayout, 0);
     166                pTopRightLayout->setSpacing(10);
     167                pTopRightLayout->addWidget(m_pTextLabel);
     168                pTopRightLayout->addWidget(m_pFlagCheckBox_Main);
     169            }
     170            /* Configure layout: */
     171            VBoxGlobal::setLayoutMargin(pTopLayout, 0);
     172            pTopLayout->setSpacing(10);
     173            pTopLayout->addWidget(m_pIconLabel);
     174            pTopLayout->addLayout(pTopRightLayout);
     175        }
     176        /* Create details-widget: */
     177        m_pDetailsWidget = new QWidget;
     178        {
     179            /* Create details-widget layout: */
     180            QVBoxLayout* pDetailsWidgetLayout = new QVBoxLayout(m_pDetailsWidget);
     181            {
     182                /* Create details text-view: */
     183                m_pDetailsTextView = new QTextEdit;
     184                {
     185                    /* Configure text-view: */
     186                    m_pDetailsTextView->setReadOnly(true);
     187                    m_pDetailsTextView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding);
     188                    /* Calculate the minimum size dynamically, approx. for 40 chars, 4 lines & 2 <table> margins: */
     189                    QFontMetrics fm = m_pDetailsTextView->fontMetrics();
     190                    m_pDetailsTextView->setMinimumSize(fm.width ('m') * 40, fm.lineSpacing() * 4 + 4 * 2);
     191                }
     192                /* Create details splitter: */
     193                m_pDetailsSplitter = new QIArrowSplitter(m_pDetailsTextView);
     194                {
     195                    /* Configure splitter: */
     196                    connect(m_pDetailsSplitter, SIGNAL(showBackDetails()), this, SLOT(detailsBack()));
     197                    connect(m_pDetailsSplitter, SIGNAL(showNextDetails()), this, SLOT(detailsNext()));
     198                    connect(m_pDetailsSplitter, SIGNAL(sigSizeChanged()), this, SLOT(sltUpdateSize()));
     199                }
     200                /* Create details check-box: */
     201                m_pFlagCheckBox_Details = new QCheckBox;
     202                {
     203                    /* Configure check-box: */
     204                    m_pFlagCheckBox_Details->hide();
     205                    m_pFlagCheckBox_Details->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
     206                }
     207                /* Configure layout: */
     208                VBoxGlobal::setLayoutMargin(pDetailsWidgetLayout, 0);
     209                pDetailsWidgetLayout->setSpacing(10);
     210                pDetailsWidgetLayout->addWidget(m_pDetailsSplitter);
     211                pDetailsWidgetLayout->addWidget(m_pFlagCheckBox_Details);
     212            }
     213        }
     214        /* Create button-box: */
     215        m_pButtonBox = new QIDialogButtonBox;
     216        {
     217            /* Configure button-box: */
     218            m_pButtonBox->setCenterButtons(true);
     219            m_pButton1 = createButton(m_iButton1);
     220            if (m_pButton1)
     221                connect(m_pButton1, SIGNAL(clicked()), SLOT(done1()));
     222            m_pButton2 = createButton(m_iButton2);
     223            if (m_pButton2)
     224                connect(m_pButton2, SIGNAL(clicked()), SLOT(done2()));
     225            m_pButton3 = createButton(m_iButton3);
     226            if (m_pButton3)
     227                connect(m_pButton3, SIGNAL(clicked()), SLOT(done3()));
     228            /* If this is a critical message add a "Copy to clipboard" button: */
     229            if (m_iconType == AlertIconType_Critical)
     230            {
     231                QPushButton *pCopyButton = createButton(AlertButton_Copy);
     232                pCopyButton->setToolTip(tr("Copy all errors to the clipboard"));
     233                connect(pCopyButton, SIGNAL(clicked()), SLOT(copy()));
     234            }
     235        }
     236        /* Configure layout: */
     237#ifdef Q_WS_MAC
     238        pMainLayout->setContentsMargins(40, 11, 40, 11);
     239#else /* !Q_WS_MAC */
     240        VBoxGlobal::setLayoutMargin(pMainLayout, 11);
     241#endif /* !Q_WS_MAC */
     242        pMainLayout->setSpacing(10);
     243        pMainLayout->addLayout(pTopLayout);
     244        pMainLayout->addWidget(m_pDetailsWidget);
     245        pMainLayout->addWidget(m_pButtonBox);
     246    }
     247
     248    /* Initialize m_pFlagCheckBox: */
     249    setDetailsShown(false);
     250}
    234251
    235252QPushButton *QIMessageBox::createButton (int aButton)
     
    253270    }
    254271
    255     QPushButton *b = mButtonBox->addButton (text, role);
     272    QPushButton *b = m_pButtonBox->addButton (text, role);
    256273
    257274    if (aButton & AlertButtonOption_Default)
     
    262279
    263280    if (aButton & AlertButtonOption_Escape)
    264         mButtonEsc = aButton & AlertButtonMask;
     281        m_iButtonEsc = aButton & AlertButtonMask;
    265282
    266283    return b;
     
    293310        QStringList parts (paragraph.split ("<!--EOM-->", QString::KeepEmptyParts));
    294311        AssertMsg (parts.size() == 2, ("Each paragraph should consist of 2 parts."));
    295         mDetailsList << QPair <QString, QString> (parts [0], parts [1]);
    296     }
    297 
    298     mDetailsSplitter->setMultiPaging (mDetailsList.size() > 1);
     312        m_detailsList << QPair <QString, QString> (parts [0], parts [1]);
     313    }
     314
     315    m_pDetailsSplitter->setMultiPaging (m_detailsList.size() > 1);
    299316    m_iDetailsIndex = 0;
    300317    refreshDetails();
     
    345362    /* Tune our size: */
    346363    resize(minimumSizeHint());
    347     mTextLabel->useSizeHintForWidth(mTextLabel->width());
    348     mTextLabel->updateGeometry();
     364    m_pTextLabel->useSizeHintForWidth(m_pTextLabel->width());
     365    m_pTextLabel->updateGeometry();
    349366
    350367    /* Call to base-class: */
     
    355372
    356373    /* Toggle details-widget: */
    357     mDetailsSplitter->toggleWidget();
     374    m_pDetailsSplitter->toggleWidget();
    358375}
    359376
     
    361378{
    362379    /* Update message text iteself */
    363     mTextLabel->setText (m_strMessage + mDetailsList [m_iDetailsIndex].first);
     380    m_pTextLabel->setText (m_strMessage + m_detailsList [m_iDetailsIndex].first);
    364381    /* Update details table */
    365     mDetailsText->setText (mDetailsList [m_iDetailsIndex].second);
    366     setDetailsShown (!mDetailsText->toPlainText().isEmpty());
     382    m_pDetailsTextView->setText (m_detailsList [m_iDetailsIndex].second);
     383    setDetailsShown (!m_pDetailsTextView->toPlainText().isEmpty());
    367384
    368385    /* Update multi-paging system */
    369     if (mDetailsList.size() > 1)
    370     {
    371         mDetailsSplitter->setButtonEnabled (true, m_iDetailsIndex < mDetailsList.size() - 1);
    372         mDetailsSplitter->setButtonEnabled (false, m_iDetailsIndex > 0);
     386    if (m_detailsList.size() > 1)
     387    {
     388        m_pDetailsSplitter->setButtonEnabled (true, m_iDetailsIndex < m_detailsList.size() - 1);
     389        m_pDetailsSplitter->setButtonEnabled (false, m_iDetailsIndex > 0);
    373390    }
    374391
    375392    /* Update details label */
    376     mDetailsSplitter->setName (mDetailsList.size() == 1 ? tr ("&Details") :
    377         tr ("&Details (%1 of %2)").arg (m_iDetailsIndex + 1).arg (mDetailsList.size()));
     393    m_pDetailsSplitter->setName (m_detailsList.size() == 1 ? tr ("&Details") :
     394        tr ("&Details (%1 of %2)").arg (m_iDetailsIndex + 1).arg (m_detailsList.size()));
    378395}
    379396
     
    389406    if (aShown)
    390407    {
    391         mFlagCB_Details->setVisible (mFlagCB_Main->isVisible());
    392         mFlagCB_Details->setChecked (mFlagCB_Main->isChecked());
    393         mFlagCB_Details->setText (mFlagCB_Main->text());
    394         if (mFlagCB_Main->hasFocus())
    395             mFlagCB_Details->setFocus();
    396         mFlagCB_Main->setVisible (false);
    397         mFlagCB = mFlagCB_Details;
    398         mSpacer->changeSize (0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum);
    399     }
    400 
    401     mDetailsVBox->setVisible (aShown);
     408        m_pFlagCheckBox_Details->setVisible (m_pFlagCheckBox_Main->isVisible());
     409        m_pFlagCheckBox_Details->setChecked (m_pFlagCheckBox_Main->isChecked());
     410        m_pFlagCheckBox_Details->setText (m_pFlagCheckBox_Main->text());
     411        if (m_pFlagCheckBox_Main->hasFocus())
     412            m_pFlagCheckBox_Details->setFocus();
     413        m_pFlagCheckBox_Main->setVisible (false);
     414        m_pFlagCheckBox = m_pFlagCheckBox_Details;
     415    }
     416
     417    m_pDetailsWidget->setVisible (aShown);
    402418
    403419    if (!aShown)
    404420    {
    405         mFlagCB_Main->setVisible (mFlagCB_Details->isVisible());
    406         mFlagCB_Main->setChecked (mFlagCB_Details->isChecked());
    407         mFlagCB_Main->setText (mFlagCB_Details->text());
    408         if (mFlagCB_Details->hasFocus())
    409             mFlagCB_Main->setFocus();
    410         mFlagCB = mFlagCB_Main;
    411         mSpacer->changeSize (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
     421        m_pFlagCheckBox_Main->setVisible (m_pFlagCheckBox_Details->isVisible());
     422        m_pFlagCheckBox_Main->setChecked (m_pFlagCheckBox_Details->isChecked());
     423        m_pFlagCheckBox_Main->setText (m_pFlagCheckBox_Details->text());
     424        if (m_pFlagCheckBox_Details->hasFocus())
     425            m_pFlagCheckBox_Main->setFocus();
     426        m_pFlagCheckBox = m_pFlagCheckBox_Main;
    412427    }
    413428}
     
    426441
    427442    /* Now resize message-box to the minimum possible size: */
    428     resize(minimumSizeHint());
     443    setFixedSize(minimumSizeHint());
    429444}
    430445
     
    440455void QIMessageBox::detailsNext()
    441456{
    442     if (m_iDetailsIndex < mDetailsList.size() - 1)
     457    if (m_iDetailsIndex < m_detailsList.size() - 1)
    443458    {
    444459        ++ m_iDetailsIndex;
     
    449464void QIMessageBox::reject()
    450465{
    451     if (mButtonEsc)
     466    if (m_iButtonEsc)
    452467    {
    453468        QDialog::reject();
    454         setResult (mButtonEsc & AlertButtonMask);
     469        setResult (m_iButtonEsc & AlertButtonMask);
    455470    }
    456471}
     
    460475    /* Create the error string with all errors. First the html version. */
    461476    QString strError = "<html><body><p>" + m_strMessage + "</p>";
    462     for (int i = 0; i < mDetailsList.size(); ++i)
    463         strError += mDetailsList.at(i).first + mDetailsList.at(i).second + "<br>";
     477    for (int i = 0; i < m_detailsList.size(); ++i)
     478        strError += m_detailsList.at(i).first + m_detailsList.at(i).second + "<br>";
    464479    strError += "</body></html>";
    465480    strError.remove(QRegExp("</+qt>"));
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h

    r45297 r45303  
    3232class QLabel;
    3333class QPushButton;
    34 class QSpacerItem;
    3534class QIArrowSplitter;
    3635class QIDialogButtonBox;
     
    8483
    8584    /* Constructor: */
    86     QIMessageBox(const QString &strCaption, const QString &strMessage, AlertIconType icon,
     85    QIMessageBox(const QString &strCaption, const QString &strMessage, AlertIconType iconType,
    8786                 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, QWidget *pParent = 0);
    8887
     
    9089    void setButtonText (int aButton, const QString &aText);
    9190
    92     QString flagText() const { return mFlagCB->isVisible() ? mFlagCB->text() : QString::null; }
     91    QString flagText() const { return m_pFlagCheckBox->isVisible() ? m_pFlagCheckBox->text() : QString::null; }
    9392    void setFlagText (const QString &aText);
    9493
    95     bool isFlagChecked() const { return mFlagCB->isChecked(); }
    96     void setFlagChecked (bool aChecked) { mFlagCB->setChecked (aChecked); }
     94    bool isFlagChecked() const { return m_pFlagCheckBox->isChecked(); }
     95    void setFlagChecked (bool aChecked) { m_pFlagCheckBox->setChecked (aChecked); }
    9796
    98     QString detailsText () const { return mDetailsText->toHtml(); }
     97    QString detailsText () const { return m_pDetailsTextView->toHtml(); }
    9998    void setDetailsText (const QString &aText);
    10099
     
    102101
    103102private:
     103
     104    /* Helper: Prepare stuff: */
     105    void prepareContent();
    104106
    105107    QPushButton *createButton (int aButton);
     
    118120    void detailsNext();
    119121
    120     void done0() { m_fDone = true; done (mButton1 & AlertButtonMask); }
    121     void done1() { m_fDone = true; done (mButton2 & AlertButtonMask); }
    122     void done2() { m_fDone = true; done (mButton3 & AlertButtonMask); }
     122    void done1() { m_fDone = true; done (m_iButton1 & AlertButtonMask); }
     123    void done2() { m_fDone = true; done (m_iButton2 & AlertButtonMask); }
     124    void done3() { m_fDone = true; done (m_iButton3 & AlertButtonMask); }
    123125
    124126    void reject();
     
    128130private:
    129131
    130     int mButton1, mButton2, mButton3, mButtonEsc;
    131     QLabel *mIconLabel;
    132     QILabel *mTextLabel;
    133     QPushButton *mButton0PB, *mButton1PB, *mButton2PB;
    134     QCheckBox *mFlagCB, *mFlagCB_Main, *mFlagCB_Details;
    135     QWidget *mDetailsVBox;
    136     QIArrowSplitter *mDetailsSplitter;
    137     QTextEdit *mDetailsText;
    138     QSpacerItem *mSpacer;
    139     QIDialogButtonBox *mButtonBox;
     132    /* Variables: */
     133    int m_iButton1, m_iButton2, m_iButton3, m_iButtonEsc;
     134    AlertIconType m_iconType;
     135    QLabel *m_pIconLabel;
     136    QILabel *m_pTextLabel;
     137    QPushButton *m_pButton1, *m_pButton2, *m_pButton3;
     138    QCheckBox *m_pFlagCheckBox, *m_pFlagCheckBox_Main, *m_pFlagCheckBox_Details;
     139    QWidget *m_pDetailsWidget;
     140    QIArrowSplitter *m_pDetailsSplitter;
     141    QTextEdit *m_pDetailsTextView;
     142    QIDialogButtonBox *m_pButtonBox;
    140143    QString m_strMessage;
    141     QList < QPair <QString, QString> > mDetailsList;
     144    QList<QPair<QString, QString> > m_detailsList;
    142145    int m_iDetailsIndex;
    143146    bool m_fDone : 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