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:
Martin Kleusberg
2015-04-16 11:44:32 +02:00
parent 569dffbc25
commit cde2393539
172 changed files with 87330 additions and 677 deletions
+4 -3
View File
@@ -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