WIP moving actions for toolbar to module system.
This commit is contained in:
parent
f5e9c4b74e
commit
78a6666839
8 changed files with 225 additions and 114 deletions
|
|
@ -1,8 +1,66 @@
|
|||
#include "Module.h"
|
||||
#include <set>
|
||||
|
||||
using namespace Leon;
|
||||
|
||||
|
||||
void ModuleRegistry::registerModule(Module *module)
|
||||
{
|
||||
modules.insert(module);
|
||||
}
|
||||
|
||||
|
||||
|
||||
ModuleRegistry& Leon::GetModuleRegistry()
|
||||
{
|
||||
static ModuleRegistry registry;
|
||||
return registry;
|
||||
}
|
||||
|
||||
Module::Module()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ModuleInstance::ModuleInstance()
|
||||
{
|
||||
GetModuleRegistry().registerModule(this);
|
||||
}
|
||||
|
||||
|
||||
//class QueryModule: public ModuleInstance {
|
||||
//public:
|
||||
// QueryModule();
|
||||
|
||||
// virtual QString getName() const override;
|
||||
|
||||
// virtual CommandContainer getCommands() const override;
|
||||
//private:
|
||||
//// CommandContainer commands;
|
||||
|
||||
// void createNewQueryTab();
|
||||
//};
|
||||
|
||||
//QueryModule::QueryModule()
|
||||
//{
|
||||
//// commands = {
|
||||
//// std::make_shared<Command<>>("New SQL file", "", createNewQueryTab)
|
||||
//// ->setHint("")
|
||||
//// ->setDescription("")
|
||||
//// ->setShortCut(Qt::CTRL + Qt::Key_N)
|
||||
//// ->addOnToolbar("standard", "")
|
||||
//// ->setMenuPath("file")
|
||||
//// };
|
||||
//}
|
||||
|
||||
//QString QueryModule::getName() const
|
||||
//{
|
||||
// return "Query Module";
|
||||
//}
|
||||
|
||||
////QueryModule::CommandContainer QueryModule::getCommands() const
|
||||
////{
|
||||
//// return commands;
|
||||
////}
|
||||
|
||||
////QueryModule theQueryModuleInstance;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue