Adds possibility to remove section contents.

This commit is contained in:
mfreiholz
2016-03-14 15:12:34 +01:00
parent 9c958d0d22
commit d2d2467101
15 changed files with 381 additions and 6 deletions

View File

@@ -54,6 +54,13 @@ public:
*/
SectionWidget* addSectionContent(const SectionContent::RefPtr& sc, SectionWidget* sw = NULL, DropArea area = CenterDropArea);
/*!
* Completely removes the <em>sc</em> from this ContainerWidget.
* This container will no longer hold a reference to the content.
* The content can be safely deleted.
*/
bool removeSectionContent(const SectionContent::RefPtr& sc);
/*!
* Shows the specific SectionContent in UI.
* Independed of the current state, whether it is used inside a section or is floating.
@@ -101,6 +108,12 @@ public:
QRect outerBottomDropRect() const;
QRect outerLeftDropRect() const;
/*!
* \brief contents
* \return List of known SectionContent for this ContainerWidget.
*/
QList<SectionContent::RefPtr> contents() const;
private:
//
// Internal Stuff Begins Here

View File

@@ -57,6 +57,9 @@ private:
// Optional attributes
QString _title;
/* Note: This method could be a problem in static build environment
* since it may begin with 0 for every module which uses ADS.
*/
static int GetNextUid();
};