VirtualBox

Changeset 9782 in vbox


Ignore:
Timestamp:
Jun 17, 2008 4:37:41 PM (17 years ago)
Author:
vboxsync
Message:

Fe/Qt4: Some code-spelling for VMSettings to make it similar to Global Settings, VBoxWarnIconLabel moved to VBoxVMSettingUtils (will be used in global settings too).

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsDlg.h

    r9751 r9782  
    3434
    3535class QTimer;
    36 class QWidgetStack;
    3736
    3837class VBoxVMSettingsDlg : public QIWithRetranslateUI<QIMainDialog>,
     
    7069    QString pagePath (QWidget *aPage);
    7170    void setWarning (const QString &aWarning);
    72     void updateMediaShortcuts();
    7371
    7472    QString dialogTitle() const;
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsUtils.h

    r9729 r9782  
    2424#define __VBoxVMSettingsUtils_h__
    2525
    26 /* Qt includes */
     26#include <VBoxGlobal.h>
     27
    2728//#include <QDialog>
    28 //#include <QHBoxLayout>
    2929//#include <QLineEdit>
    3030//#include <QPushButton>
    31 //#include <QLabel>
     31#include <QHBoxLayout>
     32#include <QLabel>
    3233#include <QTreeWidget>
    3334#include <QHeaderView>
     
    221222};
    222223
     224class VBoxWarnIconLabel: public QWidget
     225{
     226    Q_OBJECT;
     227
     228public:
     229
     230    VBoxWarnIconLabel (QWidget *aParent = NULL)
     231        : QWidget (aParent)
     232    {
     233        QHBoxLayout *layout = new QHBoxLayout (this);
     234        VBoxGlobal::setLayoutMargin (layout, 0);
     235        layout->addWidget (&mIcon);
     236        layout->addWidget (&mLabel);
     237    }
     238
     239    void setWarningPixmap (const QPixmap& aPixmap) { mIcon.setPixmap (aPixmap); }
     240    void setWarningText (const QString& aText) { mLabel.setText (aText); }
     241
     242private:
     243
     244    QLabel mIcon;
     245    QLabel mLabel;
     246};
     247
    223248#endif // __VBoxVMSettingsUtils_h__
    224249
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsDlg.cpp

    r9751 r9782  
    3838#include "QIWidgetValidator.h"
    3939
    40 /* Qt includes */
    4140#include <QTimer>
    4241
     
    6867    return list.count() ? list [0] : 0;
    6968}
    70 
    71 class VBoxWarnIconLabel: public QWidget
    72 {
    73 public:
    74     VBoxWarnIconLabel (QWidget *aParent = NULL)
    75       : QWidget (aParent)
    76     {
    77         QHBoxLayout *layout = new QHBoxLayout (this);
    78         VBoxGlobal::setLayoutMargin (layout, 0);
    79         layout->addWidget (&mIcon);
    80         layout->addWidget (&mLabel);
    81     }
    82     void setWarningPixmap (const QPixmap& aPixmap) { mIcon.setPixmap (aPixmap); }
    83     void setWarningText (const QString& aText) { mLabel.setText (aText); }
    84 
    85 private:
    86     QLabel mIcon;
    87     QLabel mLabel;
    88 };
    8969
    9070VBoxVMSettingsDlg::VBoxVMSettingsDlg (QWidget *aParent,
     
    132112                                   mLbWhatsThis->fontMetrics().width ('m') * 40);
    133113
    134     /*
    135      *  Setup connections and set validation for pages
    136      *  ----------------------------------------------------------------------
    137      */
    138 
    139114    /* Common connections */
    140 
    141115    connect (mButtonBox, SIGNAL (accepted()), this, SLOT (accept()));
    142116    connect (mButtonBox, SIGNAL (rejected()), this, SLOT (reject()));
     
    151125    //Assert (item);
    152126    //if (item) item->setHidden (true);
    153 
    154     /*
    155      *  Set initial values
    156      *  ----------------------------------------------------------------------
    157      */
    158 
    159     /* Common settings */
    160127
    161128    /* Hide unnecessary columns and header */
     
    224191        }
    225192    }
     193
    226194    /* Applying language settings */
    227195    retranslateUi();
     
    346314
    347315    setWindowTitle (dialogTitle());
    348    
     316
    349317    /* We have to make sure that the Serial & Network subpages are retranslated
    350318     * before they are revalidated. Cause: They do string comparing within
     
    442410}
    443411
    444 void VBoxVMSettingsDlg::updateWhatsThis (bool gotFocus /* = false */)
     412void VBoxVMSettingsDlg::updateWhatsThis (bool aGotFocus /* = false */)
    445413{
    446414    QString text;
    447415
    448416    QWidget *widget = 0;
    449     if (!gotFocus)
     417    if (!aGotFocus)
    450418    {
    451419        if (mWhatsThisCandidate && mWhatsThisCandidate != this)
     
    529497        case QEvent::FocusIn:
    530498        {
    531             updateWhatsThis (true /* gotFocus */);
     499            updateWhatsThis (true /* aGotFocus */);
    532500            break;
    533501        }
     
    554522    mPolished = true;
    555523
    556     /* resize to the minimum possible size */
     524    /* Resize to the minimum possible size */
    557525    resize (minimumSize());
    558526
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