Qt-Advanced-Docking-System/AdvancedDockingSystem/include/ads/FloatingWidget.h
mfreiholz 2513ab1f2b Better compatible with qt4.
* Q_PROPERTY MEMBER wasn't available, use READ and WRITE instead
* Disables namespace with qt4
* Updates default stylesheet to work with qt4 (no namespaces)

Unifies include/forward-declaration style in header files.
README status updates
2016-02-15 12:27:23 +01:00

45 lines
1.1 KiB
C++

#ifndef FLOATINGWIDGET_H
#define FLOATINGWIDGET_H
#include <QWidget>
#include <QFrame>
class QBoxLayout;
#include "ads/API.h"
#include "ads/SectionContent.h"
ADS_NAMESPACE_BEGIN
class ContainerWidget;
class SectionTitleWidget;
class SectionContentWidget;
class InternalContentData;
// 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
friend class ContainerWidget;
public:
FloatingWidget(ContainerWidget* container, SectionContent::RefPtr sc, SectionTitleWidget* titleWidget, SectionContentWidget* contentWidget, QWidget* parent = NULL);
virtual ~FloatingWidget();
SectionContent::RefPtr content() const { return _content; }
public://private:
bool takeContent(InternalContentData& data);
private:
ContainerWidget* _container;
SectionContent::RefPtr _content;
SectionTitleWidget* _titleWidget;
SectionContentWidget* _contentWidget;
QBoxLayout* _titleLayout;
};
ADS_NAMESPACE_END
#endif