Skip to content
mainwindow.h 2.55 KiB
Newer Older
raoul's avatar
raoul committed
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtWidgets/qlabel.h>
#include <memory>
#include <machine.h>
raoul's avatar
raoul committed

#include <QWidget>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QButtonGroup>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QFormLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QWidget>
3dsman's avatar
3dsman committed
#include <QtWidgets/qlabel.h>
#include <qtmaterialflatbutton.h>
3dsman's avatar
3dsman committed
#include <qtmaterialiconbutton.h>
class Machine;
raoul's avatar
raoul committed
namespace Ui {
class MainWindow;
}

class OE_interfaceDisplay;
3dsman's avatar
3dsman committed
class OE_ui_toolBox;
raoul's avatar
raoul committed

class MainWindow : public QMainWindow
{
raoul's avatar
raoul committed
	Q_OBJECT
raoul's avatar
raoul committed

public:
	explicit MainWindow(QWidget *parent = nullptr);
raoul's avatar
raoul committed
	~MainWindow();
3dsman's avatar
3dsman committed
	OE_ui_toolBox* m_leftToolTab;
3dsman's avatar
3dsman committed
	QBoxLayout* topGlWindowBar();
	QBoxLayout* stitchParam();
	OE_ui_stitchList *stitchesList;
3dsman's avatar
3dsman committed
	QtMaterialIconButton* setIconButton(QString iconFile, const char * method);
	QtMaterialFlatButton* setButton(QString name, const char * method);
raoul's avatar
raoul committed
	void keyPressEvent(QKeyEvent* event);
	void keyReleaseEvent(QKeyEvent* event);
3dsman's avatar
3dsman committed
	void machineRun();
	void machineLoad();

	OE_root* getCurrentRoot();

raoul's avatar
raoul committed
	OE_interfaceDisplay* getItfDisplay();
	void sendKeyPulse(Qt::Key key, Qt::KeyboardModifiers modifiers);
raoul's avatar
raoul committed

private slots:

	void on_tabWidget_tabCloseRequested(int index);

	void on_actionNew_triggered();

	void on_actionClose_triggered();

	void on_actionOpen_triggered();

	void on_actionSave_triggered();

	void on_actionLine_triggered();

	void on_actionUndo_triggered();

	void on_actionRedo_triggered();

	void on_actionBirail_triggered();

	void on_actionPattern1_triggered();
	void on_actionPattern2_triggered();
	void on_actionPattern3_triggered();
	void on_actionPattern4_triggered();
	void on_actionPattern5_triggered();
	void on_actionPattern6_triggered();
	void on_actionPattern7_triggered();
	void on_actionPattern8_triggered();
	void on_actionPattern9_triggered();

	void on_tabWidget_currentChanged(int index);

	void on_actionCloseCurve_triggered();

	void on_actionReverse_curve_R_triggered();

	void on_actionFill_triggered();

	void on_actionConnectToMachine_triggered(bool checked);

	void on_machineConnectionChanged(bool connected);
	void on_machineStateChanged(Machine::SlaveInfo info);

	void on_actionMachineRun_triggered();

	void on_actionMachineLoad_triggered();
3dsman's avatar
3dsman committed
signals:
	void machineConnectionChanged(bool connected);
raoul's avatar
raoul committed
	Ui::MainWindow *ui;
	QLabel status;
	std::unique_ptr<Machine> machine;
raoul's avatar
raoul committed
};

#endif // MAINWINDOW_H