2020-08-25 17:07:38 +00:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2010 Peter Penz <peter.penz19@gmail.com>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2010-12-31 10:59:46 +00:00
|
|
|
|
|
|
|
#ifndef DOLPHIN_DOCK_WIDGET_H
|
|
|
|
#define DOLPHIN_DOCK_WIDGET_H
|
|
|
|
|
|
|
|
#include <QDockWidget>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Extends QDockWidget to be able to get locked.
|
|
|
|
*/
|
|
|
|
class DolphinDockWidget : public QDockWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2019-12-26 13:23:45 +00:00
|
|
|
explicit DolphinDockWidget(const QString &title = QString(), QWidget *parent = nullptr, Qt::WindowFlags flags = {});
|
2017-11-20 22:25:06 +00:00
|
|
|
~DolphinDockWidget() override;
|
2010-12-31 10:59:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param lock If \a lock is true, the title bar of the dock-widget will get hidden so
|
|
|
|
* that it is not possible for the user anymore to move or undock the dock-widget.
|
|
|
|
*/
|
|
|
|
void setLocked(bool lock);
|
|
|
|
bool isLocked() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool m_locked;
|
|
|
|
QWidget *m_dockTitleBar;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|