// Function : getNewObjectName
// Purpose : Redefine this method to return proper name for a new object
//================================================================
-const char* BlocksGUI_ExplodeDlg::getNewObjectName() const
+QString BlocksGUI_ExplodeDlg::getNewObjectName() const
{
- return "";
+ return QString::null;
}
virtual bool execute( ObjectList& );
virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr );
- virtual const char* getNewObjectName() const;
+ virtual QString getNewObjectName() const;
private:
void Init();
return myObject;
}
-const char* EntityGUI_SubShapeDlg::getNewObjectName() const
+QString EntityGUI_SubShapeDlg::getNewObjectName() const
{
- return "";
+ return QString::null;
}
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr );
- virtual const char* getNewObjectName() const;
+ virtual QString getNewObjectName() const;
private slots:
void ClickOnOk();
// Function : getNewObjectName
// Purpose : Redefine this method to return proper name for a new object
//================================================================
-const char* GEOMBase_Helper::getNewObjectName() const
+QString GEOMBase_Helper::getNewObjectName() const
{
- return "";
+ return QString::null;
}
//================================================================
// for <theObj> or a nil reference if <theObj> should be published
// as a top-level object.
- virtual const char* getNewObjectName() const;
+ virtual QString getNewObjectName() const;
virtual void addSubshapesToStudy();
GEOM::GEOM_Object_ptr findObjectInFather( GEOM::GEOM_Object_ptr theFather, const QString& theName );
// function : getNewObjectName()
// purpose : returns contents of Name field
//=================================================================================
-const char* GEOMBase_Skeleton::getNewObjectName() const
+QString GEOMBase_Skeleton::getNewObjectName() const
{
- return myMainFrame->ResultName->text().toLatin1().constData();
+ return myMainFrame->ResultName->text();
}
//=================================================================================
/*! returns contents of "Name" field
*/
- virtual const char* getNewObjectName() const;
+ virtual QString getNewObjectName() const;
/*! returns id of a selected "constructor" radio button or '-1' in case of error
*/
_PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) );
if ( SO ) {
_PTR(StudyBuilder) aBuilder (study->studyDS()->NewBuilder());
- aBuilder->SetName( SO, getNewObjectName() );
+ aBuilder->SetName( SO, getNewObjectName().toLatin1().constData() );
}
}
}
for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it ) {
QString aName( "" );
if ( nbObjs > 1 ) {
- aName = strlen( getNewObjectName() ) ? GEOMBase::GetDefaultName( getNewObjectName() ) : GEOMBase::GetDefaultName( getPrefix( *it ) );
+ aName = getNewObjectName().length() ? GEOMBase::GetDefaultName( getNewObjectName() ) : GEOMBase::GetDefaultName( getPrefix( *it ) );
}
else {
aName = getNewObjectName();