mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-29 12:45:40 +08:00
clang-format src
This commit is contained in:
@@ -32,7 +32,7 @@ using namespace BlackCore::Db;
|
||||
namespace BlackGui::Menus
|
||||
{
|
||||
void IAircraftModelViewMenu::anchor()
|
||||
{ }
|
||||
{}
|
||||
|
||||
const QStringList &IAircraftModelViewMenu::getLogCategories()
|
||||
{
|
||||
@@ -68,9 +68,8 @@ namespace BlackGui::Menus
|
||||
return mv->selectedObjects();
|
||||
}
|
||||
|
||||
CShowSimulatorFileMenu::CShowSimulatorFileMenu(CAircraftModelView *modelView, COverlayMessagesFrame *messageFrame) :
|
||||
IAircraftModelViewMenu(modelView), m_messageFrame(messageFrame)
|
||||
{ }
|
||||
CShowSimulatorFileMenu::CShowSimulatorFileMenu(CAircraftModelView *modelView, COverlayMessagesFrame *messageFrame) : IAircraftModelViewMenu(modelView), m_messageFrame(messageFrame)
|
||||
{}
|
||||
|
||||
const QStringList &CShowSimulatorFileMenu::getLogCategories()
|
||||
{
|
||||
@@ -161,8 +160,7 @@ namespace BlackGui::Menus
|
||||
|
||||
// --------------------------------- with DB data ---------------------------------
|
||||
|
||||
CConsolidateWithDbDataMenu::CConsolidateWithDbDataMenu(CAircraftModelView *modelView, QObject *modelsTarget) :
|
||||
IAircraftModelViewMenu(modelView), m_modelsTarget(modelsTarget)
|
||||
CConsolidateWithDbDataMenu::CConsolidateWithDbDataMenu(CAircraftModelView *modelView, QObject *modelsTarget) : IAircraftModelViewMenu(modelView), m_modelsTarget(modelsTarget)
|
||||
{
|
||||
// it can be the target is not yet known
|
||||
if (modelsTarget)
|
||||
@@ -182,8 +180,16 @@ namespace BlackGui::Menus
|
||||
void CConsolidateWithDbDataMenu::customMenu(CMenuActions &menuActions)
|
||||
{
|
||||
const CAircraftModelView *mv = modelView();
|
||||
if (!mv || mv->isEmpty()) { this->nestedCustomMenu(menuActions); return; }
|
||||
if (!sGui->hasWebDataServices()) { this->nestedCustomMenu(menuActions); return; }
|
||||
if (!mv || mv->isEmpty())
|
||||
{
|
||||
this->nestedCustomMenu(menuActions);
|
||||
return;
|
||||
}
|
||||
if (!sGui->hasWebDataServices())
|
||||
{
|
||||
this->nestedCustomMenu(menuActions);
|
||||
return;
|
||||
}
|
||||
|
||||
menuActions.addMenuConsolidateModels();
|
||||
|
||||
@@ -266,8 +272,7 @@ namespace BlackGui::Menus
|
||||
|
||||
// --------------------------------- with simulator models ---------------------------------
|
||||
|
||||
CConsolidateWithSimulatorModels::CConsolidateWithSimulatorModels(CAircraftModelView *modelView, QObject *modelsTarget) :
|
||||
IAircraftModelViewMenu(modelView), m_modelsTarget(modelsTarget)
|
||||
CConsolidateWithSimulatorModels::CConsolidateWithSimulatorModels(CAircraftModelView *modelView, QObject *modelsTarget) : IAircraftModelViewMenu(modelView), m_modelsTarget(modelsTarget)
|
||||
{
|
||||
// it can be the target is not yet known
|
||||
if (modelsTarget)
|
||||
@@ -287,8 +292,16 @@ namespace BlackGui::Menus
|
||||
void CConsolidateWithSimulatorModels::customMenu(CMenuActions &menuActions)
|
||||
{
|
||||
const CAircraftModelView *mv = modelView();
|
||||
if (mv->isEmpty()) { this->nestedCustomMenu(menuActions); return; }
|
||||
if (!sGui->hasWebDataServices()) { this->nestedCustomMenu(menuActions); return; }
|
||||
if (mv->isEmpty())
|
||||
{
|
||||
this->nestedCustomMenu(menuActions);
|
||||
return;
|
||||
}
|
||||
if (!sGui->hasWebDataServices())
|
||||
{
|
||||
this->nestedCustomMenu(menuActions);
|
||||
return;
|
||||
}
|
||||
|
||||
menuActions.addMenuConsolidateModels();
|
||||
|
||||
|
||||
@@ -21,7 +21,10 @@ class QAction;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components { class CDbMappingComponent; }
|
||||
namespace Components
|
||||
{
|
||||
class CDbMappingComponent;
|
||||
}
|
||||
namespace Menus
|
||||
{
|
||||
//! Menu base class for aircraft model view menus
|
||||
@@ -33,8 +36,7 @@ namespace BlackGui
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
IAircraftModelViewMenu(BlackGui::Views::CAircraftModelView *modelView) :
|
||||
IMenuDelegate(modelView)
|
||||
IAircraftModelViewMenu(BlackGui::Views::CAircraftModelView *modelView) : IMenuDelegate(modelView)
|
||||
{}
|
||||
|
||||
//! Log.categories
|
||||
@@ -70,8 +72,8 @@ namespace BlackGui
|
||||
virtual void customMenu(CMenuActions &menuActions) override;
|
||||
|
||||
private:
|
||||
void showSimulatorFile(); //!< simulator file
|
||||
void displayIcon(); //!< aircraft icon if any
|
||||
void showSimulatorFile(); //!< simulator file
|
||||
void displayIcon(); //!< aircraft icon if any
|
||||
void startModelConverterX(); //!< show in model converter X
|
||||
|
||||
BlackGui::COverlayMessagesFrame *m_messageFrame = nullptr;
|
||||
@@ -105,10 +107,10 @@ namespace BlackGui
|
||||
void consolidateData();
|
||||
void consolidateSelectedData();
|
||||
|
||||
BlackMisc::Simulation::IModelsSetable *modelsTargetSetable() const;
|
||||
BlackMisc::Simulation::IModelsSetable *modelsTargetSetable() const;
|
||||
BlackMisc::Simulation::IModelsUpdatable *modelsTargetUpdatable() const;
|
||||
QObject *m_modelsTarget = nullptr; //!< optional target for setting/updating the models
|
||||
QAction *m_consolidateAll = nullptr; //!< consolidate data with DB (all)
|
||||
QObject *m_modelsTarget = nullptr; //!< optional target for setting/updating the models
|
||||
QAction *m_consolidateAll = nullptr; //!< consolidate data with DB (all)
|
||||
QAction *m_consolidateSelected = nullptr; //!< consolidate data with DB (selected)
|
||||
};
|
||||
|
||||
@@ -145,16 +147,16 @@ namespace BlackGui
|
||||
//! Simulator
|
||||
BlackMisc::Simulation::CSimulatorInfo getSimulator() const;
|
||||
|
||||
BlackMisc::Simulation::IModelsForSimulatorSetable *modelsTargetSetable() const;
|
||||
BlackMisc::Simulation::IModelsForSimulatorSetable *modelsTargetSetable() const;
|
||||
BlackMisc::Simulation::IModelsForSimulatorUpdatable *modelsTargetUpdatable() const;
|
||||
BlackMisc::Simulation::ISimulatorSelectable *simulatorSelectable() const;
|
||||
BlackGui::Components::CDbMappingComponent *getMappingComponent() const;
|
||||
BlackMisc::Simulation::ISimulatorSelectable *simulatorSelectable() const;
|
||||
BlackGui::Components::CDbMappingComponent *getMappingComponent() const;
|
||||
|
||||
QObject *m_modelsTarget = nullptr; //!< optional target for setting/updating the models
|
||||
QAction *m_consolidateAll = nullptr; //!< consolidate data with DB (all)
|
||||
QObject *m_modelsTarget = nullptr; //!< optional target for setting/updating the models
|
||||
QAction *m_consolidateAll = nullptr; //!< consolidate data with DB (all)
|
||||
QAction *m_consolidateSelected = nullptr; //!< consolidate data with DB (selected)
|
||||
QAction *m_updateDirsAll = nullptr; //!< consolidate file name/dir (all)
|
||||
QAction *m_updateDirsSelected = nullptr; //!< consolidate file name/dir (selected)
|
||||
QAction *m_updateDirsAll = nullptr; //!< consolidate file name/dir (all)
|
||||
QAction *m_updateDirsSelected = nullptr; //!< consolidate file name/dir (selected)
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -23,8 +23,7 @@ namespace BlackGui::Menus
|
||||
return cats;
|
||||
}
|
||||
|
||||
CFontMenu::CFontMenu(QWidget *widget, Qt::ShortcutContext shortcutContext) :
|
||||
IMenuDelegate(widget), m_widget(widget)
|
||||
CFontMenu::CFontMenu(QWidget *widget, Qt::ShortcutContext shortcutContext) : IMenuDelegate(widget), m_widget(widget)
|
||||
{
|
||||
m_fontDialogAction.reset(new QAction(CIcons::font16(), "Font", this));
|
||||
QObject::connect(m_fontDialogAction.data(), &QAction::triggered, this, &CFontMenu::changeFontDialog);
|
||||
|
||||
@@ -58,9 +58,9 @@ namespace BlackGui::Menus
|
||||
void onFontReset();
|
||||
|
||||
QWidget *m_widget = nullptr;
|
||||
QShortcut *m_fontSizePlusShortcut = nullptr; //! owned by widget
|
||||
QShortcut *m_fontSizePlusShortcut = nullptr; //! owned by widget
|
||||
QShortcut *m_fontSizeMinusShortcut = nullptr; //! owned by widget
|
||||
QShortcut *m_fontResetShortcut = nullptr; //! owned by widget
|
||||
QShortcut *m_fontResetShortcut = nullptr; //! owned by widget
|
||||
QScopedPointer<QAction> m_fontDialogAction;
|
||||
QScopedPointer<BlackGui::Components::CSettingsFontDialog> m_dialog;
|
||||
};
|
||||
|
||||
@@ -24,17 +24,14 @@ using namespace BlackMisc;
|
||||
|
||||
namespace BlackGui::Menus
|
||||
{
|
||||
CMenuAction::CMenuAction(const QIcon &icon, const QString &title, const QString &path, bool separator) :
|
||||
m_icon(icon), m_title(title), m_path(path.trimmed()), m_separator(separator)
|
||||
{ }
|
||||
CMenuAction::CMenuAction(const QIcon &icon, const QString &title, const QString &path, bool separator) : m_icon(icon), m_title(title), m_path(path.trimmed()), m_separator(separator)
|
||||
{}
|
||||
|
||||
CMenuAction::CMenuAction(const QString &path, bool separator) :
|
||||
m_path(path.trimmed()), m_separator(separator)
|
||||
{ }
|
||||
CMenuAction::CMenuAction(const QString &path, bool separator) : m_path(path.trimmed()), m_separator(separator)
|
||||
{}
|
||||
|
||||
CMenuAction::CMenuAction(QAction *action, const QString &path, bool separator) :
|
||||
m_action(action), m_icon(action->icon()), m_title(action->text()), m_path(path.trimmed()), m_separator(separator)
|
||||
{ }
|
||||
CMenuAction::CMenuAction(QAction *action, const QString &path, bool separator) : m_action(action), m_icon(action->icon()), m_title(action->text()), m_path(path.trimmed()), m_separator(separator)
|
||||
{}
|
||||
|
||||
bool CMenuAction::isCheckableQAction() const
|
||||
{
|
||||
@@ -272,25 +269,25 @@ namespace BlackGui::Menus
|
||||
return menuActions;
|
||||
}
|
||||
|
||||
CMenuAction CMenuActions::addAction(QAction *action, const QString &text, const QString &path, const CSlot<void ()> &slot, const QKeySequence &shortcut)
|
||||
CMenuAction CMenuActions::addAction(QAction *action, const QString &text, const QString &path, const CSlot<void()> &slot, const QKeySequence &shortcut)
|
||||
{
|
||||
if (action) { return this->addAction(action, path); }
|
||||
return this->addAction(text, path, slot, shortcut);
|
||||
}
|
||||
|
||||
CMenuAction CMenuActions::addAction(QAction *action, const QString &text, const QString &path, QObject *actionOwner, const CSlot<void ()> &slot, const QKeySequence &shortcut)
|
||||
CMenuAction CMenuActions::addAction(QAction *action, const QString &text, const QString &path, QObject *actionOwner, const CSlot<void()> &slot, const QKeySequence &shortcut)
|
||||
{
|
||||
if (action) { return this->addAction(action, path); }
|
||||
return this->addAction(text, path, actionOwner, slot, shortcut);
|
||||
}
|
||||
|
||||
CMenuAction CMenuActions::addAction(QAction *action, const QIcon &icon, const QString &text, const QString &path, const CSlot<void ()> &slot, const QKeySequence &shortcut)
|
||||
CMenuAction CMenuActions::addAction(QAction *action, const QIcon &icon, const QString &text, const QString &path, const CSlot<void()> &slot, const QKeySequence &shortcut)
|
||||
{
|
||||
if (action) { return this->addAction(action, path); }
|
||||
return this->addAction(icon, text, path, slot, shortcut);
|
||||
}
|
||||
|
||||
CMenuAction CMenuActions::addAction(QAction *action, const QIcon &icon, const QString &text, const QString &path, QObject *actionOwner, const CSlot<void ()> &slot, const QKeySequence &shortcut)
|
||||
CMenuAction CMenuActions::addAction(QAction *action, const QIcon &icon, const QString &text, const QString &path, QObject *actionOwner, const CSlot<void()> &slot, const QKeySequence &shortcut)
|
||||
{
|
||||
if (action) { return this->addAction(action, path); }
|
||||
Q_ASSERT_X(actionOwner, Q_FUNC_INFO, "Need action owner"); // in this case nullptr as actionOwner is not allowed
|
||||
@@ -310,11 +307,10 @@ namespace BlackGui::Menus
|
||||
return this->addAction(ma);
|
||||
}
|
||||
|
||||
CMenuAction CMenuActions::addAction(const QIcon &actionIcon, const QString &text, const QString &path, QObject *actionOwner, const CSlot<void ()> &slot, const QKeySequence &shortcut)
|
||||
CMenuAction CMenuActions::addAction(const QIcon &actionIcon, const QString &text, const QString &path, QObject *actionOwner, const CSlot<void()> &slot, const QKeySequence &shortcut)
|
||||
{
|
||||
CMenuAction action = this->addAction(actionIcon, text, path, actionOwner, shortcut);
|
||||
QAction::connect(action.getQAction(), &QAction::triggered, [slot](bool checked)
|
||||
{
|
||||
QAction::connect(action.getQAction(), &QAction::triggered, [slot](bool checked) {
|
||||
slot();
|
||||
Q_UNUSED(checked);
|
||||
});
|
||||
@@ -326,17 +322,17 @@ namespace BlackGui::Menus
|
||||
return this->addAction(actionIcon, text, path, nullptr);
|
||||
}
|
||||
|
||||
CMenuAction CMenuActions::addAction(const QIcon &actionIcon, const QString &text, const QString &path, const CSlot<void ()> &slot, const QKeySequence &shortcut)
|
||||
CMenuAction CMenuActions::addAction(const QIcon &actionIcon, const QString &text, const QString &path, const CSlot<void()> &slot, const QKeySequence &shortcut)
|
||||
{
|
||||
return this->addAction(actionIcon, text, path, slot.object(), slot, shortcut);
|
||||
}
|
||||
|
||||
CMenuAction CMenuActions::addAction(const QString &text, const QString &path, const CSlot<void ()> &slot, const QKeySequence &shortcut)
|
||||
CMenuAction CMenuActions::addAction(const QString &text, const QString &path, const CSlot<void()> &slot, const QKeySequence &shortcut)
|
||||
{
|
||||
return this->addAction(QIcon(), text, path, slot.object(), slot, shortcut);
|
||||
}
|
||||
|
||||
CMenuAction CMenuActions::addAction(const QString &text, const QString &path, QObject *actionOwner, const CSlot<void ()> &slot, const QKeySequence &shortcut)
|
||||
CMenuAction CMenuActions::addAction(const QString &text, const QString &path, QObject *actionOwner, const CSlot<void()> &slot, const QKeySequence &shortcut)
|
||||
{
|
||||
return this->addAction(QIcon(), text, path, actionOwner, slot, shortcut);
|
||||
}
|
||||
@@ -366,7 +362,7 @@ namespace BlackGui::Menus
|
||||
{
|
||||
// no separator a) if there is already one b) key roots are the same (such entries belong together)
|
||||
const bool noSeparator = (!menu.actions().isEmpty() && menu.actions().last()->isSeparator()) ||
|
||||
(isSameKeyRoot(key, lastKey));
|
||||
(isSameKeyRoot(key, lastKey));
|
||||
if (!noSeparator) { menu.addSeparator(); }
|
||||
handledSeparator = true;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace BlackGui::Menus
|
||||
void setActionEnabled(bool enabled);
|
||||
|
||||
//! Path
|
||||
const QString &getPath() const { return m_path; }
|
||||
const QString &getPath() const { return m_path; }
|
||||
|
||||
//! Last part of the path, e.g. "Foo/Bar" -> "Bar"
|
||||
QString getLastPathPart() const;
|
||||
@@ -110,116 +110,256 @@ namespace BlackGui::Menus
|
||||
//! @{
|
||||
|
||||
//! No key
|
||||
static const QString &pathNone() { static const QString p("_NONE"); return p; }
|
||||
static const QString &pathNone()
|
||||
{
|
||||
static const QString p("_NONE");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Path converter into separator
|
||||
static const QString &pathSeparator() { static const QString p("_SEPARATOR"); return p; }
|
||||
static const QString &pathSeparator()
|
||||
{
|
||||
static const QString p("_SEPARATOR");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Simulator sub menu
|
||||
static const QString &pathSimulator() { static const QString p("Custom.10.Simulator/Simulator"); return p; }
|
||||
static const QString &pathSimulator()
|
||||
{
|
||||
static const QString p("Custom.10.Simulator/Simulator");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Simulator sub menu reload models
|
||||
static const QString &pathSimulatorModelsReload() { static const QString p("Custom.10.Simulator/Simulator/Reload models"); return p; }
|
||||
static const QString &pathSimulatorModelsReload()
|
||||
{
|
||||
static const QString p("Custom.10.Simulator/Simulator/Reload models");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Simulator sub menu reload models
|
||||
static const QString &pathSimulatorModelsClearCache() { static const QString p("Custom.10.Simulator/Simulator/Clear model caches"); return p; }
|
||||
static const QString &pathSimulatorModelsClearCache()
|
||||
{
|
||||
static const QString p("Custom.10.Simulator/Simulator/Clear model caches");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Model
|
||||
static const QString &pathModel() { static const QString p("Custom.11.Model"); return p; }
|
||||
static const QString &pathModel()
|
||||
{
|
||||
static const QString p("Custom.11.Model");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Model set
|
||||
static const QString &pathModelSet() { static const QString p("Custom.11.Model/Model set"); return p; }
|
||||
static const QString &pathModelSet()
|
||||
{
|
||||
static const QString p("Custom.11.Model/Model set");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Model set, new set
|
||||
static const QString &pathModelSetNew() { static const QString p("Custom.11.Model/Model set/New set"); return p; }
|
||||
static const QString &pathModelSetNew()
|
||||
{
|
||||
static const QString p("Custom.11.Model/Model set/New set");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Consolidate
|
||||
static const QString &pathModelConsolidate() { static const QString p("Custom.11.Model/Consolidate"); return p; }
|
||||
static const QString &pathModelConsolidate()
|
||||
{
|
||||
static const QString p("Custom.11.Model/Consolidate");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Stash sub menu
|
||||
static const QString &pathModelStash() { static const QString p("Custom.11.Model/Stash/Stash"); return p; }
|
||||
static const QString &pathModelStash()
|
||||
{
|
||||
static const QString p("Custom.11.Model/Stash/Stash");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Stash editor sub menu
|
||||
static const QString &pathModelStashEditor() { static const QString p("Custom.11.Model/Stash/Editor"); return p; }
|
||||
static const QString &pathModelStashEditor()
|
||||
{
|
||||
static const QString p("Custom.11.Model/Stash/Editor");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! vPilot data
|
||||
//! \deprecated vPilot functionality likely to be removed in the future
|
||||
static const QString &pathVPilot() { static const QString p("Custom.14.vPilot/vPilot"); return p; }
|
||||
static const QString &pathVPilot()
|
||||
{
|
||||
static const QString p("Custom.14.vPilot/vPilot");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Log functionality
|
||||
static const QString &pathLog() { static const QString p("Custom15.Log"); return p; }
|
||||
static const QString &pathLog()
|
||||
{
|
||||
static const QString p("Custom15.Log");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Font menus (font size etc.)
|
||||
static const QString &pathFont() { static const QString p("Custom20.Font"); return p; }
|
||||
static const QString &pathFont()
|
||||
{
|
||||
static const QString p("Custom20.Font");
|
||||
return p;
|
||||
}
|
||||
|
||||
// ---- client ----
|
||||
|
||||
//! Client COM related
|
||||
static const QString &pathClientCom() { static const QString p("Client.ATC/COM"); return p; }
|
||||
static const QString &pathClientCom()
|
||||
{
|
||||
static const QString p("Client.ATC/COM");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Client flight plan
|
||||
static const QString &pathClientFlightPlan() { static const QString p("Client.FlightPlan"); return p; }
|
||||
static const QString &pathClientFlightPlan()
|
||||
{
|
||||
static const QString p("Client.FlightPlan");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Client follow in simulator
|
||||
static const QString &pathClientFollowInSim() { static const QString p("Client.FollowInSim"); return p; }
|
||||
static const QString &pathClientFollowInSim()
|
||||
{
|
||||
static const QString p("Client.FollowInSim");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Client simulation related
|
||||
static const QString &pathClientSimulation() { static const QString p("ClientSimulation"); return p; }
|
||||
static const QString &pathClientSimulation()
|
||||
{
|
||||
static const QString p("ClientSimulation");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Client simulation/display related
|
||||
static const QString &pathClientSimulationDisplay() { static const QString p("ClientSimulation.Display/Display"); return p; }
|
||||
static const QString &pathClientSimulationDisplay()
|
||||
{
|
||||
static const QString p("ClientSimulation.Display/Display");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Client simulation/display related
|
||||
static const QString &pathClientSimulationRender() { static const QString p("ClientSimulation.Display/Render"); return p; }
|
||||
static const QString &pathClientSimulationRender()
|
||||
{
|
||||
static const QString p("ClientSimulation.Display/Render");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Client simulation/display related
|
||||
static const QString &pathClientSimulationTransfer() { static const QString p("ClientSimulation.Transfer/Transfer"); return p; }
|
||||
static const QString &pathClientSimulationTransfer()
|
||||
{
|
||||
static const QString p("ClientSimulation.Transfer/Transfer");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Client model set related
|
||||
static const QString &pathClientModelSet() { static const QString p("Client.Model set"); return p; }
|
||||
static const QString &pathClientModelSet()
|
||||
{
|
||||
static const QString p("Client.Model set");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Network data
|
||||
static const QString &pathClientNetwork() { static const QString p("ClientNetwork/Network"); return p; }
|
||||
static const QString &pathClientNetwork()
|
||||
{
|
||||
static const QString p("ClientNetwork/Network");
|
||||
return p;
|
||||
}
|
||||
|
||||
// ---- standard view paths --------
|
||||
|
||||
//! Database
|
||||
static const QString &pathViewDatabase() { static const QString p("View.10.Database/Database"); return p; }
|
||||
static const QString &pathViewDatabase()
|
||||
{
|
||||
static const QString p("View.10.Database/Database");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Select add remove
|
||||
static const QString &pathViewAddRemove() { static const QString p("View.12.AddRemove"); return p; }
|
||||
static const QString &pathViewAddRemove()
|
||||
{
|
||||
static const QString p("View.12.AddRemove");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! View selection mode
|
||||
static const QString &pathViewSelection() { static const QString p("View.13.Selection/Selection"); return p; }
|
||||
static const QString &pathViewSelection()
|
||||
{
|
||||
static const QString p("View.13.Selection/Selection");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! Order submenus
|
||||
static const QString &pathViewOrder() { static const QString p("View.14.Order/Order"); return p; }
|
||||
static const QString &pathViewOrder()
|
||||
{
|
||||
static const QString p("View.14.Order/Order");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! View resizing
|
||||
static const QString &pathViewResize() { static const QString p("View.15.Resize"); return p; }
|
||||
static const QString &pathViewResize()
|
||||
{
|
||||
static const QString p("View.15.Resize");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! View word wrap
|
||||
static const QString &pathViewWordWrap() { static const QString p("View.16.WordWrap"); return p; }
|
||||
static const QString &pathViewWordWrap()
|
||||
{
|
||||
static const QString p("View.16.WordWrap");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! View clear highlighting
|
||||
static const QString &pathViewClearHighlighting() { static const QString p("View.17.ClearHighlight"); return p; }
|
||||
static const QString &pathViewClearHighlighting()
|
||||
{
|
||||
static const QString p("View.17.ClearHighlight");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! View filter
|
||||
static const QString &pathViewFilter() { static const QString p("View.18.Filter"); return p; }
|
||||
static const QString &pathViewFilter()
|
||||
{
|
||||
static const QString p("View.18.Filter");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! View update
|
||||
static const QString &pathViewUpdates() { static const QString p("View.19.Updates"); return p; }
|
||||
static const QString &pathViewUpdates()
|
||||
{
|
||||
static const QString p("View.19.Updates");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! View load/save
|
||||
static const QString &pathViewLoadSave() { static const QString p("View.19.LoadSave"); return p; }
|
||||
static const QString &pathViewLoadSave()
|
||||
{
|
||||
static const QString p("View.19.LoadSave");
|
||||
return p;
|
||||
}
|
||||
|
||||
//! View cut and paste
|
||||
static const QString &pathViewCutPaste() { static const QString p("View.19.CutPaste"); return p; }
|
||||
static const QString &pathViewCutPaste()
|
||||
{
|
||||
static const QString p("View.19.CutPaste");
|
||||
return p;
|
||||
}
|
||||
|
||||
// ---- nested dock widgets ----
|
||||
|
||||
//! Nested dock widget
|
||||
static const QString &pathDockWidgetNested() { static const QString p("DockWidget.Nested"); return p; }
|
||||
static const QString &pathDockWidgetNested()
|
||||
{
|
||||
static const QString p("DockWidget.Nested");
|
||||
return p;
|
||||
}
|
||||
//! @}
|
||||
|
||||
//! @{
|
||||
@@ -234,12 +374,12 @@ namespace BlackGui::Menus
|
||||
//! @}
|
||||
|
||||
private:
|
||||
QAction *m_action = nullptr; //!< the action
|
||||
QIcon m_icon; //!< icon
|
||||
QString m_title; //!< title
|
||||
QString m_path; //!< path in menu
|
||||
bool m_separator = false; //!< separator
|
||||
bool m_isMenu = false; //!< is menu?
|
||||
QAction *m_action = nullptr; //!< the action
|
||||
QIcon m_icon; //!< icon
|
||||
QString m_title; //!< title
|
||||
QString m_path; //!< path in menu
|
||||
bool m_separator = false; //!< separator
|
||||
bool m_isMenu = false; //!< is menu?
|
||||
};
|
||||
|
||||
/*!
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace BlackGui::Menus
|
||||
//! Log categories
|
||||
const QStringList &getLogCategories()
|
||||
{
|
||||
static const QStringList cats({BlackMisc::CLogCategories::guiComponent()});
|
||||
static const QStringList cats({ BlackMisc::CLogCategories::guiComponent() });
|
||||
return cats;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user