mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-04-30 00:49:27 -05:00
Use QScintilla instead of own implementation of a code editor
This is a first rough implementation of QScintilla support as SQL text editor. It should work mostly and build fine with qmake as well as cmake. The new code supports all the features of the old one plus adding a few subtle improvements. The main point of this, however, is reducing the code we have to maintain and making it easier to add new features to the editor.
This commit is contained in:
@@ -5,9 +5,11 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class SqlTextEdit;
|
||||
class SqliteTableModel;
|
||||
class DBBrowserDB;
|
||||
class QMenu;
|
||||
class QTextEdit;
|
||||
|
||||
namespace Ui {
|
||||
class SqlExecutionArea;
|
||||
@@ -18,7 +20,7 @@ class SqlExecutionArea : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SqlExecutionArea(QWidget* parent = 0, DBBrowserDB* _db = 0);
|
||||
explicit SqlExecutionArea(QWidget* parent, DBBrowserDB* _db);
|
||||
~SqlExecutionArea();
|
||||
|
||||
QString getSql() const;
|
||||
@@ -32,7 +34,6 @@ public:
|
||||
SqlTextEdit* getEditor();
|
||||
|
||||
public slots:
|
||||
virtual void setTableNames(const QStringList& tables);
|
||||
virtual void finishExecution(const QString& result);
|
||||
virtual void enableSaveButton(bool enable);
|
||||
virtual void saveAsCsv();
|
||||
@@ -40,10 +41,10 @@ public slots:
|
||||
|
||||
private:
|
||||
DBBrowserDB* db;
|
||||
Ui::SqlExecutionArea* ui;
|
||||
SqliteTableModel* model;
|
||||
QMenu* menuPopupSave;
|
||||
QString sqlFileName;
|
||||
Ui::SqlExecutionArea* ui;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user