summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-09 15:50:09 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-10 10:41:56 +0200
commit0eec855f4f5ac86f70525418918fd1ebb4d45e03 (patch)
treeb8014ad75774e00ba3c26f2b781d6ad0c6021c9a /gui
parentf56f30f1d076c8b48a0bd4ce47b26ede618d2880 (diff)
spline-widget, gui: rename mapping-related files and classes
Adjust usages.
Diffstat (limited to 'gui')
-rw-r--r--gui/main-window.hpp2
-rw-r--r--gui/mapping-window.cpp (renamed from gui/curve-config.cpp)10
-rw-r--r--gui/mapping-window.hpp (renamed from gui/curve-config.h)6
-rw-r--r--gui/mapping-window.ui (renamed from gui/mapping.ui)30
4 files changed, 24 insertions, 24 deletions
diff --git a/gui/main-window.hpp b/gui/main-window.hpp
index 66852e6f..14c7cf0d 100644
--- a/gui/main-window.hpp
+++ b/gui/main-window.hpp
@@ -30,7 +30,7 @@
#include "opentrack-logic/shortcuts.h"
#include "opentrack-logic/work.hpp"
#include "opentrack-logic/state.hpp"
-#include "curve-config.h"
+#include "mapping-window.hpp"
#include "options-dialog.hpp"
#include "process_detector.h"
diff --git a/gui/curve-config.cpp b/gui/mapping-window.cpp
index 3e262c48..108e1354 100644
--- a/gui/curve-config.cpp
+++ b/gui/mapping-window.cpp
@@ -6,7 +6,7 @@
* notice appear in all copies.
*/
-#include "curve-config.h"
+#include "mapping-window.hpp"
#include "opentrack-logic/main-settings.hpp"
#include "spline-widget/spline-widget.hpp"
MapWidget::MapWidget(Mappings& m) :
@@ -33,7 +33,7 @@ void MapWidget::reload()
{
{
struct {
- QFunctionConfigurator* qfc;
+ spline_widget* qfc;
Axis axis;
QCheckBox* checkbox;
bool altp;
@@ -58,12 +58,12 @@ void MapWidget::reload()
for (int i = 0; qfcs[i].qfc; i++)
{
const bool altp = qfcs[i].altp;
- Mapping& axis = m(qfcs[i].axis);
- Map* conf = altp ? &axis.curveAlt : &axis.curve;
+ Map& axis = m(qfcs[i].axis);
+ spline* conf = altp ? &axis.spline_alt : &axis.spline_main;
const auto& name = qfcs[i].altp ? axis.name2 : axis.name1;
if (altp)
{
- QFunctionConfigurator& qfc = *qfcs[i].qfc;
+ spline_widget& qfc = *qfcs[i].qfc;
connect(qfcs[i].checkbox, &QCheckBox::toggled,
this,
[&](bool f) -> void {qfc.setEnabled(f); qfc.force_redraw();});
diff --git a/gui/curve-config.h b/gui/mapping-window.hpp
index 2124aa81..e70a27c6 100644
--- a/gui/curve-config.h
+++ b/gui/mapping-window.hpp
@@ -1,16 +1,16 @@
#pragma once
#include <QWidget>
#include "opentrack-logic/mappings.hpp"
-#include "ui_mapping.h"
+#include "ui_mapping-window.h"
class MapWidget final : public QWidget
{
Q_OBJECT
public:
- MapWidget(Mappings &m);
+ MapWidget(Mappings& m);
void reload();
private:
- Ui::UICCurveConfigurationDialog ui;
+ Ui::mapping_window ui;
Mappings& m;
main_settings s;
diff --git a/gui/mapping.ui b/gui/mapping-window.ui
index 3e3a54ff..877feed4 100644
--- a/gui/mapping.ui
+++ b/gui/mapping-window.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>UICCurveConfigurationDialog</class>
- <widget class="QWidget" name="UICCurveConfigurationDialog">
+ <class>mapping_window</class>
+ <widget class="QWidget" name="mapping_window">
<property name="geometry">
<rect>
<x>0</x>
@@ -59,7 +59,7 @@
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QFunctionConfigurator" name="rxconfig" native="true">
+ <widget class="spline_widget" name="rxconfig" native="true">
<property name="colorBezier" stdset="0">
<color>
<red>255</red>
@@ -84,7 +84,7 @@
</widget>
</item>
<item>
- <widget class="QFunctionConfigurator" name="rxconfig_alt" native="true">
+ <widget class="spline_widget" name="rxconfig_alt" native="true">
<property name="colorBezier" stdset="0">
<color>
<red>255</red>
@@ -112,7 +112,7 @@
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="QFunctionConfigurator" name="ryconfig" native="true">
+ <widget class="spline_widget" name="ryconfig" native="true">
<property name="colorBezier" stdset="0">
<color>
<red>0</red>
@@ -137,7 +137,7 @@
</widget>
</item>
<item>
- <widget class="QFunctionConfigurator" name="ryconfig_alt" native="true">
+ <widget class="spline_widget" name="ryconfig_alt" native="true">
<property name="colorBezier" stdset="0">
<color>
<red>0</red>
@@ -165,7 +165,7 @@
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
- <widget class="QFunctionConfigurator" name="rzconfig" native="true">
+ <widget class="spline_widget" name="rzconfig" native="true">
<property name="colorBezier" stdset="0">
<color>
<red>0</red>
@@ -190,7 +190,7 @@
</widget>
</item>
<item>
- <widget class="QFunctionConfigurator" name="rzconfig_alt" native="true">
+ <widget class="spline_widget" name="rzconfig_alt" native="true">
<property name="colorBezier" stdset="0">
<color>
<red>0</red>
@@ -218,7 +218,7 @@
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
- <widget class="QFunctionConfigurator" name="txconfig" native="true">
+ <widget class="spline_widget" name="txconfig" native="true">
<property name="colorBezier" stdset="0">
<color>
<red>255</red>
@@ -243,7 +243,7 @@
</widget>
</item>
<item>
- <widget class="QFunctionConfigurator" name="txconfig_alt" native="true">
+ <widget class="spline_widget" name="txconfig_alt" native="true">
<property name="colorBezier" stdset="0">
<color>
<red>255</red>
@@ -271,7 +271,7 @@
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
- <widget class="QFunctionConfigurator" name="tyconfig" native="true">
+ <widget class="spline_widget" name="tyconfig" native="true">
<property name="colorBezier" stdset="0">
<color>
<red>255</red>
@@ -296,7 +296,7 @@
</widget>
</item>
<item>
- <widget class="QFunctionConfigurator" name="tyconfig_alt" native="true">
+ <widget class="spline_widget" name="tyconfig_alt" native="true">
<property name="colorBezier" stdset="0">
<color>
<red>255</red>
@@ -324,7 +324,7 @@
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
- <widget class="QFunctionConfigurator" name="tzconfig" native="true">
+ <widget class="spline_widget" name="tzconfig" native="true">
<property name="colorBezier" stdset="0">
<color>
<red>0</red>
@@ -349,7 +349,7 @@
</widget>
</item>
<item>
- <widget class="QFunctionConfigurator" name="tzconfig_alt" native="true">
+ <widget class="spline_widget" name="tzconfig_alt" native="true">
<property name="colorBezier" stdset="0">
<color>
<red>0</red>
@@ -381,7 +381,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>QFunctionConfigurator</class>
+ <class>spline_widget</class>
<extends>QWidget</extends>
<header>spline-widget/spline-widget.hpp</header>
</customwidget>