Changeset 9782 in vbox
- Timestamp:
- Jun 17, 2008 4:37:41 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsDlg.h
r9751 r9782 34 34 35 35 class QTimer; 36 class QWidgetStack;37 36 38 37 class VBoxVMSettingsDlg : public QIWithRetranslateUI<QIMainDialog>, … … 70 69 QString pagePath (QWidget *aPage); 71 70 void setWarning (const QString &aWarning); 72 void updateMediaShortcuts();73 71 74 72 QString dialogTitle() const; -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsUtils.h
r9729 r9782 24 24 #define __VBoxVMSettingsUtils_h__ 25 25 26 /* Qt includes */ 26 #include <VBoxGlobal.h> 27 27 28 //#include <QDialog> 28 //#include <QHBoxLayout>29 29 //#include <QLineEdit> 30 30 //#include <QPushButton> 31 //#include <QLabel> 31 #include <QHBoxLayout> 32 #include <QLabel> 32 33 #include <QTreeWidget> 33 34 #include <QHeaderView> … … 221 222 }; 222 223 224 class VBoxWarnIconLabel: public QWidget 225 { 226 Q_OBJECT; 227 228 public: 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 242 private: 243 244 QLabel mIcon; 245 QLabel mLabel; 246 }; 247 223 248 #endif // __VBoxVMSettingsUtils_h__ 224 249 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsDlg.cpp
r9751 r9782 38 38 #include "QIWidgetValidator.h" 39 39 40 /* Qt includes */41 40 #include <QTimer> 42 41 … … 68 67 return list.count() ? list [0] : 0; 69 68 } 70 71 class VBoxWarnIconLabel: public QWidget72 {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 };89 69 90 70 VBoxVMSettingsDlg::VBoxVMSettingsDlg (QWidget *aParent, … … 132 112 mLbWhatsThis->fontMetrics().width ('m') * 40); 133 113 134 /*135 * Setup connections and set validation for pages136 * ----------------------------------------------------------------------137 */138 139 114 /* Common connections */ 140 141 115 connect (mButtonBox, SIGNAL (accepted()), this, SLOT (accept())); 142 116 connect (mButtonBox, SIGNAL (rejected()), this, SLOT (reject())); … … 151 125 //Assert (item); 152 126 //if (item) item->setHidden (true); 153 154 /*155 * Set initial values156 * ----------------------------------------------------------------------157 */158 159 /* Common settings */160 127 161 128 /* Hide unnecessary columns and header */ … … 224 191 } 225 192 } 193 226 194 /* Applying language settings */ 227 195 retranslateUi(); … … 346 314 347 315 setWindowTitle (dialogTitle()); 348 316 349 317 /* We have to make sure that the Serial & Network subpages are retranslated 350 318 * before they are revalidated. Cause: They do string comparing within … … 442 410 } 443 411 444 void VBoxVMSettingsDlg::updateWhatsThis (bool gotFocus /* = false */)412 void VBoxVMSettingsDlg::updateWhatsThis (bool aGotFocus /* = false */) 445 413 { 446 414 QString text; 447 415 448 416 QWidget *widget = 0; 449 if (! gotFocus)417 if (!aGotFocus) 450 418 { 451 419 if (mWhatsThisCandidate && mWhatsThisCandidate != this) … … 529 497 case QEvent::FocusIn: 530 498 { 531 updateWhatsThis (true /* gotFocus */);499 updateWhatsThis (true /* aGotFocus */); 532 500 break; 533 501 } … … 554 522 mPolished = true; 555 523 556 /* resize to the minimum possible size */524 /* Resize to the minimum possible size */ 557 525 resize (minimumSize()); 558 526
Note:
See TracChangeset
for help on using the changeset viewer.