Rev 363 | Rev 372 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#ifndef PASTECONTROLLER_H
#define PASTECONTROLLER_H
#include "GlobalDefines.h"
#define BTN_ICON_SIZE 32
class PasteController : public QWidget
{
Q_OBJECT
public:
PasteController(QWidget *parent = 0);
~PasteController();
signals:
void EnableControls(void);
void DisableControls(void);
void TransmitData(QByteArray);
public slots:
void EnableTransmit(bool);
void ToggleHotkeys(void);
void UpdatePosition(void);
void UpdatePositionSingle(void);
void UpdateTimer(int);
void ResetPosition(void);
void QSliderToQDoubleSpinBox(int);
void QDoubleSpinBoxToQSlider(double);
protected:
bool eventFilter(QObject *, QEvent *);
private:
bool connected;
bool hotkeysEnabled;
double xPos,yPos,zPos;
bool X_Incr, X_Decr, Y_Incr, Y_Decr, Z_Incr, Z_Decr, E_Incr;
void IncrementToolhead(double x, double y, double z);
void SingleExtrude(void);
QTimer *tmrUpdate;
QLabel *labelHelp;
QPushButton *btnEnableHotkeys;
QPushButton *btnInit;
QPushButton *btnHome;
// Printer control buttons
QToolButton *btnForward;
QToolButton *btnBackward;
QToolButton *btnLeft;
QToolButton *btnRight;
QToolButton *btnUp;
QToolButton *btnDown;
QToolButton *btnExtrude;
// Toolhead position elements
QLabel *labelXPos;
QLineEdit *textXValue;
QLabel *labelYPos;
QLineEdit *textYValue;
QLabel *labelZPos;
QLineEdit *textZValue;
// Movement setting elements
QLabel *labelXYSteps;
QSlider *sliderXYSteps;
QDoubleSpinBox *textXYSteps;
QLabel *labelXYSpeed;
QSlider *sliderXYSpeed;
QSpinBox *textXYSpeed;
QLabel *labelZSteps;
QSlider *sliderZSteps;
QDoubleSpinBox *textZSteps;
QLabel *labelZSpeed;
QSlider *sliderZSpeed;
QSpinBox *textZSpeed;
QLabel *labelRepeatDelay;
QSlider *sliderRepeatDelay;
QSpinBox *textRepeatDelay;
// Extruder setting elements
QLabel *labelEForwardSteps;
QSlider *sliderEForwardSteps;
QSpinBox *textEForwardSteps;
QLabel *labelEForwardSpeed;
QSlider *sliderEForwardSpeed;
QSpinBox *textEForwardSpeed;
QLabel *labelEBackwardSteps;
QSlider *sliderEBackwardSteps;
QSpinBox *textEBackwardSteps;
QLabel *labelEBackwardSpeed;
QSlider *sliderEBackwardSpeed;
QSpinBox *textEBackwardSpeed;
QLabel *labelEZSteps;
QSlider *sliderEZSteps;
QDoubleSpinBox *textEZSteps;
};
#endif // PASTECONTROLLER_H