blob: 8cf74ac152e0f2280a11654e80e884834f1ea591 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/* Copyright (c) 2012-2015 Stanislaw Halik
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*/
#pragma once
#include "ui_ftnoir_accela_filtercontrols.h"
#include "accela-settings.hpp"
#include "api/plugin-api.hpp"
#include "compat/timer.hpp"
#include "compat/variance.hpp"
#include "compat/macros.hpp"
#include <QMutex>
#include <QTimer>
class accela : public IFilter
{
public:
accela();
void filter(const double* input, double *output) override;
void center() override { first_run = true; }
spline spline_rot, spline_pos;
module_status initialize() override { return status_ok(); }
private:
settings_accela s;
double last_output[6], deltas[6];
double smoothed_input[2];
Timer t;
#if defined DEBUG_ACCELA
Timer debug_timer;
double debug_max;
variance var;
#endif
bool first_run;
};
class dialog_accela : public IFilterDialog
{
Q_OBJECT
public:
dialog_accela();
void register_filter(IFilter*) override {}
void unregister_filter() override {}
private:
Ui::AccelaUICdialog_accela ui;
void save();
settings_accela s;
private slots:
void doOK();
void doCancel();
};
class accelaDll : public Metadata
{
Q_OBJECT
QString name() { return tr("Accela"); }
QIcon icon() { return QIcon(":/images/filter-16.png"); }
};
|