Subversion Repositories Code-Repo

Rev

Rev 364 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 364 Rev 372
Line 2... Line 2...
2
#define PASTECONTROLLER_H
2
#define PASTECONTROLLER_H
3
 
3
 
4
#include "GlobalDefines.h"
4
#include "GlobalDefines.h"
5
 
5
 
6
#define BTN_ICON_SIZE 32
6
#define BTN_ICON_SIZE 32
-
 
7
#define X_MIN 0
-
 
8
#define X_MAX 290
-
 
9
#define Y_MIN 0
-
 
10
#define Y_MAX 270
-
 
11
#define Z_MIN 0
-
 
12
#define Z_MAX 240
-
 
13
 
-
 
14
#define SLOW_MULTIPLIER 4
7
 
15
 
8
class PasteController : public QWidget
16
class PasteController : public QWidget
9
{
17
{
10
        Q_OBJECT
18
        Q_OBJECT
11
    public:
19
    public:
Line 14... Line 22...
14
 
22
 
15
    signals:
23
    signals:
16
        void EnableControls(void);
24
        void EnableControls(void);
17
        void DisableControls(void);
25
        void DisableControls(void);
18
        void TransmitData(QByteArray);
26
        void TransmitData(QByteArray);
-
 
27
        void UpdateStatus(QString);
19
 
28
 
20
    public slots:
29
    public slots:
21
        void EnableTransmit(bool);
30
        void EnableTransmit(bool);
-
 
31
        void InitializePrinter(void);
22
        void ToggleHotkeys(void);
32
        void ToggleHotkeys(void);
-
 
33
        void MoveToolhead(void);
-
 
34
        void MoveToolheadSingle(void);
23
        void UpdatePosition(void);
35
        void UpdatePosition(void);
24
        void UpdatePositionSingle(void);
36
        void ExtrudeSingle(void);
25
        void UpdateTimer(int);
-
 
26
        void ResetPosition(void);
37
        void ResetPosition(void);
-
 
38
        void ProcessData(QByteArray);
-
 
39
        void SetBaseHeight(void);
27
 
40
 
28
        void QSliderToQDoubleSpinBox(int);
41
        void QSliderToQDoubleSpinBox(int);
29
        void QDoubleSpinBoxToQSlider(double);
42
        void QDoubleSpinBoxToQSlider(double);
30
 
43
 
31
    protected:
44
    protected:
Line 34... Line 47...
34
    private:
47
    private:
35
        bool connected;
48
        bool connected;
36
        bool hotkeysEnabled;
49
        bool hotkeysEnabled;
37
        double xPos,yPos,zPos;
50
        double xPos,yPos,zPos;
38
        bool X_Incr, X_Decr, Y_Incr, Y_Decr, Z_Incr, Z_Decr, E_Incr;
51
        bool X_Incr, X_Decr, Y_Incr, Y_Decr, Z_Incr, Z_Decr, E_Incr;
-
 
52
        bool transmittingData;
39
 
53
 
40
        void IncrementToolhead(double x, double y, double z);
54
        void IncrementToolhead(double x, double y, double z);
41
        void SingleExtrude(void);
55
        void SingleExtrude(void);
42
 
56
 
-
 
57
        QQueue<QString> *queueCmds;
43
        QTimer *tmrUpdate;
58
        QTimer *tmrUpdate;
44
 
59
 
45
        QLabel *labelHelp;
60
        QLabel *labelHelp;
46
 
61
 
47
        QPushButton *btnEnableHotkeys;
62
        QPushButton *btnEnableHotkeys;
Line 87... Line 102...
87
        QSpinBox *textRepeatDelay;
102
        QSpinBox *textRepeatDelay;
88
 
103
 
89
        // Extruder setting elements
104
        // Extruder setting elements
90
        QLabel *labelEForwardSteps;
105
        QLabel *labelEForwardSteps;
91
        QSlider *sliderEForwardSteps;
106
        QSlider *sliderEForwardSteps;
92
        QSpinBox *textEForwardSteps;
107
        QDoubleSpinBox *textEForwardSteps;
93
 
108
 
94
        QLabel *labelEForwardSpeed;
109
        QLabel *labelEForwardSpeed;
95
        QSlider *sliderEForwardSpeed;
110
        QSlider *sliderEForwardSpeed;
96
        QSpinBox *textEForwardSpeed;
111
        QSpinBox *textEForwardSpeed;
97
 
112
 
98
        QLabel *labelEBackwardSteps;
113
        QLabel *labelEBackwardSteps;
99
        QSlider *sliderEBackwardSteps;
114
        QSlider *sliderEBackwardSteps;
100
        QSpinBox *textEBackwardSteps;
115
        QDoubleSpinBox *textEBackwardSteps;
101
 
116
 
102
        QLabel *labelEBackwardSpeed;
117
        QLabel *labelEBackwardSpeed;
103
        QSlider *sliderEBackwardSpeed;
118
        QSlider *sliderEBackwardSpeed;
104
        QSpinBox *textEBackwardSpeed;
119
        QSpinBox *textEBackwardSpeed;
105
 
120
 
-
 
121
        QLabel *labelExtrusionHeight;
-
 
122
        QSlider *sliderExtrusionHeight;
-
 
123
        QDoubleSpinBox *textExtrusionHeight;
-
 
124
 
106
        QLabel *labelEZSteps;
125
        QLabel *labelEZSteps;
107
        QSlider *sliderEZSteps;
126
        QSlider *sliderEZSteps;
108
        QDoubleSpinBox *textEZSteps;
127
        QDoubleSpinBox *textEZSteps;
109
 
128
 
110
};
129
};