Huge cleanups and added open gl window
This commit is contained in:
1 parent
a477581f6f
commit
ffd4c821ef
525 files changed
+1320
-35862
No files matched your search
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include <memory>
|
||||
|
||||
class QLabel;
|
||||
namespace Ui { class CodeEditorDialog; }
|
||||
|
||||
class CodeEditorDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
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 loadCode();
|
||||
void saveCode();
|
||||
void printCode();
|
||||
|
||||
void updatePosition();
|
||||
|
||||
private:
|
||||
void updateTitle();
|
||||
|
||||
const std::unique_ptr<Ui::CodeEditorDialog> m_ui;
|
||||
|
||||
QString m_title;
|
||||
|
||||
QLabel * const m_labelPosition;
|
||||
};
|
||||
Reference in new issue
Block a user