Builds on windows again
This commit is contained in:
parent
33cf39b799
commit
bebb3391c3
160 changed files with 138 additions and 117 deletions
43
pglab/DatabaseWindow.h
Normal file
43
pglab/DatabaseWindow.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#ifndef DATABASEWINDOW_H
|
||||
#define DATABASEWINDOW_H
|
||||
|
||||
#include "ASyncDBConnection.h"
|
||||
#include "tsqueue.h"
|
||||
#include <QMainWindow>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class DatabaseWindow;
|
||||
}
|
||||
|
||||
class DatabaseWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
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