1 | /* $Id: UIGuestControlFileManagerDialog.h 75268 2018-11-06 10:10:47Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIGuestControlFileManagerDialog class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-2018 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef ___UIGuestControlFileManagerDialog_h___
|
---|
19 | #define ___UIGuestControlFileManagerDialog_h___
|
---|
20 |
|
---|
21 | /* Qt includes: */
|
---|
22 | #include <QString>
|
---|
23 |
|
---|
24 | /* GUI includes: */
|
---|
25 | #include "QIManagerDialog.h"
|
---|
26 | #include "QIWithRetranslateUI.h"
|
---|
27 |
|
---|
28 | /* COM includes: */
|
---|
29 | #include "COMEnums.h"
|
---|
30 | #include "CGuest.h"
|
---|
31 |
|
---|
32 | /* Forward declarations: */
|
---|
33 | class QDialogButtonBox;
|
---|
34 | class QVBoxLayout;
|
---|
35 | class UIActionPool;
|
---|
36 | class UIGuestControlFileManagerDialog;
|
---|
37 | class CGuest;
|
---|
38 |
|
---|
39 |
|
---|
40 | /** QIManagerDialogFactory extension used as a factory for the Guest Control dialog. */
|
---|
41 | class UIGuestControlFileManagerDialogFactory : public QIManagerDialogFactory
|
---|
42 | {
|
---|
43 | public:
|
---|
44 |
|
---|
45 | UIGuestControlFileManagerDialogFactory(UIActionPool *pActionPool = 0, const CGuest &comGuest = CGuest(), const QString &strMachineName = QString());
|
---|
46 |
|
---|
47 | protected:
|
---|
48 |
|
---|
49 | /** Creates derived @a pDialog instance.
|
---|
50 | * @param pCenterWidget Passes the widget to center wrt. pCenterWidget. */
|
---|
51 | virtual void create(QIManagerDialog *&pDialog, QWidget *pCenterWidget) /* override */;
|
---|
52 |
|
---|
53 | UIActionPool *m_pActionPool;
|
---|
54 | CGuest m_comGuest;
|
---|
55 | QString m_strMachineName;
|
---|
56 | };
|
---|
57 |
|
---|
58 |
|
---|
59 | /** QIManagerDialog extension providing GUI with the dialog displaying guest control releated logs. */
|
---|
60 | class UIGuestControlFileManagerDialog : public QIWithRetranslateUI<QIManagerDialog>
|
---|
61 | {
|
---|
62 | Q_OBJECT;
|
---|
63 |
|
---|
64 | public:
|
---|
65 |
|
---|
66 | /** Constructs Guest Control dialog.
|
---|
67 | * @param pCenterWidget Passes the widget reference to center according to.
|
---|
68 | * @param pActionPool Passes the action-pool reference.
|
---|
69 | * @param comGuest Passes the com-guest reference. */
|
---|
70 | UIGuestControlFileManagerDialog(QWidget *pCenterWidget, UIActionPool *pActionPool, const CGuest &comGuest, const QString &strMachineName = QString());
|
---|
71 |
|
---|
72 | protected:
|
---|
73 |
|
---|
74 | virtual void prepare() /* override */;
|
---|
75 | /** @name Event-handling stuff.
|
---|
76 | * @{ */
|
---|
77 | /** Handles translation event. */
|
---|
78 | virtual void retranslateUi() /* override */;
|
---|
79 | /** @} */
|
---|
80 |
|
---|
81 | /** @name Prepare/cleanup cascade.
|
---|
82 | * @{ */
|
---|
83 | /** Configures all. */
|
---|
84 | virtual void configure() /* override */;
|
---|
85 | /** Configures central-widget. */
|
---|
86 | virtual void configureCentralWidget() /* override */;
|
---|
87 | /** Perform final preparations. */
|
---|
88 | virtual void finalize() /* override */;
|
---|
89 | /** Loads dialog setting such as geometry from extradata. */
|
---|
90 | virtual void loadSettings() /* override */;
|
---|
91 |
|
---|
92 | /** Saves dialog setting into extradata. */
|
---|
93 | virtual void saveSettings() const /* override */;
|
---|
94 | /** @} */
|
---|
95 |
|
---|
96 | /** @name Functions related to geometry restoration.
|
---|
97 | * @{ */
|
---|
98 | /** Returns whether the window should be maximized when geometry being restored. */
|
---|
99 | virtual bool shouldBeMaximized() const /* override */;
|
---|
100 | /** @} */
|
---|
101 |
|
---|
102 | private slots:
|
---|
103 |
|
---|
104 | void sltSetCloseButtonShortCut(QKeySequence shortcut);
|
---|
105 |
|
---|
106 | private:
|
---|
107 |
|
---|
108 | void manageEscapeShortCut();
|
---|
109 | UIActionPool *m_pActionPool;
|
---|
110 | CGuest m_comGuest;
|
---|
111 | QString m_strMachineName;
|
---|
112 | };
|
---|
113 |
|
---|
114 |
|
---|
115 | #endif /* !___UIGuestControlFileManagerDialog_h___ */
|
---|