refs #325, as preparation to reduce loading I need to find out when an info area is visible.

Existing functions visible() / isHidden() are not suitable, as those represent "technical visibility".
We need a logical visibility telling us if the user can see / has selected the corresponing dockable widget.

* New base class info area (where dockable widgets are placed)
* Adjusted derived component (currently 1)
* Cleaned up old code in floatAllWidgets
This commit is contained in:
Klaus Basan
2014-09-12 12:38:06 +02:00
parent 2d7fe607fe
commit 936cc7c147
9 changed files with 854 additions and 628 deletions

View File

@@ -16,8 +16,13 @@
namespace BlackGui
{
//! Forward declarations
class CInfoArea;
namespace Components { class CDockWidgetInfoAreaComponent; }
//! Class for dock widgets serving as info bar
//! Specialized class for dock widgets serving as info area
//! \sa CDockWidgetInfoBar
//! \sa CInfoArea
class CDockWidgetInfoArea : public CDockWidget
{
Q_OBJECT
@@ -26,9 +31,28 @@ namespace BlackGui
//! Constructor
explicit CDockWidgetInfoArea(QWidget *parent = nullptr);
//! The parent info area
const CInfoArea *getParentInfoArea() const;
//! The parent info area
CInfoArea *getParentInfoArea();
//! Is this the selected widget, means it is not floating, and the one selected
bool isSelectedDockWidget() const;
//! Visible widget
bool isVisibleWidget() const;
protected:
//! Contribute to menu
virtual void addToContextMenu(QMenu *contextMenu) const override;
//! \copydoc CDockWidget::initalFloating
virtual void initalFloating() override;
private:
//! Find all embedded runtime components
QList<Components::CDockWidgetInfoAreaComponent *> findEmbeddedDockWidgetInfoAreaComponents() const;
};
} // namespace