VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPaneContainer.h@ 101020

Last change on this file since 101020 was 101020, checked in by vboxsync, 13 months ago

FE/Qt: bugref:10496, bugref:6699. Some refactoring.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1/* $Id: UIFileManagerPaneContainer.h 101020 2023-09-05 12:10:22Z 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#include "QIWithRetranslateUI.h"
42
43#include "CProgress.h"
44
45/* Forward declarations: */
46
47class QTabWidget;
48class QCheckBox;
49class UIFileManagerLogViewer;
50class UIFileManagerOptions;
51class QScrollArea;
52class QSpacerItem;
53class QVBoxLayout;
54
55class UIFileManagerPaneContainer : public UIPaneContainer
56{
57 Q_OBJECT;
58
59signals:
60
61 /* Signal(s) related to preferences tab. */
62 void sigOptionsChanged();
63 /* Signal(s) related to operations tab. */
64 void sigFileOperationComplete(QUuid progressId);
65 void sigFileOperationFail(QString strErrorString, QString strSourceTableName, FileManagerLogType eLogType);
66
67public:
68
69 UIFileManagerPaneContainer(QWidget *pParent, UIFileManagerOptions *pFileManagerOptions);
70 void updatePreferences();
71 void appendLog(const QString &strLog, const QString &strMachineName, FileManagerLogType eLogType);
72 void addNewProgress(const CProgress &comProgress, const QString &strSourceTableName);
73
74 enum Page
75 {
76 Page_Preferences = 0,
77 Page_Operations,
78 Page_Log,
79 Page_Max
80 };
81
82
83protected:
84
85 virtual void retranslateUi() final override;
86 virtual void contextMenuEvent(QContextMenuEvent *pEvent) final override;
87
88private slots:
89
90 /** @name Preferences tab slots
91 * @{ */
92 void sltListDirectoryCheckBoxToogled(bool bChecked);
93 void sltDeleteConfirmationCheckBoxToogled(bool bChecked);
94 void sltHumanReabableSizesCheckBoxToogled(bool bChecked);
95 void sltShowHiddenObjectsCheckBoxToggled(bool bChecked);
96 /** @} */
97
98 /** @name Operations tab slots
99 * @{ */
100 void sltRemoveFinished();
101 void sltRemoveAll();
102 void sltRemoveSelected();
103 void sltHandleWidgetFocusIn(QWidget *pWidget);
104 void sltHandleWidgetFocusOut(QWidget *pWidget);
105 void sltScrollToBottom(int iMin, int iMax);
106 /** @} */
107
108private:
109
110 void prepare() override;
111 void preparePreferencesTab();
112 void prepareLogTab();
113 void prepareOperationsTab();
114
115 /** @name Preferences tab
116 * @{ */
117 QCheckBox *m_pListDirectoriesOnTopCheckBox;
118 QCheckBox *m_pDeleteConfirmationCheckBox;
119 QCheckBox *m_pHumanReabableSizesCheckBox;
120 QCheckBox *m_pShowHiddenObjectsCheckBox;
121 UIFileManagerOptions *m_pFileManagerOptions;
122 /** @} */
123
124 /** @name Log tab
125 * @{ */
126 UIFileManagerLogViewer *m_pLogTextEdit;
127 /** @} */
128
129 /** @name Operations tab
130 * @{ */
131 QScrollArea *m_pScrollArea;
132 QVBoxLayout *m_pOperationsTabLayout;
133 QSpacerItem *m_pContainerSpaceItem;
134 QWidget *m_pWidgetInFocus;
135 QSet<QWidget*> m_widgetSet;
136 /** @} */
137};
138
139#endif /* !FEQT_INCLUDED_SRC_guestctrl_UIFileManagerPaneContainer_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette