Changeset 9253 in vbox for trunk/src/VBox
- Timestamp:
- May 30, 2008 1:43:55 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 5 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk
r9245 r9253 273 273 VirtualBox_QT_UISRCS4 += ui/VBoxRegistrationDlg.ui 274 274 275 VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxSharedFoldersSettings.ui,$(VirtualBox_QT_UISRCS3))276 VirtualBox_QT_UISRCS4 += ui/VBoxSharedFoldersSettings.ui277 278 275 VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxSnapshotDetailsDlg.ui,$(VirtualBox_QT_UISRCS3)) 279 276 VirtualBox_QT_UISRCS4 += ui/VBoxSnapshotDetailsDlg.ui … … 314 311 VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxVMSettingsUSB.ui,$(VirtualBox_QT_UISRCS3)) 315 312 VirtualBox_QT_UISRCS4 += ui/VBoxVMSettingsUSB.ui 313 314 VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxVMSettingsSF.ui,$(VirtualBox_QT_UISRCS3)) 315 VirtualBox_QT_UISRCS4 += ui/VBoxVMSettingsSF.ui 316 316 317 317 VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxVMSettingsVRDP.ui,$(VirtualBox_QT_UISRCS3)) … … 462 462 include/VBoxVMFirstRunWzd.h \ 463 463 include/VBoxRegistrationDlg.h \ 464 include/VBoxSharedFoldersSettings.h \465 464 include/VBoxSnapshotDetailsDlg.h \ 466 465 include/VBoxVMInformationDlg.h \ … … 477 476 include/VBoxVMSettingsParallel.h \ 478 477 include/VBoxVMSettingsUSB.h \ 478 include/VBoxVMSettingsSF.h \ 479 479 include/VBoxVMSettingsVRDP.h \ 480 480 include/VBoxVMSettingsDlg.h … … 550 550 src/VBoxVMFirstRunWzd.cpp \ 551 551 src/VBoxRegistrationDlg.cpp \ 552 src/VBoxSharedFoldersSettings.cpp \553 552 src/VBoxSnapshotDetailsDlg.cpp \ 554 553 src/VBoxVMInformationDlg.cpp \ … … 564 563 src/VBoxVMSettingsParallel.cpp \ 565 564 src/VBoxVMSettingsUSB.cpp \ 565 src/VBoxVMSettingsSF.cpp \ 566 566 src/VBoxVMSettingsVRDP.cpp \ 567 567 src/VBoxVMSettingsDlg.cpp -
trunk/src/VBox/Frontends/VirtualBox4/VBoxUI.pro
r9227 r9253 30 30 ui/VBoxVMSettingsParallel.ui \ 31 31 ui/VBoxVMSettingsUSB.ui \ 32 ui/VBox SharedFoldersSettings.ui \32 ui/VBoxVMSettingsSF.ui \ 33 33 ui/VBoxNewVMWzd.ui \ 34 34 ui/VBoxCloseVMDlg.ui \ -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h
r9089 r9253 346 346 347 347 348 class VBox SharedFoldersSettings;348 class VBoxVMSettingsSF; 349 349 class VBoxSFDialog : public QIWithRetranslateUI<QDialog> 350 350 { … … 369 369 private: 370 370 371 VBox SharedFoldersSettings*mSettings;371 VBoxVMSettingsSF *mSettings; 372 372 CSession &mSession; 373 373 }; -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsSF.h
r9242 r9253 2 2 * 3 3 * VBox frontends: Qt4 GUI ("VirtualBox"): 4 * VBox SharedFoldersSettingsclass declaration4 * VBoxVMSettingsSF class declaration 5 5 */ 6 6 … … 21 21 */ 22 22 23 #ifndef __VBox SharedFoldersSettings_h__24 #define __VBox SharedFoldersSettings_h__23 #ifndef __VBoxVMSettingsSF_h__ 24 #define __VBoxVMSettingsSF_h__ 25 25 26 #include "VBox SharedFoldersSettings.gen.h"26 #include "VBoxVMSettingsSF.gen.h" 27 27 #include "QIWithRetranslateUI.h" 28 28 … … 47 47 typedef QList<SFolderName> SFoldersNameList; 48 48 49 class VBox SharedFoldersSettings: public QIWithRetranslateUI<QWidget>,50 public Ui::VBoxSharedFoldersSettings49 class VBoxVMSettingsSF : public QIWithRetranslateUI<QWidget>, 50 public Ui::VBoxVMSettingsSF 51 51 { 52 52 Q_OBJECT; … … 54 54 public: 55 55 56 VBoxSharedFoldersSettings (QWidget *aParent = 0, int aType = WrongType); 56 static void getFromMachineEx (const CMachine &aMachine, 57 QWidget *aParent); 58 static void putBackToMachineEx(); 59 60 VBoxVMSettingsSF (QWidget *aParent = 0, int aType = WrongType); 57 61 58 62 int dialogType() { return mDialogType; } … … 101 105 SFoldersNameList usedList (bool aIncludeSelected); 102 106 107 static VBoxVMSettingsSF *mSettings; 108 103 109 int mDialogType; 104 110 bool mIsListViewChanged; … … 121 127 }; 122 128 123 VBoxAddSFDialog (VBox SharedFoldersSettings*aParent,129 VBoxAddSFDialog (VBoxVMSettingsSF *aParent, 124 130 VBoxAddSFDialog::DialogType aType, 125 131 bool aEnableSelector /* for "permanent" checkbox */, … … 162 168 }; 163 169 164 #endif // __VBox SharedFoldersSettings_h__170 #endif // __VBoxVMSettingsSF_h__ 165 171 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
r9245 r9253 27 27 #include "VBoxDiskImageManagerDlg.h" 28 28 #include "VBoxVMFirstRunWzd.h" 29 #include "VBox SharedFoldersSettings.h"29 #include "VBoxVMSettingsSF.h" 30 30 #include "VBoxVMInformationDlg.h" 31 31 #include "VBoxDownloaderWgt.h" … … 2177 2177 switchToFullscreen (aOn, aSeamless); 2178 2178 2179 #ifdef Q_WS_MAC 2179 #ifdef Q_WS_MAC 2180 2180 if (aOn && aSeamless) 2181 2181 { … … 3499 3499 3500 3500 /* Setup settings layout */ 3501 mSettings = new VBox SharedFoldersSettings(this, MachineType | ConsoleType);3501 mSettings = new VBoxVMSettingsSF (this, MachineType | ConsoleType); 3502 3502 mSettings->getFromConsole (aSession.GetConsole()); 3503 3503 mSettings->getFromMachine (aSession.GetMachine()); -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsSF.cpp
r9242 r9253 2 2 * 3 3 * VBox frontends: Qt4 GUI ("VirtualBox"): 4 * VBox SharedFoldersSettingsclass implementation4 * VBoxVMSettingsSF class implementation 5 5 */ 6 6 … … 21 21 */ 22 22 23 #include "VBox SharedFoldersSettings.h"23 #include "VBoxVMSettingsSF.h" 24 24 #include "VBoxGlobal.h" 25 25 #include "VBoxProblemReporter.h" … … 171 171 172 172 173 VBoxSharedFoldersSettings::VBoxSharedFoldersSettings (QWidget *aParent, 174 int aType) 173 VBoxVMSettingsSF* VBoxVMSettingsSF::mSettings = 0; 174 175 VBoxVMSettingsSF::VBoxVMSettingsSF (QWidget *aParent, int aType) 175 176 : QIWithRetranslateUI<QWidget> (aParent) 176 177 , mDialogType (aType) … … 178 179 { 179 180 /* Apply UI decorations */ 180 Ui::VBox SharedFoldersSettings::setupUi (this);181 Ui::VBoxVMSettingsSF::setupUi (this); 181 182 182 183 mTreeView->header()->setMovable (false); … … 228 229 229 230 230 void VBoxSharedFoldersSettings::getFromGlobal() 231 void VBoxVMSettingsSF::getFromMachineEx (const CMachine &aMachine, 232 QWidget *aPage) 233 { 234 mSettings = new VBoxVMSettingsSF (aPage, MachineType); 235 QVBoxLayout *layout = new QVBoxLayout (aPage); 236 layout->setContentsMargins (0, 0, 0, 0); 237 layout->addWidget (mSettings); 238 mSettings->getFromMachine (aMachine); 239 } 240 241 void VBoxVMSettingsSF::putBackToMachineEx() 242 { 243 mSettings->putBackToMachine(); 244 } 245 246 247 void VBoxVMSettingsSF::getFromGlobal() 231 248 { 232 249 AssertMsgFailed (("Global shared folders are not implemented yet\n")); … … 236 253 } 237 254 238 void VBox SharedFoldersSettings::getFromMachine (const CMachine &aMachine)255 void VBoxVMSettingsSF::getFromMachine (const CMachine &aMachine) 239 256 { 240 257 mMachine = aMachine; … … 244 261 } 245 262 246 void VBox SharedFoldersSettings::getFromConsole (const CConsole &aConsole)263 void VBoxVMSettingsSF::getFromConsole (const CConsole &aConsole) 247 264 { 248 265 mConsole = aConsole; … … 253 270 254 271 255 void VBox SharedFoldersSettings::putBackToGlobal()272 void VBoxVMSettingsSF::putBackToGlobal() 256 273 { 257 274 AssertMsgFailed (("Global shared folders are not implemented yet\n")); … … 269 286 } 270 287 271 void VBox SharedFoldersSettings::putBackToMachine()288 void VBoxVMSettingsSF::putBackToMachine() 272 289 { 273 290 if (!mIsListViewChanged) … … 283 300 } 284 301 285 void VBox SharedFoldersSettings::putBackToConsole()302 void VBoxVMSettingsSF::putBackToConsole() 286 303 { 287 304 if (!mIsListViewChanged) … … 297 314 } 298 315 299 void VBox SharedFoldersSettings::retranslateUi()316 void VBoxVMSettingsSF::retranslateUi() 300 317 { 301 318 /* Translate uic generated strings */ 302 Ui::VBox SharedFoldersSettings::retranslateUi (this);319 Ui::VBoxVMSettingsSF::retranslateUi (this); 303 320 304 321 mTrFull = tr ("Full"); … … 306 323 } 307 324 308 void VBox SharedFoldersSettings::tbAddPressed()325 void VBoxVMSettingsSF::tbAddPressed() 309 326 { 310 327 /* Invoke Add-Box Dialog */ … … 339 356 } 340 357 341 void VBox SharedFoldersSettings::tbEditPressed()358 void VBoxVMSettingsSF::tbEditPressed() 342 359 { 343 360 /* Check selected item */ … … 391 408 } 392 409 393 void VBox SharedFoldersSettings::tbRemovePressed()410 void VBoxVMSettingsSF::tbRemovePressed() 394 411 { 395 412 QTreeWidgetItem *selectedItem = mTreeView->selectedItems().size() == 1 ? … … 402 419 403 420 404 void VBox SharedFoldersSettings::processCurrentChanged (421 void VBoxVMSettingsSF::processCurrentChanged ( 405 422 QTreeWidgetItem *aCurrentItem, QTreeWidgetItem* /* aPreviousItem */) 406 423 { … … 417 434 } 418 435 419 void VBox SharedFoldersSettings::processDoubleClick (QTreeWidgetItem *aItem,436 void VBoxVMSettingsSF::processDoubleClick (QTreeWidgetItem *aItem, 420 437 int /* aColumn */) 421 438 { … … 427 444 428 445 429 void VBox SharedFoldersSettings::adjustList()446 void VBoxVMSettingsSF::adjustList() 430 447 { 431 448 /* Adjust two columns size. … … 449 466 } 450 467 451 void VBox SharedFoldersSettings::adjustFields()468 void VBoxVMSettingsSF::adjustFields() 452 469 { 453 470 QTreeWidgetItem *mainRoot = mTreeView->invisibleRootItem(); … … 467 484 468 485 469 void VBox SharedFoldersSettings::showEvent (QShowEvent *aEvent)486 void VBoxVMSettingsSF::showEvent (QShowEvent *aEvent) 470 487 { 471 488 QWidget::showEvent (aEvent); … … 476 493 477 494 478 void VBox SharedFoldersSettings::removeSharedFolder (const QString & aName,495 void VBoxVMSettingsSF::removeSharedFolder (const QString & aName, 479 496 const QString & aPath, 480 497 SFDialogType aType) … … 513 530 } 514 531 515 void VBox SharedFoldersSettings::createSharedFolder (const QString & aName,532 void VBoxVMSettingsSF::createSharedFolder (const QString & aName, 516 533 const QString & aPath, 517 534 bool aWritable, … … 552 569 553 570 554 void VBox SharedFoldersSettings::getFrom (const CSharedFolderEnumerator &aEn,571 void VBoxVMSettingsSF::getFrom (const CSharedFolderEnumerator &aEn, 555 572 SFTreeViewItem *aRoot) 556 573 { … … 571 588 } 572 589 573 void VBox SharedFoldersSettings::putBackTo (CSharedFolderEnumerator &aEn,574 590 void VBoxVMSettingsSF::putBackTo (CSharedFolderEnumerator &aEn, 591 SFTreeViewItem *aRoot) 575 592 { 576 593 Assert (!aRoot->text (1).isNull()); … … 609 626 610 627 611 SFTreeViewItem* VBox SharedFoldersSettings::searchRoot (bool aIsPermanent,612 628 SFTreeViewItem* VBoxVMSettingsSF::searchRoot (bool aIsPermanent, 629 SFDialogType aType) 613 630 { 614 631 QString type = aType != WrongType ? QString::number (aType) : … … 631 648 } 632 649 633 bool VBox SharedFoldersSettings::isEditable (const QString &aKey)650 bool VBoxVMSettingsSF::isEditable (const QString &aKey) 634 651 { 635 652 /* mDialogType should be correct */ … … 641 658 } 642 659 643 SFoldersNameList VBox SharedFoldersSettings::usedList (bool aIncludeSelected)660 SFoldersNameList VBoxVMSettingsSF::usedList (bool aIncludeSelected) 644 661 { 645 662 /* Make the used names list: */ … … 661 678 662 679 663 VBoxAddSFDialog::VBoxAddSFDialog (VBox SharedFoldersSettings*aParent,680 VBoxAddSFDialog::VBoxAddSFDialog (VBoxVMSettingsSF *aParent, 664 681 VBoxAddSFDialog::DialogType aType, 665 682 bool aEnableSelector, … … 778 795 "on the host PC.")); 779 796 780 mLbName->setText (tr ("Folder Name")); 797 mLbName->setText (tr ("Folder Name")); 781 798 mLeName->setWhatsThis (tr ("Displays the name of the shared folder " 782 799 "(as it will be seen by the guest OS).")); … … 795 812 void VBoxAddSFDialog::validate() 796 813 { 797 int dlgType = static_cast<VBox SharedFoldersSettings*>814 int dlgType = static_cast<VBoxVMSettingsSF*> 798 815 (parent())->dialogType(); 799 816 SFDialogType resultType = -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsSF.ui
r9242 r9253 17 17 additional information or have any questions. 18 18 </comment> 19 <class>VBox SharedFoldersSettings</class>20 <widget class="QWidget" name="VBox SharedFoldersSettings" >19 <class>VBoxVMSettingsSF</class> 20 <widget class="QWidget" name="VBoxVMSettingsSF" > 21 21 <property name="geometry" > 22 22 <rect> … … 33 33 </sizepolicy> 34 34 </property> 35 <property name="windowTitle" >36 <string comment="don't translate" >VBoxSharedFoldersSettings</string>37 </property>38 35 <layout class="QVBoxLayout" > 39 36 <property name="leftMargin" > … … 41 38 </property> 42 39 <property name="topMargin" > 43 <number> 0</number>40 <number>5</number> 44 41 </property> 45 42 <property name="rightMargin" > … … 55 52 </property> 56 53 <layout class="QHBoxLayout" > 54 <property name="topMargin" > 55 <number>5</number> 56 </property> 57 57 <item> 58 58 <widget class="QTreeWidget" name="mTreeView" > -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsUSB.ui
r9232 r9253 60 60 </property> 61 61 <layout class="QHBoxLayout" > 62 <property name="topMargin" > 63 <number>5</number> 64 </property> 62 65 <item> 63 66 <widget class="QTreeWidget" name="mTwFilters" >
Note:
See TracChangeset
for help on using the changeset viewer.