refs #933, allow to explicitly add separator as menu action

(a bit of a hack, but unproblematic and sometimes useful)
This commit is contained in:
Klaus Basan
2017-04-10 16:39:46 +02:00
committed by Mathew Sutcliffe
parent 2d56167e65
commit 54219966ac
2 changed files with 31 additions and 2 deletions

View File

@@ -81,6 +81,9 @@ namespace BlackGui
//! Is menu?
bool isSubMenu() const { return m_isMenu; }
//! Is separator
bool isSeparator() const { return m_title == "_SEP_"; }
//! Is menu?
void setSubMenu(bool menu) { m_isMenu = menu; }
@@ -112,6 +115,9 @@ namespace BlackGui
//! No key
static const QString &pathNone() { static const QString p("_NONE"); return p; }
//! Path converter into separator
static const QString &pathSeparator() { static const QString p("_SEPARATOR"); return p; }
//! Model set
static const QString &pathModelSet() { static const QString p("Custom.10.Model/Model set"); return p; }
@@ -237,6 +243,9 @@ namespace BlackGui
//! Add a sub menu
CMenuAction addMenu(const QString &title, const QString &path);
//! Add a separator
void addSeparator(const QString &path);
//! Add a sub menu
CMenuAction addMenu(const QIcon &icon, const QString &title, const QString &path);
@@ -327,6 +336,9 @@ namespace BlackGui
//! Model set menu
CMenuAction addMenuModelSet();
//! Add ModelConverterX menu (optional)
CMenuAction addMenuModelConverterX();
//! @}
//! Predfefined sub menus