Frontend to the famous GRBL.

gcodeparser.h 779B

    /* Part of x2grbl * * Copyright Johann Wilhelm <johann.wilhelm@9mal6.de> 2015 * * see Readme.md for detailed license and usage information! */ #ifndef GCODEPARSER_H #define GCODEPARSER_H #include <QIODevice> #include <QList> #include <QVector3D> #include <QMap> class QPainter2Gcode; class HpglParser; class GCodeParser { friend class HpglParser; friend class QPainter2GCode; public: GCodeParser(); bool open(QIODevice &Input); bool save(QIODevice &Output); bool adjustZ(QList<QVector3D> ZValues); QString getLine(int Line); int getFirstLine(); int getLastLine(); int getNextLine(int Line); bool isEmpty() {return Lines.isEmpty();} protected: QMap<int, QString> Lines; }; #endif // GCODEPARSER_H