cutter/src/dialogs/EditInstructionDialog.h
ncyellow ae35ac9d08 Minor Header Optimizations (#1429)
1. remove unnecessary includes. compile optimization
2. add more const for getter functions
2019-04-06 14:04:55 +02:00

39 lines
850 B
C++

#ifndef EDITINSTRUCTIONDIALOG_H
#define EDITINSTRUCTIONDIALOG_H
#include <QDialog>
#include <memory>
namespace Ui {
class EditInstructionDialog;
}
enum InstructionEditMode {
EDIT_NONE, EDIT_BYTES, EDIT_TEXT
};
class EditInstructionDialog : public QDialog
{
Q_OBJECT
public:
explicit EditInstructionDialog(InstructionEditMode isEditingBytes, QWidget *parent = nullptr);
~EditInstructionDialog();
QString getInstruction() const;
void setInstruction(const QString &instruction);
private slots:
void on_buttonBox_accepted();
void on_buttonBox_rejected();
void updatePreview(const QString &input);
private:
std::unique_ptr<Ui::EditInstructionDialog> ui;
InstructionEditMode editMode; // true if editing intruction **bytes**; false if editing instruction **text**
};
#endif // EDITINSTRUCTIONDIALOG_H