digiKam
Digikam::SidebarSplitter Class Reference
+ Inheritance diagram for Digikam::SidebarSplitter:

Classes

class  Private
 

Public Member Functions

void addSplitterCollapserButton (QWidget *const widget)
 
void restoreState (KConfigGroup &group)
 
void restoreState (KConfigGroup &group, const QString &key)
 
void saveState (KConfigGroup &group)
 
void saveState (KConfigGroup &group, const QString &key)
 
void setSize (QWidget *const widget, int size)
 
void setSize (Sidebar *const bar, int size)
 
 SidebarSplitter (Qt::Orientation orientation, QWidget *const parent=nullptr)
 
 SidebarSplitter (QWidget *const parent=nullptr)
 
int size (QWidget *const widget) const
 
int size (Sidebar *const bar) const
 
 ~SidebarSplitter () override
 

Static Public Attributes

static const QString DEFAULT_CONFIG_KEY = QLatin1String("SplitterState")
 

Friends

class Sidebar
 

Constructor & Destructor Documentation

◆ SidebarSplitter() [1/2]

Digikam::SidebarSplitter::SidebarSplitter ( QWidget *const  parent = nullptr)
explicit

This is a QSplitter with better support for storing its state in config files, especially if Sidebars are contained in the splitter.

◆ SidebarSplitter() [2/2]

Digikam::SidebarSplitter::SidebarSplitter ( Qt::Orientation  orientation,
QWidget *const  parent = nullptr 
)
explicit

◆ ~SidebarSplitter()

Digikam::SidebarSplitter::~SidebarSplitter ( )
override

Member Function Documentation

◆ addSplitterCollapserButton()

void Digikam::SidebarSplitter::addSplitterCollapserButton ( QWidget *const  widget)

◆ restoreState() [1/2]

void Digikam::SidebarSplitter::restoreState ( KConfigGroup &  group)

Restores the splitter state from group, handling minimized sidebars correctly. DEFAULT_CONFIG_KEY is used for restoring the state.

References DEFAULT_CONFIG_KEY.

Referenced by Digikam::EditorWindow::applyStandardSettings().

◆ restoreState() [2/2]

void Digikam::SidebarSplitter::restoreState ( KConfigGroup &  group,
const QString &  key 
)

Restores the splitter state from group, handling minimized sidebars correctly. This version uses a specified key in the config group.

◆ saveState() [1/2]

void Digikam::SidebarSplitter::saveState ( KConfigGroup &  group)

Saves the splitter state to group, handling minimized sidebars correctly. DEFAULT_CONFIG_KEY is used for storing the state.

References DEFAULT_CONFIG_KEY.

Referenced by Digikam::EditorWindow::saveStandardSettings().

◆ saveState() [2/2]

void Digikam::SidebarSplitter::saveState ( KConfigGroup &  group,
const QString &  key 
)

Saves the splitter state to group, handling minimized sidebars correctly. This version uses a specified key in the config group.

◆ setSize() [1/2]

void Digikam::SidebarSplitter::setSize ( QWidget *const  widget,
int  size 
)

References size().

◆ setSize() [2/2]

void Digikam::SidebarSplitter::setSize ( Sidebar *const  bar,
int  size 
)

Sets the splitter size for the given sidebar or splitter child widget to size. Special value -1: Sets the minimum size hint of the widget.

References size().

Referenced by Digikam::Sidebar::deleteTab(), and Digikam::Sidebar::restore().

◆ size() [1/2]

int Digikam::SidebarSplitter::size ( QWidget *const  widget) const

◆ size() [2/2]

int Digikam::SidebarSplitter::size ( Sidebar *const  bar) const

Returns the value of sizes() that corresponds to the given Sidebar or splitter child widget.

Referenced by Digikam::Sidebar::appendTab(), Digikam::Sidebar::backup(), setSize(), and Digikam::Sidebar::shrink().

Friends And Related Function Documentation

◆ Sidebar

friend class Sidebar
friend

Member Data Documentation

◆ DEFAULT_CONFIG_KEY

const QString Digikam::SidebarSplitter::DEFAULT_CONFIG_KEY = QLatin1String("SplitterState")
static

Referenced by restoreState(), and saveState().


The documentation for this class was generated from the following files: