mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve CmdFeature base class
Add default implementation of isEnabled() and add const
This commit is contained in:
parent
59ca0b943c
commit
1da509166a
@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicNewAnalysisPlotFeature, "RicNewAnalysisPlotFeature" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewAnalysisPlotFeature::isCommandEnabled()
|
||||
bool RicNewAnalysisPlotFeature::isCommandEnabled() const
|
||||
{
|
||||
if ( caf::firstAncestorOfTypeFromSelectedObject<RimAnalysisPlotCollection>() ) return true;
|
||||
if ( caf::firstAncestorOfTypeFromSelectedObject<RimSummaryPlot>() ) return true;
|
||||
|
@ -28,7 +28,7 @@ class RicNewAnalysisPlotFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicNewPlotDataFilterFeature, "RicNewPlotDataFilterFeature"
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewPlotDataFilterFeature::isCommandEnabled()
|
||||
bool RicNewPlotDataFilterFeature::isCommandEnabled() const
|
||||
{
|
||||
RimAnalysisPlot* analysisPlot = caf::SelectionManager::instance()->selectedItemAncestorOfType<RimAnalysisPlot>();
|
||||
|
||||
|
@ -28,7 +28,7 @@ class RicNewPlotDataFilterFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -41,7 +41,7 @@ CAF_CMD_SOURCE_INIT( RicCreateReachCircleAnnotationFeature, "RicCreateReachCircl
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreateReachCircleAnnotationFeature::isCommandEnabled()
|
||||
bool RicCreateReachCircleAnnotationFeature::isCommandEnabled() const
|
||||
{
|
||||
auto selObjs = caf::selectedObjectsByTypeStrict<RimAnnotationCollection*>();
|
||||
auto selGroupColl = caf::selectedObjectsByTypeStrict<RimAnnotationGroupCollection*>();
|
||||
|
@ -32,7 +32,7 @@ class RicCreateReachCircleAnnotationFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicCreateTextAnnotationFeature, "RicCreateTextAnnotationFea
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreateTextAnnotationFeature::isCommandEnabled()
|
||||
bool RicCreateTextAnnotationFeature::isCommandEnabled() const
|
||||
{
|
||||
auto selObjsGlobal = caf::selectedObjectsByTypeStrict<RimAnnotationCollection*>();
|
||||
auto selObjs2InView = caf::selectedObjectsByTypeStrict<RimAnnotationInViewCollection*>();
|
||||
|
@ -34,7 +34,7 @@ class RicCreateTextAnnotationFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
@ -39,14 +39,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicCreateTextAnnotationIn3dViewFeature, "RicCreateTextAnnotationIn3dViewFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreateTextAnnotationIn3dViewFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicCreateTextAnnotationIn3dViewFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -41,7 +41,7 @@ CAF_CMD_SOURCE_INIT( RicCreateUserDefinedPolylinesAnnotationFeature, "RicCreateU
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreateUserDefinedPolylinesAnnotationFeature::isCommandEnabled()
|
||||
bool RicCreateUserDefinedPolylinesAnnotationFeature::isCommandEnabled() const
|
||||
{
|
||||
auto selObjs = caf::selectedObjectsByTypeStrict<RimAnnotationCollection*>();
|
||||
auto selGroupColl = caf::selectedObjectsByTypeStrict<RimAnnotationGroupCollection*>();
|
||||
|
@ -32,7 +32,7 @@ class RicCreateUserDefinedPolylinesAnnotationFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicImportPolylinesAnnotationFeature, "RicImportPolylinesAnn
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicImportPolylinesAnnotationFeature::isCommandEnabled()
|
||||
bool RicImportPolylinesAnnotationFeature::isCommandEnabled() const
|
||||
{
|
||||
auto selObjs = caf::selectedObjectsByTypeStrict<RimAnnotationCollection*>();
|
||||
auto selGroupColl = caf::selectedObjectsByTypeStrict<RimAnnotationGroupCollection*>();
|
||||
|
@ -28,7 +28,7 @@ class RicImportPolylinesAnnotationFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -24,14 +24,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicCloseProjectFeature, "RicCloseProjectFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCloseProjectFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicCloseProjectFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -35,14 +35,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicEditPreferencesFeature, "RicEditPreferencesFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicEditPreferencesFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<caf::FontHolderInterface*> findFontObjects()
|
||||
{
|
||||
auto project = RimProject::current();
|
||||
|
@ -31,7 +31,6 @@ class RicEditPreferencesFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
@ -27,14 +27,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicExitApplicationFeature, "RicExitApplicationFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicExitApplicationFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicExitApplicationFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -35,14 +35,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicExportObjectAndFieldKeywordsFeature, "RicExportObjectAndFieldKeywordsFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicExportObjectAndFieldKeywordsFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicExportObjectAndFieldKeywordsFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
@ -46,14 +46,6 @@ CAF_CMD_SOURCE_INIT( RicSearchHelpFeature, "RicSearchHelpFeature" );
|
||||
CAF_CMD_SOURCE_INIT( RicSearchIssuesHelpFeature, "RicSearchIssuesHelpFeature" );
|
||||
CAF_CMD_SOURCE_INIT( RicCreateNewIssueHelpFeature, "RicCreateNewIssueHelpFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicHelpAboutFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -205,14 +197,6 @@ QString RicHelpAboutFeature::getPythonVersion( const QString& pathToPythonExecut
|
||||
return versionString;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicHelpCommandLineFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -234,14 +218,6 @@ void RicHelpCommandLineFeature::setupActionLook( QAction* actionToSetup )
|
||||
actionToSetup->setIcon( QIcon( ":/HelpCircle.svg" ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicHelpSummaryCommandLineFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -263,14 +239,6 @@ void RicHelpSummaryCommandLineFeature::setupActionLook( QAction* actionToSetup )
|
||||
actionToSetup->setIcon( QIcon( ":/HelpCircle.svg" ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicHelpOpenUsersGuideFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -291,14 +259,6 @@ void RicHelpOpenUsersGuideFeature::setupActionLook( QAction* actionToSetup )
|
||||
actionToSetup->setIcon( QIcon( ":/HelpCircle.svg" ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicSearchHelpFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -337,14 +297,6 @@ void RicSearchHelpFeature::setupActionLook( QAction* actionToSetup )
|
||||
applyShortcutWithHintToAction( actionToSetup, QKeySequence::HelpContents );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicSearchIssuesHelpFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -363,14 +315,6 @@ void RicSearchIssuesHelpFeature::setupActionLook( QAction* actionToSetup )
|
||||
actionToSetup->setIcon( QIcon( ":/HelpCircle.svg" ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreateNewIssueHelpFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -30,7 +30,6 @@ class RicHelpAboutFeature : public caf::CmdFeature
|
||||
static QString getPythonVersion( const QString& pathToPythonExecutable );
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
@ -43,7 +42,6 @@ class RicHelpCommandLineFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
@ -56,7 +54,6 @@ class RicHelpSummaryCommandLineFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
@ -69,7 +66,6 @@ class RicHelpOpenUsersGuideFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
@ -82,7 +78,6 @@ class RicSearchHelpFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
@ -95,7 +90,6 @@ class RicSearchIssuesHelpFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
@ -108,7 +102,6 @@ class RicCreateNewIssueHelpFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -27,14 +27,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicLaunchRegressionTestsFeature, "RicLaunchRegressionTestsFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicLaunchRegressionTestsFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -73,14 +65,6 @@ void RicLaunchRegressionTestDialogFeature::showRegressionTestDialog()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicLaunchRegressionTestDialogFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicLaunchRegressionTestsFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
private:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
@ -43,7 +42,6 @@ class RicLaunchRegressionTestDialogFeature : public caf::CmdFeature
|
||||
static void showRegressionTestDialog();
|
||||
|
||||
private:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -25,14 +25,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicLaunchUnitTestsFeature, "RicLaunchUnitTestsFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicLaunchUnitTestsFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -29,7 +29,6 @@ class RicLaunchUnitTestsFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -56,14 +56,6 @@ void RicOpenInTextEditorFeature::openFileInTextEditor( const QString& filePath,
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicOpenInTextEditorFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -30,7 +30,6 @@ class RicOpenInTextEditorFeature : public caf::CmdFeature
|
||||
static void openFileInTextEditor( const QString& filePath, QObject* parent );
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -27,14 +27,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicOpenLastUsedFileFeature, "RicOpenLastUsedFileFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicOpenLastUsedFileFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicOpenLastUsedFileFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -29,14 +29,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicOpenProjectFeature, "RicOpenProjectFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicOpenProjectFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicOpenProjectFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -28,14 +28,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicRunCommandFileFeature, "RicRunCommandFileFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicRunCommandFileFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicRunCommandFileFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
private:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -51,14 +51,6 @@ caf::PdmScriptResponse RicSaveProjectAsFeature::execute()
|
||||
return caf::PdmScriptResponse();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicSaveProjectAsFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -35,7 +35,6 @@ public:
|
||||
caf::PdmScriptResponse execute() override;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
@ -60,14 +60,6 @@ caf::PdmScriptResponse RicSaveProjectFeature::execute()
|
||||
return caf::PdmScriptResponse();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicSaveProjectFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -35,7 +35,6 @@ public:
|
||||
caf::PdmScriptResponse execute() override;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
@ -25,14 +25,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicSaveProjectNoGlobalPathsFeature, "RicSaveProjectNoGlobalPathsFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicSaveProjectNoGlobalPathsFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicSaveProjectNoGlobalPathsFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
private:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -27,14 +27,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicShowClassNamesFeature, "RicShowClassNamesFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowClassNamesFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -59,7 +51,7 @@ void RicShowClassNamesFeature::setupActionLook( QAction* actionToSetup )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowClassNamesFeature::isCommandChecked()
|
||||
bool RicShowClassNamesFeature::isCommandChecked() const
|
||||
{
|
||||
return RiaPreferences::current()->systemPreferences()->appendClassNameToUiText();
|
||||
}
|
||||
|
@ -28,8 +28,7 @@ class RicShowClassNamesFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandChecked() override;
|
||||
bool isCommandChecked() const override;
|
||||
};
|
||||
|
@ -75,14 +75,6 @@ void RicShowMainWindowFeature::showMainWindow()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowMainWindowFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -31,7 +31,6 @@ public:
|
||||
static void showMainWindow();
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -32,14 +32,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicShowMemoryCleanupDialogFeature, "RicShowMemoryCleanupDialogFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowMemoryCleanupDialogFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicShowMemoryCleanupDialogFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ CAF_CMD_SOURCE_INIT( RicShowPlotDataCtxFeature, "RicShowPlotDataCtxFeature" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowPlotDataCtxFeature::isCommandEnabled()
|
||||
bool RicShowPlotDataCtxFeature::isCommandEnabled() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -28,5 +28,5 @@ class RicShowPlotDataCtxFeature : public RicShowPlotDataFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
};
|
||||
|
@ -168,7 +168,7 @@ private:
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowPlotDataFeature::isCommandEnabled()
|
||||
bool RicShowPlotDataFeature::isCommandEnabled() const
|
||||
{
|
||||
QString content = RiaFeatureCommandContext::instance()->contentString();
|
||||
if ( !content.isEmpty() )
|
||||
@ -355,7 +355,7 @@ void RicShowPlotDataFeature::showTextWindow( const QString& title, const QString
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowPlotDataFeature::getSelection( std::vector<RimPlotWindow*>& selection )
|
||||
void RicShowPlotDataFeature::getSelection( std::vector<RimPlotWindow*>& selection ) const
|
||||
{
|
||||
if ( sender() )
|
||||
{
|
||||
|
@ -33,12 +33,12 @@ class RicShowPlotDataFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
private:
|
||||
void getSelection( std::vector<RimPlotWindow*>& selection );
|
||||
void getSelection( std::vector<RimPlotWindow*>& selection ) const;
|
||||
|
||||
public:
|
||||
static void showTabbedTextWindow( RiuTabbedTextProvider* textProvider );
|
||||
|
@ -24,14 +24,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicShowPlotWindowFeature, "RicShowPlotWindowFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowPlotWindowFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicShowPlotWindowFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -56,7 +56,7 @@ void RicTileWindowsFeature::applyTiling( RiuMainWindow* mainWindow, RiaDefines::
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicTileWindowsFeature::isCommandEnabled()
|
||||
bool RicTileWindowsFeature::isCommandEnabled() const
|
||||
{
|
||||
auto* mainWindow = RiuMainWindow::instance();
|
||||
if ( mainWindow )
|
||||
@ -91,7 +91,7 @@ void RicTileWindowsFeature::setupActionLook( QAction* actionToSetup )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicTileWindowsFeature::isCommandChecked()
|
||||
bool RicTileWindowsFeature::isCommandChecked() const
|
||||
{
|
||||
auto proj = RimProject::current();
|
||||
|
||||
@ -124,7 +124,7 @@ void RicTilePlotWindowsFeature::applyTiling( RiuPlotMainWindow* mainWindow, RiaD
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicTilePlotWindowsFeature::isCommandEnabled()
|
||||
bool RicTilePlotWindowsFeature::isCommandEnabled() const
|
||||
{
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
if ( mainPlotWindow )
|
||||
@ -159,7 +159,7 @@ void RicTilePlotWindowsFeature::setupActionLook( QAction* actionToSetup )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicTilePlotWindowsFeature::isCommandChecked()
|
||||
bool RicTilePlotWindowsFeature::isCommandChecked() const
|
||||
{
|
||||
auto proj = RimProject::current();
|
||||
|
||||
@ -171,7 +171,7 @@ CAF_CMD_SOURCE_INIT( RicTileWindowsVerticallyFeature, "RicTileWindowsVerticallyF
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicTileWindowsVerticallyFeature::isCommandEnabled()
|
||||
bool RicTileWindowsVerticallyFeature::isCommandEnabled() const
|
||||
{
|
||||
RiuMainWindow* mainWindow = RiuMainWindow::instance();
|
||||
if ( mainWindow )
|
||||
@ -205,7 +205,7 @@ void RicTileWindowsVerticallyFeature::setupActionLook( QAction* actionToSetup )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicTileWindowsVerticallyFeature::isCommandChecked()
|
||||
bool RicTileWindowsVerticallyFeature::isCommandChecked() const
|
||||
{
|
||||
auto proj = RimProject::current();
|
||||
|
||||
@ -217,7 +217,7 @@ CAF_CMD_SOURCE_INIT( RicTileWindowsHorizontallyFeature, "RicTileWindowsHorizonta
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicTileWindowsHorizontallyFeature::isCommandEnabled()
|
||||
bool RicTileWindowsHorizontallyFeature::isCommandEnabled() const
|
||||
{
|
||||
RiuMainWindow* mainWindow = RiuMainWindow::instance();
|
||||
if ( mainWindow )
|
||||
@ -251,7 +251,7 @@ void RicTileWindowsHorizontallyFeature::setupActionLook( QAction* actionToSetup
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicTileWindowsHorizontallyFeature::isCommandChecked()
|
||||
bool RicTileWindowsHorizontallyFeature::isCommandChecked() const
|
||||
{
|
||||
auto proj = RimProject::current();
|
||||
|
||||
@ -269,7 +269,7 @@ CAF_CMD_SOURCE_INIT( RicTilePlotWindowsVerticallyFeature, "RicTilePlotWindowsVer
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicTilePlotWindowsVerticallyFeature::isCommandEnabled()
|
||||
bool RicTilePlotWindowsVerticallyFeature::isCommandEnabled() const
|
||||
{
|
||||
auto* mainWindow = RiuPlotMainWindow::instance();
|
||||
if ( mainWindow )
|
||||
@ -303,7 +303,7 @@ void RicTilePlotWindowsVerticallyFeature::setupActionLook( QAction* actionToSetu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicTilePlotWindowsVerticallyFeature::isCommandChecked()
|
||||
bool RicTilePlotWindowsVerticallyFeature::isCommandChecked() const
|
||||
{
|
||||
auto proj = RimProject::current();
|
||||
|
||||
@ -315,7 +315,7 @@ CAF_CMD_SOURCE_INIT( RicTilePlotWindowsHorizontallyFeature, "RicTilePlotWindowsH
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicTilePlotWindowsHorizontallyFeature::isCommandEnabled()
|
||||
bool RicTilePlotWindowsHorizontallyFeature::isCommandEnabled() const
|
||||
{
|
||||
auto* mainWindow = RiuPlotMainWindow::instance();
|
||||
if ( mainWindow )
|
||||
@ -349,7 +349,7 @@ void RicTilePlotWindowsHorizontallyFeature::setupActionLook( QAction* actionToSe
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicTilePlotWindowsHorizontallyFeature::isCommandChecked()
|
||||
bool RicTilePlotWindowsHorizontallyFeature::isCommandChecked() const
|
||||
{
|
||||
auto proj = RimProject::current();
|
||||
|
||||
|
@ -37,10 +37,10 @@ public:
|
||||
static void applyTiling( RiuMainWindow* mainWindow, RiaDefines::WindowTileMode requestedTileMode );
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandChecked() override;
|
||||
bool isCommandChecked() const override;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
@ -51,10 +51,10 @@ class RicTileWindowsVerticallyFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandChecked() override;
|
||||
bool isCommandChecked() const override;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
@ -65,10 +65,10 @@ class RicTileWindowsHorizontallyFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandChecked() override;
|
||||
bool isCommandChecked() const override;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
@ -82,10 +82,10 @@ public:
|
||||
static void applyTiling( RiuPlotMainWindow* mainWindow, RiaDefines::WindowTileMode requestedTileMode );
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandChecked() override;
|
||||
bool isCommandChecked() const override;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
@ -96,10 +96,10 @@ class RicTilePlotWindowsVerticallyFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandChecked() override;
|
||||
bool isCommandChecked() const override;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
@ -110,8 +110,8 @@ class RicTilePlotWindowsHorizontallyFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandChecked() override;
|
||||
bool isCommandChecked() const override;
|
||||
};
|
||||
|
@ -32,14 +32,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicNewPolygonFilter3dviewFeature, "RicNewPolygonFilter3dviewFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewPolygonFilter3dviewFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicNewPolygonFilter3dviewFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -30,14 +30,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicNewPolygonFilterFeature, "RicNewPolygonFilterFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewPolygonFilterFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicNewPolygonFilterFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicNewRangeFilterSlice3dviewFeature, "RicNewRangeFilterSlic
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewRangeFilterSlice3dviewFeature::isCommandEnabled()
|
||||
bool RicNewRangeFilterSlice3dviewFeature::isCommandEnabled() const
|
||||
{
|
||||
RimGridView* view = RiaApplication::instance()->activeGridView();
|
||||
if ( !view ) return false;
|
||||
|
@ -28,7 +28,7 @@ class RicNewRangeFilterSlice3dviewFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -34,14 +34,6 @@ RicNewRangeFilterSliceFeature::RicNewRangeFilterSliceFeature( QString cmdText, i
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewRangeFilterSliceFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -29,7 +29,6 @@ protected:
|
||||
RicNewRangeFilterSliceFeature( QString cmdText, int sliceDirection );
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
@ -30,14 +30,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicNewUserDefinedFilterFeature, "RicNewUserDefinedFilterFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewUserDefinedFilterFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,6 @@ class RicNewUserDefinedFilterFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicCopyStandardLegendFeature, "RicCopyStandardLegendFeature
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCopyStandardLegendFeature::isCommandEnabled()
|
||||
bool RicCopyStandardLegendFeature::isCommandEnabled() const
|
||||
{
|
||||
return selectedColorLegend() != nullptr;
|
||||
}
|
||||
|
@ -30,10 +30,10 @@ class RicCopyStandardLegendFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
private:
|
||||
RimColorLegend* selectedColorLegend();
|
||||
static RimColorLegend* selectedColorLegend();
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ CAF_CMD_SOURCE_INIT( RicImportColorCategoriesFeature, "RicImportColorCategoriesF
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicImportColorCategoriesFeature::isCommandEnabled()
|
||||
bool RicImportColorCategoriesFeature::isCommandEnabled() const
|
||||
{
|
||||
return caf::firstAncestorOfTypeFromSelectedObject<RimColorLegendCollection>() != nullptr;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class RicImportColorCategoriesFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ CAF_CMD_SOURCE_INIT( RicInsertColorLegendFeature, "RicInsertColorLegendFeature"
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicInsertColorLegendFeature::isCommandEnabled()
|
||||
bool RicInsertColorLegendFeature::isCommandEnabled() const
|
||||
{
|
||||
return selectedColorLegendCollection() != nullptr;
|
||||
}
|
||||
|
@ -30,10 +30,10 @@ class RicInsertColorLegendFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
private:
|
||||
RimColorLegendCollection* selectedColorLegendCollection();
|
||||
static RimColorLegendCollection* selectedColorLegendCollection();
|
||||
};
|
||||
|
@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicInsertColorLegendItemFeature, "RicInsertColorLegendItemF
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Disallows insert of color legend item in standard color legends
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicInsertColorLegendItemFeature::isCommandEnabled()
|
||||
bool RicInsertColorLegendItemFeature::isCommandEnabled() const
|
||||
{
|
||||
RimColorLegend* legend = selectedColorLegend();
|
||||
|
||||
|
@ -30,10 +30,10 @@ class RicInsertColorLegendItemFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
private:
|
||||
RimColorLegend* selectedColorLegend();
|
||||
static RimColorLegend* selectedColorLegend();
|
||||
};
|
||||
|
@ -31,7 +31,7 @@ CAF_CMD_SOURCE_INIT( RicDeleteValveTemplateFeature, "RicDeleteValveTemplateFeatu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicDeleteValveTemplateFeature::isCommandEnabled()
|
||||
bool RicDeleteValveTemplateFeature::isCommandEnabled() const
|
||||
{
|
||||
return caf::SelectionManager::instance()->selectedItemOfType<RimValveTemplate>() != nullptr;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class RicDeleteValveTemplateFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicEditPerforationCollectionFeature, "RicEditPerforationCol
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicEditPerforationCollectionFeature::isCommandEnabled()
|
||||
bool RicEditPerforationCollectionFeature::isCommandEnabled() const
|
||||
{
|
||||
return selectedPerforationCollection() != nullptr;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class RicEditPerforationCollectionFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
@ -123,7 +123,7 @@ void RicExportFishbonesLateralsFeature::setupActionLook( QAction* actionToSetup
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicExportFishbonesLateralsFeature::isCommandEnabled()
|
||||
bool RicExportFishbonesLateralsFeature::isCommandEnabled() const
|
||||
{
|
||||
return selectedFishbonesCollection() != nullptr;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ class RicExportFishbonesLateralsFeature : public caf::CmdFeature
|
||||
protected:
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
|
||||
private:
|
||||
static RimFishbonesCollection* selectedFishbonesCollection();
|
||||
|
@ -42,14 +42,6 @@ CAF_CMD_SOURCE_INIT( RicImportEnsembleFractureStatisticsFeature, "RicImportEnsem
|
||||
QString RicImportEnsembleFractureStatisticsFeature::m_pathFilter = "*";
|
||||
QString RicImportEnsembleFractureStatisticsFeature::m_fileNameFilter = "*";
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicImportEnsembleFractureStatisticsFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -40,7 +40,6 @@ public:
|
||||
protected:
|
||||
static void importSingleEnsembleFractureStatistics( const QStringList& fileNames );
|
||||
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
@ -74,7 +74,7 @@ void RicNewFishbonesSubsAtMeasuredDepthFeature::setupActionLook( QAction* action
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewFishbonesSubsAtMeasuredDepthFeature::isCommandEnabled()
|
||||
bool RicNewFishbonesSubsAtMeasuredDepthFeature::isCommandEnabled() const
|
||||
{
|
||||
return RiuWellPathSelectionItem::wellPathSelectionItem() != nullptr;
|
||||
}
|
||||
|
@ -30,5 +30,5 @@ class RicNewFishbonesSubsAtMeasuredDepthFeature : public caf::CmdFeature
|
||||
protected:
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
};
|
||||
|
@ -131,7 +131,7 @@ void RicNewFishbonesSubsFeature::setupActionLook( QAction* actionToSetup )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewFishbonesSubsFeature::isCommandEnabled()
|
||||
bool RicNewFishbonesSubsFeature::isCommandEnabled() const
|
||||
{
|
||||
return selectedFishbonesCollection() != nullptr;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
protected:
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
|
||||
private:
|
||||
static RimFishbonesCollection* selectedFishbonesCollection();
|
||||
|
@ -77,7 +77,7 @@ void RicNewPerforationIntervalAtMeasuredDepthFeature::setupActionLook( QAction*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewPerforationIntervalAtMeasuredDepthFeature::isCommandEnabled()
|
||||
bool RicNewPerforationIntervalAtMeasuredDepthFeature::isCommandEnabled() const
|
||||
{
|
||||
return RiuWellPathSelectionItem::wellPathSelectionItem() != nullptr;
|
||||
}
|
||||
|
@ -32,5 +32,5 @@ class RicNewPerforationIntervalAtMeasuredDepthFeature : public caf::CmdFeature
|
||||
protected:
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
};
|
||||
|
@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicNewPerforationIntervalFeature, "RicNewPerforationInterva
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewPerforationIntervalFeature::isCommandEnabled()
|
||||
bool RicNewPerforationIntervalFeature::isCommandEnabled() const
|
||||
{
|
||||
return selectedPerforationCollection() != nullptr;
|
||||
}
|
||||
|
@ -31,10 +31,10 @@ class RicNewPerforationIntervalFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
private:
|
||||
RimPerforationCollection* selectedPerforationCollection();
|
||||
static RimPerforationCollection* selectedPerforationCollection();
|
||||
};
|
||||
|
@ -171,14 +171,6 @@ RimStimPlanModelPlot* RicNewStimPlanModelPlotFeature::createPlot( RimStimPlanMod
|
||||
return plot;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewStimPlanModelPlotFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -43,7 +43,6 @@ public:
|
||||
static RimStimPlanModelPlot* createPlot( RimStimPlanModel* stimPlanModel );
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
@ -88,7 +88,7 @@ void RicNewValveAtMeasuredDepthFeature::setupActionLook( QAction* actionToSetup
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewValveAtMeasuredDepthFeature::isCommandEnabled()
|
||||
bool RicNewValveAtMeasuredDepthFeature::isCommandEnabled() const
|
||||
{
|
||||
auto wellPathSelectionItem = RiuWellPathSelectionItem::wellPathSelectionItem();
|
||||
return wellPathSelectionItem && dynamic_cast<RimPerforationInterval*>( wellPathSelectionItem->m_wellPathComponent );
|
||||
|
@ -30,5 +30,5 @@ class RicNewValveAtMeasuredDepthFeature : public caf::CmdFeature
|
||||
protected:
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
};
|
||||
|
@ -16,7 +16,7 @@ CAF_CMD_SOURCE_INIT( RicNewValveFeature, "RicNewValveFeature" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewValveFeature::isCommandEnabled()
|
||||
bool RicNewValveFeature::isCommandEnabled() const
|
||||
{
|
||||
std::vector<caf::PdmUiItem*> allSelectedItems;
|
||||
caf::SelectionManager::instance()->selectedItems( allSelectedItems );
|
||||
|
@ -28,7 +28,7 @@ class RicNewValveFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
@ -120,11 +120,3 @@ void RicNewValveTemplateFeature::setupActionLook( QAction* actionToSetup )
|
||||
actionToSetup->setIcon( QIcon( ":/ICDValve16x16.png" ) );
|
||||
actionToSetup->setText( "New Valve Template" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewValveTemplateFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -41,5 +41,4 @@ protected:
|
||||
static RimValveTemplate* createNewValveTemplate();
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandEnabled() override;
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ CAF_CMD_SOURCE_INIT( RicWellPathImportPerforationIntervalsFeature, "RicWellPathI
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicWellPathImportPerforationIntervalsFeature::isCommandEnabled()
|
||||
bool RicWellPathImportPerforationIntervalsFeature::isCommandEnabled() const
|
||||
{
|
||||
return RicWellPathImportPerforationIntervalsFeature::selectedWellPathCollection() != nullptr;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class RicWellPathImportPerforationIntervalsFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user