KDDockWidgets API Documentation
2.1
Loading...
Searching...
No Matches
source
src
qtwidgets
views
qtwidgets/views/SideBar.h
Go to the documentation of this file.
1
/*
2
This file is part of KDDockWidgets.
3
4
SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5
Author: SĂ©rgio Martins <sergio.martins@kdab.com>
6
7
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
8
9
Contact KDAB at <info@kdab.com> for commercial licensing options.
10
*/
11
12
#ifndef KD_SIDEBARWIDGET_P_H
13
#define KD_SIDEBARWIDGET_P_H
14
15
#include "
View.h
"
16
#include "kddockwidgets/docks_export.h"
17
#include <kddockwidgets/core/views/SideBarViewInterface.h>
18
19
#include <QToolButton>
20
#include <QPointer>
21
22
QT_BEGIN_NAMESPACE
23
class
QBoxLayout
;
24
class
QAbstractButton
;
25
QT_END_NAMESPACE
26
27
namespace
KDDockWidgets
{
28
29
namespace
Core {
30
class
SideBar
;
31
}
32
33
namespace
QtWidgets
{
34
class
SideBar
;
35
}
36
37
class
DOCKS_EXPORT SideBarButton :
public
QToolButton
38
{
39
Q_OBJECT
40
public
:
41
explicit
SideBarButton(Core::DockWidget *dw, QtWidgets::SideBar *parent);
42
~SideBarButton()
override
;
43
44
protected
:
45
void
paintEvent
(
QPaintEvent
*)
override
;
46
QSize
sizeHint
()
const override
;
47
48
private
:
49
bool
isVertical()
const
;
50
51
friend
class
QtWidgets::SideBar;
52
class
Private;
53
Private *
const
d;
54
};
55
56
namespace
QtWidgets
{
57
58
class
DOCKS_EXPORT SideBar :
public
View<QWidget>,
public
Core::SideBarViewInterface
59
{
60
Q_OBJECT
61
public
:
62
explicit
SideBar(
Core::SideBar
*,
QWidget
*parent);
63
64
protected
:
65
void
addDockWidget_Impl(
Core::DockWidget
*dock)
override
;
66
void
removeDockWidget_Impl(
Core::DockWidget
*dock)
override
;
67
68
// virtual so users can provide their own buttons
69
virtual
SideBarButton
*createButton(
Core::DockWidget
*dw,
70
SideBar *parent)
const
;
71
72
private
:
73
void
init()
override
;
74
75
QBoxLayout
*m_layout =
nullptr
;
76
};
77
}
78
79
}
80
81
#endif
KDDockWidgets::Core::DockWidget
The DockWidget base-class. DockWidget and Core::DockWidget are only split in two so we can share some...
Definition
core/DockWidget.h:60
KDDockWidgets::Core::SideBarViewInterface
The interface that SideBar views should implement.
Definition
SideBarViewInterface.h:25
KDDockWidgets::Core::SideBar
Definition
core/SideBar.h:30
KDDockWidgets::SideBarButton
Definition
qtquick/views/SideBar.h:42
KDDockWidgets::SideBarButton::sizeHint
QSize sizeHint() const override
KDDockWidgets::SideBarButton::paintEvent
void paintEvent(QPaintEvent *) override
KDDockWidgets::Core::ViewType::SideBar
@ SideBar
KDDockWidgets
Class to abstract QAction, so code still works with QtQuick and Flutter.
Definition
KDStlContainerAdaptor.h:427
KDDockWidgets::FrontendType::QtWidgets
@ QtWidgets
QAbstractButton
QBoxLayout
QPaintEvent
QSize
QToolButton
View.h
QWidget
© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8