mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 02:06:08 +08:00
Ref T310, removed "m_separator" from IMenuDelegate as it is not used
This commit is contained in:
@@ -83,18 +83,18 @@ namespace BlackGui
|
|||||||
ui->tvp_AircraftModelsForVPilot->addFilterDialog();
|
ui->tvp_AircraftModelsForVPilot->addFilterDialog();
|
||||||
|
|
||||||
// model menus
|
// model menus
|
||||||
ui->comp_OwnAircraftModels->view()->setCustomMenu(new CShowSimulatorFileMenu(ui->comp_OwnAircraftModels->view(), this, true));
|
ui->comp_OwnAircraftModels->view()->setCustomMenu(new CShowSimulatorFileMenu(ui->comp_OwnAircraftModels->view(), this));
|
||||||
ui->comp_OwnAircraftModels->view()->setCustomMenu(new CMergeWithVPilotMenu(this));
|
ui->comp_OwnAircraftModels->view()->setCustomMenu(new CMergeWithVPilotMenu(this));
|
||||||
ui->comp_OwnAircraftModels->view()->setCustomMenu(new COwnModelSetMenu(this, true));
|
ui->comp_OwnAircraftModels->view()->setCustomMenu(new COwnModelSetMenu(this));
|
||||||
ui->comp_OwnAircraftModels->view()->setCustomMenu(new CStashToolsMenu(this, false));
|
ui->comp_OwnAircraftModels->view()->setCustomMenu(new CStashToolsMenu(this));
|
||||||
|
|
||||||
ui->comp_OwnModelSet->view()->setCustomMenu(new CShowSimulatorFileMenu(ui->comp_OwnModelSet->view(), this, true));
|
ui->comp_OwnModelSet->view()->setCustomMenu(new CShowSimulatorFileMenu(ui->comp_OwnModelSet->view(), this));
|
||||||
ui->comp_OwnModelSet->view()->setCustomMenu(new CStashToolsMenu(this, true));
|
ui->comp_OwnModelSet->view()->setCustomMenu(new CStashToolsMenu(this));
|
||||||
|
|
||||||
ui->comp_StashAircraft->view()->setCustomMenu(new CShowSimulatorFileMenu(ui->comp_StashAircraft->view(), this, true));
|
ui->comp_StashAircraft->view()->setCustomMenu(new CShowSimulatorFileMenu(ui->comp_StashAircraft->view(), this));
|
||||||
ui->comp_StashAircraft->view()->setCustomMenu(new CApplyDbDataMenu(this, true));
|
ui->comp_StashAircraft->view()->setCustomMenu(new CApplyDbDataMenu(this));
|
||||||
ui->comp_StashAircraft->view()->setCustomMenu(new COwnModelSetMenu(this, true));
|
ui->comp_StashAircraft->view()->setCustomMenu(new COwnModelSetMenu(this));
|
||||||
ui->comp_StashAircraft->view()->setCustomMenu(new CStashToolsMenu(this, false));
|
ui->comp_StashAircraft->view()->setCustomMenu(new CStashToolsMenu(this));
|
||||||
|
|
||||||
// connects
|
// connects
|
||||||
connect(ui->editor_ModelMapping, &CModelMappingForm::requestStash, this, &CDbMappingComponent::stashCurrentModel);
|
connect(ui->editor_ModelMapping, &CModelMappingForm::requestStash, this, &CDbMappingComponent::stashCurrentModel);
|
||||||
@@ -159,8 +159,8 @@ namespace BlackGui
|
|||||||
connect(ui->tvp_AircraftModelsForVPilot, &CAircraftModelView::toggledHighlightStashedModels, this, &CDbMappingComponent::onStashedModelsChangedTriggerDigest);
|
connect(ui->tvp_AircraftModelsForVPilot, &CAircraftModelView::toggledHighlightStashedModels, this, &CDbMappingComponent::onStashedModelsChangedTriggerDigest);
|
||||||
connect(ui->tvp_AircraftModelsForVPilot, &CAircraftModelView::requestUpdate, this, &CDbMappingComponent::requestVPilotDataUpdate);
|
connect(ui->tvp_AircraftModelsForVPilot, &CAircraftModelView::requestUpdate, this, &CDbMappingComponent::requestVPilotDataUpdate);
|
||||||
|
|
||||||
ui->tvp_AircraftModelsForVPilot->setCustomMenu(new CMappingVPilotMenu(this, true));
|
ui->tvp_AircraftModelsForVPilot->setCustomMenu(new CMappingVPilotMenu(this));
|
||||||
ui->tvp_AircraftModelsForVPilot->setCustomMenu(new CStashToolsMenu(this, false));
|
ui->tvp_AircraftModelsForVPilot->setCustomMenu(new CStashToolsMenu(this));
|
||||||
ui->tvp_AircraftModelsForVPilot->setDisplayAutomatically(true);
|
ui->tvp_AircraftModelsForVPilot->setDisplayAutomatically(true);
|
||||||
|
|
||||||
ui->tvp_AircraftModelsForVPilot->addFilterDialog();
|
ui->tvp_AircraftModelsForVPilot->addFilterDialog();
|
||||||
@@ -909,8 +909,8 @@ namespace BlackGui
|
|||||||
return qobject_cast<CDbMappingComponent *>(this->parent());
|
return qobject_cast<CDbMappingComponent *>(this->parent());
|
||||||
}
|
}
|
||||||
|
|
||||||
CDbMappingComponent::CStashToolsMenu::CStashToolsMenu(CDbMappingComponent *mappingComponent, bool separator) :
|
CDbMappingComponent::CStashToolsMenu::CStashToolsMenu(CDbMappingComponent *mappingComponent) :
|
||||||
BlackGui::Menus::IMenuDelegate(mappingComponent, separator)
|
Menus::IMenuDelegate(mappingComponent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void CDbMappingComponent::CStashToolsMenu::customMenu(CMenuActions &menuActions)
|
void CDbMappingComponent::CStashToolsMenu::customMenu(CMenuActions &menuActions)
|
||||||
@@ -1009,8 +1009,8 @@ namespace BlackGui
|
|||||||
return qobject_cast<CDbMappingComponent *>(this->parent());
|
return qobject_cast<CDbMappingComponent *>(this->parent());
|
||||||
}
|
}
|
||||||
|
|
||||||
CDbMappingComponent::CMergeWithVPilotMenu::CMergeWithVPilotMenu(CDbMappingComponent *mappingComponent, bool separator) :
|
CDbMappingComponent::CMergeWithVPilotMenu::CMergeWithVPilotMenu(CDbMappingComponent *mappingComponent) :
|
||||||
IMenuDelegate(mappingComponent, separator)
|
IMenuDelegate(mappingComponent)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(mappingComponent, Q_FUNC_INFO, "Missing vPilot reader");
|
Q_ASSERT_X(mappingComponent, Q_FUNC_INFO, "Missing vPilot reader");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace BlackGui
|
|||||||
bool canAddToModelSetTab() const;
|
bool canAddToModelSetTab() const;
|
||||||
|
|
||||||
//! Current model view
|
//! Current model view
|
||||||
BlackGui::Views::CAircraftModelView *currentModelView() const;
|
Views::CAircraftModelView *currentModelView() const;
|
||||||
|
|
||||||
//! Unvalidated consolidated aircraft model from the editor subparts (icao, distributor)
|
//! Unvalidated consolidated aircraft model from the editor subparts (icao, distributor)
|
||||||
//! \note not guaranteed to be valid, just a snapshot of its current editor state
|
//! \note not guaranteed to be valid, just a snapshot of its current editor state
|
||||||
@@ -346,8 +346,8 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CMappingVPilotMenu(CDbMappingComponent *mappingComponent, bool separator = true) :
|
CMappingVPilotMenu(CDbMappingComponent *mappingComponent) :
|
||||||
BlackGui::Menus::IMenuDelegate(mappingComponent, separator)
|
BlackGui::Menus::IMenuDelegate(mappingComponent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//! \copydoc IMenuDelegate::customMenu
|
//! \copydoc IMenuDelegate::customMenu
|
||||||
@@ -366,14 +366,14 @@ namespace BlackGui
|
|||||||
//! -# toggle stash auto filtering
|
//! -# toggle stash auto filtering
|
||||||
//! -# show changed attributes
|
//! -# show changed attributes
|
||||||
//! \note This is a specific menu for the CDbMappingComponent component
|
//! \note This is a specific menu for the CDbMappingComponent component
|
||||||
class CStashToolsMenu : public BlackGui::Menus::IMenuDelegate
|
class CStashToolsMenu : public Menus::IMenuDelegate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CStashToolsMenu(CDbMappingComponent *mappingComponent, bool separator = true);
|
CStashToolsMenu(CDbMappingComponent *mappingComponent);
|
||||||
|
|
||||||
//! \copydoc IMenuDelegate::customMenu
|
//! \copydoc IMenuDelegate::customMenu
|
||||||
virtual void customMenu(BlackGui::Menus::CMenuActions &menuActions) override;
|
virtual void customMenu(Menus::CMenuActions &menuActions) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! Mapping component
|
//! Mapping component
|
||||||
@@ -388,12 +388,12 @@ namespace BlackGui
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Menu for own model sets
|
//! Menu for own model sets
|
||||||
class COwnModelSetMenu : public BlackGui::Menus::IMenuDelegate
|
class COwnModelSetMenu : public Menus::IMenuDelegate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
COwnModelSetMenu(CDbMappingComponent *mappingComponent, bool separator = true) :
|
COwnModelSetMenu(CDbMappingComponent *mappingComponent) :
|
||||||
BlackGui::Menus::IMenuDelegate(mappingComponent, separator)
|
Menus::IMenuDelegate(mappingComponent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//! \copydoc IMenuDelegate::customMenu
|
//! \copydoc IMenuDelegate::customMenu
|
||||||
@@ -407,16 +407,16 @@ namespace BlackGui
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Apply DB data to selected models
|
//! Apply DB data to selected models
|
||||||
class CApplyDbDataMenu : public BlackGui::Menus::IMenuDelegate
|
class CApplyDbDataMenu : public Menus::IMenuDelegate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CApplyDbDataMenu(CDbMappingComponent *mappingComponent, bool separator = true) :
|
CApplyDbDataMenu(CDbMappingComponent *mappingComponent) :
|
||||||
BlackGui::Menus::IMenuDelegate(mappingComponent, separator)
|
Menus::IMenuDelegate(mappingComponent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//! \copydoc IMenuDelegate::customMenu
|
//! \copydoc IMenuDelegate::customMenu
|
||||||
virtual void customMenu(BlackGui::Menus::CMenuActions &menuActions) override;
|
virtual void customMenu(Menus::CMenuActions &menuActions) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! Mapping component
|
//! Mapping component
|
||||||
@@ -427,14 +427,14 @@ namespace BlackGui
|
|||||||
|
|
||||||
//! Merge with vPilot data
|
//! Merge with vPilot data
|
||||||
//! \deprecated vPilot menus will be removed in the future
|
//! \deprecated vPilot menus will be removed in the future
|
||||||
class CMergeWithVPilotMenu : public BlackGui::Menus::IMenuDelegate
|
class CMergeWithVPilotMenu : public Menus::IMenuDelegate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CMergeWithVPilotMenu(CDbMappingComponent *mappingComponent, bool separator = true);
|
CMergeWithVPilotMenu(CDbMappingComponent *mappingComponent);
|
||||||
|
|
||||||
//! \copydoc IMenuDelegate::customMenu
|
//! \copydoc IMenuDelegate::customMenu
|
||||||
virtual void customMenu(BlackGui::Menus::CMenuActions &menuActions) override;
|
virtual void customMenu(Menus::CMenuActions &menuActions) override;
|
||||||
|
|
||||||
//! Mapping component
|
//! Mapping component
|
||||||
CDbMappingComponent *mappingComponent() const;
|
CDbMappingComponent *mappingComponent() const;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace BlackGui
|
|||||||
ui->tvp_OwnAircraftModels->setAircraftModelMode(CAircraftModelListModel::OwnAircraftModelMappingTool);
|
ui->tvp_OwnAircraftModels->setAircraftModelMode(CAircraftModelListModel::OwnAircraftModelMappingTool);
|
||||||
ui->tvp_OwnAircraftModels->addFilterDialog();
|
ui->tvp_OwnAircraftModels->addFilterDialog();
|
||||||
ui->tvp_OwnAircraftModels->setDisplayAutomatically(true);
|
ui->tvp_OwnAircraftModels->setDisplayAutomatically(true);
|
||||||
ui->tvp_OwnAircraftModels->setCustomMenu(new CLoadModelsMenu(this, true));
|
ui->tvp_OwnAircraftModels->setCustomMenu(new CLoadModelsMenu(this));
|
||||||
ui->tvp_OwnAircraftModels->setSimulatorForLoading(ui->comp_SimulatorSelector->getValue());
|
ui->tvp_OwnAircraftModels->setSimulatorForLoading(ui->comp_SimulatorSelector->getValue());
|
||||||
|
|
||||||
connect(ui->tvp_OwnAircraftModels, &CAircraftModelView::requestUpdate, this, &CDbOwnModelsComponent::requestOwnModelsUpdate);
|
connect(ui->tvp_OwnAircraftModels, &CAircraftModelView::requestUpdate, this, &CDbOwnModelsComponent::requestOwnModelsUpdate);
|
||||||
@@ -73,7 +73,7 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
// menu
|
// menu
|
||||||
ui->tvp_OwnAircraftModels->setCustomMenu(new CConsolidateWithDbDataMenu(ui->tvp_OwnAircraftModels, this, false));
|
ui->tvp_OwnAircraftModels->setCustomMenu(new CConsolidateWithDbDataMenu(ui->tvp_OwnAircraftModels, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
CDbOwnModelsComponent::~CDbOwnModelsComponent()
|
CDbOwnModelsComponent::~CDbOwnModelsComponent()
|
||||||
|
|||||||
@@ -172,16 +172,16 @@ namespace BlackGui
|
|||||||
|
|
||||||
//! The menu for loading and handling own models for mapping tasks
|
//! The menu for loading and handling own models for mapping tasks
|
||||||
//! \note This is specific for that very component
|
//! \note This is specific for that very component
|
||||||
class CLoadModelsMenu : public BlackGui::Menus::IMenuDelegate
|
class CLoadModelsMenu : public Menus::IMenuDelegate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CLoadModelsMenu(CDbOwnModelsComponent *ownModelsComponent, bool separator = true) :
|
CLoadModelsMenu(CDbOwnModelsComponent *ownModelsComponent) :
|
||||||
BlackGui::Menus::IMenuDelegate(ownModelsComponent, separator)
|
BlackGui::Menus::IMenuDelegate(ownModelsComponent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//! \copydoc IMenuDelegate::customMenu
|
//! \copydoc IMenuDelegate::customMenu
|
||||||
virtual void customMenu(BlackGui::Menus::CMenuActions &menuActions) override;
|
virtual void customMenu(Menus::CMenuActions &menuActions) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList<QAction *> m_loadActions; //!< load actions
|
QList<QAction *> m_loadActions; //!< load actions
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ namespace BlackGui
|
|||||||
ui->tvp_OwnModelSet->menuAddItems(CAircraftModelView::MenuRemoveSelectedRows | CAircraftModelView::MenuMaterializeFilter);
|
ui->tvp_OwnModelSet->menuAddItems(CAircraftModelView::MenuRemoveSelectedRows | CAircraftModelView::MenuMaterializeFilter);
|
||||||
ui->tvp_OwnModelSet->addFilterDialog();
|
ui->tvp_OwnModelSet->addFilterDialog();
|
||||||
ui->tvp_OwnModelSet->setCustomMenu(new CLoadModelSetMenu(this));
|
ui->tvp_OwnModelSet->setCustomMenu(new CLoadModelSetMenu(this));
|
||||||
ui->tvp_OwnModelSet->setCustomMenu(new CConsolidateWithDbDataMenu(ui->tvp_OwnModelSet, this, true));
|
ui->tvp_OwnModelSet->setCustomMenu(new CConsolidateWithDbDataMenu(ui->tvp_OwnModelSet, this));
|
||||||
ui->tvp_OwnModelSet->setCustomMenu(new CConsolidateWithSimulatorModels(ui->tvp_OwnModelSet, this, false));
|
ui->tvp_OwnModelSet->setCustomMenu(new CConsolidateWithSimulatorModels(ui->tvp_OwnModelSet, this));
|
||||||
ui->tvp_OwnModelSet->menuAddItems(CAircraftModelView::MenuLoadAndSave);
|
ui->tvp_OwnModelSet->menuAddItems(CAircraftModelView::MenuLoadAndSave);
|
||||||
ui->tvp_OwnModelSet->setSorting(CAircraftModel::IndexOrderString);
|
ui->tvp_OwnModelSet->setSorting(CAircraftModel::IndexOrderString);
|
||||||
ui->tvp_OwnModelSet->initAsOrderable();
|
ui->tvp_OwnModelSet->initAsOrderable();
|
||||||
|
|||||||
@@ -177,8 +177,8 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CLoadModelSetMenu(CDbOwnModelSetComponent *ownModelSetComponent, bool separator = true) :
|
CLoadModelSetMenu(CDbOwnModelSetComponent *ownModelSetComponent) :
|
||||||
Menus::IMenuDelegate(ownModelSetComponent, separator)
|
Menus::IMenuDelegate(ownModelSetComponent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//! \copydoc IMenuDelegate::customMenu
|
//! \copydoc IMenuDelegate::customMenu
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ namespace BlackGui
|
|||||||
m_input->setMaximumWidth(150);
|
m_input->setMaximumWidth(150);
|
||||||
m_marginMenuAction = new QWidgetAction(this);
|
m_marginMenuAction = new QWidgetAction(this);
|
||||||
m_marginMenuAction->setDefaultWidget(m_input);
|
m_marginMenuAction->setDefaultWidget(m_input);
|
||||||
m_fontMenu = new CFontMenu(this, true, Qt::WidgetWithChildrenShortcut);
|
m_fontMenu = new CFontMenu(this, Qt::WidgetWithChildrenShortcut);
|
||||||
|
|
||||||
this->setContextMenuPolicy(Qt::CustomContextMenu);
|
this->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
connect(this, &CDockWidget::customContextMenuRequested, this, &CDockWidget::showContextMenu);
|
connect(this, &CDockWidget::customContextMenuRequested, this, &CDockWidget::showContextMenu);
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ namespace BlackGui
|
|||||||
return mv->selectedObjects();
|
return mv->selectedObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
CShowSimulatorFileMenu::CShowSimulatorFileMenu(CAircraftModelView *modelView, COverlayMessagesFrame *messageFrame, bool separator) :
|
CShowSimulatorFileMenu::CShowSimulatorFileMenu(CAircraftModelView *modelView, COverlayMessagesFrame *messageFrame) :
|
||||||
IAircraftModelViewMenu(modelView, separator), m_messageFrame(messageFrame)
|
IAircraftModelViewMenu(modelView), m_messageFrame(messageFrame)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
const CLogCategoryList &CShowSimulatorFileMenu::getLogCategories()
|
const CLogCategoryList &CShowSimulatorFileMenu::getLogCategories()
|
||||||
@@ -158,8 +158,8 @@ namespace BlackGui
|
|||||||
|
|
||||||
// --------------------------------- with DB data ---------------------------------
|
// --------------------------------- with DB data ---------------------------------
|
||||||
|
|
||||||
CConsolidateWithDbDataMenu::CConsolidateWithDbDataMenu(CAircraftModelView *modelView, QObject *modelsTarget, bool separator) :
|
CConsolidateWithDbDataMenu::CConsolidateWithDbDataMenu(CAircraftModelView *modelView, QObject *modelsTarget) :
|
||||||
IAircraftModelViewMenu(modelView, separator), m_modelsTarget(modelsTarget)
|
IAircraftModelViewMenu(modelView), m_modelsTarget(modelsTarget)
|
||||||
{
|
{
|
||||||
// it can be the target is not yet known
|
// it can be the target is not yet known
|
||||||
if (modelsTarget)
|
if (modelsTarget)
|
||||||
@@ -265,8 +265,8 @@ namespace BlackGui
|
|||||||
|
|
||||||
// --------------------------------- with simulator models ---------------------------------
|
// --------------------------------- with simulator models ---------------------------------
|
||||||
|
|
||||||
CConsolidateWithSimulatorModels::CConsolidateWithSimulatorModels(CAircraftModelView *modelView, QObject *modelsTarget, bool separator) :
|
CConsolidateWithSimulatorModels::CConsolidateWithSimulatorModels(CAircraftModelView *modelView, QObject *modelsTarget) :
|
||||||
IAircraftModelViewMenu(modelView, separator), m_modelsTarget(modelsTarget)
|
IAircraftModelViewMenu(modelView), m_modelsTarget(modelsTarget)
|
||||||
{
|
{
|
||||||
// it can be the target is not yet known
|
// it can be the target is not yet known
|
||||||
if (modelsTarget)
|
if (modelsTarget)
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ namespace BlackGui
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
IAircraftModelViewMenu(BlackGui::Views::CAircraftModelView *modelView, bool separator = true) :
|
IAircraftModelViewMenu(BlackGui::Views::CAircraftModelView *modelView) :
|
||||||
IMenuDelegate(modelView, separator)
|
IMenuDelegate(modelView)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//! Log.categories
|
//! Log.categories
|
||||||
@@ -60,7 +60,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CShowSimulatorFileMenu(BlackGui::Views::CAircraftModelView *modelView, BlackGui::COverlayMessagesFrame *messageFrame, bool separator = true);
|
CShowSimulatorFileMenu(Views::CAircraftModelView *modelView, COverlayMessagesFrame *messageFrame);
|
||||||
|
|
||||||
//! Log.categories
|
//! Log.categories
|
||||||
static const BlackMisc::CLogCategoryList &getLogCategories();
|
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||||
@@ -89,7 +89,7 @@ namespace BlackGui
|
|||||||
using IAircraftModelViewMenu::IAircraftModelViewMenu;
|
using IAircraftModelViewMenu::IAircraftModelViewMenu;
|
||||||
|
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CConsolidateWithDbDataMenu(BlackGui::Views::CAircraftModelView *modelView, QObject *modelsTarget, bool separator = true);
|
CConsolidateWithDbDataMenu(BlackGui::Views::CAircraftModelView *modelView, QObject *modelsTarget);
|
||||||
|
|
||||||
//! Log.categories
|
//! Log.categories
|
||||||
static const BlackMisc::CLogCategoryList &getLogCategories();
|
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||||
@@ -121,7 +121,7 @@ namespace BlackGui
|
|||||||
using IAircraftModelViewMenu::IAircraftModelViewMenu;
|
using IAircraftModelViewMenu::IAircraftModelViewMenu;
|
||||||
|
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CConsolidateWithSimulatorModels(BlackGui::Views::CAircraftModelView *modelView, QObject *modelsTarget, bool separator = true);
|
CConsolidateWithSimulatorModels(Views::CAircraftModelView *modelView, QObject *modelsTarget);
|
||||||
|
|
||||||
//! Log.categories
|
//! Log.categories
|
||||||
static const BlackMisc::CLogCategoryList &getLogCategories();
|
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ namespace BlackGui
|
|||||||
return cats;
|
return cats;
|
||||||
}
|
}
|
||||||
|
|
||||||
CFontMenu::CFontMenu(QWidget *widget, bool separator, Qt::ShortcutContext shortcutContext) :
|
CFontMenu::CFontMenu(QWidget *widget, Qt::ShortcutContext shortcutContext) :
|
||||||
IMenuDelegate(widget, separator), m_widget(widget)
|
IMenuDelegate(widget), m_widget(widget)
|
||||||
{
|
{
|
||||||
this->m_fontDialogAction.reset(new QAction(CIcons::font16(), "Font", this));
|
this->m_fontDialogAction.reset(new QAction(CIcons::font16(), "Font", this));
|
||||||
QObject::connect(this->m_fontDialogAction.data(), &QAction::triggered, this, &CFontMenu::changeFontDialog);
|
QObject::connect(this->m_fontDialogAction.data(), &QAction::triggered, this, &CFontMenu::changeFontDialog);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CFontMenu(QWidget *widget, bool separator = true, Qt::ShortcutContext shortcutContext = Qt::WidgetShortcut);
|
CFontMenu(QWidget *widget, Qt::ShortcutContext shortcutContext = Qt::WidgetShortcut);
|
||||||
|
|
||||||
//! Log.categories
|
//! Log.categories
|
||||||
static const BlackMisc::CLogCategoryList &getLogCategories();
|
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ namespace BlackGui
|
|||||||
//! Is menu?
|
//! Is menu?
|
||||||
bool isSubMenu() const { return m_isMenu; }
|
bool isSubMenu() const { return m_isMenu; }
|
||||||
|
|
||||||
//! Is separator
|
//! Is separator?
|
||||||
bool isSeparator() const { return m_title == "_SEP_"; }
|
bool isSeparator() const { return m_title == "_SEP_"; }
|
||||||
|
|
||||||
//! Is menu?
|
//! Is menu?
|
||||||
@@ -118,20 +118,24 @@ namespace BlackGui
|
|||||||
//! Path converter into separator
|
//! 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; }
|
||||||
|
|
||||||
//! Model set
|
|
||||||
static const QString &pathModelSet() { static const QString p("Custom.10.Model/Model set"); return p; }
|
|
||||||
|
|
||||||
//! Model set, new set
|
|
||||||
static const QString &pathModelSetNew() { static const QString p("Custom.10.Model/Model set/New set"); return p; }
|
|
||||||
|
|
||||||
//! Simulator sub menu
|
//! Simulator sub menu
|
||||||
static const QString &pathSimulator() { static const QString p("Custom.11.Simulator/Simulator"); return p; }
|
static const QString &pathSimulator() { static const QString p("Custom.10.Simulator/Simulator"); return p; }
|
||||||
|
|
||||||
//! Simulator sub menu reload models
|
//! Simulator sub menu reload models
|
||||||
static const QString &pathSimulatorModelsReload() { static const QString p("Custom.11.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
|
//! Simulator sub menu reload models
|
||||||
static const QString &pathSimulatorModelsClearCache() { static const QString p("Custom.11.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; }
|
||||||
|
|
||||||
|
//! Model set
|
||||||
|
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; }
|
||||||
|
|
||||||
//! Stash sub menu
|
//! Stash sub menu
|
||||||
static const QString &pathStash() { static const QString p("Custom.12.Stash/Stash"); return p; }
|
static const QString &pathStash() { static const QString p("Custom.12.Stash/Stash"); return p; }
|
||||||
|
|||||||
@@ -51,8 +51,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
IMenuDelegate(QWidget *parent = nullptr, bool separator = false) :
|
IMenuDelegate(QWidget *parent = nullptr) : QObject(parent) {}
|
||||||
QObject(parent), m_separator(separator) {}
|
|
||||||
|
|
||||||
//! Delegate down one level
|
//! Delegate down one level
|
||||||
void nestedCustomMenu(CMenuActions &menuActions) const
|
void nestedCustomMenu(CMenuActions &menuActions) const
|
||||||
@@ -70,7 +69,6 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
IMenuDelegate *m_nestedDelegate = nullptr; //!< nested delegate if any
|
IMenuDelegate *m_nestedDelegate = nullptr; //!< nested delegate if any
|
||||||
bool m_separator = false; //!< at end, terminate with separator
|
|
||||||
};
|
};
|
||||||
} // ns
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
Reference in New Issue
Block a user