Introduced the MasterController as part of working on loading catalogue information.
Need a central piece to manage the catalogue data per database to prevent loading this multiple times. MasterController is now also used to enable reopening the connection manager from a query window after the connection manager has been closed.
This commit is contained in:
parent
b6d986051b
commit
6370050204
36 changed files with 769 additions and 71 deletions
|
|
@ -14,14 +14,15 @@
|
|||
#include <QCloseEvent>
|
||||
#include <querytab.h>
|
||||
#include "util.h"
|
||||
|
||||
#include "MasterController.h"
|
||||
|
||||
namespace pg = Pgsql;
|
||||
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
MainWindow::MainWindow(MasterController *master, QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::MainWindow)
|
||||
, m_masterController(master)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
@ -132,7 +133,19 @@ void MainWindow::on_actionClose_triggered()
|
|||
|
||||
void MainWindow::on_actionAbout_triggered()
|
||||
{
|
||||
//
|
||||
QMessageBox::about(this, "pgLab 0.1", tr(
|
||||
"Copyrights 2016-2017, Eelke Klein, All Rights Reserved.\n"
|
||||
"\n"
|
||||
"The program is provided AS IS with NO WARRANTY OF ANY KIND,"
|
||||
" INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS "
|
||||
"FOR A PARTICULAR PURPOSE.\n"
|
||||
"\n"
|
||||
"This program is dynamically linked with Qt 5.7 Copyright (C) 2016 The Qt Company Ltd. https://www.qt.io/licensing/. \n"
|
||||
"\n"
|
||||
"Icons by fatcow http://www.fatcow.com/free-icons provided under Creative Commons "
|
||||
"attribution 3.0 license\n"
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
#if false
|
||||
|
|
@ -231,5 +244,11 @@ void MainWindow::on_tabWidget_tabCloseRequested(int index)
|
|||
if (qt->canClose()) {
|
||||
ui->tabWidget->removeTab(index);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_actionShow_connection_manager_triggered()
|
||||
{
|
||||
m_masterController->showConnectionManager();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue