summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--variant/trackmouse/images/start.pngbin0 -> 1400 bytes
-rw-r--r--variant/trackmouse/images/stop.pngbin0 -> 5790 bytes
-rw-r--r--variant/trackmouse/lang/nl_NL.ts4
-rw-r--r--variant/trackmouse/lang/ru_RU.ts4
-rw-r--r--variant/trackmouse/lang/stub.ts4
-rw-r--r--variant/trackmouse/main.cpp18
-rw-r--r--variant/trackmouse/trackmouse-res.qrc6
-rw-r--r--variant/trackmouse/window.cpp18
-rw-r--r--variant/trackmouse/window.hpp17
-rw-r--r--variant/trackmouse/window.ui382
10 files changed, 453 insertions, 0 deletions
diff --git a/variant/trackmouse/images/start.png b/variant/trackmouse/images/start.png
new file mode 100644
index 00000000..b8e6f271
--- /dev/null
+++ b/variant/trackmouse/images/start.png
Binary files differ
diff --git a/variant/trackmouse/images/stop.png b/variant/trackmouse/images/stop.png
new file mode 100644
index 00000000..0ff13bd5
--- /dev/null
+++ b/variant/trackmouse/images/stop.png
Binary files differ
diff --git a/variant/trackmouse/lang/nl_NL.ts b/variant/trackmouse/lang/nl_NL.ts
new file mode 100644
index 00000000..9e739505
--- /dev/null
+++ b/variant/trackmouse/lang/nl_NL.ts
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="nl_NL">
+</TS>
diff --git a/variant/trackmouse/lang/ru_RU.ts b/variant/trackmouse/lang/ru_RU.ts
new file mode 100644
index 00000000..f62cf2e1
--- /dev/null
+++ b/variant/trackmouse/lang/ru_RU.ts
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="ru_RU">
+</TS>
diff --git a/variant/trackmouse/lang/stub.ts b/variant/trackmouse/lang/stub.ts
new file mode 100644
index 00000000..6401616d
--- /dev/null
+++ b/variant/trackmouse/lang/stub.ts
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1">
+</TS>
diff --git a/variant/trackmouse/main.cpp b/variant/trackmouse/main.cpp
new file mode 100644
index 00000000..0128683e
--- /dev/null
+++ b/variant/trackmouse/main.cpp
@@ -0,0 +1,18 @@
+#include "gui/init.hpp"
+#include "window.hpp"
+
+#if defined _WIN32
+# include <windows.h>
+#endif
+
+int main(int argc, char** argv)
+{
+ return run_application(argc, argv, []() { return new window; });
+}
+
+#if defined _MSC_VER
+int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int /* nCmdShow */)
+{
+ return main(__argc, __argv);
+}
+#endif
diff --git a/variant/trackmouse/trackmouse-res.qrc b/variant/trackmouse/trackmouse-res.qrc
new file mode 100644
index 00000000..f351b3f2
--- /dev/null
+++ b/variant/trackmouse/trackmouse-res.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/images">
+ <file>images/start.png</file>
+ <file>images/stop.png</file>
+ </qresource>
+</RCC>
diff --git a/variant/trackmouse/window.cpp b/variant/trackmouse/window.cpp
new file mode 100644
index 00000000..7566f6ca
--- /dev/null
+++ b/variant/trackmouse/window.cpp
@@ -0,0 +1,18 @@
+#include "window.hpp"
+
+#include <QApplication>
+
+void window::closeEvent(QCloseEvent* e)
+{
+ e->accept();
+ QApplication::exit(0);
+}
+
+window::window() : QMainWindow()
+{
+ ui.setupUi(this);
+ setAttribute(Qt::WA_QuitOnClose);
+
+ show();
+}
+
diff --git a/variant/trackmouse/window.hpp b/variant/trackmouse/window.hpp
new file mode 100644
index 00000000..e5c34410
--- /dev/null
+++ b/variant/trackmouse/window.hpp
@@ -0,0 +1,17 @@
+#pragma once
+
+#include "ui_window.h"
+#include <QMainWindow>
+#include <QCloseEvent>
+
+class window : public QMainWindow
+{
+ Q_OBJECT
+
+ Ui::window ui;
+
+ void closeEvent(QCloseEvent* e) override;
+public:
+ window();
+
+};
diff --git a/variant/trackmouse/window.ui b/variant/trackmouse/window.ui
new file mode 100644
index 00000000..c8ad4e22
--- /dev/null
+++ b/variant/trackmouse/window.ui
@@ -0,0 +1,382 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>window</class>
+ <widget class="QMainWindow" name="window">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>763</width>
+ <height>258</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle">
+ <string>trackmouse prototype</string>
+ </property>
+ <widget class="QWidget" name="frame">
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <property name="spacing">
+ <number>9</number>
+ </property>
+ <item>
+ <widget class="QFrame" name="video_feed">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>320</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>320</width>
+ <height>240</height>
+ </size>
+ </property>
+ <widget class="QFrame" name="video_frame">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>320</width>
+ <height>240</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>320</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>320</width>
+ <height>240</height>
+ </size>
+ </property>
+ <widget class="QLabel" name="video_frame_label">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>320</width>
+ <height>240</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>320</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>320</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <family>Candara</family>
+ <pointsize>37</pointsize>
+ <weight>50</weight>
+ <bold>false</bold>
+ <kerning>true</kerning>
+ </font>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../../gui/opentrack-res.qrc">:/images/tracking-not-started.png</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <widget class="QWidget" name="widget_3" native="true">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="spacing">
+ <number>1</number>
+ </property>
+ <property name="leftMargin">
+ <number>13</number>
+ </property>
+ <property name="topMargin">
+ <number>12</number>
+ </property>
+ <property name="rightMargin">
+ <number>12</number>
+ </property>
+ <property name="bottomMargin">
+ <number>12</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Keyboard shortcuts</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="leftMargin">
+ <number>40</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>40</number>
+ </property>
+ <property name="bottomMargin">
+ <number>4</number>
+ </property>
+ <property name="horizontalSpacing">
+ <number>30</number>
+ </property>
+ <property name="verticalSpacing">
+ <number>10</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ <stylestrategy>PreferAntialias</stylestrategy>
+ </font>
+ </property>
+ <property name="text">
+ <string>start/stop tracking</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" alignment="Qt::AlignRight">
+ <widget class="QLabel" name="label_3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ <stylestrategy>PreferAntialias</stylestrategy>
+ </font>
+ </property>
+ <property name="text">
+ <string>Alt+F10</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ <stylestrategy>PreferAntialias</stylestrategy>
+ </font>
+ </property>
+ <property name="text">
+ <string>center</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" alignment="Qt::AlignRight">
+ <widget class="QLabel" name="label_5">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ <stylestrategy>PreferAntialias</stylestrategy>
+ </font>
+ </property>
+ <property name="text">
+ <string>Alt+F12</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QWidget" name="widget_2" native="true">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>3</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Sensitivity</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="sensitivity_slider">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>10</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="pageStep">
+ <number>1</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition">
+ <enum>QSlider::TicksAbove</enum>
+ </property>
+ <property name="tickInterval">
+ <number>10</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="sensitivity_label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>2</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>100%</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QWidget" name="widget" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="topMargin">
+ <number>3</number>
+ </property>
+ <property name="bottomMargin">
+ <number>3</number>
+ </property>
+ <item>
+ <widget class="QCommandLinkButton" name="start_button">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Start</string>
+ </property>
+ <property name="icon">
+ <iconset resource="trackmouse-res.qrc">
+ <normaloff>:/images/images/start.png</normaloff>:/images/images/start.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>43</width>
+ <height>20</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCommandLinkButton" name="stop_button">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Stop</string>
+ </property>
+ <property name="icon">
+ <iconset resource="trackmouse-res.qrc">
+ <normaloff>:/images/images/stop.png</normaloff>:/images/images/stop.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <resources>
+ <include location="../../gui/opentrack-res.qrc"/>
+ <include location="trackmouse-res.qrc"/>
+ </resources>
+ <connections/>
+</ui>