Changeset 2357 in vbox for trunk/src/VBox/Frontends/VirtualBox/ui
- Timestamp:
- Apr 26, 2007 4:37:53 PM (18 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/ui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxNewHDWzd.ui
r2326 r2357 124 124 </property> 125 125 </spacer> 126 <spacer> 127 <property name="name"> 128 <cstring>widthSpacer</cstring> 129 </property> 130 <property name="orientation"> 131 <enum>Horizontal</enum> 132 </property> 133 <property name="sizeType"> 134 <enum>MinimumExpanding</enum> 135 </property> 136 <property name="sizeHint"> 137 <size> 138 <width>400</width> 139 <height>1</height> 140 </size> 141 </property> 142 </spacer> 126 143 </vbox> 127 144 </widget> … … 591 608 <widget class="QLayoutWidget"> 592 609 <property name="name"> 593 <cstring> layout15</cstring>610 <cstring>summaryLayout</cstring> 594 611 </property> 595 612 <vbox> … … 617 634 <property name="alignment"> 618 635 <set>WordBreak|AlignTop</set> 619 </property>620 </widget>621 <widget class="QTextEdit">622 <property name="name">623 <cstring>teSummary</cstring>624 </property>625 <property name="sizePolicy">626 <sizepolicy>627 <hsizetype>7</hsizetype>628 <vsizetype>5</vsizetype>629 <horstretch>0</horstretch>630 <verstretch>0</verstretch>631 </sizepolicy>632 </property>633 <property name="frameShape">634 <enum>NoFrame</enum>635 </property>636 <property name="wordWrap">637 <enum>NoWrap</enum>638 </property>639 <property name="readOnly">640 <bool>true</bool>641 636 </property> 642 637 </widget> … … 720 715 <include location="global" impldecl="in implementation">qlocale.h</include> 721 716 </includes> 717 <forwards> 718 <forward>class VBoxTextView</forward> 719 </forwards> 722 720 <variables> 723 721 <variable access="private">QIWidgetValidator *wvalNameAndSize;</variable> … … 726 724 <variable access="private">Q_UINT64 maxVDISize;</variable> 727 725 <variable access="private">Q_UINT64 currentSize;</variable> 726 <variable access="private">VBoxTextView *teSummary;</variable> 728 727 </variables> 729 728 <slots> … … 736 735 <functions> 737 736 <function access="private">init()</function> 737 <function access="private">showEvent( QShowEvent * )</function> 738 738 <function>setRecommendedFileName( const QString & aName )</function> 739 739 <function>setRecommendedSize( Q_UINT64 aSize )</function> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxNewHDWzd.ui.h
r958 r2357 169 169 * ---------------------------------------------------------------------- */ 170 170 171 /* setup the pictures background color */ 172 VBoxGlobal::fillPixmapBackGrd (pmWelcome); 173 VBoxGlobal::fillPixmapBackGrd (pmType); 174 VBoxGlobal::fillPixmapBackGrd (pmNameAndSize); 175 VBoxGlobal::fillPixmapBackGrd (pmSummary); 176 171 177 /* Image type page */ 172 178 … … 210 216 /* Summary page */ 211 217 218 teSummary = new VBoxTextView (pageSummary); 219 teSummary->setSizePolicy (QSizePolicy::Minimum, QSizePolicy::Minimum); 220 teSummary->setFrameShape (QTextEdit::NoFrame); 221 teSummary->setReadOnly (TRUE); 222 summaryLayout->insertWidget (1, teSummary); 223 212 224 /* filter out Enter keys in order to direct them to the default dlg button */ 213 225 QIKeyFilter *ef = new QIKeyFilter (this, Key_Enter); … … 251 263 /* the finish button on the Summary page is always enabled */ 252 264 setFinishEnabled (pageSummary, true); 265 266 /* setup minimum width for the sizeHint to be calculated correctly */ 267 int wid = widthSpacer->minimumSize().width(); 268 txWelcome->setMinimumWidth (wid); 269 textLabel1_2->setMinimumWidth (wid); 270 txNameComment->setMinimumWidth (wid); 271 txSizeComment->setMinimumWidth (wid); 272 txSummaryHdr->setMinimumWidth (wid); 273 txSummaryFtr->setMinimumWidth (wid); 274 } 275 276 277 void VBoxNewHDWzd::showEvent (QShowEvent *e) 278 { 279 QDialog::showEvent (e); 280 281 /* one may think that QWidget::polish() is the right place to do things 282 * below, but apparently, by the time when QWidget::polish() is called, 283 * the widget style & layout are not fully done, at least the minimum 284 * size hint is not properly calculated. Since this is sometimes necessary, 285 * we provide our own "polish" implementation. */ 286 287 layout()->activate(); 288 289 /* resize to the miminum possible size */ 290 resize (minimumSize()); 291 292 VBoxGlobal::centerWidget (this, parentWidget()); 253 293 } 254 294 … … 398 438 teSummary->setFocus(); 399 439 } 440 441 page->layout()->activate(); 400 442 } 401 443 -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxNewVMWzd.ui
r382 r2357 125 125 <spacer> 126 126 <property name="name"> 127 <cstring> spacer67</cstring>127 <cstring>widthSpacer</cstring> 128 128 </property> 129 129 <property name="orientation"> … … 909 909 <widget class="QLayoutWidget"> 910 910 <property name="name"> 911 <cstring> layout37</cstring>911 <cstring>summaryLayout</cstring> 912 912 </property> 913 913 <vbox> … … 940 940 <property name="alignment"> 941 941 <set>WordBreak|AlignTop</set> 942 </property>943 </widget>944 <widget class="QTextEdit">945 <property name="name">946 <cstring>teSummary</cstring>947 </property>948 <property name="sizePolicy">949 <sizepolicy>950 <hsizetype>7</hsizetype>951 <vsizetype>5</vsizetype>952 <horstretch>0</horstretch>953 <verstretch>0</verstretch>954 </sizepolicy>955 </property>956 <property name="frameShape">957 <enum>NoFrame</enum>958 </property>959 <property name="readOnly">960 <bool>true</bool>961 942 </property> 962 943 </widget> … … 1065 1046 <forwards> 1066 1047 <forward>class VBoxMediaComboBox</forward> 1048 <forward>class VBoxTextView</forward> 1067 1049 </forwards> 1068 1050 <variables> … … 1074 1056 <variable access="private">CMachine cmachine;</variable> 1075 1057 <variable access="private">VBoxMediaComboBox *mediaCombo;</variable> 1058 <variable access="private">VBoxTextView *teSummary;</variable> 1076 1059 </variables> 1077 1060 <slots> … … 1088 1071 <function access="private">init()</function> 1089 1072 <function access="private">destroy()</function> 1073 <function access="private">showEvent( QShowEvent * )</function> 1090 1074 <function>showPage( QWidget * page )</function> 1091 1075 <function>accept()</function> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxNewVMWzd.ui.h
r868 r2357 71 71 */ 72 72 73 /* setup the pictures colors */ 74 VBoxGlobal::fillPixmapBackGrd (pmWelcome); 75 VBoxGlobal::fillPixmapBackGrd (pmNameAndOS); 76 VBoxGlobal::fillPixmapBackGrd (pmMemory); 77 VBoxGlobal::fillPixmapBackGrd (pmHDD); 78 VBoxGlobal::fillPixmapBackGrd (pmSummary); 79 73 80 /* Name and OS page */ 74 81 … … 89 96 90 97 leRAM->setValidator (new QIntValidator (MinRAM, MaxRAM, this)); 91 92 /* filter out Enter keys in order to direct them to the default dlg button */93 QIKeyFilter *ef = new QIKeyFilter (this, Key_Enter);94 ef->watchOn (teSummary);95 98 96 99 wvalMemory = new QIWidgetValidator (pageMemory, this); … … 117 120 this, SLOT (revalidate (QIWidgetValidator *))); 118 121 122 /* Summary page */ 123 124 teSummary = new VBoxTextView (pageSummary); 125 teSummary->setSizePolicy (QSizePolicy::Minimum, QSizePolicy::Minimum); 126 teSummary->setFrameShape (QTextEdit::NoFrame); 127 teSummary->setReadOnly (TRUE); 128 summaryLayout->insertWidget (1, teSummary); 129 130 /* filter out Enter keys in order to direct them to the default dlg button */ 131 QIKeyFilter *ef = new QIKeyFilter (this, Key_Enter); 132 ef->watchOn (teSummary); 133 119 134 /* 120 135 * set initial values … … 164 179 /* the finish button on the Summary page is always enabled */ 165 180 setFinishEnabled (pageSummary, true); 166 167 resize (sizeHint()); 181 182 /* setup minimum width for the sizeHint to be calculated correctly */ 183 int wid = widthSpacer->minimumSize().width(); 184 txWelcome->setMinimumWidth (wid); 185 txNameAndOS->setMinimumWidth (wid); 186 textLabel1->setMinimumWidth (wid); 187 txRAMBest2->setMinimumWidth (wid); 188 textLabel1_3->setMinimumWidth (wid); 189 txVDIBest->setMinimumWidth (wid); 190 txSummaryHdr->setMinimumWidth (wid); 191 txSummaryFtr->setMinimumWidth (wid); 168 192 } 169 193 … … 172 196 { 173 197 ensureNewHardDiskDeleted(); 198 } 199 200 void VBoxNewVMWzd::showEvent (QShowEvent *e) 201 { 202 QDialog::showEvent (e); 203 204 /* one may think that QWidget::polish() is the right place to do things 205 * below, but apparently, by the time when QWidget::polish() is called, 206 * the widget style & layout are not fully done, at least the minimum 207 * size hint is not properly calculated. Since this is sometimes necessary, 208 * we provide our own "polish" implementation. */ 209 210 layout()->activate(); 211 212 /* resize to the miminum possible size */ 213 resize (minimumSize()); 214 215 VBoxGlobal::centerWidget (this, parentWidget()); 174 216 } 175 217 … … 244 286 else if (page == pageSummary) 245 287 teSummary->setFocus(); 288 289 page->layout()->activate(); 246 290 } 247 291
Note:
See TracChangeset
for help on using the changeset viewer.