Changeset 7188 in vbox
- Timestamp:
- Feb 27, 2008 7:08:51 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h
r6645 r7188 167 167 static const char* GUI_RegistrationData; 168 168 static const char* GUI_LastVMSelected; 169 static const char* GUI_InfoDlgState; 169 170 }; 170 171 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxDefs.cpp
r5999 r7188 35 35 const char* VBoxDefs::GUI_RegistrationData = "GUI/RegistrationData"; 36 36 const char* VBoxDefs::GUI_LastVMSelected = "GUI/LastVMSelected"; 37 const char* VBoxDefs::GUI_InfoDlgState = "GUI/InfoDlgState"; -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMInformationDlg.ui
r6719 r7188 137 137 <variable access="private">QTimer mStatTimer;</variable> 138 138 <variable access="private">VBoxConsoleView *mConsole;</variable> 139 <variable access="private">int mWidth;</variable> 140 <variable access="private">int mHeight;</variable> 141 <variable access="private">bool mMax;</variable> 139 142 </variables> 140 143 <slots> … … 156 159 <function access="protected">resizeEvent( QResizeEvent* )</function> 157 160 <function returnType="QString" access="pritave">parseStatistics( const QString & )</function> 158 <function access="pri tave">refreshStatistics()</function>161 <function access="private">refreshStatistics()</function> 159 162 <function returnType="QString" access="pritave">formatHardDisk( const QString &, CEnums::DiskControllerType, LONG, int, int )</function> 160 163 <function returnType="QString" access="pritave">formatAdapter( const QString &, ULONG, int, int )</function> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMInformationDlg.ui.h
r6986 r7188 104 104 languageChangeImp(); 105 105 106 /* make initial resize */107 resize (500, 450);108 109 106 /* show statistics page and make it focused */ 110 107 connect (mInfoStack, SIGNAL (currentChanged (QWidget*)), … … 116 113 void VBoxVMInformationDlg::destroy() 117 114 { 115 /* save dialog attributes for this vm */ 116 QString dlgsize ("%1,%2,%3"); 117 mSession.GetMachine().SetExtraData (VBoxDefs::GUI_InfoDlgState, 118 dlgsize.arg (mWidth).arg (mHeight).arg (isMaximized() ? "max" : "normal")); 119 118 120 if (!mSession.isNull() && !mSession.GetMachine().isNull()) 119 121 mSelfArray.erase (mSession.GetMachine().GetName()); … … 148 150 connect (&mStatTimer, SIGNAL (timeout()), this, SLOT (processStatistics())); 149 151 connect (mConsole, SIGNAL (resizeHintDone()), this, SLOT (processStatistics())); 152 153 /* preload dialog attributes for this vm */ 154 QString dlgsize = mSession.GetMachine().GetExtraData (VBoxDefs::GUI_InfoDlgState); 155 if (dlgsize.isNull()) 156 { 157 mWidth = 400; 158 mHeight = 450; 159 mMax = false; 160 } 161 else 162 { 163 QStringList list = QStringList::split (',', dlgsize); 164 mWidth = list [0].toInt(), mHeight = list [1].toInt(); 165 mMax = list [2] == "max"; 166 } 150 167 } 151 168 … … 315 332 mIsPolished = true; 316 333 334 /* load window size and state */ 335 resize (mWidth, mHeight); 336 if (mMax) 337 QTimer::singleShot (0, this, SLOT (showMaximized())); 338 317 339 VBoxGlobal::centerWidget (this, parentWidget()); 318 340 } … … 325 347 QPoint (mSizeGrip->rect().width() - 1, 326 348 mSizeGrip->rect().height() - 1)); 349 350 /* store dialog size for this vm */ 351 if (mIsPolished && !isMaximized()) 352 { 353 mWidth = width(); 354 mHeight = height(); 355 } 327 356 } 328 357
Note:
See TracChangeset
for help on using the changeset viewer.