VirtualBox

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

Last change on this file since 82781 was 76581, checked in by vboxsync, 5 years ago

Fe/QT: scm header guard alignment.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/* $Id: QIArrowSplitter.h 76581 2019-01-01 06:24:57Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - Qt extensions: QIArrowSplitter class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef FEQT_INCLUDED_SRC_extensions_QIArrowSplitter_h
19#define FEQT_INCLUDED_SRC_extensions_QIArrowSplitter_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Qt includes: */
25#include <QWidget>
26
27/* GUI includes: */
28#include "QIWithRetranslateUI.h"
29#include "UILibraryDefs.h"
30
31/* Forward declarations: */
32class QVBoxLayout;
33class QIArrowButtonSwitch;
34class QIArrowButtonPress;
35class QIDetailsBrowser;
36
37/* Type definitions: */
38typedef QPair<QString, QString> QStringPair;
39typedef QList<QStringPair> QStringPairList;
40
41/** QWidget extension
42 * allowing to toggle visibility for any other child widget. */
43class SHARED_LIBRARY_STUFF QIArrowSplitter : public QIWithRetranslateUI<QWidget>
44{
45 Q_OBJECT;
46
47signals:
48
49 /** Notifies listeners about size-hint change. */
50 void sigSizeHintChange();
51
52public:
53
54 /** Constructs arrow splitter passing @a pParent to the base-class. */
55 QIArrowSplitter(QWidget *pParent = 0);
56
57 /** Returns minimum size-hint. */
58 QSize minimumSizeHint() const;
59
60 /** Defines the @a strName for the switch-button. */
61 void setName(const QString &strName);
62
63 /** Returns splitter details. */
64 const QStringPairList& details() const { return m_details; }
65 /** Defines splitter @a details. */
66 void setDetails(const QStringPairList &details);
67
68public slots:
69
70 /** Updates size-hints. */
71 void sltUpdateSizeHints();
72
73 /** Updates navigation-buttons visibility. */
74 void sltUpdateNavigationButtonsVisibility();
75 /** Updates details-browser visibility. */
76 void sltUpdateDetailsBrowserVisibility();
77
78 /** Navigates through details-list backward. */
79 void sltSwitchDetailsPageBack();
80 /** Navigates through details-list forward. */
81 void sltSwitchDetailsPageNext();
82
83protected:
84
85 /** Handles translation event. */
86 virtual void retranslateUi() /* override */;
87
88private:
89
90 /** Prepares all. */
91 void prepare();
92
93 /** Updates details. */
94 void updateDetails();
95
96 /** Holds the main-layout instance. */
97 QVBoxLayout *m_pMainLayout;
98
99 /** Holds the switch-button instance. */
100 QIArrowButtonSwitch *m_pSwitchButton;
101 /** Holds the back-button instance. */
102 QIArrowButtonPress *m_pBackButton;
103 /** Holds the next-button instance. */
104 QIArrowButtonPress *m_pNextButton;
105
106 /** Holds the details-browser. */
107 QIDetailsBrowser *m_pDetailsBrowser;
108 /** Holds details-list. */
109 QStringPairList m_details;
110 /** Holds details-list index. */
111 int m_iDetailsIndex;
112};
113
114#endif /* !FEQT_INCLUDED_SRC_extensions_QIArrowSplitter_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use