Removing plugin system is holding back development to much.
This commit is contained in:
parent
048843a1d4
commit
edb789ca4a
22 changed files with 198 additions and 562 deletions
|
|
@ -1,12 +1,12 @@
|
|||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include "plugin_support/LMainWindow.h"
|
||||
#include "ConnectionConfig.h"
|
||||
#include "OpenDatabase.h"
|
||||
#include "Pgsql_Connection.h"
|
||||
#include "ControllableTask.h"
|
||||
#include <QFutureWatcher>
|
||||
#include <QMainWindow>
|
||||
#include <memory>
|
||||
|
||||
namespace Pgsql {
|
||||
|
|
@ -18,13 +18,16 @@ class QCloseEvent;
|
|||
class OpenDatabase;
|
||||
class PgClass;
|
||||
|
||||
class QAction;
|
||||
class QMenu;
|
||||
class QTabWidget;
|
||||
class QToolBar;
|
||||
|
||||
|
||||
/** This is the class for windows that handle tasks for a specific database/catalog
|
||||
*
|
||||
*/
|
||||
class DatabaseWindow : public LMainWindow {
|
||||
class DatabaseWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
public:
|
||||
DatabaseWindow(MasterController *master, QWidget *parent);
|
||||
|
|
@ -34,15 +37,36 @@ public:
|
|||
|
||||
std::shared_ptr<OpenDatabase> getDatabase() { return m_database; }
|
||||
|
||||
void newCodeGenPage(QString query, std::shared_ptr<const Pgsql::Result> dbres);
|
||||
void setTabCaptionForWidget(QWidget *widget, const QString &caption, const QString &hint);
|
||||
void setTabIcon(QWidget *widget, const QString &iconname);
|
||||
|
||||
/// Called when a newly created page is added to the QTabWidget
|
||||
void addPage(QWidget* page, QString caption);
|
||||
|
||||
void newCodeGenPage(QString query, std::shared_ptr<const Pgsql::Result> dbres);
|
||||
private:
|
||||
QTabWidget *m_tabWidget = nullptr;
|
||||
QToolBar *m_mainToolBar = nullptr;
|
||||
|
||||
ConnectionConfig m_config;
|
||||
std::shared_ptr<OpenDatabase> m_database;
|
||||
|
||||
MasterController *m_masterController;
|
||||
|
||||
// Standard menu's
|
||||
QMenu *m_fileMenu = nullptr;
|
||||
|
||||
// Standard actions
|
||||
QAction *actionAbout = nullptr;
|
||||
QAction *actionClose = nullptr;
|
||||
QAction *actionNewSql = nullptr;
|
||||
QAction *actionOpenSql = nullptr;
|
||||
|
||||
|
||||
QMenu *menuFile = nullptr;
|
||||
QMenu *menuHelp = nullptr;
|
||||
|
||||
|
||||
class LoadCatalog: public ControllableTask<OpenDatabase::OpenDatabaseSPtr> {
|
||||
public:
|
||||
LoadCatalog(ConnectionConfig config)
|
||||
|
|
@ -62,10 +86,17 @@ private:
|
|||
|
||||
void newCreateTablePage();
|
||||
|
||||
void createActions();
|
||||
void initMenus();
|
||||
|
||||
private slots:
|
||||
|
||||
void catalogLoaded();
|
||||
// void tabWidget_tabCloseRequested(int index);
|
||||
// void tabWidget_currentChanged(int index);
|
||||
|
||||
void on_actionClose_triggered();
|
||||
void on_actionNewSql_triggered();
|
||||
void on_actionOpenSql_triggered();
|
||||
void on_actionAbout_triggered();
|
||||
void on_actionShow_connection_manager_triggered();
|
||||
void on_actionCopy_triggered();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue