VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/extensions/QISplitter.h

Last change on this file was 102479, checked in by vboxsync, 6 months ago

FE/Qt: Wipe out all the excessive types of QISplitter handles; Also, do not cache palette colors, that simplifies theme support for QISplitter painting procedure.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1/* $Id: QISplitter.h 102479 2023-12-05 14:56:51Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - Qt extensions: QISplitter class declaration.
4 */
5
6/*
7 * Copyright (C) 2009-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_QISplitter_h
29#define FEQT_INCLUDED_SRC_extensions_QISplitter_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QSplitter>
36
37/* GUI includes: */
38#include "UILibraryDefs.h"
39
40/* Forward declarations: */
41class QSplitterHandle;
42
43/** QSplitter subclass with extended functionality. */
44class SHARED_LIBRARY_STUFF QISplitter : public QSplitter
45{
46 Q_OBJECT;
47
48public:
49
50 /** Constructs splitter passing @a enmOrientation and @a pParent to the base-class. */
51 QISplitter(Qt::Orientation enmOrientation = Qt::Horizontal, QWidget *pParent = 0);
52
53protected:
54
55 /** Preprocesses Qt @a pEvent for passed @a pObject. */
56 virtual bool eventFilter(QObject *pObject, QEvent *pEvent) RT_OVERRIDE;
57
58 /** Handles show @a pEvent. */
59 virtual void showEvent(QShowEvent *pEvent) RT_OVERRIDE;
60
61 /** Creates a handle. */
62 virtual QSplitterHandle *createHandle() RT_OVERRIDE;
63
64private:
65
66 /** Holds the serialized base-state. */
67 QByteArray m_baseState;
68
69 /** Holds whether the splitter is polished. */
70 bool m_fPolished;
71
72 /** Holds the handle color. */
73 QColor m_color;
74};
75
76#endif /* !FEQT_INCLUDED_SRC_extensions_QISplitter_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use