1 | /* $Id: UIFileManagerPaneContainer.h 103923 2024-03-19 17:01:11Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIVMLogViewer 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_UIFileManagerPaneContainer_h
|
---|
29 | #define FEQT_INCLUDED_SRC_guestctrl_UIFileManagerPaneContainer_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* Qt includes */
|
---|
35 | #include <QWidget>
|
---|
36 | #include <QSet>
|
---|
37 |
|
---|
38 | /* GUI includes: */
|
---|
39 | #include "UIPaneContainer.h"
|
---|
40 | #include "UIGuestControlDefs.h"
|
---|
41 |
|
---|
42 | #include "CProgress.h"
|
---|
43 |
|
---|
44 | /* Forward declarations: */
|
---|
45 |
|
---|
46 | class QTabWidget;
|
---|
47 | class QCheckBox;
|
---|
48 | class UIFileManagerLogViewer;
|
---|
49 | class UIFileManagerOptions;
|
---|
50 | class QScrollArea;
|
---|
51 | class QSpacerItem;
|
---|
52 | class QVBoxLayout;
|
---|
53 |
|
---|
54 | class UIFileManagerPaneContainer : public UIPaneContainer
|
---|
55 | {
|
---|
56 | Q_OBJECT;
|
---|
57 |
|
---|
58 | signals:
|
---|
59 |
|
---|
60 | /* Signal(s) related to preferences tab. */
|
---|
61 | void sigOptionsChanged();
|
---|
62 | /* Signal(s) related to operations tab. */
|
---|
63 | void sigFileOperationComplete(QUuid progressId);
|
---|
64 | void sigFileOperationFail(QString strErrorString, QString strSourceTableName, FileManagerLogType eLogType);
|
---|
65 |
|
---|
66 | public:
|
---|
67 |
|
---|
68 | UIFileManagerPaneContainer(QWidget *pParent, UIFileManagerOptions *pFileManagerOptions);
|
---|
69 | void updatePreferences();
|
---|
70 | void appendLog(const QString &strLog, const QString &strMachineName, FileManagerLogType eLogType);
|
---|
71 | void addNewProgress(const CProgress &comProgress, const QString &strSourceTableName);
|
---|
72 |
|
---|
73 | enum Page
|
---|
74 | {
|
---|
75 | Page_Preferences = 0,
|
---|
76 | Page_Operations,
|
---|
77 | Page_Log,
|
---|
78 | Page_Max
|
---|
79 | };
|
---|
80 |
|
---|
81 | protected:
|
---|
82 |
|
---|
83 | virtual void contextMenuEvent(QContextMenuEvent *pEvent) final override;
|
---|
84 |
|
---|
85 | private slots:
|
---|
86 |
|
---|
87 | /** @name Preferences tab slots
|
---|
88 | * @{ */
|
---|
89 | void sltListDirectoryCheckBoxToogled(bool bChecked);
|
---|
90 | void sltDeleteConfirmationCheckBoxToogled(bool bChecked);
|
---|
91 | void sltHumanReabableSizesCheckBoxToogled(bool bChecked);
|
---|
92 | void sltShowHiddenObjectsCheckBoxToggled(bool bChecked);
|
---|
93 | /** @} */
|
---|
94 |
|
---|
95 | /** @name Operations tab slots
|
---|
96 | * @{ */
|
---|
97 | void sltRemoveFinished();
|
---|
98 | void sltRemoveAll();
|
---|
99 | void sltRemoveSelected();
|
---|
100 | void sltHandleWidgetFocusIn(QWidget *pWidget);
|
---|
101 | void sltHandleWidgetFocusOut(QWidget *pWidget);
|
---|
102 | void sltScrollToBottom(int iMin, int iMax);
|
---|
103 | /** @} */
|
---|
104 | void sltRetranslateUI();
|
---|
105 |
|
---|
106 | private:
|
---|
107 |
|
---|
108 | void prepare() override;
|
---|
109 | void preparePreferencesTab();
|
---|
110 | void prepareLogTab();
|
---|
111 | void prepareOperationsTab();
|
---|
112 |
|
---|
113 | /** @name Preferences tab
|
---|
114 | * @{ */
|
---|
115 | QCheckBox *m_pListDirectoriesOnTopCheckBox;
|
---|
116 | QCheckBox *m_pDeleteConfirmationCheckBox;
|
---|
117 | QCheckBox *m_pHumanReabableSizesCheckBox;
|
---|
118 | QCheckBox *m_pShowHiddenObjectsCheckBox;
|
---|
119 | UIFileManagerOptions *m_pFileManagerOptions;
|
---|
120 | /** @} */
|
---|
121 |
|
---|
122 | /** @name Log tab
|
---|
123 | * @{ */
|
---|
124 | UIFileManagerLogViewer *m_pLogTextEdit;
|
---|
125 | /** @} */
|
---|
126 |
|
---|
127 | /** @name Operations tab
|
---|
128 | * @{ */
|
---|
129 | QScrollArea *m_pScrollArea;
|
---|
130 | QVBoxLayout *m_pOperationsTabLayout;
|
---|
131 | QSpacerItem *m_pContainerSpaceItem;
|
---|
132 | QWidget *m_pWidgetInFocus;
|
---|
133 | QSet<QWidget*> m_widgetSet;
|
---|
134 | /** @} */
|
---|
135 | };
|
---|
136 |
|
---|
137 | #endif /* !FEQT_INCLUDED_SRC_guestctrl_UIFileManagerPaneContainer_h */
|
---|