History

initial skeleton of qml objects

David Kelly committed 9 years ago

Commit 54dfc331 parent 6b6b6024 files · +78 −21Browse files

Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all

Unified · Split

interface/src/Application.cpp+10−8
@@ -170,6 +170,7 @@ · 169 unmodified lines
170170 #if defined(Q_OS_MAC) || defined(Q_OS_WIN)
171171 #include "SpeechRecognizer.h"
172172 #endif
173+#include "ui/ResourceImageItem.h"
173174 #include "ui/AddressBarDialog.h"
174175 #include "ui/AvatarInputs.h"
175176 #include "ui/DialogsManager.h"
@@ -214,7 +215,7 @@ static QTimer pingTimer; · 38 unmodified lines
214215
215216 static const int MAX_CONCURRENT_RESOURCE_DOWNLOADS = 16;
216217
217−// For processing on QThreadPool, we target a number of threads after reserving some
218+// For processing on QThreadPool, we target a number of threads after reserving some
218219 // based on how many are being consumed by the application and the display plugin. However,
219220 // we will never drop below the 'min' value
220221 static const int MIN_PROCESSING_THREAD_POOL_SIZE = 1;
@@ -1247,7 +1248,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1026 unmodified lines
12471248 // Add periodic checks to send user activity data
12481249 static int CHECK_NEARBY_AVATARS_INTERVAL_MS = 10000;
12491250 static int NEARBY_AVATAR_RADIUS_METERS = 10;
1250−
1251+
12511252 // setup the stats interval depending on if the 1s faster hearbeat was requested
12521253 static const QString FAST_STATS_ARG = "--fast-heartbeat";
12531254 static int SEND_STATS_INTERVAL_MS = arguments().indexOf(FAST_STATS_ARG) != -1 ? 1000 : 10000;
@@ -1397,10 +1398,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 143 unmodified lines
13971398
13981399 _autoSwitchDisplayModeSupportedHMDPlugin = nullptr;
13991400 foreach(DisplayPluginPointer displayPlugin, PluginManager::getInstance()->getDisplayPlugins()) {
1400− if (displayPlugin->isHmd() &&
1401+ if (displayPlugin->isHmd() &&
14011402 displayPlugin->getSupportsAutoSwitch()) {
14021403 _autoSwitchDisplayModeSupportedHMDPlugin = displayPlugin;
1403− _autoSwitchDisplayModeSupportedHMDPluginName =
1404+ _autoSwitchDisplayModeSupportedHMDPluginName =
14041405 _autoSwitchDisplayModeSupportedHMDPlugin->getName();
14051406 _previousHMDWornStatus =
14061407 _autoSwitchDisplayModeSupportedHMDPlugin->isDisplayVisible();
@@ -1653,7 +1654,7 @@ void Application::aboutToQuit() { · 246 unmodified lines
16531654 }
16541655
16551656 getActiveDisplayPlugin()->deactivate();
1656− if (_autoSwitchDisplayModeSupportedHMDPlugin
1657+ if (_autoSwitchDisplayModeSupportedHMDPlugin
16571658 && _autoSwitchDisplayModeSupportedHMDPlugin->isSessionActive()) {
16581659 _autoSwitchDisplayModeSupportedHMDPlugin->endSession();
16591660 }
@@ -1918,6 +1919,7 @@ void Application::initializeUi() { · 258 unmodified lines
19181919 LoginDialog::registerType();
19191920 Tooltip::registerType();
19201921 UpdateDialog::registerType();
1922+ qmlRegisterType<ResourceImageItem>("Hifi", 1, 0, "ResourceImageItem");
19211923 qmlRegisterType<Preference>("Hifi", 1, 0, "Preference");
19221924
19231925 auto offscreenUi = DependencyManager::get<OffscreenUi>();
@@ -5231,7 +5233,7 @@ void Application::clearDomainOctreeDetails() { · 3307 unmodified lines
52315233 skyStage->setBackgroundMode(model::SunSkyStage::SKY_DEFAULT);
52325234
52335235 _recentlyClearedDomain = true;
5234−
5236+
52355237 DependencyManager::get<AnimationCache>()->clearUnusedResources();
52365238 DependencyManager::get<ModelCache>()->clearUnusedResources();
52375239 DependencyManager::get<SoundCache>()->clearUnusedResources();
@@ -5793,7 +5795,7 @@ bool Application::displayAvatarAttachmentConfirmationDialog(const QString& name) · 555 unmodified lines
57935795 }
57945796 }
57955797
5796−void Application::toggleRunningScriptsWidget() const {
5798+void Application::toggleRunningScriptsWidget() const {
57975799 auto scriptEngines = DependencyManager::get<ScriptEngines>();
57985800 bool scriptsRunning = !scriptEngines->getRunningScripts().isEmpty();
57995801 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
@@ -5892,7 +5894,7 @@ void Application::showDialog(const QString& desktopURL, const QString& tabletURL · 92 unmodified lines
58925894 if (!hmd->getShouldShowTablet() && !isHMDMode()) {
58935895 hmd->openTablet();
58945896 }
5895−
5897+
58965898 }
58975899 }
58985900

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t