History

add an HFMetaEvent class as super class for meta events

Stephen Birarda committed 12 years ago

Commit 0ddf6651 parent 66267876 files · +62 −14Browse files

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

Unified · Split

interface/src/Application.cpp+7−6
@@ -67,7 +67,6 @@ · 66 unmodified lines
6767 #include <UUID.h>
6868
6969 #include "Application.h"
70−#include "HFActionEvent.h"
7170 #include "InterfaceVersion.h"
7271 #include "Menu.h"
7372 #include "ModelUploader.h"
@@ -78,6 +77,8 @@ · 4 unmodified lines
7877 #include "devices/OculusManager.h"
7978 #include "devices/TV3DManager.h"
8079
80+#include "events/HFActionEvent.h"
81+
8182 #include "renderer/ProgramObject.h"
8283
8384 #include "scripting/AccountScriptingInterface.h"
@@ -139,6 +140,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 55 unmodified lines
139140 _glWidget(new GLCanvas()),
140141 _nodeThread(new QThread(this)),
141142 _datagramProcessor(),
143+ _undoStack(),
144+ _undoStackScriptingInterface(&_undoStack),
142145 _frameCount(0),
143146 _fps(60.0f),
144147 _justStarted(true),
@@ -175,8 +178,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 30 unmodified lines
175178 _nodeBoundsDisplay(this),
176179 _previousScriptLocation(),
177180 _applicationOverlay(),
178− _undoStack(),
179− _undoStackScriptingInterface(&_undoStack),
180181 _runningScriptsWidget(NULL),
181182 _runningScriptsWidgetWasVisible(false),
182183 _trayIcon(new QSystemTrayIcon(_window)),
@@ -835,7 +836,7 @@ bool Application::event(QEvent* event) { · 652 unmodified lines
835836
836837 return false;
837838 }
838−
839+
839840 return QApplication::event(event);
840841 }
841842
@@ -1245,7 +1246,7 @@ void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) { · 403 unmodified lines
12451246
12461247 // nobody handled this - make it an action event on the _window object
12471248 HFActionEvent actionEvent(HFActionEvent::startType(), event->localPos());
1248− sendEvent(_window, &actionEvent);
1249+ sendEvent(this, &actionEvent);
12491250
12501251 } else if (event->button() == Qt::RightButton) {
12511252 // right click items here
@@ -1276,7 +1277,7 @@ void Application::mouseReleaseEvent(QMouseEvent* event, unsigned int deviceID) { · 24 unmodified lines
12761277
12771278 // fire an action end event
12781279 HFActionEvent actionEvent(HFActionEvent::endType(), event->localPos());
1279− sendEvent(_window, &actionEvent);
1280+ sendEvent(this, &actionEvent);
12801281 }
12811282 }
12821283 }

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