VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.h@ 100347

Last change on this file since 100347 was 98103, checked in by vboxsync, 2 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/* $Id: QIArrowSplitter.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - Qt extensions: QIArrowSplitter class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-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_extensions_QIArrowSplitter_h
29#define FEQT_INCLUDED_SRC_extensions_QIArrowSplitter_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QWidget>
36
37/* GUI includes: */
38#include "QIWithRetranslateUI.h"
39#include "UILibraryDefs.h"
40
41/* Forward declarations: */
42class QVBoxLayout;
43class QIArrowButtonSwitch;
44class QIArrowButtonPress;
45class QIDetailsBrowser;
46
47/* Type definitions: */
48typedef QPair<QString, QString> QStringPair;
49typedef QList<QStringPair> QStringPairList;
50
51/** QWidget extension
52 * allowing to toggle visibility for any other child widget. */
53class SHARED_LIBRARY_STUFF QIArrowSplitter : public QIWithRetranslateUI<QWidget>
54{
55 Q_OBJECT;
56
57signals:
58
59 /** Notifies listeners about size-hint change. */
60 void sigSizeHintChange();
61
62public:
63
64 /** Constructs arrow splitter passing @a pParent to the base-class. */
65 QIArrowSplitter(QWidget *pParent = 0);
66
67 /** Returns minimum size-hint. */
68 QSize minimumSizeHint() const;
69
70 /** Defines the @a strName for the switch-button. */
71 void setName(const QString &strName);
72
73 /** Returns splitter details. */
74 const QStringPairList& details() const { return m_details; }
75 /** Defines splitter @a details. */
76 void setDetails(const QStringPairList &details);
77
78public slots:
79
80 /** Updates size-hints. */
81 void sltUpdateSizeHints();
82
83 /** Updates navigation-buttons visibility. */
84 void sltUpdateNavigationButtonsVisibility();
85 /** Updates details-browser visibility. */
86 void sltUpdateDetailsBrowserVisibility();
87
88 /** Navigates through details-list backward. */
89 void sltSwitchDetailsPageBack();
90 /** Navigates through details-list forward. */
91 void sltSwitchDetailsPageNext();
92
93protected:
94
95 /** Handles translation event. */
96 virtual void retranslateUi() RT_OVERRIDE;
97
98private:
99
100 /** Prepares all. */
101 void prepare();
102
103 /** Updates details. */
104 void updateDetails();
105
106 /** Holds the main-layout instance. */
107 QVBoxLayout *m_pMainLayout;
108
109 /** Holds the switch-button instance. */
110 QIArrowButtonSwitch *m_pSwitchButton;
111 /** Holds the back-button instance. */
112 QIArrowButtonPress *m_pBackButton;
113 /** Holds the next-button instance. */
114 QIArrowButtonPress *m_pNextButton;
115
116 /** Holds the details-browser. */
117 QIDetailsBrowser *m_pDetailsBrowser;
118 /** Holds details-list. */
119 QStringPairList m_details;
120 /** Holds details-list index. */
121 int m_iDetailsIndex;
122};
123
124#endif /* !FEQT_INCLUDED_SRC_extensions_QIArrowSplitter_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