1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-04-01 02:42:39 +08:00
Qt-Advanced-Docking-System/AdvancedDockingSystem/src/ads/floating_widget.h
2015-12-09 12:21:38 +01:00

39 lines
874 B
C++

#ifndef FLOATINGWIDGET_H
#define FLOATINGWIDGET_H
#include <QWidget>
#include <QFrame>
#include "ads.h"
#include "section_content.h"
class QBoxLayout;
ADS_NAMESPACE_BEGIN
class SectionTitleWidget;
class SectionContentWidget;
// FloatingWidget holds and displays SectionContent as a floating window.
// It can be resized, moved and dropped back into a SectionWidget.
class FloatingWidget : public QWidget
{
Q_OBJECT
public:
FloatingWidget(SectionContent::RefPtr sc, SectionTitleWidget* titleWidget, SectionContentWidget* contentWidget, QWidget* parent = nullptr);
InternalContentData takeContent();
protected:
virtual void closeEvent(QCloseEvent* e);
private:
SectionContent::RefPtr _content;
SectionTitleWidget* _titleWidget;
SectionContentWidget* _contentWidget;
QBoxLayout* _titleLayout;
};
ADS_NAMESPACE_END
#endif