2018-04-08 09:07:43 +02:00
|
|
|
|
#include "Module.h"
|
2018-08-05 09:07:12 +02:00
|
|
|
|
#include <set>
|
2018-04-08 09:07:43 +02:00
|
|
|
|
|
|
|
|
|
|
using namespace Leon;
|
|
|
|
|
|
|
2018-08-05 09:07:12 +02:00
|
|
|
|
|
|
|
|
|
|
void ModuleRegistry::registerModule(Module *module)
|
|
|
|
|
|
{
|
|
|
|
|
|
modules.insert(module);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ModuleRegistry& Leon::GetModuleRegistry()
|
|
|
|
|
|
{
|
|
|
|
|
|
static ModuleRegistry registry;
|
|
|
|
|
|
return registry;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-04-08 09:07:43 +02:00
|
|
|
|
Module::Module()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2018-08-05 09:07:12 +02:00
|
|
|
|
|
|
|
|
|
|
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;
|