46 lines
928 B
C++
46 lines
928 B
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include <QFileDialog>
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui {
|
|
class MainWindow;
|
|
}
|
|
QT_END_NAMESPACE
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
QMap<QString, QColor> colorMap;
|
|
|
|
MainWindow(QWidget *parent = nullptr);
|
|
~MainWindow();
|
|
|
|
public slots:
|
|
void onGridUpdated();
|
|
|
|
private slots:
|
|
void on_spinGridWidth_valueChanged(int arg1);
|
|
void on_spinGridHeight_valueChanged(int arg1);
|
|
|
|
void on_comboLineColor_currentTextChanged(const QString &arg1);
|
|
void on_listLines_currentRowChanged(int currentRow);
|
|
|
|
void on_buttonSave_clicked();
|
|
|
|
void on_buttonClear_clicked();
|
|
|
|
void on_buttonDeleteLine_clicked();
|
|
|
|
private:
|
|
Ui::MainWindow *ui;
|
|
int lastEditedLine = -1;
|
|
|
|
bool isSelectedLineCorrect(int line);
|
|
void throwWarning(const QString &title, const QStringList &description);
|
|
};
|
|
#endif // MAINWINDOW_H
|