Subversion Repositories Code-Repo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
363 Kevin 1
#ifndef PASTECONTROLLER_H
2
#define PASTECONTROLLER_H
3
 
4
#include "GlobalDefines.h"
5
 
6
#define BTN_ICON_SIZE 32
7
 
8
class PasteController : public QWidget
9
{
10
        Q_OBJECT
11
    public:
12
        PasteController(QWidget *parent = 0);
13
        ~PasteController();
14
 
15
    signals:
16
        void EnableControls(void);
17
        void DisableControls(void);
364 Kevin 18
        void TransmitData(QByteArray);
363 Kevin 19
 
20
    public slots:
364 Kevin 21
        void EnableTransmit(bool);
22
        void ToggleHotkeys(void);
23
        void UpdatePosition(void);
24
        void UpdatePositionSingle(void);
25
        void UpdateTimer(int);
26
        void ResetPosition(void);
363 Kevin 27
 
364 Kevin 28
        void QSliderToQDoubleSpinBox(int);
29
        void QDoubleSpinBoxToQSlider(double);
30
 
31
    protected:
32
        bool eventFilter(QObject *, QEvent *);
33
 
363 Kevin 34
    private:
364 Kevin 35
        bool connected;
36
        bool hotkeysEnabled;
37
        double xPos,yPos,zPos;
38
        bool X_Incr, X_Decr, Y_Incr, Y_Decr, Z_Incr, Z_Decr, E_Incr;
39
 
40
        void IncrementToolhead(double x, double y, double z);
41
        void SingleExtrude(void);
42
 
43
        QTimer *tmrUpdate;
44
 
363 Kevin 45
        QLabel *labelHelp;
46
 
47
        QPushButton *btnEnableHotkeys;
48
        QPushButton *btnInit;
49
        QPushButton *btnHome;
50
 
364 Kevin 51
        // Printer control buttons
363 Kevin 52
        QToolButton *btnForward;
53
        QToolButton *btnBackward;
54
        QToolButton *btnLeft;
55
        QToolButton *btnRight;
56
        QToolButton *btnUp;
57
        QToolButton *btnDown;
58
        QToolButton *btnExtrude;
59
 
364 Kevin 60
        // Toolhead position elements
363 Kevin 61
        QLabel *labelXPos;
62
        QLineEdit *textXValue;
63
        QLabel *labelYPos;
64
        QLineEdit *textYValue;
65
        QLabel *labelZPos;
66
        QLineEdit *textZValue;
67
 
364 Kevin 68
        // Movement setting elements
69
        QLabel *labelXYSteps;
70
        QSlider *sliderXYSteps;
71
        QDoubleSpinBox *textXYSteps;
72
 
363 Kevin 73
        QLabel *labelXYSpeed;
74
        QSlider *sliderXYSpeed;
75
        QSpinBox *textXYSpeed;
76
 
364 Kevin 77
        QLabel *labelZSteps;
78
        QSlider *sliderZSteps;
79
        QDoubleSpinBox *textZSteps;
363 Kevin 80
 
81
        QLabel *labelZSpeed;
82
        QSlider *sliderZSpeed;
83
        QSpinBox *textZSpeed;
84
 
85
        QLabel *labelRepeatDelay;
86
        QSlider *sliderRepeatDelay;
87
        QSpinBox *textRepeatDelay;
88
 
364 Kevin 89
        // Extruder setting elements
90
        QLabel *labelEForwardSteps;
91
        QSlider *sliderEForwardSteps;
92
        QSpinBox *textEForwardSteps;
93
 
363 Kevin 94
        QLabel *labelEForwardSpeed;
95
        QSlider *sliderEForwardSpeed;
96
        QSpinBox *textEForwardSpeed;
97
 
364 Kevin 98
        QLabel *labelEBackwardSteps;
99
        QSlider *sliderEBackwardSteps;
100
        QSpinBox *textEBackwardSteps;
101
 
363 Kevin 102
        QLabel *labelEBackwardSpeed;
103
        QSlider *sliderEBackwardSpeed;
104
        QSpinBox *textEBackwardSpeed;
105
 
364 Kevin 106
        QLabel *labelEZSteps;
107
        QSlider *sliderEZSteps;
108
        QDoubleSpinBox *textEZSteps;
363 Kevin 109
 
110
};
111
 
112
#endif // PASTECONTROLLER_H