]> cloud.milkyroute.net Git - dolphin.git/blob - src/dolphindockwidget.h
Merge branch 'release/20.08' into master
[dolphin.git] / src / dolphindockwidget.h
1 /*
2 * SPDX-FileCopyrightText: 2010 Peter Penz <peter.penz19@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7 #ifndef DOLPHIN_DOCK_WIDGET_H
8 #define DOLPHIN_DOCK_WIDGET_H
9
10 #include <QDockWidget>
11
12 /**
13 * @brief Extends QDockWidget to be able to get locked.
14 */
15 class DolphinDockWidget : public QDockWidget
16 {
17 Q_OBJECT
18
19 public:
20 explicit DolphinDockWidget(const QString& title = QString(), QWidget* parent = nullptr, Qt::WindowFlags flags = {});
21 ~DolphinDockWidget() override;
22
23 /**
24 * @param lock If \a lock is true, the title bar of the dock-widget will get hidden so
25 * that it is not possible for the user anymore to move or undock the dock-widget.
26 */
27 void setLocked(bool lock);
28 bool isLocked() const;
29
30 private:
31 bool m_locked;
32 QWidget* m_dockTitleBar;
33 };
34
35 #endif