#pragma once #include #include #include "../common/diality_keys.h" class QLineEdit; class QTextEdit; class QLabel; class QPushButton; class QCheckBox; class MainWindow final : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget* parent = nullptr); private slots: void onReloadKeysClicked(); void onGenerateClicked(); void onSaveClicked(); private: bool ensureKeysLoaded(); void updateSizeStatus(int modules, int scalePx, int quietModules, double printedMm); QLabel* m_keysStatus = nullptr; QPushButton* m_reloadKeysBtn = nullptr; QLineEdit* m_fieldsEdit = nullptr; QLineEdit* m_dpiEdit = nullptr; QLineEdit* m_targetMmEdit = nullptr; QCheckBox* m_compressCheck = nullptr; QLabel* m_sizeStatus = nullptr; QTextEdit* m_outText = nullptr; QLabel* m_imageLabel = nullptr; QPushButton* m_saveBtn = nullptr; QImage m_lastImage; diality::Keys m_keys; bool m_keysLoaded = false; QString m_keysPath; };