KSane

splittercollapser.h
1/*
2 * SPDX-FileCopyrightText: 2009 Aurélien Gâteau <agateau@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6
7#ifndef SPLITTERCOLLAPSER_H
8#define SPLITTERCOLLAPSER_H
9
10// Qt
11#include <QToolButton>
12
13// KDE
14
15class QSplitter;
16
17namespace KSaneIface
18{
19
20struct SplitterCollapserPrivate;
21/**
22 * A button which appears on the side of a splitter handle and allows easy
23 * collapsing of the widget on the opposite side
24 */
26{
28public:
30 ~SplitterCollapser() override;
31
32 QSize sizeHint() const override;
33
34public Q_SLOTS:
35 void slotCollapse();
36 void slotRestore();
37 void slotSetCollapsed(bool collapsed);
38
39protected:
40 bool eventFilter(QObject *, QEvent *) override;
41
42 void paintEvent(QPaintEvent *) override;
43
44private:
45 SplitterCollapserPrivate *const d;
46
47private Q_SLOTS:
48 void slotClicked();
49};
50
51} // namespace
52
53#endif /* SPLITTERCOLLAPSER_H */
A button which appears on the side of a splitter handle and allows easy collapsing of the widget on t...
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:54:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.