FIlename is now remembered and used by save. Save as added.
This commit is contained in:
parent
35932e7a8d
commit
69ac154b07
11 changed files with 539 additions and 169 deletions
|
|
@ -27,6 +27,8 @@ namespace Pgsql {
|
|||
class Connection;
|
||||
}
|
||||
|
||||
class QueryTab;
|
||||
|
||||
class QCloseEvent;
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
|
|
@ -49,6 +51,7 @@ private:
|
|||
std::chrono::time_point<std::chrono::steady_clock> m_startTime;
|
||||
ConnectionConfig m_config;
|
||||
bool m_queryTextChanged = false;
|
||||
QString m_fileName;
|
||||
|
||||
|
||||
void startTimer();
|
||||
|
|
@ -57,6 +60,7 @@ private:
|
|||
|
||||
|
||||
Ui::MainWindow *ui;
|
||||
QueryTab *m_queryTab = nullptr;
|
||||
std::unique_ptr<SqlHighlighter> highlighter;
|
||||
|
||||
ASyncDBConnection m_dbConnection;
|
||||
|
|
@ -72,6 +76,8 @@ private:
|
|||
|
||||
bool continueWithoutSaving();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void showEvent(QShowEvent *event);
|
||||
void saveSqlTo(const QString &filename);
|
||||
private slots:
|
||||
|
||||
void startConnect();
|
||||
|
|
@ -95,6 +101,7 @@ private slots:
|
|||
void on_actionExecute_SQL_triggered();
|
||||
void on_actionExplain_Analyze_triggered();
|
||||
void on_actionCancel_triggered();
|
||||
void on_actionSave_SQL_as_triggered();
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue