fuse_collinear_edges.png
geometry.png
import_picture.png
+ import.png
limit_tolerance.png
line.png
line2points.png
}
// get icon
QString prefix = plugin_name.isEmpty() ? "GEOM" : plugin_name;
- icon = resMgr->loadPixmap( prefix, tr( ("ICO_"+name).toLatin1().constData() ), false );
+ if ( name.startsWith( "Import"))
+ icon = resMgr->loadPixmap( "GEOM", tr("ICO_IMPORT_SHAPE"), true );
+ else
+ icon = resMgr->loadPixmap( prefix, tr( ("ICO_"+name).toLatin1().constData() ), false );
// translate operation name
operationName = tr( ("MEN_"+name).toLatin1().constData() );
<source>ICO_TRANSFER_DATA</source>
<translation>transfer_data.png</translation>
</message>
+ <message>
+ <source>ICO_IMPORT_SHAPE</source>
+ <translation>import.png</translation>
+ </message>
<message>
<source>ICON_DLG_POINT_FACE</source>
<translation>pointonface.png</translation>
return 1;
}
-IMPLEMENT_STANDARD_HANDLE (XAOPlugin_Driver, TFunction_Driver);
-IMPLEMENT_STANDARD_RTTIEXT(XAOPlugin_Driver, TFunction_Driver);
+//=======================================================================
+//function : GetCreationInformation
+//purpose : Returns a name of creation operation and names and values of
+// creation parameters
+//=======================================================================
+
+bool XAOPlugin_Driver::GetCreationInformation(std::string& theOperationName,
+ std::vector<GEOM_Param>& theParams)
+{
+ if (Label().IsNull()) return false;
+ Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
+
+ theOperationName = "ImportXAO";
+ AddParam( theParams, "File name", function->GetString( GetFileNameTag() ));
+ return true;
+}
+
+IMPLEMENT_STANDARD_HANDLE (XAOPlugin_Driver, GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT(XAOPlugin_Driver, GEOM_BaseDriver);
#ifndef _XAOPlugin_Driver_HXX
#define _XAOPlugin_Driver_HXX
-// OCCT includes
-#include <TFunction_Driver.hxx>
+#include "GEOM_BaseDriver.hxx"
-DEFINE_STANDARD_HANDLE(XAOPlugin_Driver, TFunction_Driver);
+DEFINE_STANDARD_HANDLE(XAOPlugin_Driver, GEOM_BaseDriver);
-class XAOPlugin_Driver: public TFunction_Driver
+class XAOPlugin_Driver: public GEOM_BaseDriver
{
public:
XAOPlugin_Driver();
Standard_Boolean MustExecute(const TFunction_Logbook&) const;
virtual void Validate(TFunction_Logbook&) const {}
-DEFINE_STANDARD_RTTI(XAOPlugin_Driver)
+ virtual bool GetCreationInformation(std::string& theOperationName,
+ std::vector<GEOM_Param>& theParams);
+
+ static int GetFileNameTag() { return 1; } // where to store file name in GEOM_Function
+
+ DEFINE_STANDARD_RTTI(XAOPlugin_Driver)
};
#endif // _XAOPlugin_Driver_HXX
if (function.IsNull()) return false;
if (function->GetDriverGUID() != XAOPlugin_Driver::GetID()) return false;
+ function->SetString( XAOPlugin_Driver::GetFileNameTag(), fileName );
+
// set the geometry
if (xaoGeometry->getFormat() == XAO::BREP)
{