mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-21 03:21:43 -06:00
Add a new option to the Preferences Dialog which activates horizontal tiling between the SQL code editor and the result view in the Execute SQL tab, i.e. the two widgets are shown side by side instead of one over the other. See issue #380.
52 lines
1.0 KiB
C++
52 lines
1.0 KiB
C++
#ifndef SQLEXECUTIONAREA_H
|
|
#define SQLEXECUTIONAREA_H
|
|
|
|
#include "sqltextedit.h"
|
|
|
|
#include <QWidget>
|
|
|
|
class SqlTextEdit;
|
|
class SqliteTableModel;
|
|
class DBBrowserDB;
|
|
class QMenu;
|
|
class QTextEdit;
|
|
|
|
namespace Ui {
|
|
class SqlExecutionArea;
|
|
}
|
|
|
|
class SqlExecutionArea : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit SqlExecutionArea(QWidget* parent, DBBrowserDB* _db);
|
|
~SqlExecutionArea();
|
|
|
|
QString getSql() const;
|
|
QString getSelectedSql() const;
|
|
|
|
QString fileName() const { return sqlFileName; }
|
|
void setFileName(const QString& filename) { sqlFileName = filename; }
|
|
|
|
SqliteTableModel* getModel() { return model; }
|
|
QTextEdit* getResultView();
|
|
SqlTextEdit* getEditor();
|
|
|
|
public slots:
|
|
virtual void finishExecution(const QString& result);
|
|
virtual void enableSaveButton(bool enable);
|
|
virtual void saveAsCsv();
|
|
virtual void saveAsView();
|
|
virtual void reloadSettings();
|
|
|
|
private:
|
|
DBBrowserDB* db;
|
|
SqliteTableModel* model;
|
|
QMenu* menuPopupSave;
|
|
QString sqlFileName;
|
|
Ui::SqlExecutionArea* ui;
|
|
};
|
|
|
|
#endif
|