[70027] | 1 | /* $Id: UIPaneContainer.h 104445 2024-04-26 14:09:35Z vboxsync $ */
|
---|
| 2 | /** @file
|
---|
| 3 | * VBox Qt GUI - UIVMLogViewer class declaration.
|
---|
| 4 | */
|
---|
| 5 |
|
---|
| 6 | /*
|
---|
[98103] | 7 | * Copyright (C) 2010-2023 Oracle and/or its affiliates.
|
---|
[70027] | 8 | *
|
---|
[96407] | 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
|
---|
[70027] | 26 | */
|
---|
| 27 |
|
---|
[101015] | 28 | #ifndef FEQT_INCLUDED_SRC_widgets_UIPaneContainer_h
|
---|
| 29 | #define FEQT_INCLUDED_SRC_widgets_UIPaneContainer_h
|
---|
[76532] | 30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
| 31 | # pragma once
|
---|
| 32 | #endif
|
---|
[70027] | 33 |
|
---|
| 34 | /* Qt includes: */
|
---|
| 35 | #include <QWidget>
|
---|
[71477] | 36 | #include <QKeySequence>
|
---|
[102726] | 37 |
|
---|
[70027] | 38 | /* GUI includes: */
|
---|
[102726] | 39 | #include "QIManagerDialog.h"
|
---|
[70027] | 40 |
|
---|
| 41 | /* Forward declarations: */
|
---|
[102729] | 42 | class QAbstractButton;
|
---|
[70027] | 43 | class QHBoxLayout;
|
---|
[102727] | 44 | class QIDialogButtonBox;
|
---|
[70027] | 45 |
|
---|
[76950] | 46 | /** QWidget extension acting as the base class for all the dialog panels like file manager, logviewer etc. */
|
---|
[103923] | 47 | class SHARED_LIBRARY_STUFF UIPaneContainer : public QWidget
|
---|
[100906] | 48 | {
|
---|
| 49 | Q_OBJECT;
|
---|
| 50 |
|
---|
| 51 | signals:
|
---|
| 52 |
|
---|
| 53 | void sigCurrentTabChanged(int iIndex);
|
---|
[100955] | 54 | void sigHidden();
|
---|
[102727] | 55 | void sigDetach();
|
---|
[100906] | 56 |
|
---|
| 57 | public:
|
---|
| 58 |
|
---|
[102727] | 59 | UIPaneContainer(QWidget *pParent, EmbedTo enmEmbedTo = EmbedTo_Stack, bool fDetachAllowed = false);
|
---|
[100906] | 60 | void setCurrentIndex(int iIndex);
|
---|
[100917] | 61 | int currentIndex() const;
|
---|
[100906] | 62 |
|
---|
| 63 | protected:
|
---|
| 64 |
|
---|
| 65 | virtual void prepare();
|
---|
[100907] | 66 | void insertTab(int iIndex, QWidget *pPage, const QString &strLabel = QString());
|
---|
[100906] | 67 | void setTabText(int iIndex, const QString &strText);
|
---|
| 68 |
|
---|
[100955] | 69 | private slots:
|
---|
| 70 |
|
---|
| 71 | void sltHide();
|
---|
[102729] | 72 | void sltHandleButtonBoxClick(QAbstractButton *pButton);
|
---|
[103923] | 73 | void sltRetranslateUI();
|
---|
[102729] | 74 |
|
---|
[100906] | 75 | private:
|
---|
| 76 |
|
---|
[102726] | 77 | EmbedTo m_enmEmbedTo;
|
---|
[102727] | 78 | bool m_fDetachAllowed;
|
---|
[102726] | 79 | QTabWidget *m_pTabWidget;
|
---|
[102727] | 80 | QIDialogButtonBox *m_pButtonBox;
|
---|
[100906] | 81 | };
|
---|
| 82 |
|
---|
[101015] | 83 | #endif /* !FEQT_INCLUDED_SRC_widgets_UIPaneContainer_h */
|
---|