HypothesesSet::HypothesesSet( const QString& theSetName )
: myHypoSetName( theSetName ),
- myIsAlgo( false )
+ myIsAlgo( false ),
+ myIsCustom( false )
{
}
: myHypoSetName( theSetName ),
myHypoList( theHypoList ),
myAlgoList( theAlgoList ),
- myIsAlgo( false )
+ myIsAlgo( false ),
+ myIsCustom( false )
{
}
{
return list()->at(myIndex);
}
+
+void HypothesesSet::setIsCustom( bool isCustom )
+{
+ myIsCustom = isCustom;
+}
+
+bool HypothesesSet::getIsCustom() const
+{
+ return myIsCustom;
+}
+
+int HypothesesSet::maxDim() const
+{
+ HypothesesSet * thisSet = (HypothesesSet*) this;
+ int dim = -1;
+ for ( int isAlgo = 0; isAlgo < 2; ++isAlgo )
+ {
+ thisSet->init( isAlgo );
+ while ( thisSet->next(), thisSet->more() )
+ if ( HypothesisData* hypData = SMESH::GetHypothesisData( thisSet->current() ))
+ for ( int i = 0; i < hypData->Dim.count(); ++i )
+ dim = qMax( dim, hypData->Dim[i] );
+ }
+ return dim;
+}
void set( bool, const QStringList& );
int count( bool ) const;
+ void setIsCustom( bool );
+ bool getIsCustom() const;
+ int maxDim() const;
+
bool isAlgo() const;
//this method sets internal index to -1, thus before any data access it is necessary to call next()
QStringList* list() const;
private:
- bool myIsAlgo;
QString myHypoSetName;
QStringList myHypoList, myAlgoList;
+ bool myIsAlgo, myIsCustom;
int myIndex;
};