VirtualBox

Changeset 9253 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 30, 2008 1:43:55 PM (17 years ago)
Author:
vboxsync
Message:

Fe/Qt4: Shared Folders VMSettings renamed according other settings pages and formed into the same order as other settings pages.

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
5 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk

    r9245 r9253  
    273273VirtualBox_QT_UISRCS4 += ui/VBoxRegistrationDlg.ui
    274274
    275 VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxSharedFoldersSettings.ui,$(VirtualBox_QT_UISRCS3))
    276 VirtualBox_QT_UISRCS4 += ui/VBoxSharedFoldersSettings.ui
    277 
    278275VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxSnapshotDetailsDlg.ui,$(VirtualBox_QT_UISRCS3))
    279276VirtualBox_QT_UISRCS4 += ui/VBoxSnapshotDetailsDlg.ui
     
    314311VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxVMSettingsUSB.ui,$(VirtualBox_QT_UISRCS3))
    315312VirtualBox_QT_UISRCS4 += ui/VBoxVMSettingsUSB.ui
     313
     314VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxVMSettingsSF.ui,$(VirtualBox_QT_UISRCS3))
     315VirtualBox_QT_UISRCS4 += ui/VBoxVMSettingsSF.ui
    316316
    317317VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxVMSettingsVRDP.ui,$(VirtualBox_QT_UISRCS3))
     
    462462        include/VBoxVMFirstRunWzd.h \
    463463        include/VBoxRegistrationDlg.h \
    464         include/VBoxSharedFoldersSettings.h \
    465464        include/VBoxSnapshotDetailsDlg.h \
    466465        include/VBoxVMInformationDlg.h \
     
    477476        include/VBoxVMSettingsParallel.h \
    478477        include/VBoxVMSettingsUSB.h \
     478        include/VBoxVMSettingsSF.h \
    479479        include/VBoxVMSettingsVRDP.h \
    480480        include/VBoxVMSettingsDlg.h
     
    550550        src/VBoxVMFirstRunWzd.cpp \
    551551        src/VBoxRegistrationDlg.cpp \
    552         src/VBoxSharedFoldersSettings.cpp \
    553552        src/VBoxSnapshotDetailsDlg.cpp \
    554553        src/VBoxVMInformationDlg.cpp \
     
    564563        src/VBoxVMSettingsParallel.cpp \
    565564        src/VBoxVMSettingsUSB.cpp \
     565        src/VBoxVMSettingsSF.cpp \
    566566        src/VBoxVMSettingsVRDP.cpp \
    567567        src/VBoxVMSettingsDlg.cpp
  • trunk/src/VBox/Frontends/VirtualBox4/VBoxUI.pro

    r9227 r9253  
    3030        ui/VBoxVMSettingsParallel.ui \
    3131        ui/VBoxVMSettingsUSB.ui \
    32         ui/VBoxSharedFoldersSettings.ui \
     32        ui/VBoxVMSettingsSF.ui \
    3333        ui/VBoxNewVMWzd.ui \
    3434        ui/VBoxCloseVMDlg.ui \
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h

    r9089 r9253  
    346346
    347347
    348 class VBoxSharedFoldersSettings;
     348class VBoxVMSettingsSF;
    349349class VBoxSFDialog : public QIWithRetranslateUI<QDialog>
    350350{
     
    369369private:
    370370
    371     VBoxSharedFoldersSettings *mSettings;
     371    VBoxVMSettingsSF *mSettings;
    372372    CSession &mSession;
    373373};
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsSF.h

    r9242 r9253  
    22 *
    33 * VBox frontends: Qt4 GUI ("VirtualBox"):
    4  * VBoxSharedFoldersSettings class declaration
     4 * VBoxVMSettingsSF class declaration
    55 */
    66
     
    2121 */
    2222
    23 #ifndef __VBoxSharedFoldersSettings_h__
    24 #define __VBoxSharedFoldersSettings_h__
     23#ifndef __VBoxVMSettingsSF_h__
     24#define __VBoxVMSettingsSF_h__
    2525
    26 #include "VBoxSharedFoldersSettings.gen.h"
     26#include "VBoxVMSettingsSF.gen.h"
    2727#include "QIWithRetranslateUI.h"
    2828
     
    4747typedef QList<SFolderName> SFoldersNameList;
    4848
    49 class VBoxSharedFoldersSettings : public QIWithRetranslateUI<QWidget>,
    50                                   public Ui::VBoxSharedFoldersSettings
     49class VBoxVMSettingsSF : public QIWithRetranslateUI<QWidget>,
     50                         public Ui::VBoxVMSettingsSF
    5151{
    5252    Q_OBJECT;
     
    5454public:
    5555
    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);
    5761
    5862    int dialogType() { return mDialogType; }
     
    101105    SFoldersNameList usedList (bool aIncludeSelected);
    102106
     107    static VBoxVMSettingsSF *mSettings;
     108
    103109    int      mDialogType;
    104110    bool     mIsListViewChanged;
     
    121127    };
    122128
    123     VBoxAddSFDialog (VBoxSharedFoldersSettings *aParent,
     129    VBoxAddSFDialog (VBoxVMSettingsSF *aParent,
    124130                     VBoxAddSFDialog::DialogType aType,
    125131                     bool aEnableSelector /* for "permanent" checkbox */,
     
    162168};
    163169
    164 #endif // __VBoxSharedFoldersSettings_h__
     170#endif // __VBoxVMSettingsSF_h__
    165171
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp

    r9245 r9253  
    2727#include "VBoxDiskImageManagerDlg.h"
    2828#include "VBoxVMFirstRunWzd.h"
    29 #include "VBoxSharedFoldersSettings.h"
     29#include "VBoxVMSettingsSF.h"
    3030#include "VBoxVMInformationDlg.h"
    3131#include "VBoxDownloaderWgt.h"
     
    21772177    switchToFullscreen (aOn, aSeamless);
    21782178
    2179 #ifdef Q_WS_MAC 
     2179#ifdef Q_WS_MAC
    21802180    if (aOn && aSeamless)
    21812181    {
     
    34993499
    35003500    /* Setup settings layout */
    3501     mSettings = new VBoxSharedFoldersSettings (this, MachineType | ConsoleType);
     3501    mSettings = new VBoxVMSettingsSF (this, MachineType | ConsoleType);
    35023502    mSettings->getFromConsole (aSession.GetConsole());
    35033503    mSettings->getFromMachine (aSession.GetMachine());
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsSF.cpp

    r9242 r9253  
    22 *
    33 * VBox frontends: Qt4 GUI ("VirtualBox"):
    4  * VBoxSharedFoldersSettings class implementation
     4 * VBoxVMSettingsSF class implementation
    55 */
    66
     
    2121 */
    2222
    23 #include "VBoxSharedFoldersSettings.h"
     23#include "VBoxVMSettingsSF.h"
    2424#include "VBoxGlobal.h"
    2525#include "VBoxProblemReporter.h"
     
    171171
    172172
    173 VBoxSharedFoldersSettings::VBoxSharedFoldersSettings (QWidget *aParent,
    174                                                       int aType)
     173VBoxVMSettingsSF* VBoxVMSettingsSF::mSettings = 0;
     174
     175VBoxVMSettingsSF::VBoxVMSettingsSF (QWidget *aParent, int aType)
    175176    : QIWithRetranslateUI<QWidget> (aParent)
    176177    , mDialogType (aType)
     
    178179{
    179180    /* Apply UI decorations */
    180     Ui::VBoxSharedFoldersSettings::setupUi (this);
     181    Ui::VBoxVMSettingsSF::setupUi (this);
    181182
    182183    mTreeView->header()->setMovable (false);
     
    228229
    229230
    230 void VBoxSharedFoldersSettings::getFromGlobal()
     231void 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
     241void VBoxVMSettingsSF::putBackToMachineEx()
     242{
     243    mSettings->putBackToMachine();
     244}
     245
     246
     247void VBoxVMSettingsSF::getFromGlobal()
    231248{
    232249    AssertMsgFailed (("Global shared folders are not implemented yet\n"));
     
    236253}
    237254
    238 void VBoxSharedFoldersSettings::getFromMachine (const CMachine &aMachine)
     255void VBoxVMSettingsSF::getFromMachine (const CMachine &aMachine)
    239256{
    240257    mMachine = aMachine;
     
    244261}
    245262
    246 void VBoxSharedFoldersSettings::getFromConsole (const CConsole &aConsole)
     263void VBoxVMSettingsSF::getFromConsole (const CConsole &aConsole)
    247264{
    248265    mConsole = aConsole;
     
    253270
    254271
    255 void VBoxSharedFoldersSettings::putBackToGlobal()
     272void VBoxVMSettingsSF::putBackToGlobal()
    256273{
    257274    AssertMsgFailed (("Global shared folders are not implemented yet\n"));
     
    269286}
    270287
    271 void VBoxSharedFoldersSettings::putBackToMachine()
     288void VBoxVMSettingsSF::putBackToMachine()
    272289{
    273290    if (!mIsListViewChanged)
     
    283300}
    284301
    285 void VBoxSharedFoldersSettings::putBackToConsole()
     302void VBoxVMSettingsSF::putBackToConsole()
    286303{
    287304    if (!mIsListViewChanged)
     
    297314}
    298315
    299 void VBoxSharedFoldersSettings::retranslateUi()
     316void VBoxVMSettingsSF::retranslateUi()
    300317{
    301318    /* Translate uic generated strings */
    302     Ui::VBoxSharedFoldersSettings::retranslateUi (this);
     319    Ui::VBoxVMSettingsSF::retranslateUi (this);
    303320
    304321    mTrFull = tr ("Full");
     
    306323}
    307324
    308 void VBoxSharedFoldersSettings::tbAddPressed()
     325void VBoxVMSettingsSF::tbAddPressed()
    309326{
    310327    /* Invoke Add-Box Dialog */
     
    339356}
    340357
    341 void VBoxSharedFoldersSettings::tbEditPressed()
     358void VBoxVMSettingsSF::tbEditPressed()
    342359{
    343360    /* Check selected item */
     
    391408}
    392409
    393 void VBoxSharedFoldersSettings::tbRemovePressed()
     410void VBoxVMSettingsSF::tbRemovePressed()
    394411{
    395412    QTreeWidgetItem *selectedItem = mTreeView->selectedItems().size() == 1 ?
     
    402419
    403420
    404 void VBoxSharedFoldersSettings::processCurrentChanged (
     421void VBoxVMSettingsSF::processCurrentChanged (
    405422    QTreeWidgetItem *aCurrentItem, QTreeWidgetItem* /* aPreviousItem */)
    406423{
     
    417434}
    418435
    419 void VBoxSharedFoldersSettings::processDoubleClick (QTreeWidgetItem *aItem,
     436void VBoxVMSettingsSF::processDoubleClick (QTreeWidgetItem *aItem,
    420437                                                    int /* aColumn */)
    421438{
     
    427444
    428445
    429 void VBoxSharedFoldersSettings::adjustList()
     446void VBoxVMSettingsSF::adjustList()
    430447{
    431448    /* Adjust two columns size.
     
    449466}
    450467
    451 void VBoxSharedFoldersSettings::adjustFields()
     468void VBoxVMSettingsSF::adjustFields()
    452469{
    453470    QTreeWidgetItem *mainRoot = mTreeView->invisibleRootItem();
     
    467484
    468485
    469 void VBoxSharedFoldersSettings::showEvent (QShowEvent *aEvent)
     486void VBoxVMSettingsSF::showEvent (QShowEvent *aEvent)
    470487{
    471488    QWidget::showEvent (aEvent);
     
    476493
    477494
    478 void VBoxSharedFoldersSettings::removeSharedFolder (const QString & aName,
     495void VBoxVMSettingsSF::removeSharedFolder (const QString & aName,
    479496                                                    const QString & aPath,
    480497                                                    SFDialogType aType)
     
    513530}
    514531
    515 void VBoxSharedFoldersSettings::createSharedFolder (const QString & aName,
     532void VBoxVMSettingsSF::createSharedFolder (const QString & aName,
    516533                                                    const QString & aPath,
    517534                                                    bool aWritable,
     
    552569
    553570
    554 void VBoxSharedFoldersSettings::getFrom (const CSharedFolderEnumerator &aEn,
     571void VBoxVMSettingsSF::getFrom (const CSharedFolderEnumerator &aEn,
    555572                                         SFTreeViewItem *aRoot)
    556573{
     
    571588}
    572589
    573 void VBoxSharedFoldersSettings::putBackTo (CSharedFolderEnumerator &aEn,
    574                                            SFTreeViewItem *aRoot)
     590void VBoxVMSettingsSF::putBackTo (CSharedFolderEnumerator &aEn,
     591                                  SFTreeViewItem *aRoot)
    575592{
    576593    Assert (!aRoot->text (1).isNull());
     
    609626
    610627
    611 SFTreeViewItem* VBoxSharedFoldersSettings::searchRoot (bool aIsPermanent,
    612                                                        SFDialogType aType)
     628SFTreeViewItem* VBoxVMSettingsSF::searchRoot (bool aIsPermanent,
     629                                              SFDialogType aType)
    613630{
    614631    QString type = aType != WrongType ? QString::number (aType) :
     
    631648}
    632649
    633 bool VBoxSharedFoldersSettings::isEditable (const QString &aKey)
     650bool VBoxVMSettingsSF::isEditable (const QString &aKey)
    634651{
    635652    /* mDialogType should be correct */
     
    641658}
    642659
    643 SFoldersNameList VBoxSharedFoldersSettings::usedList (bool aIncludeSelected)
     660SFoldersNameList VBoxVMSettingsSF::usedList (bool aIncludeSelected)
    644661{
    645662    /* Make the used names list: */
     
    661678
    662679
    663 VBoxAddSFDialog::VBoxAddSFDialog (VBoxSharedFoldersSettings *aParent,
     680VBoxAddSFDialog::VBoxAddSFDialog (VBoxVMSettingsSF *aParent,
    664681                                  VBoxAddSFDialog::DialogType aType,
    665682                                  bool aEnableSelector,
     
    778795                               "on the host PC."));
    779796
    780     mLbName->setText (tr ("Folder Name")); 
     797    mLbName->setText (tr ("Folder Name"));
    781798    mLeName->setWhatsThis (tr ("Displays the name of the shared folder "
    782799                               "(as it will be seen by the guest OS)."));
     
    795812void VBoxAddSFDialog::validate()
    796813{
    797     int dlgType = static_cast<VBoxSharedFoldersSettings*>
     814    int dlgType = static_cast<VBoxVMSettingsSF*>
    798815                  (parent())->dialogType();
    799816    SFDialogType resultType =
  • trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsSF.ui

    r9242 r9253  
    1717 additional information or have any questions.
    1818 </comment>
    19  <class>VBoxSharedFoldersSettings</class>
    20  <widget class="QWidget" name="VBoxSharedFoldersSettings" >
     19 <class>VBoxVMSettingsSF</class>
     20 <widget class="QWidget" name="VBoxVMSettingsSF" >
    2121  <property name="geometry" >
    2222   <rect>
     
    3333   </sizepolicy>
    3434  </property>
    35   <property name="windowTitle" >
    36    <string comment="don't translate" >VBoxSharedFoldersSettings</string>
    37   </property>
    3835  <layout class="QVBoxLayout" >
    3936   <property name="leftMargin" >
     
    4138   </property>
    4239   <property name="topMargin" >
    43     <number>0</number>
     40    <number>5</number>
    4441   </property>
    4542   <property name="rightMargin" >
     
    5552     </property>
    5653     <layout class="QHBoxLayout" >
     54      <property name="topMargin" >
     55       <number>5</number>
     56      </property>
    5757      <item>
    5858       <widget class="QTreeWidget" name="mTreeView" >
  • trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsUSB.ui

    r9232 r9253  
    6060     </property>
    6161     <layout class="QHBoxLayout" >
     62      <property name="topMargin" >
     63       <number>5</number>
     64      </property>
    6265      <item>
    6366       <widget class="QTreeWidget" name="mTwFilters" >
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette