summaryrefslogtreecommitdiffhomepage
path: root/tracker-test/test.h
blob: 7f06968e3bea3ab09c061f562e62410de18ee14b (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
#pragma once
#include "ui_test.h"
#include "api/plugin-api.hpp"
#include "compat/timer.hpp"
#include "compat/macros.hpp"

#include <cmath>

class test_tracker : public ITracker
{
public:
    test_tracker();
    ~test_tracker() override;
    module_status start_tracker(QFrame *) override;
    void data(double *data) override;

private:
    double last[6] {};
    Timer t;
};

class test_dialog : public ITrackerDialog
{
    Q_OBJECT

    Ui::test_ui ui;
public:
    test_dialog();
    void register_tracker(ITracker *) override {}
    void unregister_tracker() override {}
private slots:
    void doOK();
    void doCancel();
};

class test_metadata : public Metadata
{
    Q_OBJECT

    QString name() override { return tr("Test tracker"); }
    QIcon icon() override { return QIcon(":/images/opentrack.png"); }
};