History

Merge branch 'master' of https://github.com/worklist/hifi into 19507

Stojce Slavkovski committed 12 years ago

Commit 8ee282e2 parents ccabe70 7a1919650 files · +1321 −381Browse files

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

Unified · Split

interface/src/Application.cpp+17−13
@@ -63,11 +63,11 @@ · 62 unmodified lines
6363 #include <UUID.h>
6464 #include <OctreeSceneStats.h>
6565 #include <LocalVoxelsList.h>
66−#include <ModelUploader.h>
6766
6867 #include "Application.h"
6968 #include "InterfaceVersion.h"
7069 #include "Menu.h"
70+#include "ModelUploader.h"
7171 #include "Util.h"
7272 #include "devices/OculusManager.h"
7373 #include "devices/TV3DManager.h"
@@ -3090,6 +3090,16 @@ void Application::setMenuShortcutsEnabled(bool enabled) { · 3016 unmodified lines
30903090 setShortcutsEnabled(_window->menuBar(), enabled);
30913091 }
30923092
3093+void Application::uploadModel(ModelType modelType) {
3094+ ModelUploader* uploader = new ModelUploader(modelType);
3095+ QThread* thread = new QThread();
3096+ thread->connect(uploader, SIGNAL(destroyed()), SLOT(quit()));
3097+ thread->connect(thread, SIGNAL(finished()), SLOT(deleteLater()));
3098+ uploader->connect(thread, SIGNAL(started()), SLOT(send()));
3099+
3100+ thread->start();
3101+}
3102+
30933103 void Application::updateWindowTitle(){
30943104
30953105 QString buildVersion = " (build " + applicationVersion() + ")";
@@ -3417,22 +3427,16 @@ void Application::toggleRunningScriptsWidget() { · 321 unmodified lines
34173427 }
34183428 }
34193429
3420−void Application::uploadFST(bool isHead) {
3421− ModelUploader* uploader = new ModelUploader(isHead);
3422− QThread* thread = new QThread();
3423− thread->connect(uploader, SIGNAL(destroyed()), SLOT(quit()));
3424− thread->connect(thread, SIGNAL(finished()), SLOT(deleteLater()));
3425− uploader->connect(thread, SIGNAL(started()), SLOT(send()));
3426−
3427− thread->start();
3428−}
3429−
34303430 void Application::uploadHead() {
3431− uploadFST(true);
3431+ uploadModel(HEAD_MODEL);
34323432 }
34333433
34343434 void Application::uploadSkeleton() {
3435− uploadFST(false);
3435+ uploadModel(SKELETON_MODEL);
3436+}
3437+
3438+void Application::uploadAttachment() {
3439+ uploadModel(ATTACHMENT_MODEL);
34363440 }
34373441
34383442 ScriptEngine* Application::loadScript(const QString& scriptName, bool loadScriptFromEditor) {

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