//aRule = "client='ObjectBrowser' and type='MEDFIELD'";
//mgr->setRule( action( VISU_IMPORT_MED ), aRule, true );
- aRule = "client='ObjectBrowser' and $type in {'VISU::TPART'} and selcount>=1";
- mgr->setRule( action( VISU_MULTIPR_FULL_RES ), aRule, true );
- mgr->setRule( action( VISU_MULTIPR_MED_RES ), aRule, true );
- mgr->setRule( action( VISU_MULTIPR_LOW_RES ), aRule, true );
- mgr->setRule( action( VISU_MULTIPR_HIDE), aRule, true );
+ aRule = "client='ObjectBrowser' and $type in {'VISU::TPART'} and ";
+ {
+ QString aCustomRule = aRule + "fullResolution=1 and (selcount>1 or (selcount=1 and resolutionState!='F'))";
+ mgr->setRule( action( VISU_MULTIPR_FULL_RES ), aCustomRule, true );
+ }
+ {
+ QString aCustomRule = aRule + "mediumResolution=1 and (selcount>1 or (selcount=1 and resolutionState!='M'))";
+ mgr->setRule( action( VISU_MULTIPR_MED_RES ), aCustomRule, true );
+ }
+ {
+ QString aCustomRule = aRule + "lowResolution=1 and (selcount>1 or (selcount=1 and resolutionState!='L'))";
+ mgr->setRule( action( VISU_MULTIPR_LOW_RES ), aCustomRule, true );
+ }
+ {
+ QString aCustomRule = aRule + "(selcount>1 or (selcount=1 and resolutionState!='H'))";
+ mgr->setRule( action( VISU_MULTIPR_HIDE), aCustomRule, true );
+ }
}
//***************************************************************************
if ( !val.isValid() ) {
if ( p == "type" ) val = QtxValue( type( ind ) );
else if ( p == "nbComponents" ) val = QtxValue( nbComponents( ind ) );
- else if ( p == "resolution" ) val = QtxValue( resolution( ind ) );
else if ( p == "medEntity" ) val = QtxValue( medEntity( ind ) );
else if ( p == "medSource" ) val = QtxValue( medSource( ind ) );
else if ( p == "representation" ) val = QtxValue( representation( ind ) );
else if ( p == "isShading" ) val = QtxValue( isShading( ind ) );
else if ( p == "isScalarMapAct" ) val = QtxValue( isScalarMapAct( ind ) );
else if ( p == "isVisuComponent") val = QtxValue( isVisuComponent( ind ) );
+
+ else if ( p == "fullResolution" ) val = QtxValue( fullResolution( ind ) );
+ else if ( p == "mediumResolution" ) val = QtxValue( mediumResolution( ind ) );
+ else if ( p == "lowResolution" ) val = QtxValue( lowResolution( ind ) );
+ else if ( p == "resolutionState" ) val = QtxValue( resolutionState( ind ) );
}
return val;
//---------------------------------------------------------------
-QString VisuGUI_Selection::resolution( const int ind ) const
+QString VisuGUI_Selection::resolutions( const int ind ) const
{
QString aResStr;
SalomeApp_Study* aStudy = GetStudy();
VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
bool isExist;
- QString aVal = VISU::Storable::FindValue(aMap,"myState",&isExist);
+ QString aVal = VISU::Storable::FindValue(aMap,"myResolutions",&isExist);
if ( isExist )
aResStr = aVal;
}
+//---------------------------------------------------------------
+QString VisuGUI_Selection::resolution( const int ind, char theResoltuion ) const
+{
+ QString aResStr;
+
+ QString aResolutions = resolutions( ind );
+ if(aResolutions.isEmpty())
+ return aResStr;
+
+ if(aResolutions.find(theResoltuion) != -1)
+ aResStr = "1";
+ else
+ aResStr = "0";
+
+ return aResStr;
+}
+
+
+//---------------------------------------------------------------
+QString VisuGUI_Selection::fullResolution( const int ind ) const
+{
+ return resolution( ind, 'F');
+}
+
+
+//---------------------------------------------------------------
+QString VisuGUI_Selection::mediumResolution( const int ind ) const
+{
+ return resolution( ind, 'M');
+}
+
+
+//---------------------------------------------------------------
+QString VisuGUI_Selection::lowResolution( const int ind ) const
+{
+ return resolution( ind, 'L');
+}
+
+
+//---------------------------------------------------------------
+QString VisuGUI_Selection::resolutionState( const int ind ) const
+{
+ QString aResStr;
+ SalomeApp_Study* aStudy = GetStudy();
+ if ( !aStudy )
+ return aResStr;
+
+ VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, entry( ind ));
+ VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
+
+ bool isExist;
+ QString aVal = VISU::Storable::FindValue(aMap,"myState",&isExist);
+ if ( isExist ) {
+ if ( aVal.toInt() == VISU::Result::FULL )
+ aResStr = "F";
+ if ( aVal.toInt() == VISU::Result::MEDIUM )
+ aResStr = "M";
+ if ( aVal.toInt() == VISU::Result::LOW )
+ aResStr = "L";
+ if ( aVal.toInt() == VISU::Result::HIDDEN )
+ aResStr = "H";
+ }
+
+ return aResStr;
+}
+
+
//---------------------------------------------------------------
QString VisuGUI_Selection::medEntity( const int ind ) const
{
private:
QString type( const int ) const;
QString nbComponents( const int ) const;
- QString resolution( const int ) const;
QString medEntity( const int ) const;
QString medSource( const int ) const;
QString nbTimeStamps( const int ) const;
QString isScalarMapAct( const int ) const;
bool isVisuComponent( const int ) const;
+ QString fullResolution( const int ) const;
+ QString mediumResolution( const int ) const;
+ QString lowResolution( const int ) const;
+ QString resolutionState( const int ) const;
+
private:
int nbChild( const int, const bool ) const;
SalomeApp_Study* GetStudy() const;
+ QString resolutions( const int ) const;
+ QString resolution( const int, char theResoltuion ) const;
+
private:
SalomeApp_Module* myModule;
};