summaryrefslogtreecommitdiffhomepage
path: root/tracker-hatire/ftnoir_tracker_hat_dialog.h
blob: b93c430131b3375fb4f4bc3946d84ed1bc79a783 (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
#include "opentrack/plugin-api.hpp"
#include "ftnoir_tracker_hat_settings.h"
#include "ftnoir_tracker_hat.h"
#include "ui_ftnoir_hatcontrols.h"
#include <QObject>
#include <QWidget>
#include <QTime>
#include <QTimer>
#include <QMessageBox>
#include <QMetaType>

// Widget that has controls for FTNoIR protocol client-settings.
class TrackerControls: public ITrackerDialog
{
    Q_OBJECT
public:
    explicit TrackerControls();
    ~TrackerControls() override;
    void Initialize(QWidget *parent) ; // unused
    void register_tracker(ITracker *tracker) override;
    void unregister_tracker() override;

private:
    Ui::UIHATControls ui;
    hatire *theTracker;
    QTime last_time;

public  slots:
    void WriteMsgInfo(const QByteArray &MsgInfo);

    void doOK();
    void doCancel();
    void doReset();
    //void doCenter();
    void doZero();
    void doSend();
    void poll_tracker_info();
    void doSerialInfo();

protected:
    TrackerSettings s;
    QTimer timer;

private slots:
    void on_lineSend_returnPressed();
};