Show current database action in status bar and add cancel button

This adds a label to the status bar which becomes visible whenever the
database is busy. It also specifies the currently running action. Also
add a button which allows you to cancel this action at the next
opportunity.

Note that this doesn't work for the Execute SQL tab yet which requires
some more rewriting of the code there.
This commit is contained in:
Martin Kleusberg
2018-10-11 20:22:38 +02:00
parent f1e01dde8c
commit 11ace1efa6
6 changed files with 55 additions and 5 deletions
+10 -5
View File
@@ -10,12 +10,7 @@
#include <QMainWindow>
#include <QMap>
class QDragEnterEvent;
class EditDialog;
class QIntValidator;
class QLabel;
class QModelIndex;
class QPersistentModelIndex;
class SqliteTableModel;
class DbStructureModel;
class RemoteDock;
@@ -23,6 +18,13 @@ class RemoteDatabase;
class FindReplaceDialog;
class ExtendedTableWidget;
class QDragEnterEvent;
class QIntValidator;
class QModelIndex;
class QLabel;
class QPersistentModelIndex;
class QToolButton;
namespace Ui {
class MainWindow;
}
@@ -158,6 +160,8 @@ private:
QLabel* statusEncodingLabel;
QLabel* statusEncryptionLabel;
QLabel* statusReadOnlyLabel;
QToolButton* statusStopButton;
QLabel* statusBusyLabel;
DbStructureModel* dbStructureModel;
@@ -306,6 +310,7 @@ private slots:
void updateInsertDeleteRecordButton();
void runSqlNewTab(const QString& query, const QString& title);
void printDbStructure();
void updateDatabaseBusyStatus(bool busy, const QString& user);
};
#endif