1 | /* $Id: UIPaneContainer.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_widgets_UIPaneContainer_h
|
---|
29 | #define FEQT_INCLUDED_SRC_widgets_UIPaneContainer_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* Qt includes: */
|
---|
35 | #include <QWidget>
|
---|
36 | #include <QKeySequence>
|
---|
37 |
|
---|
38 | /* GUI includes: */
|
---|
39 | #include "QIManagerDialog.h"
|
---|
40 |
|
---|
41 | /* Forward declarations: */
|
---|
42 | class QAbstractButton;
|
---|
43 | class QHBoxLayout;
|
---|
44 | class QIDialogButtonBox;
|
---|
45 |
|
---|
46 | /** QWidget extension acting as the base class for all the dialog panels like file manager, logviewer etc. */
|
---|
47 | class SHARED_LIBRARY_STUFF UIPaneContainer : public QWidget
|
---|
48 | {
|
---|
49 | Q_OBJECT;
|
---|
50 |
|
---|
51 | signals:
|
---|
52 |
|
---|
53 | void sigCurrentTabChanged(int iIndex);
|
---|
54 | void sigHidden();
|
---|
55 | void sigDetach();
|
---|
56 |
|
---|
57 | public:
|
---|
58 |
|
---|
59 | UIPaneContainer(QWidget *pParent, EmbedTo enmEmbedTo = EmbedTo_Stack, bool fDetachAllowed = false);
|
---|
60 | void setCurrentIndex(int iIndex);
|
---|
61 | int currentIndex() const;
|
---|
62 |
|
---|
63 | protected:
|
---|
64 |
|
---|
65 | virtual void prepare();
|
---|
66 | void insertTab(int iIndex, QWidget *pPage, const QString &strLabel = QString());
|
---|
67 | void setTabText(int iIndex, const QString &strText);
|
---|
68 |
|
---|
69 | private slots:
|
---|
70 |
|
---|
71 | void sltHide();
|
---|
72 | void sltHandleButtonBoxClick(QAbstractButton *pButton);
|
---|
73 | void sltRetranslateUI();
|
---|
74 |
|
---|
75 | private:
|
---|
76 |
|
---|
77 | EmbedTo m_enmEmbedTo;
|
---|
78 | bool m_fDetachAllowed;
|
---|
79 |
|
---|
80 | QTabWidget *m_pTabWidget;
|
---|
81 |
|
---|
82 | QIDialogButtonBox *m_pButtonBox;
|
---|
83 | };
|
---|
84 |
|
---|
85 | #endif /* !FEQT_INCLUDED_SRC_widgets_UIPaneContainer_h */
|
---|