inital commit
This commit is contained in:
70
mainwindow.h
Normal file
70
mainwindow.h
Normal file
@ -0,0 +1,70 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QComboBox>
|
||||
#include <QShortcut>
|
||||
#include "vhfmill.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class MainWindow; }
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
VhfMill* mill_;
|
||||
|
||||
QShortcut viewTopAction;
|
||||
QShortcut viewFrontAction;
|
||||
QShortcut viewLeftAction;
|
||||
QShortcut viewRightAction;
|
||||
bool jogEnabled = false;
|
||||
|
||||
private slots:
|
||||
void raiseError(int errorNum);
|
||||
void positionUpdate(std::vector<int> position);
|
||||
void isHomed(VhfMill::Axis axis);
|
||||
void gotOutputs(uint8_t outputs);
|
||||
void gotPressureState(bool state);
|
||||
void checkBlocks();
|
||||
void toolChangeDone();
|
||||
void gotSpindleSpeed(int speed);
|
||||
void touchoffChanged(std::vector<int> position);
|
||||
void textChanged();
|
||||
void selectedJogStepChanged(int index);
|
||||
void jog(VhfMill::Axis axis, int jogDirection);
|
||||
|
||||
void home();
|
||||
void stopSpindle();
|
||||
void run();
|
||||
void toolSwitch();
|
||||
void touchoff();
|
||||
void touchoffAll();
|
||||
void touchoffRst();
|
||||
void toolUnload();
|
||||
void openGcode();
|
||||
void openVhfCode();
|
||||
|
||||
private:
|
||||
void setAllBlocked(bool block);
|
||||
void setOutputsBlocked(bool block);
|
||||
void setJogBlocked(bool block);
|
||||
void setToolchangeBlocked(bool block);
|
||||
void setSpindleBlocked(bool block);
|
||||
void setHomeingBlocked(bool block);
|
||||
void setTouchoffBlocked(bool block);
|
||||
|
||||
static VhfMill::Axis comboBoxToAxis(const QComboBox& box);
|
||||
|
||||
protected:
|
||||
virtual bool eventFilter(QObject *o, QEvent *e) override;
|
||||
|
||||
public:
|
||||
MainWindow(VhfMill* mill, QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui = nullptr;
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
Reference in New Issue
Block a user