Switching to linux for development of pglab.
Switched from qmake to cmake. Code changes to make it compile.
This commit is contained in:
parent
dd9906dbd8
commit
04723a289b
142 changed files with 124 additions and 83 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