Connection manager can now open a query window for selected connection.
Query window has now buttons with icons made in the designer for better looks. Depending on received responses from the database the tabcontrol with the message, data and explain tab now switches to the appropriate tab.
This commit is contained in:
parent
88fcc0338d
commit
d19741f111
26 changed files with 408 additions and 116 deletions
|
|
@ -1,8 +1,11 @@
|
|||
#ifndef DATABASEWINDOW_H
|
||||
#ifndef DATABASEWINDOW_H
|
||||
#define DATABASEWINDOW_H
|
||||
|
||||
#include "asyncdbconnection.h"
|
||||
#include "tsqueue.h"
|
||||
#include <QMainWindow>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class DatabaseWindow;
|
||||
}
|
||||
|
|
@ -15,8 +18,26 @@ public:
|
|||
explicit DatabaseWindow(QWidget *parent = 0);
|
||||
~DatabaseWindow();
|
||||
|
||||
void setConfig(const ConnectionConfig &config);
|
||||
/* Meant to be called from other threads to pass a code block
|
||||
* that has to be executed in the context of the thread of the window.
|
||||
*/
|
||||
void QueueTask(TSQueue::t_Callable c);
|
||||
|
||||
private:
|
||||
Ui::DatabaseWindow *ui;
|
||||
TSQueue m_taskQueue;
|
||||
ASyncDBConnection m_dbConnection;
|
||||
ConnectionConfig m_config;
|
||||
|
||||
|
||||
void connectionStateChanged(ASyncDBConnection::State state);
|
||||
void receiveNotice(Pgsql::ErrorDetails notice);
|
||||
|
||||
void startConnect();
|
||||
private slots:
|
||||
|
||||
void processCallableQueue();
|
||||
};
|
||||
|
||||
#endif // DATABASEWINDOW_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue