Some cleanup and support for dropping floating window with multiple setcion into section
This commit is contained in:
@@ -73,6 +73,10 @@ public:
|
||||
|
||||
MainContainerWidget* mainContainerWidget() const {return m_MainContainerWidget;}
|
||||
|
||||
void addSectionWidget(SectionWidget* section);
|
||||
|
||||
void takeSection(SectionWidget* Widget);
|
||||
|
||||
signals:
|
||||
/*!
|
||||
* Emits whenever the "isActiveTab" state of a SectionContent changes.
|
||||
@@ -86,7 +90,6 @@ protected:
|
||||
void dropIntoSection(FloatingWidget* FloatingWidget, SectionWidget* targetSection, DropArea area);
|
||||
virtual bool event(QEvent *e) override;
|
||||
SectionWidget* newSectionWidget();
|
||||
void addSectionWidget(SectionWidget* section);
|
||||
SectionWidget* dropContentOuterHelper(QLayout* l, const InternalContentData& data, Qt::Orientation orientation, bool append);
|
||||
SectionWidget* insertNewSectionWidget(const InternalContentData& data,
|
||||
SectionWidget* targetSection, SectionWidget* ret, Qt::Orientation Orientation, int InsertIndexOffset);
|
||||
|
||||
@@ -54,7 +54,7 @@ class FloatingWidget : public QWidget
|
||||
|
||||
public:
|
||||
FloatingWidget(MainContainerWidget* container, SectionContent::RefPtr sc, SectionTitleWidget* titleWidget, SectionContentWidget* contentWidget, QWidget* parent = NULL);
|
||||
FloatingWidget(SectionWidget* sectionWidget);
|
||||
FloatingWidget(MainContainerWidget* container, SectionWidget* sectionWidget);
|
||||
virtual ~FloatingWidget();
|
||||
|
||||
SectionContent::RefPtr content() const { return _content; }
|
||||
@@ -88,8 +88,8 @@ private:
|
||||
|
||||
MainContainerWidget* m_MainContainerWidget;
|
||||
SectionContent::RefPtr _content;
|
||||
SectionTitleWidget* _titleWidget;
|
||||
SectionContentWidget* _contentWidget;
|
||||
//SectionTitleWidget* _titleWidget;
|
||||
//SectionContentWidget* _contentWidget;
|
||||
CContainerWidget* m_ContainerWidget;
|
||||
CContainerWidget* m_DropContainer;
|
||||
bool m_DraggingActive = false;
|
||||
|
||||
@@ -50,7 +50,6 @@ protected:
|
||||
virtual void mouseMoveEvent(QMouseEvent* ev);
|
||||
|
||||
private:
|
||||
void moveFloatingWidget(QMouseEvent* ev, MainContainerWidget* cw);
|
||||
void startFloating(QMouseEvent* ev, MainContainerWidget* cw, SectionWidget* sectionwidget);
|
||||
void moveTab(QMouseEvent* ev);
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ public:
|
||||
void addContent(const SectionContent::RefPtr& c);
|
||||
void addContent(const InternalContentData& data, bool autoActivate);
|
||||
bool takeContent(int uid, InternalContentData& data);
|
||||
bool takeContentAt(int Index, InternalContentData& data);
|
||||
int indexOfContent(const SectionContent::RefPtr& c) const;
|
||||
int indexOfContentByUid(int uid) const;
|
||||
int indexOfContentByTitlePos(const QPoint& pos, QWidget* exclude = NULL) const;
|
||||
@@ -71,8 +72,6 @@ private slots:
|
||||
|
||||
private:
|
||||
const int _uid;
|
||||
|
||||
QPointer<CContainerWidget> m_ContainerWidget;
|
||||
QPointer<MainContainerWidget> m_MainContainerWidget;
|
||||
QList<SectionContent::RefPtr> m_Contents;
|
||||
QList<SectionTitleWidget*> m_TitleWidgets;
|
||||
|
||||
Reference in New Issue
Block a user