File indexing completed on 2025-04-27 03:58:31

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2005-03-22
0007  * Description : a widget to manage sidebar in GUI.
0008  *
0009  * SPDX-FileCopyrightText: 2005-2006 by Joern Ahrens <joern dot ahrens at kdemail dot net>
0010  * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  * SPDX-FileCopyrightText: 2008-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
0012  * SPDX-FileCopyrightText: 2001-2003 by Joseph Wenninger <jowenn at kde dot org>
0013  *
0014  * SPDX-License-Identifier: GPL-2.0-or-later
0015  *
0016  * ============================================================ */
0017 
0018 #include "sidebar_p.h"
0019 
0020 namespace Digikam
0021 {
0022 
0023 DMultiTabBarFrame::Private::Private()
0024     : mainLayout(nullptr),
0025       position  (Qt::LeftEdge),
0026       style     (DMultiTabBar::AllIconsText)
0027 {
0028 }
0029 
0030 // -------------------------------------------------------------------------------------
0031 
0032 DMultiTabBarTab::Private::Private()
0033     : position(Qt::LeftEdge),
0034       style   (DMultiTabBar::AllIconsText)
0035 {
0036 }
0037 
0038 // -------------------------------------------------------------------------------------
0039 
0040 DMultiTabBar::Private::Private()
0041     : internal (nullptr),
0042       layout   (nullptr),
0043       btnTabSep(nullptr),
0044       position (Qt::LeftEdge)
0045 {
0046 }
0047 
0048 // -------------------------------------------------------------------------------------
0049     
0050 SidebarState::SidebarState()
0051     : activeWidget(nullptr),
0052       size        (0)
0053 {
0054 }
0055 
0056 SidebarState::SidebarState(QWidget* const w, int size)
0057     : activeWidget(w),
0058       size        (size)
0059 {
0060 }
0061 
0062 // -------------------------------------------------------------------------------------
0063 
0064 Sidebar::Private::Private()
0065     : minimizedDefault      (false),
0066       minimized             (false),
0067       isMinimized           (false),
0068       tabs                  (0),
0069       activeTab             (-1),
0070       dragSwitchId          (-1),
0071       restoreSize           (0),
0072       stack                 (nullptr),
0073       splitter              (nullptr),
0074       dragSwitchTimer       (nullptr),
0075       appendedTabsStateCache(),
0076       optionActiveTabEntry  (QLatin1String("ActiveTab")),
0077       optionMinimizedEntry  (QLatin1String("Minimized")),
0078       optionRestoreSizeEntry(QLatin1String("RestoreSize"))
0079 {
0080 }
0081 
0082 } // namespace Digikam