VirtualBox

Changeset 77528 in vbox for trunk/src


Ignore:
Timestamp:
Mar 1, 2019 1:07:07 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: Some more code cleanup.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp

    r76977 r77528  
    1717
    1818/* Qt includes: */
    19 #include <QAbstractItemModel>
    20 #include <QCheckBox>
    2119#include <QHBoxLayout>
    22 #include <QHeaderView>
    2320#include <QPushButton>
    2421#include <QSplitter>
    25 #include <QTableWidget>
    26 #include <QTextEdit>
    2722
    2823/* GUI includes: */
    29 #include "QILabel.h"
    30 #include "QILineEdit.h"
    31 #include "QITabWidget.h"
    3224#include "QITreeWidget.h"
    33 #include "QIWithRetranslateUI.h"
    3425#include "UIActionPool.h"
    3526#include "UIErrorString.h"
    3627#include "UIExtraDataManager.h"
    3728#include "UIIconPool.h"
    38 #include "UIGuestControlConsole.h"
    3929#include "UIFileManager.h"
    4030#include "UIFileManagerSessionPanel.h"
     
    4333#include "UIFileManagerOperationsPanel.h"
    4434#include "UIFileManagerGuestTable.h"
     35#include "UIFileManagerHostTable.h"
    4536#include "UIGuestControlInterface.h"
    46 #include "UIFileManagerHostTable.h"
    4737#include "UIToolBar.h"
    4838#include "VBoxGlobal.h"
     
    5040/* COM includes: */
    5141#include "CFsObjInfo.h"
    52 #include "CGuest.h"
    5342#include "CGuestDirectory.h"
    5443#include "CGuestFsObjInfo.h"
    55 #include "CGuestProcess.h"
    5644#include "CGuestSession.h"
    5745#include "CGuestSessionStateChangedEvent.h"
     
    6856
    6957    UIFileOperationsList(QWidget *pParent = 0);
    70 
    71 private:
    7258};
    7359
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.h

    r76950 r77528  
    4141class QHBoxLayout;
    4242class QSplitter;
    43 class QTableWidget;
    4443class QTextEdit;
    4544class QVBoxLayout;
    46 class QITabWidget;
    4745class CGuestSessionStateChangedEvent;
    4846class UIActionPool;
    49 class UIFileOperationsList;
    50 class UIGuestControlConsole;
    51 class UIGuestControlInterface;
    5247class UIDialogPanel;
    5348class UIFileManagerLogPanel;
     
    5752class UIFileManagerGuestTable;
    5853class UIFileManagerHostTable;
    59 class UIGuestSessionCreateWidget;
    6054class UIToolBar;
    6155
     
    9084    Q_OBJECT;
    9185
     86signals:
     87
     88    void sigSetCloseButtonShortCut(QKeySequence);
     89
    9290public:
    9391
     
    10199    UIToolBar *toolbar() const { return m_pToolBar; }
    102100#endif
    103 
    104 signals:
    105 
    106     void sigSetCloseButtonShortCut(QKeySequence);
    107101
    108102protected:
     
    178172    UIToolBar                *m_pVerticalToolBar;
    179173
    180     UIGuestControlConsole    *m_pConsole;
    181     UIGuestControlInterface  *m_pControlInterface;
    182174    UIFileManagerGuestTable         *m_pGuestFileTable;
    183175    UIFileManagerHostTable   *m_pHostFileTable;
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.h

    r76581 r77528  
    5959};
    6060
    61 
    6261/** QIManagerDialog extension providing GUI with the dialog displaying file manager releated logs. */
    6362class UIFileManagerDialog : public QIWithRetranslateUI<QIManagerDialog>
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.h

    r76626 r77528  
    4242    Q_OBJECT;
    4343
     44signals:
     45
     46    void sigNewFileOperation(const CProgress &comProgress);
     47
    4448public:
    4549
     
    4953    void copyHostToGuest(const QStringList &hostSourcePathList,
    5054                         const QString &strDestination = QString());
    51 
    52 signals:
    53 
    54     void sigNewFileOperation(const CProgress &comProgress);
    5555
    5656protected:
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.h

    r76581 r77528  
    6969    static QString permissionString(QFileDevice::Permissions permissions);
    7070    void    prepareActionConnections();
    71 
    7271};
    7372
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerOperationsPanel.cpp

    r77158 r77528  
    4949    Q_OBJECT;
    5050
     51signals:
     52
     53    void sigProgressComplete(QUuid progressId);
     54    void sigProgressFail(QString strErrorString, FileManagerLogType eLogType);
     55    void sigFocusIn(QWidget *pWidget);
     56    void sigFocusOut(QWidget *pWidget);
     57
    5158public:
    5259
     
    5562    bool isCompleted() const;
    5663    bool isCanceled() const;
    57 
    58 signals:
    59 
    60     void sigProgressComplete(QUuid progressId);
    61     void sigProgressFail(QString strErrorString, FileManagerLogType eLogType);
    62     void sigFocusIn(QWidget *pWidget);
    63     void sigFocusOut(QWidget *pWidget);
    6464
    6565protected:
     
    8686        OperationStatus_Invalid,
    8787        OperationStatus_Max
    88 
    8988    };
     89
    9090    void prepare();
    9191    void prepareWidgets();
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerOperationsPanel.h

    r76950 r77528  
    4646    Q_OBJECT;
    4747
     48signals:
     49
     50    void sigFileOperationComplete(QUuid progressId);
     51    void sigFileOperationFail(QString strErrorString, FileManagerLogType eLogType);
     52
    4853public:
    4954
     
    5156    virtual QString panelName() const /* override */;
    5257    void addNewProgress(const CProgress &comProgress);
    53 
    54 signals:
    55 
    56     void sigFileOperationComplete(QUuid progressId);
    57     void sigFileOperationFail(QString strErrorString, FileManagerLogType eLogType);
    5858
    5959protected:
     
    9090        QSet<QWidget*>  m_widgetSet;
    9191    /** @} */
    92 
    93 
    94 
    9592};
    9693
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerOptionsPanel.cpp

    r76950 r77528  
    1717
    1818/* Qt includes: */
    19 #include <QComboBox>
    2019#include <QHBoxLayout>
    21 #include <QFontDatabase>
    22 #include <QFontDialog>
    2320#include <QCheckBox>
    24 #include <QLabel>
    25 #include <QSpinBox>
    2621
    2722/* GUI includes: */
    2823#include "QIToolButton.h"
    29 #include "UIIconPool.h"
    3024#include "UIFileManager.h"
    3125#include "UIFileManagerOptionsPanel.h"
    32 
    3326
    3427UIFileManagerOptionsPanel::UIFileManagerOptionsPanel(QWidget *pParent, UIFileManagerOptions *pFileManagerOptions)
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerOptionsPanel.h

    r76950 r77528  
    2727/* Forward declarations: */
    2828class QCheckBox;
    29 class QSpinBox;
    3029class QLabel;
    3130class QIToolButton;
     
    3837    Q_OBJECT;
    3938
     39signals:
     40
     41    void sigOptionsChanged();
     42
    4043public:
    4144
     
    4548     *  when file manager options have been changed by other means and this panel needs to adapt. */
    4649    void update();
    47 
    48 signals:
    49 
    50     void sigOptionsChanged();
    5150
    5251protected:
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerSessionPanel.cpp

    r77171 r77528  
    1919#include <QCheckBox>
    2020#include <QHBoxLayout>
    21 #include <QMenu>
    2221#include <QPushButton>
    23 #include <QSpinBox>
    24 #include <QTextEdit>
    2522
    2623/* GUI includes: */
    2724#include "QILineEdit.h"
    28 #include "QIToolButton.h"
    29 #include "UIIconPool.h"
    30 #include "UIFileManager.h"
    3125#include "UIFileManagerSessionPanel.h"
    32 
    3326
    3427/*********************************************************************************************************************************
     
    10396    {
    10497        m_pMainLayout->addWidget(m_pUserNameEdit, 2);
    105         m_pUserNameEdit->setPlaceholderText("User Name");
     98        m_pUserNameEdit->setPlaceholderText(QApplication::translate("UIFileManager", "User Name"));
    10699    }
    107100
     
    110103    {
    111104        m_pMainLayout->addWidget(m_pPasswordEdit, 2);
    112         m_pPasswordEdit->setPlaceholderText(UIFileManager::tr("Password"));
     105        m_pPasswordEdit->setPlaceholderText(QApplication::translate("UIFileManager", "Password"));
    113106        m_pPasswordEdit->setEchoMode(QLineEdit::Password);
    114107    }
     
    117110    if (m_pShowPasswordCheckBox)
    118111    {
    119         m_pShowPasswordCheckBox->setText(UIFileManager::tr("Show Password"));
     112        m_pShowPasswordCheckBox->setText(QApplication::translate("UIFileManager", "Show Password"));
    120113        m_pMainLayout->addWidget(m_pShowPasswordCheckBox);
    121114        connect(m_pShowPasswordCheckBox, &QCheckBox::toggled,
     
    161154    if (m_pUserNameEdit)
    162155    {
    163         m_pUserNameEdit->setToolTip(UIFileManager::tr("User name to authenticate session creation"));
    164         m_pUserNameEdit->setPlaceholderText(UIFileManager::tr("User Name"));
    165 
    166     }
    167     if (m_pPasswordEdit)
    168     {
    169         m_pPasswordEdit->setToolTip(UIFileManager::tr("Password to authenticate session creation"));
    170         m_pPasswordEdit->setPlaceholderText(UIFileManager::tr("Password"));
    171     }
    172 
    173     if (m_pCreateButton)
    174         m_pCreateButton->setText(UIFileManager::tr("Create Session"));
    175     if (m_pCloseButton)
    176         m_pCloseButton->setText(UIFileManager::tr("Close Session"));
     156        m_pUserNameEdit->setToolTip(QApplication::translate("UIFileManager", "User name to authenticate session creation"));
     157        m_pUserNameEdit->setPlaceholderText(QApplication::translate("UIFileManager", "User Name"));
     158
     159    }
     160    if (m_pPasswordEdit)
     161    {
     162        m_pPasswordEdit->setToolTip(QApplication::translate("UIFileManager", "Password to authenticate session creation"));
     163        m_pPasswordEdit->setPlaceholderText(QApplication::translate("UIFileManager", "Password"));
     164    }
     165
     166    if (m_pCreateButton)
     167        m_pCreateButton->setText(QApplication::translate("UIFileManager", "Create Session"));
     168    if (m_pCloseButton)
     169        m_pCloseButton->setText(QApplication::translate("UIFileManager", "Close Session"));
    177170}
    178171
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerSessionPanel.h

    r76950 r77528  
    2626
    2727/* Forward declarations: */
    28 class QTextEdit;
    29 class UIFileManager;
    3028class UIGuestSessionCreateWidget;
    3129
     
    3432{
    3533    Q_OBJECT;
     34
     35signals:
     36
     37    void sigCreateSession(QString strUserName, QString strPassword);
     38    void sigCloseSession();
    3639
    3740public:
     
    4447    /** @} */
    4548    virtual QString panelName() const /* override */;
    46 
    47 signals:
    48 
    49     void sigCreateSession(QString strUserName, QString strPassword);
    50     void sigCloseSession();
    5149
    5250protected:
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp

    r77286 r77528  
    2020#include <QComboBox>
    2121#include <QCheckBox>
    22 #include <QDateTime>
    23 #include <QDir>
    2422#include <QHeaderView>
    2523#include <QItemDelegate>
    2624#include <QGridLayout>
    27 #include <QMenu>
    28 #include <QSortFilterProxyModel>
    2925#include <QTextEdit>
    30 #include <QPushButton>
    3126
    3227/* GUI includes: */
     
    3530#include "QILabel.h"
    3631#include "QILineEdit.h"
    37 #include "QIMessageBox.h"
    3832#include "VBoxGlobal.h"
    3933#include "UIActionPool.h"
     
    9892
    9993    virtual void drawFocus ( QPainter * /*painter*/, const QStyleOptionViewItem & /*option*/, const QRect & /*rect*/ ) const {}
    100 
    10194};
    10295
     
    120113
    121114    QILineEdit      *m_pLineEdit;
    122 
    123115};
    124116
     
    144136    QCheckBox *m_pAskNextTimeCheckBox;
    145137    QILabel   *m_pQuestionLabel;
    146 
    147138};
    148139
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.h

    r76581 r77528  
    104104};
    105105
    106 
    107106/** A QIDialog child to display properties of a file object */
    108107class UIPropertiesDialog : public QIDialog
     
    123122    QString      m_strProperty;
    124123};
    125 
    126124
    127125/** This class serves a base class for file table. Currently a guest version
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlTreeItem.h

    r76581 r77528  
    110110    void initProcessSubTree();
    111111    CGuestSession m_comGuestSession;
    112 
    113112};
    114113
     
    151150
    152151#endif /* !FEQT_INCLUDED_SRC_guestctrl_UIGuestControlTreeItem_h */
    153 
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlDialog.h

    r76581 r77528  
    3434
    3535/* Forward declarations: */
    36 class QDialogButtonBox;
    37 class QVBoxLayout;
    3836class UIActionPool;
    3937class UIGuestProcessControlDialog;
    4038class CGuest;
    41 
    4239
    4340/** QIManagerDialogFactory extension used as a factory for the Guest Control dialog. */
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlWidget.cpp

    r76606 r77528  
    158158        }
    159159    }
    160 
    161160};
    162161
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.cpp

    r77519 r77528  
    7272};
    7373
     74
    7475/*********************************************************************************************************************************
    7576*   UIVisoContentTableView implementation.                                                                                       *
     
    111112}
    112113
     114
    113115/*********************************************************************************************************************************
    114116*   UIVisoContentTreeProxyModel implementation.                                                                                  *
     
    137139    return false;
    138140}
     141
    139142
    140143/*********************************************************************************************************************************
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