mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 17:35:45 +02:00
Moved last methog out of Menu
Also did a bit of Header cleanup
This commit is contained in:
parent
e7a2b0296b
commit
1f31828e08
16 changed files with 51 additions and 57 deletions
|
@ -40,6 +40,7 @@
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
|
#include <QSystemTrayIcon>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QWindow>
|
#include <QWindow>
|
||||||
|
@ -101,7 +102,6 @@
|
||||||
#include "gpu/Batch.h"
|
#include "gpu/Batch.h"
|
||||||
#include "gpu/GLBackend.h"
|
#include "gpu/GLBackend.h"
|
||||||
|
|
||||||
|
|
||||||
#include "scripting/AccountScriptingInterface.h"
|
#include "scripting/AccountScriptingInterface.h"
|
||||||
#include "scripting/AudioDeviceScriptingInterface.h"
|
#include "scripting/AudioDeviceScriptingInterface.h"
|
||||||
#include "scripting/ClipboardScriptingInterface.h"
|
#include "scripting/ClipboardScriptingInterface.h"
|
||||||
|
@ -113,6 +113,10 @@
|
||||||
#include "scripting/WindowScriptingInterface.h"
|
#include "scripting/WindowScriptingInterface.h"
|
||||||
#include "scripting/WebWindowClass.h"
|
#include "scripting/WebWindowClass.h"
|
||||||
|
|
||||||
|
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
|
||||||
|
#include "SpeechRecognizer.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "ui/DataWebDialog.h"
|
#include "ui/DataWebDialog.h"
|
||||||
#include "ui/DialogsManager.h"
|
#include "ui/DialogsManager.h"
|
||||||
#include "ui/InfoView.h"
|
#include "ui/InfoView.h"
|
||||||
|
@ -727,6 +731,14 @@ void Application::runTests() {
|
||||||
runTimingTests();
|
runTimingTests();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Application::aboutApp() {
|
||||||
|
InfoView::forcedShow(INFO_HELP_PATH);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Application::showEditEntitiesHelp() {
|
||||||
|
InfoView::forcedShow(INFO_EDIT_ENTITIES_PATH);
|
||||||
|
}
|
||||||
|
|
||||||
void Application::resetCamerasOnResizeGL(Camera& camera, int width, int height) {
|
void Application::resetCamerasOnResizeGL(Camera& camera, int width, int height) {
|
||||||
if (OculusManager::isConnected()) {
|
if (OculusManager::isConnected()) {
|
||||||
OculusManager::configureCamera(camera, width, height);
|
OculusManager::configureCamera(camera, width, height);
|
||||||
|
|
|
@ -371,6 +371,8 @@ public slots:
|
||||||
void setVSyncEnabled();
|
void setVSyncEnabled();
|
||||||
|
|
||||||
void resetSensors();
|
void resetSensors();
|
||||||
|
void aboutApp();
|
||||||
|
void showEditEntitiesHelp();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void clearDomainOctreeDetails();
|
void clearDomainOctreeDetails();
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
#include <AddressManager.h>
|
#include <AddressManager.h>
|
||||||
|
#include <Application.h>
|
||||||
|
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
|
|
|
@ -51,6 +51,9 @@
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
#include "scripting/LocationScriptingInterface.h"
|
#include "scripting/LocationScriptingInterface.h"
|
||||||
#include "scripting/MenuScriptingInterface.h"
|
#include "scripting/MenuScriptingInterface.h"
|
||||||
|
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
|
||||||
|
#include "SpeechRecognizer.h"
|
||||||
|
#endif
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
#include "ui/AddressBarDialog.h"
|
#include "ui/AddressBarDialog.h"
|
||||||
#include "ui/AnimationsDialog.h"
|
#include "ui/AnimationsDialog.h"
|
||||||
|
@ -96,12 +99,7 @@ Menu::Menu() {
|
||||||
QMenu* fileMenu = addMenu("File");
|
QMenu* fileMenu = addMenu("File");
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
addActionToQMenuAndActionHash(fileMenu,
|
addActionToQMenuAndActionHash(fileMenu, MenuOption::AboutApp, 0, qApp, SLOT(aboutApp()), QAction::AboutRole);
|
||||||
MenuOption::AboutApp,
|
|
||||||
0,
|
|
||||||
this,
|
|
||||||
SLOT(aboutApp()),
|
|
||||||
QAction::AboutRole);
|
|
||||||
#endif
|
#endif
|
||||||
auto dialogsManager = DependencyManager::get<DialogsManager>();
|
auto dialogsManager = DependencyManager::get<DialogsManager>();
|
||||||
AccountManager& accountManager = AccountManager::getInstance();
|
AccountManager& accountManager = AccountManager::getInstance();
|
||||||
|
@ -577,7 +575,7 @@ Menu::Menu() {
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
QMenu* helpMenu = addMenu("Help");
|
QMenu* helpMenu = addMenu("Help");
|
||||||
QAction* helpAction = helpMenu->addAction(MenuOption::AboutApp);
|
QAction* helpAction = helpMenu->addAction(MenuOption::AboutApp);
|
||||||
connect(helpAction, SIGNAL(triggered()), this, SLOT(aboutApp()));
|
connect(helpAction, SIGNAL(triggered()), qApp, SLOT(aboutApp()));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1059,16 +1057,3 @@ bool Menu::menuItemExists(const QString& menu, const QString& menuitem) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////// TODO: Move to appropriate files ////////////////////////////////////////////
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
void Menu::aboutApp() {
|
|
||||||
InfoView::forcedShow(INFO_HELP_PATH);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Menu::showEditEntitiesHelp() {
|
|
||||||
InfoView::forcedShow(INFO_EDIT_ENTITIES_PATH);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -19,36 +19,10 @@
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
#include <EventTypes.h>
|
|
||||||
#include <MenuItemProperties.h>
|
#include <MenuItemProperties.h>
|
||||||
|
|
||||||
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
|
|
||||||
#include "SpeechRecognizer.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "ui/ChatWindow.h"
|
|
||||||
#include "ui/JSConsole.h"
|
|
||||||
#include "ui/ScriptEditorWindow.h"
|
|
||||||
|
|
||||||
const QString SETTINGS_ADDRESS_KEY = "address";
|
|
||||||
class QSettings;
|
class QSettings;
|
||||||
|
|
||||||
class AddressBarDialog;
|
|
||||||
class AnimationsDialog;
|
|
||||||
class AttachmentsDialog;
|
|
||||||
class CachesSizeDialog;
|
|
||||||
class BandwidthDialog;
|
|
||||||
class DataWebDialog;
|
|
||||||
class HMDToolsDialog;
|
|
||||||
class LodToolsDialog;
|
|
||||||
class LoginDialog;
|
|
||||||
class OctreeStatsDialog;
|
|
||||||
class PreferencesDialog;
|
|
||||||
class MetavoxelEditor;
|
|
||||||
class MetavoxelNetworkSimulator;
|
|
||||||
class ChatWindow;
|
|
||||||
class MenuItemProperties;
|
|
||||||
|
|
||||||
class Menu : public QMenuBar {
|
class Menu : public QMenuBar {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -123,15 +97,6 @@ private:
|
||||||
|
|
||||||
|
|
||||||
QHash<QString, QAction*> _actionHash;
|
QHash<QString, QAction*> _actionHash;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////// TODO: Move to appropriate files ////////////////////////////////////////////
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
private slots:
|
|
||||||
void aboutApp();
|
|
||||||
void showEditEntitiesHelp();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace MenuOption {
|
namespace MenuOption {
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#include <NetworkAccessManager.h>
|
#include <NetworkAccessManager.h>
|
||||||
|
|
||||||
|
#include "Application.h"
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
|
|
||||||
#include "ScriptsModel.h"
|
#include "ScriptsModel.h"
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
|
#include <GLMHelpers.h>
|
||||||
#include <PerfStat.h>
|
#include <PerfStat.h>
|
||||||
#include <SharedUtil.h>
|
#include <SharedUtil.h>
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "Application.h"
|
||||||
#include "RealSense.h"
|
#include "RealSense.h"
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QScriptValue>
|
#include <QScriptValue>
|
||||||
|
#include <QScrollArea>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#define hifi_AnimationsDialog_h
|
#define hifi_AnimationsDialog_h
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
#include <QDoubleSpinBox>
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
|
|
||||||
#include "avatar/MyAvatar.h"
|
#include "avatar/MyAvatar.h"
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <AccountManager.h>
|
#include <AccountManager.h>
|
||||||
#include <Application.h>
|
|
||||||
#include <MainWindow.h>
|
#include <MainWindow.h>
|
||||||
#include <PathUtils.h>
|
#include <PathUtils.h>
|
||||||
#include <XmppClient.h>
|
#include <XmppClient.h>
|
||||||
|
@ -20,6 +19,7 @@
|
||||||
#include "AttachmentsDialog.h"
|
#include "AttachmentsDialog.h"
|
||||||
#include "BandwidthDialog.h"
|
#include "BandwidthDialog.h"
|
||||||
#include "CachesSizeDialog.h"
|
#include "CachesSizeDialog.h"
|
||||||
|
#include "ChatWindow.h"
|
||||||
#include "HMDToolsDialog.h"
|
#include "HMDToolsDialog.h"
|
||||||
#include "LodToolsDialog.h"
|
#include "LodToolsDialog.h"
|
||||||
#include "LoginDialog.h"
|
#include "LoginDialog.h"
|
||||||
|
|
|
@ -14,10 +14,27 @@
|
||||||
|
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
|
#include <Application.h>
|
||||||
#include <DependencyManager.h>
|
#include <DependencyManager.h>
|
||||||
|
|
||||||
|
#include "HMDToolsDialog.h"
|
||||||
|
|
||||||
class QAction;
|
class QAction;
|
||||||
|
|
||||||
|
class AddressBarDialog;
|
||||||
|
class AnimationsDialog;
|
||||||
|
class AttachmentsDialog;
|
||||||
|
class CachesSizeDialog;
|
||||||
|
class ChatWindow;
|
||||||
|
class BandwidthDialog;
|
||||||
|
class LodToolsDialog;
|
||||||
|
class LoginDialog;
|
||||||
|
class MetavoxelEditor;
|
||||||
|
class MetavoxelNetworkSimulator;
|
||||||
|
class OctreeStatsDialog;
|
||||||
|
class PreferencesDialog;
|
||||||
|
class ScriptEditorWindow;
|
||||||
|
|
||||||
class DialogsManager : public QObject, public Dependency {
|
class DialogsManager : public QObject, public Dependency {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
SINGLETON_DEPENDENCY
|
SINGLETON_DEPENDENCY
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QDoubleSpinBox>
|
#include <QDoubleSpinBox>
|
||||||
#include <QFormLayout>
|
#include <QFormLayout>
|
||||||
|
#include <QLabel>
|
||||||
#include <QPalette>
|
#include <QPalette>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QSlider>
|
#include <QSlider>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#ifndef hifi_MetavoxelEditor_h
|
#ifndef hifi_MetavoxelEditor_h
|
||||||
#define hifi_MetavoxelEditor_h
|
#define hifi_MetavoxelEditor_h
|
||||||
|
|
||||||
|
#include <QFormLayout>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#include "ui_scriptEditorWidget.h"
|
#include "ui_scriptEditorWidget.h"
|
||||||
#include "ScriptEditorWidget.h"
|
#include "ScriptEditorWidget.h"
|
||||||
|
#include "ScriptEditorWindow.h"
|
||||||
|
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
#include <glm/gtx/quaternion.hpp>
|
#include <glm/gtx/quaternion.hpp>
|
||||||
#include <glm/gtx/vector_angle.hpp>
|
#include <glm/gtx/vector_angle.hpp>
|
||||||
|
|
||||||
|
#include <Application.h>
|
||||||
|
#include <GeometryCache.h>
|
||||||
|
#include <GLCanvas.h>
|
||||||
#include <LODManager.h>
|
#include <LODManager.h>
|
||||||
#include <PerfStat.h>
|
#include <PerfStat.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue