mirror of
https://github.com/overte-org/overte.git
synced 2025-04-26 02:16:26 +02:00
Merge branch 'dk/triggerMenuInScriptPlus' of https://github.com/davidkelly/hifi into davidkelly-dk/triggerMenuInScriptPlus
This commit is contained in:
commit
0809484e33
5 changed files with 14 additions and 1 deletions
|
@ -125,3 +125,8 @@ void MenuScriptingInterface::setIsOptionChecked(const QString& menuOption, bool
|
||||||
Q_ARG(const QString&, menuOption),
|
Q_ARG(const QString&, menuOption),
|
||||||
Q_ARG(bool, isChecked));
|
Q_ARG(bool, isChecked));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MenuScriptingInterface::triggerOption(const QString& menuOption) {
|
||||||
|
QMetaObject::invokeMethod(Menu::getInstance(), "triggerOption", Q_ARG(const QString&, menuOption));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,8 @@ public slots:
|
||||||
|
|
||||||
bool isOptionChecked(const QString& menuOption);
|
bool isOptionChecked(const QString& menuOption);
|
||||||
void setIsOptionChecked(const QString& menuOption, bool isChecked);
|
void setIsOptionChecked(const QString& menuOption, bool isChecked);
|
||||||
|
|
||||||
|
void triggerOption(const QString& menuOption);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void menuItemEvent(const QString& menuItem);
|
void menuItemEvent(const QString& menuItem);
|
||||||
|
|
|
@ -206,3 +206,7 @@ void WindowScriptingInterface::takeSnapshot(bool notify, float aspectRatio) {
|
||||||
void WindowScriptingInterface::shareSnapshot(const QString& path) {
|
void WindowScriptingInterface::shareSnapshot(const QString& path) {
|
||||||
qApp->shareSnapshot(path);
|
qApp->shareSnapshot(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WindowScriptingInterface::isPhysicsEnabled() {
|
||||||
|
return qApp->isPhysicsEnabled();
|
||||||
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ public slots:
|
||||||
void copyToClipboard(const QString& text);
|
void copyToClipboard(const QString& text);
|
||||||
void takeSnapshot(bool notify = true, float aspectRatio = 0.0f);
|
void takeSnapshot(bool notify = true, float aspectRatio = 0.0f);
|
||||||
void shareSnapshot(const QString& path);
|
void shareSnapshot(const QString& path);
|
||||||
|
bool isPhysicsEnabled();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void domainChanged(const QString& domainHostname);
|
void domainChanged(const QString& domainHostname);
|
||||||
|
|
|
@ -62,7 +62,6 @@ public:
|
||||||
MenuWrapper* getMenu(const QString& menuName);
|
MenuWrapper* getMenu(const QString& menuName);
|
||||||
MenuWrapper* getSubMenuFromName(const QString& menuName, MenuWrapper* menu);
|
MenuWrapper* getSubMenuFromName(const QString& menuName, MenuWrapper* menu);
|
||||||
|
|
||||||
void triggerOption(const QString& menuOption);
|
|
||||||
QAction* getActionForOption(const QString& menuOption);
|
QAction* getActionForOption(const QString& menuOption);
|
||||||
|
|
||||||
QAction* addActionToQMenuAndActionHash(MenuWrapper* destinationMenu,
|
QAction* addActionToQMenuAndActionHash(MenuWrapper* destinationMenu,
|
||||||
|
@ -112,6 +111,8 @@ public slots:
|
||||||
|
|
||||||
void toggleDeveloperMenus();
|
void toggleDeveloperMenus();
|
||||||
void toggleAdvancedMenus();
|
void toggleAdvancedMenus();
|
||||||
|
|
||||||
|
void triggerOption(const QString& menuOption);
|
||||||
|
|
||||||
static bool isSomeSubmenuShown() { return _isSomeSubmenuShown; }
|
static bool isSomeSubmenuShown() { return _isSomeSubmenuShown; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue