VirtualBox

Ignore:
Timestamp:
Jun 8, 2023 1:45:18 PM (20 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9080. Removed one of the panels. It did not have enough stuff in it to deserve its existence.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
2 deleted
7 edited

Legend:

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

    r100064 r100123  
    871871        src/medium/viso/UIVisoCreator.h \
    872872        src/medium/viso/UIVisoConfigurationPanel.h \
    873         src/medium/viso/UIVisoCreatorOptionsPanel.h \
    874873        src/medium/viso/UIVisoHostBrowser.h \
    875874        src/notificationcenter/UINotificationCenter.h \
     
    14541453        src/medium/viso/UIVisoCreator.cpp \
    14551454        src/medium/viso/UIVisoConfigurationPanel.cpp \
    1456         src/medium/viso/UIVisoCreatorOptionsPanel.cpp \
    14571455        src/medium/viso/UIVisoHostBrowser.cpp \
    14581456        src/notificationcenter/UINotificationCenter.cpp \
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp

    r100071 r100123  
    22892289    {
    22902290        setName(QApplication::translate("UIActionPool", "VISO Creator"));
    2291     }
    2292 };
    2293 
    2294 /** Toggle action extension, used to toggle 'VISO Creator configuration' panel in file manager. */
    2295 class UIActionMenuVISOCreatorToggleConfigPanel : public UIActionToggle
    2296 {
    2297     Q_OBJECT;
    2298 
    2299 public:
    2300 
    2301     /** Constructs action passing @a pParent to the base-class. */
    2302     UIActionMenuVISOCreatorToggleConfigPanel(UIActionPool *pParent)
    2303         : UIActionToggle(pParent)
    2304     {
    2305         setShortcutContext(Qt::WidgetWithChildrenShortcut);
    2306         setIcon(UIIconPool::iconSetFull(":/file_manager_options_32px.png",
    2307                                         ":/%file_manager_options_16px.png",
    2308                                         ":/file_manager_options_disabled_32px.png",
    2309                                         ":/file_manager_options_disabled_16px.png"));
    2310     }
    2311 
    2312 protected:
    2313 
    2314     /** Returns shortcut extra-data ID. */
    2315     virtual QString shortcutExtraDataID() const RT_OVERRIDE
    2316     {
    2317         return QString("ToggleVISOCreatorConfigurationPanel");
    2318     }
    2319 
    2320     /** Returns default shortcut. */
    2321     virtual QKeySequence defaultShortcut(UIActionPoolType) const RT_OVERRIDE
    2322     {
    2323         return QKeySequence();
    2324     }
    2325 
    2326     /** Handles translation event. */
    2327     virtual void retranslateUi() RT_OVERRIDE
    2328     {
    2329         setName(QApplication::translate("UIActionPool", "Configuration"));
    2330         setShortcutScope(QApplication::translate("UIActionPool", "VISO Creator"));
    2331         setStatusTip(QApplication::translate("UIActionPool", "Open panel for VISO Creator configuration"));
    2332         setToolTip(QApplication::translate("UIActionPool", "Open Configuration Panel")
    2333                    + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
    23342291    }
    23352292};
     
    32293186    /* Create VISO Creator actions: */
    32303187    m_pool[UIActionIndex_M_VISOCreator] = new UIActionMenuVISOCreator(this);
    3231     m_pool[UIActionIndex_M_VISOCreator_ToggleConfigPanel] = new UIActionMenuVISOCreatorToggleConfigPanel(this);
    32323188    m_pool[UIActionIndex_M_VISOCreator_ToggleOptionsPanel] = new UIActionMenuVISOCreatorToggleOptionsPanel(this);
    32333189    m_pool[UIActionIndex_M_VISOCreator_Add] = new UIActionMenuVISOCreatorAdd(this);
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h

    r100071 r100123  
    151151    /* VISO Creator actions: */
    152152    UIActionIndex_M_VISOCreator,
    153     UIActionIndex_M_VISOCreator_ToggleConfigPanel,
    154153    UIActionIndex_M_VISOCreator_ToggleOptionsPanel,
    155154    UIActionIndex_M_VISOCreator_Add,
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoConfigurationPanel.cpp

    r100107 r100123  
    2727
    2828/* Qt includes: */
     29#include <QCheckBox>
    2930#include <QComboBox>
    3031#include <QGridLayout>
     
    4344    , m_pVisoNameLineEdit(0)
    4445    , m_pCustomOptionsLineEdit(0)
     46    , m_pShowHiddenObjectsCheckBox(0)
     47    , m_pShowHiddenObjectsLabel(0)
    4548{
    4649    prepareObjects();
     
    6972    m_pCustomOptionsLineEdit->clear();
    7073    m_pCustomOptionsLineEdit->setText(visoCustomOptions.join(";"));
     74}
     75
     76void UIVisoConfigurationPanel::setShowHiddenbjects(bool fShow)
     77{
     78    if (m_pShowHiddenObjectsCheckBox)
     79        m_pShowHiddenObjectsCheckBox->setChecked(fShow);
    7180}
    7281
     
    99108        mainLayout()->addWidget(m_pCustomOptionsLineEdit, Qt::AlignLeft);
    100109    }
     110
     111
     112    m_pShowHiddenObjectsCheckBox = new QCheckBox;
     113    m_pShowHiddenObjectsLabel = new QILabel(QApplication::translate("UIVisoCreatorWidget", "Show Hidden Objects"));
     114    m_pShowHiddenObjectsLabel->setBuddy(m_pShowHiddenObjectsCheckBox);
     115    mainLayout()->addWidget(m_pShowHiddenObjectsCheckBox, 0, Qt::AlignLeft);
     116    mainLayout()->addWidget(m_pShowHiddenObjectsLabel, 0, Qt::AlignLeft);
     117    mainLayout()->addStretch(6);
     118
     119
    101120    retranslateUi();
    102121}
     
    108127    if (m_pCustomOptionsLabel)
    109128        connect(m_pCustomOptionsLineEdit, &QILineEdit::editingFinished, this, &UIVisoConfigurationPanel::sltCustomOptionsEdited);
     129    if (m_pShowHiddenObjectsCheckBox)
     130        connect(m_pShowHiddenObjectsCheckBox, &QCheckBox::stateChanged,
     131                this, &UIVisoConfigurationPanel::sltShowHiddenObjectsChange);
    110132}
    111133
     
    121143    if (m_pCustomOptionsLineEdit)
    122144        m_pCustomOptionsLineEdit->setToolTip(QApplication::translate("UIVisoCreatorWidget", "The list of suctom options delimited with ';'."));
     145    if (m_pShowHiddenObjectsLabel)
     146        m_pShowHiddenObjectsLabel->setText(QApplication::translate("UIVisoCreatorWidget", "Show Hidden Objects"));
     147    if (m_pShowHiddenObjectsCheckBox)
     148        m_pShowHiddenObjectsCheckBox->setToolTip(QApplication::translate("UIVisoCreatorWidget", "When checked, "
     149                                                                         "multiple hidden objects are shown in the file browser"));
    123150}
    124151
     
    137164        emit sigVisoNameChanged(m_pVisoNameLineEdit->text());
    138165}
     166
     167void UIVisoConfigurationPanel::sltShowHiddenObjectsChange(int iState)
     168{
     169    if (iState == static_cast<int>(Qt::Checked))
     170        sigShowHiddenObjects(true);
     171    else
     172        sigShowHiddenObjects(false);
     173}
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoConfigurationPanel.h

    r100107 r100123  
    3636
    3737/* Forward declarations: */
     38class QCheckBox;
    3839class QComboBox;
    3940class QILabel;
     
    4950    void sigVisoNameChanged(const QString &strVisoName);
    5051    void sigCustomVisoOptionsChanged(const QStringList &customVisoOptions);
     52    void sigShowHiddenObjects(bool fShow);
    5153
    5254public:
     55
    5356    UIVisoConfigurationPanel(QWidget *pParent = 0);
    5457    ~UIVisoConfigurationPanel();
     
    5659    void setVisoName(const QString& strVisoName);
    5760    void setVisoCustomOptions(const QStringList& visoCustomOptions);
     61    void setShowHiddenbjects(bool fShow);
    5862
    5963protected:
     
    6569    void sltVisoNameChanged();
    6670    void sltCustomOptionsEdited();
     71    void sltShowHiddenObjectsChange(int iState);
    6772
    6873private:
     
    7580    QILineEdit   *m_pVisoNameLineEdit;
    7681    QILineEdit   *m_pCustomOptionsLineEdit;
     82    QCheckBox    *m_pShowHiddenObjectsCheckBox;
     83    QILabel      *m_pShowHiddenObjectsLabel;
    7784};
    7885
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp

    r100122 r100123  
    4848#include "UIVisoCreator.h"
    4949#include "UIVisoConfigurationPanel.h"
    50 #include "UIVisoCreatorOptionsPanel.h"
    5150#include "UIVisoContentBrowser.h"
    5251#ifdef VBOX_WS_MAC
     
    6665                                         bool fShowToolBar, const QString& strMachineName /* = QString() */)
    6766    : QIWithRetranslateUI<QWidget>(pParent)
    68     , m_pActionConfiguration(0)
    6967    , m_pActionOptions(0)
    7068    , m_pAddAction(0)
     
    308306    }
    309307
    310     m_pCreatorOptionsPanel = new UIVisoCreatorOptionsPanel;
     308    m_pCreatorOptionsPanel = new UIVisoConfigurationPanel;
    311309    if (m_pCreatorOptionsPanel)
    312310    {
     
    339337    }
    340338
    341     if (m_pActionConfiguration)
    342         connect(m_pActionConfiguration, &QAction::triggered, this, &UIVisoCreatorWidget::sltPanelActionToggled);
    343339    if (m_pActionOptions)
    344340        connect(m_pActionOptions, &QAction::triggered, this, &UIVisoCreatorWidget::sltPanelActionToggled);
     
    352348        connect(m_pConfigurationPanel, &UIVisoConfigurationPanel::sigHidePanel,
    353349                this, &UIVisoCreatorWidget::sltHandleHidePanel);
    354         m_panelActionMap.insert(m_pConfigurationPanel, m_pActionConfiguration);
    355350    }
    356351
    357352    if (m_pCreatorOptionsPanel)
    358353    {
    359         connect(m_pCreatorOptionsPanel, &UIVisoCreatorOptionsPanel::sigShowHiddenObjects,
     354        connect(m_pCreatorOptionsPanel, &UIVisoConfigurationPanel::sigShowHiddenObjects,
    360355                this, &UIVisoCreatorWidget::sltHandleShowHiddenObjectsChange);
    361         connect(m_pCreatorOptionsPanel, &UIVisoCreatorOptionsPanel::sigHidePanel,
     356        connect(m_pCreatorOptionsPanel, &UIVisoConfigurationPanel::sigHidePanel,
    362357                this, &UIVisoCreatorWidget::sltHandleHidePanel);
    363358        m_panelActionMap.insert(m_pCreatorOptionsPanel, m_pActionOptions);
     
    390385        return;
    391386
    392     m_pActionConfiguration = m_pActionPool->action(UIActionIndex_M_VISOCreator_ToggleConfigPanel);
    393387    m_pActionOptions = m_pActionPool->action(UIActionIndex_M_VISOCreator_ToggleOptionsPanel);
    394388
    395     m_pOpenAction = m_pActionPool->action(UIActionIndex_M_VISOCreator_Open);
    396389    m_pAddAction = m_pActionPool->action(UIActionIndex_M_VISOCreator_Add);
    397390    if (m_pAddAction && m_pHostBrowser)
     
    412405    if (m_pToolBar)
    413406    {
    414         if (m_pActionConfiguration)
    415             m_pToolBar->addAction(m_pActionConfiguration);
    416407        if (m_pActionOptions)
    417408            m_pToolBar->addAction(m_pActionOptions);
     
    419410    if (m_pMainMenu)
    420411    {
    421         m_pMainMenu->addAction(m_pActionConfiguration);
    422412        m_pMainMenu->addAction(m_pActionOptions);
    423413        m_pMainMenu->addSeparator();
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h

    r100114 r100123  
    5353class UIVisoHostBrowser;
    5454class UIVisoContentBrowser;
    55 class UIVisoCreatorOptionsPanel;
    5655class UIVisoConfigurationPanel;
    5756
     
    147146    /** @name Main toolbar (and main menu) actions
    148147      * @{ */
    149         QAction         *m_pActionConfiguration;
    150148        QAction         *m_pActionOptions;
    151149    /** @} */
     
    170168    BrowserOptions        m_browserOptions;
    171169    QMenu                *m_pMainMenu;
    172     UIVisoCreatorOptionsPanel *m_pCreatorOptionsPanel;
     170    UIVisoConfigurationPanel *m_pCreatorOptionsPanel;
    173171    UIVisoConfigurationPanel  *m_pConfigurationPanel;
    174172    QMap<UIDialogPanel*, QAction*> m_panelActionMap;
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