Changeset 9866 in vbox
- Timestamp:
- Jun 23, 2008 9:03:47 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 32256
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk
r9820 r9866 538 538 include/QITreeWidget.h \ 539 539 include/QIMainDialog.h \ 540 include/QIHelpButton.h \ 540 541 include/VBoxGlobalSettings.h \ 541 542 include/VBoxUtils.h \ … … 625 626 src/QIMainDialog.cpp \ 626 627 src/QILineEdit.cpp \ 628 src/QIHelpButton.cpp \ 627 629 src/VBoxDefs.cpp \ 628 630 src/VBoxGlobalSettings.cpp \ -
trunk/src/VBox/Frontends/VirtualBox4/VirtualBox.qrc
r9060 r9866 95 95 <file alias="machine_16px.png">images/machine_16px.png</file> 96 96 <file alias="help_16px.png">images/help_16px.png</file> 97 <file alias="help_button_normal_mac_22px.png">images/help_button_normal_mac_22px.png</file> 98 <file alias="help_button_pressed_mac_22px.png">images/help_button_pressed_mac_22px.png</file> 97 99 <file alias="site_16px.png">images/site_16px.png</file> 98 100 <file alias="register_16px.png">images/register_16px.png</file> -
trunk/src/VBox/Frontends/VirtualBox4/include/QIDialogButtonBox.h
r9296 r9866 28 28 /* Qt includes */ 29 29 #include <QDialogButtonBox> 30 #include <QPointer> 30 31 31 32 class QBoxLayout; 33 34 class QIHelpButton; 32 35 33 36 class QIDialogButtonBox: public QIWithRetranslateUI<QDialogButtonBox> … … 37 40 QIDialogButtonBox (Qt::Orientation aOrientation, QWidget *aParent = 0) :QIWithRetranslateUI<QDialogButtonBox> (aParent) { setOrientation (aOrientation); } 38 41 QIDialogButtonBox (StandardButtons aButtons, Qt::Orientation aOrientation = Qt::Horizontal, QWidget *aParent = 0); 42 43 QPushButton *button (StandardButton aWhich) const; 39 44 40 45 QPushButton *addButton (const QString &aText, ButtonRole aRole); … … 52 57 53 58 void retranslateUi(); 59 60 private: 61 62 QPointer<QIHelpButton> mHelpButton; 54 63 }; 55 64 -
trunk/src/VBox/Frontends/VirtualBox4/src/QIDialogButtonBox.cpp
r9299 r9866 22 22 23 23 #include "QIDialogButtonBox.h" 24 #include "QIHelpButton.h" 24 25 25 26 #include <iprt/assert.h> … … 37 38 38 39 retranslateUi(); 40 } 41 42 QPushButton *QIDialogButtonBox::button (StandardButton aWhich) const 43 { 44 QPushButton *button = QDialogButtonBox::button (aWhich); 45 if (!button && 46 aWhich == QDialogButtonBox::Help) 47 button = mHelpButton; 48 return button; 39 49 } 40 50 … … 66 76 layout->insertStretch(index + 2); 67 77 } 78 68 79 69 80 void QIDialogButtonBox::addExtraLayout (QLayout* aLayout) … … 98 109 void QIDialogButtonBox::retranslateUi() 99 110 { 100 QPushButton *btn = button (QDialogButtonBox::Help);111 QPushButton *btn = QDialogButtonBox::button (QDialogButtonBox::Help); 101 112 if (btn) 102 113 { 103 btn->setText (tr ("&Help")); 104 if (btn->shortcut().isEmpty()) 105 btn->setShortcut (QKeySequence::HelpContents); 114 /* Use our very own help button if the user requested for one. */ 115 if (!mHelpButton) 116 mHelpButton = new QIHelpButton; 117 mHelpButton->initFrom (btn); 118 removeButton (btn); 119 QDialogButtonBox::addButton (mHelpButton, QDialogButtonBox::HelpRole); 106 120 } 107 121 } 122
Note:
See TracChangeset
for help on using the changeset viewer.