Basic concept of MenuAction is working
Module can register action Window adds this action to its menu Clicking the menu item for the action has the expected result But menu structure still needs work (everything is now put into one dropdown menu)
This commit is contained in:
parent
f130c426a1
commit
dc8a052544
12 changed files with 220 additions and 28 deletions
|
|
@ -30,6 +30,7 @@ namespace Pgsql {
|
|||
class Connection;
|
||||
}
|
||||
|
||||
class MenuAction;
|
||||
class QueryTab;
|
||||
class MasterController;
|
||||
class QCloseEvent;
|
||||
|
|
@ -41,13 +42,33 @@ namespace DatabaseWindow_details {
|
|||
class DatabaseWindowContentContext;
|
||||
}
|
||||
|
||||
class LMainWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
LMainWindow(QWidget *parent = nullptr);
|
||||
|
||||
void initModuleMenus();
|
||||
protected:
|
||||
|
||||
DatabaseWindow_details::DatabaseWindowContentContext *m_context;
|
||||
|
||||
void addModuleMenuActions();
|
||||
|
||||
private:
|
||||
QMenu *m_fileMenu = nullptr;
|
||||
|
||||
void addMenuAction(const MenuAction &ma);
|
||||
};
|
||||
|
||||
|
||||
/** This is the class for windows that handle tasks for a specific database/catalog
|
||||
*
|
||||
*/
|
||||
class DatabaseWindow : public QMainWindow {
|
||||
class DatabaseWindow : public LMainWindow {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DatabaseWindow(MasterController *master, QWidget *parent);
|
||||
DatabaseWindow(MasterController *master, QWidget *parent);
|
||||
~DatabaseWindow();
|
||||
|
||||
void setConfig(const ConnectionConfig &config);
|
||||
|
|
@ -64,7 +85,6 @@ public:
|
|||
private:
|
||||
|
||||
Ui::DatabaseWindow *ui;
|
||||
DatabaseWindow_details::DatabaseWindowContentContext *m_context;
|
||||
|
||||
ConnectionConfig m_config;
|
||||
std::shared_ptr<OpenDatabase> m_database;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue