Lots of fixes and added more dialogs
This commit is contained in:
@@ -12,9 +12,26 @@ class CodeEditorDialog : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CodeEditorDialog(QWidget *parent = nullptr);
|
||||
explicit CodeEditorDialog(const QString &title, QWidget *parent = nullptr);
|
||||
~CodeEditorDialog();
|
||||
|
||||
void accept() override;
|
||||
void reject() override;
|
||||
|
||||
const QString &title() const { return m_title; }
|
||||
void setTitle(const QString &title) { if (m_title == title) return; m_title = title; updateTitle(); }
|
||||
|
||||
QString script() const;
|
||||
void setScript(const QString &script);
|
||||
|
||||
protected slots:
|
||||
void changed();
|
||||
|
||||
protected:
|
||||
bool m_unsavedChanges{};
|
||||
|
||||
void addToolbarWidget(QWidget *widget);
|
||||
|
||||
private slots:
|
||||
void load();
|
||||
void save();
|
||||
@@ -22,9 +39,12 @@ private slots:
|
||||
|
||||
void updatePosition();
|
||||
|
||||
protected:
|
||||
private:
|
||||
void updateTitle();
|
||||
|
||||
const std::unique_ptr<Ui::CodeEditorDialog> m_ui;
|
||||
|
||||
private:
|
||||
QString m_title;
|
||||
|
||||
QLabel * const m_labelPosition;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user