1 | /* $Id: UIFileManagerDialog.h 98103 2023-01-17 14:15:46Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIFileManagerDialog class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-2023 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.virtualbox.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef FEQT_INCLUDED_SRC_guestctrl_UIFileManagerDialog_h
|
---|
29 | #define FEQT_INCLUDED_SRC_guestctrl_UIFileManagerDialog_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* Qt includes: */
|
---|
35 | #include <QString>
|
---|
36 | #include <QUuid>
|
---|
37 |
|
---|
38 | /* GUI includes: */
|
---|
39 | #include "QIManagerDialog.h"
|
---|
40 | #include "QIWithRetranslateUI.h"
|
---|
41 |
|
---|
42 |
|
---|
43 |
|
---|
44 | /* Forward declarations: */
|
---|
45 | class QDialogButtonBox;
|
---|
46 | class QVBoxLayout;
|
---|
47 | class UIActionPool;
|
---|
48 | class UIFileManagerDialog;
|
---|
49 |
|
---|
50 |
|
---|
51 | /** QIManagerDialogFactory extension used as a factory for the file manager dialog. */
|
---|
52 | class UIFileManagerDialogFactory : public QIManagerDialogFactory
|
---|
53 | {
|
---|
54 | public:
|
---|
55 |
|
---|
56 | UIFileManagerDialogFactory(UIActionPool *pActionPool, const QUuid &uMachineId, const QString &strMachineName);
|
---|
57 | UIFileManagerDialogFactory();
|
---|
58 |
|
---|
59 | protected:
|
---|
60 |
|
---|
61 | /** Creates derived @a pDialog instance.
|
---|
62 | * @param pCenterWidget Passes the widget to center wrt. pCenterWidget. */
|
---|
63 | virtual void create(QIManagerDialog *&pDialog, QWidget *pCenterWidget) RT_OVERRIDE;
|
---|
64 |
|
---|
65 | UIActionPool *m_pActionPool;
|
---|
66 | QUuid m_uMachineId;
|
---|
67 | QString m_strMachineName;
|
---|
68 | };
|
---|
69 |
|
---|
70 | /** QIManagerDialog extension providing GUI with the dialog displaying file manager releated logs. */
|
---|
71 | class UIFileManagerDialog : public QIWithRetranslateUI<QIManagerDialog>
|
---|
72 | {
|
---|
73 | Q_OBJECT;
|
---|
74 |
|
---|
75 | public:
|
---|
76 |
|
---|
77 | /** Constructs File Manager dialog.
|
---|
78 | * @param pCenterWidget Passes the widget reference to center according to.
|
---|
79 | * @param pActionPool Passes the action-pool reference.
|
---|
80 | * @param uMachineId Passes the machine id. */
|
---|
81 | UIFileManagerDialog(QWidget *pCenterWidget, UIActionPool *pActionPool, const QUuid &uMachineId, const QString &strMachineName);
|
---|
82 | ~UIFileManagerDialog();
|
---|
83 |
|
---|
84 | protected:
|
---|
85 |
|
---|
86 | /** @name Event-handling stuff.
|
---|
87 | * @{ */
|
---|
88 | /** Handles translation event. */
|
---|
89 | virtual void retranslateUi() RT_OVERRIDE;
|
---|
90 | /** @} */
|
---|
91 |
|
---|
92 | /** @name Prepare/cleanup cascade.
|
---|
93 | * @{ */
|
---|
94 | /** Configures all. */
|
---|
95 | virtual void configure() RT_OVERRIDE;
|
---|
96 | /** Configures central-widget. */
|
---|
97 | virtual void configureCentralWidget() RT_OVERRIDE;
|
---|
98 | /** Perform final preparations. */
|
---|
99 | virtual void finalize() RT_OVERRIDE;
|
---|
100 | /** Loads dialog setting from extradata. */
|
---|
101 | virtual void loadSettings() RT_OVERRIDE;
|
---|
102 |
|
---|
103 | /** Saves dialog setting into extradata. */
|
---|
104 | virtual void saveSettings() RT_OVERRIDE;
|
---|
105 | /** @} */
|
---|
106 |
|
---|
107 | /** @name Functions related to geometry restoration.
|
---|
108 | * @{ */
|
---|
109 | /** Returns whether the window should be maximized when geometry being restored. */
|
---|
110 | virtual bool shouldBeMaximized() const RT_OVERRIDE;
|
---|
111 | /** @} */
|
---|
112 |
|
---|
113 | private slots:
|
---|
114 |
|
---|
115 | void sltSetCloseButtonShortCut(QKeySequence shortcut);
|
---|
116 |
|
---|
117 | private:
|
---|
118 |
|
---|
119 | void manageEscapeShortCut();
|
---|
120 | UIActionPool *m_pActionPool;
|
---|
121 | QUuid m_uMachineId;
|
---|
122 | QString m_strMachineName;
|
---|
123 | };
|
---|
124 |
|
---|
125 |
|
---|
126 | #endif /* !FEQT_INCLUDED_SRC_guestctrl_UIFileManagerDialog_h */
|
---|