8 #include <QScopedPointer>
12 #include "ui_swiftdata.h"
28 void CSwiftData::onMenuClicked()
30 QObject *sender = QObject::sender();
31 if (sender == ui->menu_WindowFont)
36 else if (sender == ui->menu_MappingMaxData)
41 else if (sender == ui->menu_MappingMaxMapping)
48 void CSwiftData::initDynamicMenus()
50 Q_ASSERT_X(ui->menu_InfoAreas, Q_FUNC_INFO,
"missing info areas");
51 Q_ASSERT_X(ui->comp_MainInfoArea, Q_FUNC_INFO,
"missing main area");
52 ui->menu_InfoAreas->addActions(ui->comp_MainInfoArea->getInfoAreaSelectActions(
true, ui->menu_InfoAreas));
55 ui->menu_Mapping->addAction(CIcons::database16(),
"Auto publish data",
this, &CSwiftData::showAutoPublishing);
57 QString resourceDir(CSwiftDirectories::shareDirectory());
58 if (!resourceDir.isEmpty() && QDir(resourceDir).exists())
60 Q_ASSERT_X(ui->comp_MainInfoArea, Q_FUNC_INFO,
"Missing main info area");
61 Q_ASSERT_X(ui->comp_MainInfoArea->getDataInfoAreaComponent(), Q_FUNC_INFO,
"Missing DB info area");
62 ui->menu_Mapping->addAction(CIcons::database16(),
"Load all DB data",
63 ui->comp_MainInfoArea->getDataInfoAreaComponent(),
64 &CDataInfoAreaComponent::requestUpdateOfAllDbData);
65 ui->menu_Mapping->addAction(CIcons::load16(),
"Load DB test data from disk",
66 ui->comp_MainInfoArea->getDataInfoAreaComponent(),
67 &CDataInfoAreaComponent::readDbDataFromResourceDir);
70 ui->menu_Mapping->addAction(CIcons::save16(),
"Save DB test data to disk",
71 ui->comp_MainInfoArea->getDataInfoAreaComponent(),
72 &CDataInfoAreaComponent::writeDbDataToResourceDir);
bool isDeveloperFlagSet() const
Running with dev.flag?
void resizeForMapping()
Resize so that mapping is easier.
void resizeForSelect()
Resize so that selection is easy (larger table view)
SWIFT_GUI_EXPORT swift::gui::CGuiApplication * sGui
Single instance of GUI application object.
Backend services of the swift project, like dealing with the network or the simulators.
High level reusable GUI components.
Free functions in swift::misc.