Bezig met plugin menu systeem

This commit is contained in:
eelke 2019-08-15 12:40:29 +02:00
parent 601d071d0f
commit 048843a1d4
10 changed files with 93 additions and 16 deletions

View file

@ -30,25 +30,25 @@ void QueryToolModule::init()
{
auto ca = makeContextAction<QueryTool>(tr("Save SQL"), &QueryTool::save);
ca->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_S));
// ca->setMenuLocation(MenuPath("File/Save"));
// ca->setToolbarLocation(ToolbarLocation("main", "save"));
ca->setMenuLocation(MenuPath("File/Save"));
ca->setToolbarLocation(ToolbarLocation("main", "save"));
// how we tell the system we want this to become a menu button with this as it's default action
registerContextAction(ca);
}
// {
// auto ca = makeContextAction<QueryTool>(tr("Save SQL as"), &QueryTool::saveAs);
// ca->setMenuLocation(MenuPath("File/Save"));
// ca->setToolbarLocation(ToolbarLocation("main", "save"));
// // how we tell the system we want this to become a secondary action for the previous button?
// registerContextAction(ca);
// }
// {
// auto ca = makeContextAction<QueryTool>(tr("Save copy of SQL as"), &QueryTool::saveCopyAs);
// ca->setMenuLocation(MenuPath("File/Save"));
// ca->setToolbarLocation(ToolbarLocation("main", "save"));
// // how we tell the system we want this to become a secondary action for the previous button?
// registerContextAction(ca);
// }
{
auto ca = makeContextAction<QueryTool>(tr("Save SQL as"), &QueryTool::saveAs);
ca->setMenuLocation(MenuPath("File/Save"));
ca->setToolbarLocation(ToolbarLocation("main", "save"));
// how we tell the system we want this to become a secondary action for the previous button?
registerContextAction(ca);
}
{
auto ca = makeContextAction<QueryTool>(tr("Save copy of SQL as"), &QueryTool::saveCopyAs);
ca->setMenuLocation(MenuPath("File/Save"));
ca->setToolbarLocation(ToolbarLocation("main", "save"));
// how we tell the system we want this to become a secondary action for the previous button?
registerContextAction(ca);
}
}