Commit e512ad42 authored by WINTZ Julien's avatar WINTZ Julien

Enhancing Menu Bar Framework for standalone use.

parent 62a2b689
......@@ -473,6 +473,11 @@ void dtkWidgetsMenuBarContainer::switchToNextSlide(dtkWidgetsMenu *m)
emit q->entered(m);
}
void dtkWidgetsMenuBarContainer::touch(void)
{
this->master_slide->touch(this->master_menus, this);
}
void dtkWidgetsMenuBarContainer::touch(dtkWidgetsMenuBar *mb)
{
if(!this->master_slide) {
......@@ -500,6 +505,8 @@ void dtkWidgetsMenuBarContainer::build(const QVector<dtkWidgetsMenu *>& menus)
}
this->master_slide->touch(menus, this);
this->master_menus = menus;
}
void dtkWidgetsMenuBarContainer::buildChildSlide(dtkWidgetsMenu *menu)
......
......@@ -57,6 +57,9 @@ public slots:
public:
void build(const QVector<dtkWidgetsMenu *>&);
void buildChildSlide(dtkWidgetsMenu *);
public:
void touch(void);
void touch(dtkWidgetsMenuBar *);
public:
......@@ -71,6 +74,15 @@ public:
dtkWidgetsMenuBarContainerSlide *master_slide = nullptr;
dtkWidgetsMenuNavigationFacade *navigator = nullptr;
// /////////////////////////////////////////////////////////////////////////////
// TODO: Special case of a container used standalone
// /////////////////////////////////////////////////////////////////////////////
public:
QVector<dtkWidgetsMenu *> master_menus;
// /////////////////////////////////////////////////////////////////////////////
private:
friend class dtkWidgetsMenuBarButton;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment