tooltip="Select the part to import the document" />
</feature>
<feature id="Import" title="Import" tooltip="Import a file" icon="icons/Exchange/import.png"
- helpfile="importFeature.html"
- internal="1">
+ helpfile="importFeature.html" internal="1">
<file_selector id="file_path" title="Import file" path="">
<validator id="ExchangePlugin_ImportFormat" parameters="BREP|BRP:BREP,STEP|STP:STEP,IGES|IGS:IGES,XAO:XAO" />
</file_selector>
</feature>
<feature id="Export" title="Export" tooltip="Export to file" icon="icons/Exchange/export.png"
- helpfile="exportFeature.html">
+ helpfile="exportFeature.html" internal="1">
<source path="export_widget.xml" />
</feature>
<feature id="Dump" title="Dump" tooltip="Dump Python script" icon="icons/Exchange/dump.png"
QAction* SHAPERGUI::addDesktopCommand(const QString& theId, const QString& theTitle,
const QString& theTip, const QIcon& theIcon,
const QKeySequence& theKeys, bool isCheckable,
- const char* theMenuSourceText, const int theMenuPosition)
+ const char* theMenuSourceText,
+ const QString& theSubMenu,
+ const int theMenuPosition,
+ const int theSuibMenuPosition)
{
int aMenu = createMenu(tr(theMenuSourceText), -1, -1);
+ if (!theSubMenu.isNull())
+ aMenu = createMenu(theSubMenu, aMenu, -1, theSuibMenuPosition);
int aId = getNextCommandId();
myActionsList.append(aId);
virtual bool isFeatureOfNested(const QAction* theAction);
virtual QAction* addDesktopCommand(const QString& theId, const QString& theTitle,
- const QString& theTip, const QIcon& theIcon,
- const QKeySequence& theKeys, bool isCheckable,
- const char* theMenuSourceText,
- const int theMenuPosition = 10);
+ const QString& theTip, const QIcon& theIcon,
+ const QKeySequence& theKeys, bool isCheckable,
+ const char* theMenuSourceText, const QString& theSubMenu = QString(),
+ const int theMenuPosition = 10,
+ const int theSuibMenuPosition = -1) Standard_OVERRIDE;
virtual void addDesktopMenuSeparator(const char* theMenuSourceText,
const int theMenuPosition = 10);
//! \param isCheckable - is checkable or not
//! \param theKeys - hot keys
//! \param theMenuSourceText - a source text of the desktop menu
+ //! \param theSubMenu - a sub-menu name
//! \param theMenuPosition - a position of the command in the desktop menu
+ //! \param theSuibMenuPosition - a position of the sub-menu in the desktop menu
//! returns created action
virtual QAction* addDesktopCommand(const QString& theId, const QString& theTitle,
const QString& theTip, const QIcon& theIcon,
const QKeySequence& theKeys, bool isCheckable,
const char* theMenuSourceText,
- const int theMenuPosition = 10) = 0;
+ const QString& theSubMenu = QString(),
+ const int theMenuPosition = 10,
+ const int theSuibMenuPosition = -1) = 0;
//! Insert separator into Edit menu of SALOME desktop
virtual void addDesktopMenuSeparator(const char* theMenuSourceText,
#include <ExchangePlugin_ExportPart.h>
#include <ExchangePlugin_ImportPart.h>
#include <ExchangePlugin_Import.h>
+#include <ExchangePlugin_ExportFeature.h>
#include <GeomAPI_Pnt.h>
#include <GeomAPI_ShapeExplorer.h>
// Add commands to a file menu
- aAction = salomeConnector()->addDesktopCommand("SAVEAS_CMD", tr("Export native..."),
- tr("Export the current document into a native file"),
- QIcon(), QKeySequence(),
- false, "MEN_DESK_FILE");
- connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onSaveAs()));
-
- aAction = salomeConnector()->addDesktopCommand("OPEN_CMD", tr("Import native..."),
+ // Import sub-menu
+ aAction = salomeConnector()->addDesktopCommand("OPEN_CMD", tr("Part set..."),
tr("Import native file"),
QIcon(), QKeySequence(),
- false, "MEN_DESK_FILE");
+ false, "MEN_DESK_FILE", tr("Import"), 10, 10);
connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onOpen()));
- salomeConnector()->addDesktopMenuSeparator("MEN_DESK_FILE");
- aAction = salomeConnector()->addDesktopCommand("EXPORT_PART_CMD", tr("Export part..."),
- tr("Export a part of the current document into a file"),
- QIcon(), QKeySequence(),
- false, "MEN_DESK_FILE");
- connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onExportPart()));
-
- aAction = salomeConnector()->addDesktopCommand("IMPORT_PART_CMD", tr("Import part..."),
+ aAction = salomeConnector()->addDesktopCommand("IMPORT_PART_CMD", tr("Part..."),
tr("Import structure of a part"),
QIcon(), QKeySequence(),
- false, "MEN_DESK_FILE");
+ false, "MEN_DESK_FILE", tr("Import"), 10, 10);
connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onImportPart()));
- aAction = salomeConnector()->addDesktopCommand("IMPORT_SHAPE_CMD", tr("Import shape..."),
- tr("Import shape from a file"),
+ aAction = salomeConnector()->addDesktopCommand("IMPORT_SHAPE_CMD", tr("From CAD format..."),
+ tr("Import shape from a CAD format file"),
ModuleBase_IconFactory::loadIcon("icons/Exchange/import.png"),
- QKeySequence(), false, "MEN_DESK_FILE");
+ QKeySequence(), false, "MEN_DESK_FILE", tr("Import"), 10, 10);
connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onImportShape()));
- salomeConnector()->addDesktopMenuSeparator("MEN_DESK_FILE");
+ // Export sub-menu
+ aAction = salomeConnector()->addDesktopCommand("SAVEAS_CMD", tr("Part set..."),
+ tr("Export the current document into a native file"),
+ QIcon(), QKeySequence(),
+ false, "MEN_DESK_FILE", tr("Export"), 10, 11);
+ connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onSaveAs()));
+
+ aAction = salomeConnector()->addDesktopCommand("EXPORT_PART_CMD", tr("Part..."),
+ tr("Export a part of the current document into a file"),
+ QIcon(), QKeySequence(),
+ false, "MEN_DESK_FILE", tr("Export"), 10, 11);
+ connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onExportPart()));
+
+ aAction = salomeConnector()->addDesktopCommand("EXPORT_SHAPE_CMD", tr("To CAD format..."),
+ tr("Export shape to a CAD format file"),
+ ModuleBase_IconFactory::loadIcon("icons/Exchange/export.png"),
+ QKeySequence(), false, "MEN_DESK_FILE", tr("Export"), 10, 11);
+ connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onExportShape()));
#else
// File commands group
}
}
+//******************************************************
+void XGUI_Workshop::onExportShape()
+{
+ if (abortAllOperations()) {
+ ModuleBase_OperationFeature* anExportOp = dynamic_cast<ModuleBase_OperationFeature*>(
+ module()->createOperation(ExchangePlugin_ExportFeature::ID()));
+ myPropertyPanel->updateApplyPlusButton(anExportOp->feature());
+ operationMgr()->startOperation(anExportOp);
+ }
+}
+
//******************************************************
void XGUI_Workshop::onExportPart()
{
/// Import part structure from a file
void onImportPart();
- /// Import part structure from a file
+ /// Import shape from a file
void onImportShape();
/// Export features to a file
void onExportPart();
+ /// Export a shape to a file
+ void onExportShape();
+
#ifndef HAVE_SALOME
/// Exit application
void onExit();
<source>Windows</source>
<translation>Fenêtres</translation>
</message>
+ <message>
+ <source>Iso-lines...</source>
+ <translation>Iso-lines...</translation>
+ </message>
</context>
<context>
<name>XGUI_DataTree</name>
</message>
<message>
<source>Export native...</source>
- <translation>Exporter natif...</translation>
+ <translation type="vanished">Exporter natif...</translation>
</message>
<message>
<source>Export the current document into a native file</source>
</message>
<message>
<source>Import native...</source>
- <translation>Importer natif...</translation>
+ <translation type="vanished">Importer natif...</translation>
</message>
<message>
<source>Import native file</source>
</message>
<message>
<source>Export part...</source>
- <translation>Partie export...</translation>
+ <translation type="vanished">Partie export...</translation>
</message>
<message>
<source>Export a part of the current document into a file</source>
</message>
<message>
<source>Import part...</source>
- <translation>Importer une partie...</translation>
+ <translation type="vanished">Importer une partie...</translation>
</message>
<message>
<source>Import structure of a part</source>
<translation>Structure d'importation d'une pièce</translation>
</message>
+ <message>
+ <source>Part set...</source>
+ <translation>Ensemble de parties...</translation>
+ </message>
+ <message>
+ <source>Import</source>
+ <translation>Importation</translation>
+ </message>
+ <message>
+ <source>Part...</source>
+ <translation>Partie...</translation>
+ </message>
+ <message>
+ <source>From CAD format...</source>
+ <translation>A partir du format CAO...</translation>
+ </message>
+ <message>
+ <source>Import shape from a CAD format file</source>
+ <translation>Importer une forme à partir d'un fichier au format CAO</translation>
+ </message>
+ <message>
+ <source>Export</source>
+ <translation>Exporter</translation>
+ </message>
+ <message>
+ <source>To CAD format...</source>
+ <translation>Au format CAO...</translation>
+ </message>
+ <message>
+ <source>Number of Iso-lines</source>
+ <translation>Nombre de Iso-lignes</translation>
+ </message>
+ <message>
+ <source>Export shape to a CAD format file</source>
+ <translation>Exportation de la forme vers un fichier au format CAO</translation>
+ </message>
</context>
</TS>