VirtualBox

Changeset 47134 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 14, 2013 2:18:13 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Global preferences: *General* page cleanup/rework (part 2).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/global
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp

    r47130 r47134  
    1818 */
    1919
    20 /* Global includes */
     20/* Qt includes: */
    2121#include <QDir>
    2222
    23 /* Local includes */
     23/* GUI includes: */
    2424#include "UIGlobalSettingsGeneral.h"
    2525#include "VBoxGlobal.h"
    2626
    27 /* General page constructor: */
    2827UIGlobalSettingsGeneral::UIGlobalSettingsGeneral()
    2928{
     
    3231
    3332#ifndef Q_WS_MAC
    34     m_pPresentationModeLabel->hide();
    35     m_pPresentationModeCheckbox->hide();
     33    m_pLabelPresentationMode->hide();
     34    m_pCheckBoxPresentationMode->hide();
    3635#endif /* !Q_WS_MAC */
    3736    /* Hide checkbox for now: */
    38     m_pHostScreenSaverLabel->hide();
    39     m_pHostScreenSaverCheckbox->hide();
     37    m_pLabelHostScreenSaver->hide();
     38    m_pCheckBoxHostScreenSaver->hide();
    4039
    4140    /* Setup widgets: */
    42     m_pMachineFolderSelector->setHomeDir(vboxGlobal().virtualBox().GetHomeFolder());
    43     m_pVRDPLibNameSelector->setHomeDir(vboxGlobal().virtualBox().GetHomeFolder());
    44     m_pVRDPLibNameSelector->setMode(VBoxFilePathSelectorWidget::Mode_File_Open);
     41    m_pSelectorMachineFolder->setHomeDir(vboxGlobal().virtualBox().GetHomeFolder());
     42    m_pSelectorVRDPLibName->setHomeDir(vboxGlobal().virtualBox().GetHomeFolder());
     43    m_pSelectorVRDPLibName->setMode(VBoxFilePathSelectorWidget::Mode_File_Open);
    4544
    4645    /* Apply language settings: */
     
    7271{
    7372    /* Fetch from cache: */
    74     m_pMachineFolderSelector->setPath(m_cache.m_strDefaultMachineFolder);
    75     m_pVRDPLibNameSelector->setPath(m_cache.m_strVRDEAuthLibrary);
     73    m_pSelectorMachineFolder->setPath(m_cache.m_strDefaultMachineFolder);
     74    m_pSelectorVRDPLibName->setPath(m_cache.m_strVRDEAuthLibrary);
    7675#ifdef Q_WS_MAC
    77     m_pPresentationModeCheckbox->setChecked(m_cache.m_fPresentationModeEnabled);
     76    m_pCheckBoxPresentationMode->setChecked(m_cache.m_fPresentationModeEnabled);
    7877#endif /* Q_WS_MAC */
    79     m_pHostScreenSaverCheckbox->setChecked(m_cache.m_fHostScreenSaverDisabled);
     78    m_pCheckBoxHostScreenSaver->setChecked(m_cache.m_fHostScreenSaverDisabled);
    8079}
    8180
     
    8584{
    8685    /* Upload to cache: */
    87     m_cache.m_strDefaultMachineFolder = m_pMachineFolderSelector->path();
    88     m_cache.m_strVRDEAuthLibrary = m_pVRDPLibNameSelector->path();
     86    m_cache.m_strDefaultMachineFolder = m_pSelectorMachineFolder->path();
     87    m_cache.m_strVRDEAuthLibrary = m_pSelectorVRDPLibName->path();
    8988#ifdef Q_WS_MAC
    90     m_cache.m_fPresentationModeEnabled = m_pPresentationModeCheckbox->isChecked();
     89    m_cache.m_fPresentationModeEnabled = m_pCheckBoxPresentationMode->isChecked();
    9190#endif /* Q_WS_MAC */
    92     m_cache.m_fHostScreenSaverDisabled = m_pHostScreenSaverCheckbox->isChecked();
     91    m_cache.m_fHostScreenSaverDisabled = m_pCheckBoxHostScreenSaver->isChecked();
    9392}
    9493
     
    101100
    102101    /* Save from cache: */
    103     if (m_properties.isOk() && m_pMachineFolderSelector->isModified())
     102    if (m_properties.isOk() && m_pSelectorMachineFolder->isModified())
    104103        m_properties.SetDefaultMachineFolder(m_cache.m_strDefaultMachineFolder);
    105     if (m_properties.isOk() && m_pVRDPLibNameSelector->isModified())
     104    if (m_properties.isOk() && m_pSelectorVRDPLibName->isModified())
    106105        m_properties.SetVRDEAuthLibrary(m_cache.m_strVRDEAuthLibrary);
    107106#ifdef Q_WS_MAC
     
    114113}
    115114
    116 /* Navigation stuff: */
    117115void UIGlobalSettingsGeneral::setOrderAfter(QWidget *pWidget)
    118116{
    119     setTabOrder(pWidget, m_pMachineFolderSelector);
    120     setTabOrder(m_pMachineFolderSelector, m_pVRDPLibNameSelector);
    121     setTabOrder(m_pVRDPLibNameSelector, m_pPresentationModeCheckbox);
    122     setTabOrder(m_pPresentationModeCheckbox, m_pHostScreenSaverCheckbox);
     117    /* Configure navigation: */
     118    setTabOrder(pWidget, m_pSelectorMachineFolder);
     119    setTabOrder(m_pSelectorMachineFolder, m_pSelectorVRDPLibName);
     120    setTabOrder(m_pSelectorVRDPLibName, m_pCheckBoxPresentationMode);
     121    setTabOrder(m_pCheckBoxPresentationMode, m_pCheckBoxHostScreenSaver);
    123122}
    124123
    125 /* Translation stuff: */
    126124void UIGlobalSettingsGeneral::retranslateUi()
    127125{
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.ui

    r47130 r47134  
    1515 <class>UIGlobalSettingsGeneral</class>
    1616 <widget class="QWidget" name="UIGlobalSettingsGeneral">
    17   <property name="geometry">
    18    <rect>
    19     <x>0</x>
    20     <y>0</y>
    21     <width>400</width>
    22     <height>200</height>
    23    </rect>
    24   </property>
    2517  <layout class="QGridLayout">
    2618   <property name="margin">
     
    2820   </property>
    2921   <item row="0" column="0">
    30     <widget class="QLabel" name="m_pMachineFolderLabel">
     22    <widget class="QLabel" name="m_pLabelMachineFolder">
    3123     <property name="text">
    3224      <string>Default &amp;Machine Folder:</string>
     
    3628     </property>
    3729     <property name="buddy">
    38       <cstring>m_pMachineFolderSelector</cstring>
     30      <cstring>m_pSelectorMachineFolder</cstring>
    3931     </property>
    4032    </widget>
    4133   </item>
    4234   <item row="0" column="1">
    43     <widget class="VBoxFilePathSelectorWidget" name="m_pMachineFolderSelector">
     35    <widget class="VBoxFilePathSelectorWidget" name="m_pSelectorMachineFolder">
    4436     <property name="sizePolicy">
    4537      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
     
    5446   </item>
    5547   <item row="1" column="0">
    56     <widget class="QLabel" name="m_pVRDPLibNameLabel">
     48    <widget class="QLabel" name="m_pLabelVRDPLibName">
    5749     <property name="text">
    5850      <string>V&amp;RDP Authentication Library:</string>
     
    6254     </property>
    6355     <property name="buddy">
    64       <cstring>m_pVRDPLibNameSelector</cstring>
     56      <cstring>m_pSelectorVRDPLibName</cstring>
    6557     </property>
    6658    </widget>
    6759   </item>
    6860   <item row="1" column="1">
    69     <widget class="VBoxFilePathSelectorWidget" name="m_pVRDPLibNameSelector">
     61    <widget class="VBoxFilePathSelectorWidget" name="m_pSelectorVRDPLibName">
    7062     <property name="sizePolicy">
    7163      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
     
    8072   </item>
    8173   <item row="2" column="0">
    82     <widget class="QLabel" name="m_pPresentationModeLabel">
     74    <widget class="QLabel" name="m_pLabelPresentationMode">
    8375     <property name="text">
    8476      <string>&amp;Dock and Menubar:</string>
     
    8880     </property>
    8981     <property name="buddy">
    90       <cstring>m_pPresentationModeCheckbox</cstring>
     82      <cstring>m_pCheckBoxPresentationMode</cstring>
    9183     </property>
    9284    </widget>
    9385   </item>
    9486   <item row="2" column="1">
    95     <widget class="QCheckBox" name="m_pPresentationModeCheckbox">
     87    <widget class="QCheckBox" name="m_pCheckBoxPresentationMode">
    9688     <property name="text">
    9789      <string>Auto Show in Fullscreen</string>
     
    10395   </item>
    10496   <item row="3" column="0">
    105     <widget class="QLabel" name="m_pHostScreenSaverLabel">
     97    <widget class="QLabel" name="m_pLabelHostScreenSaver">
    10698     <property name="text">
    10799      <string>&amp;Host Screen Saver:</string>
     
    111103     </property>
    112104     <property name="buddy">
    113       <cstring>m_pHostScreenSaverCheckbox</cstring>
     105      <cstring>m_pCheckBoxHostScreenSaver</cstring>
    114106     </property>
    115107    </widget>
    116108   </item>
    117109   <item row="3" column="1">
    118     <widget class="QCheckBox" name="m_pHostScreenSaverCheckbox">
     110    <widget class="QCheckBox" name="m_pCheckBoxHostScreenSaver">
    119111     <property name="whatsThis">
    120112      <string>When checked, the host screen saver will be disabled whenever a virtual machine is running.</string>
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp

    r47133 r47134  
    2222#include "VBoxGlobal.h"
    2323
    24 /* Update page constructor: */
    2524UIGlobalSettingsUpdate::UIGlobalSettingsUpdate()
    2625    : m_pLastChosenRadio(0)
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