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
|
|
@ -1,71 +0,0 @@
|
|||
#include "MasterController.h"
|
||||
#include "ConnectionManagerWindow.h"
|
||||
#include "ConnectionList.h"
|
||||
#include "ConnectionListModel.h"
|
||||
#include "MainWindow.h"
|
||||
#include "ServerWindow.h"
|
||||
#include "BackupDialog.h"
|
||||
|
||||
|
||||
MasterController::MasterController(QObject *parent) : QObject(parent)
|
||||
{}
|
||||
|
||||
MasterController::~MasterController()
|
||||
{
|
||||
delete m_connectionManagerWindow;
|
||||
delete m_connectionListModel;
|
||||
delete m_connectionList;
|
||||
}
|
||||
|
||||
void MasterController::init()
|
||||
{
|
||||
m_connectionList = new ConnectionList;
|
||||
m_connectionList->load();
|
||||
m_connectionListModel = new ConnectionListModel(m_connectionList, this);
|
||||
|
||||
m_connectionManagerWindow = new ConnectionManagerWindow(this, nullptr);
|
||||
m_connectionManagerWindow->show();
|
||||
|
||||
}
|
||||
|
||||
void MasterController::showConnectionManager()
|
||||
{
|
||||
m_connectionManagerWindow->show();
|
||||
}
|
||||
|
||||
void MasterController::openSqlWindowForConnection(int connection_index)
|
||||
{
|
||||
auto cc = m_connectionListModel->get(connection_index);
|
||||
m_connectionListModel->save(connection_index);
|
||||
if (cc.valid()) {
|
||||
auto w = new MainWindow(this, nullptr);
|
||||
w->setAttribute( Qt::WA_DeleteOnClose );
|
||||
w->setConfig(cc.get());
|
||||
w->show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MasterController::openBackupDlgForConnection(int connection_index)
|
||||
{
|
||||
auto cc = m_connectionListModel->get(connection_index);
|
||||
m_connectionListModel->save(connection_index);
|
||||
if (cc.valid()) {
|
||||
auto w = new BackupDialog(nullptr); //new ServerWindow(this, nullptr);
|
||||
w->setAttribute( Qt::WA_DeleteOnClose );
|
||||
w->setConfig(cc.get());
|
||||
w->show();
|
||||
}
|
||||
}
|
||||
|
||||
void MasterController::openServerWindowForConnection(int connection_index)
|
||||
{
|
||||
auto cc = m_connectionListModel->get(connection_index);
|
||||
m_connectionListModel->save(connection_index);
|
||||
if (cc.valid()) {
|
||||
auto w = new ServerWindow(this, nullptr);
|
||||
w->setAttribute( Qt::WA_DeleteOnClose );
|
||||
w->setConfig(cc.get());
|
||||
w->show();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue