2014-08-12 10:50:10 +00:00
|
|
|
#ifndef QBRAINFUCK_H
|
|
|
|
#define QBRAINFUCK_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QMessageBox>
|
|
|
|
#include <QFileDialog>
|
|
|
|
#include <QJsonObject>
|
|
|
|
#include <QJsonDocument>
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class QBrainfuck;
|
|
|
|
}
|
|
|
|
|
|
|
|
class QBrainfuck : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit QBrainfuck(QWidget *parent = 0);
|
|
|
|
~QBrainfuck();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_encodeButton_clicked();
|
|
|
|
|
|
|
|
void on_decodeButton_clicked();
|
|
|
|
|
|
|
|
void on_motifButton_clicked();
|
|
|
|
|
|
|
|
void on_textTextEdit_textChanged();
|
|
|
|
|
|
|
|
void on_programTextEdit_textChanged();
|
|
|
|
|
|
|
|
void on_motifTextEdit_textChanged();
|
|
|
|
|
|
|
|
void on_regexLineEdit_textChanged(const QString &arg1);
|
|
|
|
|
|
|
|
void on_saveButton_clicked();
|
|
|
|
|
|
|
|
void on_loadButton_clicked();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::QBrainfuck *ui;
|
2014-08-13 15:58:49 +00:00
|
|
|
|
|
|
|
QString formatNumber(int number);
|
|
|
|
void printMemory(QByteArray array, int maxPtr, int ptr, QString text);
|
|
|
|
void printMemory(QList<char> array, int maxPtr, int ptr, QString text);
|
2014-08-12 10:50:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QBRAINFUCK_H
|