summaryrefslogtreecommitdiffhomepage
path: root/pose-widget
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-09 17:14:02 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-10 03:18:58 +0100
commit7d101a1c2827b5e7a373fb0d0a68099fb692e55a (patch)
tree3489a2988806a02a9ef31760116de104f94582c6 /pose-widget
parent674c8a9f1a42b36940551a6ebaf953ad96d379d0 (diff)
many: spring cleanup
Diffstat (limited to 'pose-widget')
-rw-r--r--pose-widget/export.hpp11
-rw-r--r--pose-widget/pose-widget.cpp10
-rw-r--r--pose-widget/pose-widget.hpp13
3 files changed, 21 insertions, 13 deletions
diff --git a/pose-widget/export.hpp b/pose-widget/export.hpp
new file mode 100644
index 00000000..bfe55138
--- /dev/null
+++ b/pose-widget/export.hpp
@@ -0,0 +1,11 @@
+// generates export.hpp for each module from compat/linkage.hpp
+
+#pragma once
+
+#include "compat/linkage-macros.hpp"
+
+#ifdef BUILD_POSE_WIDGET
+# define OTR_POSE_WIDGET_EXPORT OTR_GENERIC_EXPORT
+#else
+# define OTR_POSE_WIDGET_EXPORT OTR_GENERIC_IMPORT
+#endif
diff --git a/pose-widget/pose-widget.cpp b/pose-widget/pose-widget.cpp
index 50606c00..c25ad3eb 100644
--- a/pose-widget/pose-widget.cpp
+++ b/pose-widget/pose-widget.cpp
@@ -12,13 +12,15 @@
#include "compat/check-visible.hpp"
#include <cmath>
#include <algorithm>
+
#include <QPainter>
#include <QPaintEvent>
-#include <QPalette>
-#include <QGroupBox>
#include <QDebug>
+// XXX this needs rewriting in terms of scanline rendering -sh 20180105
+// see: <https://mikro.naprvyraz.sk/docs/Coding/2/TEXTURE4.TXT>
+
using namespace pose_widget_impl;
pose_transform::pose_transform(QWidget* dst) :
@@ -279,8 +281,8 @@ void pose_transform::project_quad_texture()
const unsigned orig_pitch = tex.bytesPerLine();
const unsigned dest_pitch = image.bytesPerLine();
- unsigned char const* const restrict_ptr orig = tex.constBits();
- unsigned char* const restrict_ptr dest = image.bits();
+ unsigned char const* restrict_ptr orig = tex.constBits();
+ unsigned char* restrict_ptr dest = image.bits();
const int orig_depth = tex.depth() / 8;
const int dest_depth = image.depth() / 8;
diff --git a/pose-widget/pose-widget.hpp b/pose-widget/pose-widget.hpp
index cdbcdeb8..9b280afc 100644
--- a/pose-widget/pose-widget.hpp
+++ b/pose-widget/pose-widget.hpp
@@ -10,21 +10,16 @@
#include "api/plugin-api.hpp"
#include "compat/euler.hpp"
+#include "export.hpp"
+
#include <tuple>
#include <mutex>
#include <atomic>
#include <vector>
-#include <QtGlobal>
#include <QWidget>
#include <QThread>
-#include <QPixmap>
-
-#ifdef BUILD_POSE_WIDGET
-# define POSE_WIDGET_EXPORT Q_DECL_EXPORT
-#else
-# define POSE_WIDGET_EXPORT Q_DECL_IMPORT
-#endif
+#include <QImage>
namespace pose_widget_impl {
@@ -94,7 +89,7 @@ struct pose_transform final : QThread
static constexpr int w = 320, h = 240;
};
-class POSE_WIDGET_EXPORT pose_widget final : public QWidget
+class OTR_POSE_WIDGET_EXPORT pose_widget final : public QWidget
{
public:
pose_widget(QWidget *parent = nullptr);