mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user