digiKam
sidebar_p.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2005-03-22
7  * Description : a widget to manage sidebar in GUI - Private headers.
8  *
9  * Copyright (C) 2005-2006 by Joern Ahrens <joern dot ahrens at kdemail dot net>
10  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  * Copyright (C) 2008-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
12  * Copyright (C) 2001-2003 by Joseph Wenninger <jowenn at kde dot org>
13  *
14  * This program is free software; you can redistribute it
15  * and/or modify it under the terms of the GNU General
16  * Public License as published by the Free Software Foundation;
17  * either version 2, or (at your option)
18  * any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * ============================================================ */
26 
27 #ifndef DIGIKAM_SIDE_BAR_P_H
28 #define DIGIKAM_SIDE_BAR_P_H
29 
30 #include "sidebar.h"
31 
32 // Qt includes
33 
34 #include <QDragEnterEvent>
35 #include <QEvent>
36 #include <QPixmap>
37 #include <QSplitter>
38 #include <QStackedWidget>
39 #include <QTimer>
40 #include <QHash>
41 #include <QScrollArea>
42 #include <QFrame>
43 #include <QActionEvent>
44 #include <QLayout>
45 #include <QPainter>
46 #include <QFontMetrics>
47 #include <QStyle>
48 #include <QStyleOptionButton>
49 
50 // KDE includes
51 
52 #include <kconfiggroup.h>
53 
54 // Local includes
55 
56 #include "digikam_debug.h"
57 
58 namespace Digikam
59 {
60 
61 class Q_DECL_HIDDEN DMultiTabBarFrame::Private
62 {
63 public:
64 
65  explicit Private();
66 
67  QBoxLayout* mainLayout;
69  Qt::Edge position;
71 };
72 
73 // -------------------------------------------------------------------------------------
74 
75 class Q_DECL_HIDDEN DMultiTabBarTab::Private
76 {
77 public:
78 
79  explicit Private();
80 
81  Qt::Edge position;
83 };
84 
85 // -------------------------------------------------------------------------------------
86 
87 class Q_DECL_HIDDEN DMultiTabBar::Private
88 {
89 public:
90 
91  explicit Private();
92 
93  DMultiTabBarFrame* internal;
94  QBoxLayout* layout;
95  QFrame* btnTabSep;
97  Qt::Edge position;
98 };
99 
100 // -------------------------------------------------------------------------------------
101 
102 class Q_DECL_HIDDEN SidebarState
103 {
104 public:
105 
106  SidebarState();
107  SidebarState(QWidget* const w, int size);
108 
109  QWidget* activeWidget;
110  int size;
111 };
112 
113 // -------------------------------------------------------------------------------------
114 
115 class Q_DECL_HIDDEN Sidebar::Private
116 {
117 
118 public:
119 
120  explicit Private();
121 
123  bool minimized;
124 
131 
132  int tabs;
136 
137  QStackedWidget* stack;
140 
141  QHash<QWidget*, SidebarState> appendedTabsStateCache;
142 
143  const QString optionActiveTabEntry;
144  const QString optionMinimizedEntry;
145  const QString optionRestoreSizeEntry;
146 };
147 
148 // -------------------------------------------------------------------------------------
149 
150 class Q_DECL_HIDDEN SidebarSplitter::Private
151 {
152 public:
153 
155 };
156 
157 } // namespace Digikam
158 
159 #endif // DIGIKAM_SIDE_BAR_P_H
Definition: sidebar_p.h:62
Qt::Edge position
Definition: sidebar_p.h:69
DMultiTabBar::TextStyle style
Definition: sidebar_p.h:70
QBoxLayout * mainLayout
Definition: sidebar_p.h:67
QList< DMultiTabBarTab * > tabs
Definition: sidebar_p.h:68
Definition: sidebar.h:283
Definition: sidebar_p.h:76
Qt::Edge position
Definition: sidebar_p.h:81
DMultiTabBar::TextStyle style
Definition: sidebar_p.h:82
Definition: sidebar.h:218
Definition: sidebar_p.h:88
QFrame * btnTabSep
Definition: sidebar_p.h:95
QList< DMultiTabBarButton * > buttons
Definition: sidebar_p.h:96
QBoxLayout * layout
Definition: sidebar_p.h:94
Qt::Edge position
Definition: sidebar_p.h:97
Definition: sidebar.h:57
TextStyle
Definition: sidebar.h:66
Definition: sidebar_p.h:151
QList< Sidebar * > sidebars
Definition: sidebar_p.h:154
Definition: sidebar.h:480
Definition: sidebar_p.h:103
QWidget * activeWidget
Definition: sidebar_p.h:109
int size
Definition: sidebar_p.h:110
Definition: sidebar_p.h:116
int tabs
Definition: sidebar_p.h:132
int dragSwitchId
Definition: sidebar_p.h:134
QStackedWidget * stack
Definition: sidebar_p.h:137
int restoreSize
Definition: sidebar_p.h:135
SidebarSplitter * splitter
Definition: sidebar_p.h:138
QHash< QWidget *, SidebarState > appendedTabsStateCache
Definition: sidebar_p.h:141
bool minimizedDefault
Definition: sidebar_p.h:122
QTimer * dragSwitchTimer
Definition: sidebar_p.h:139
bool minimized
Definition: sidebar_p.h:123
const QString optionActiveTabEntry
Definition: sidebar_p.h:143
const QString optionMinimizedEntry
Definition: sidebar_p.h:144
bool isMinimized
Definition: sidebar_p.h:130
const QString optionRestoreSizeEntry
Definition: sidebar_p.h:145
int activeTab
Definition: sidebar_p.h:133
Definition: sidebar.h:333
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43