mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-25 17:00:35 +05:00
[bos #35160][EDF](2023-T1) Keyboard shortcuts.
The branch must be synchronized with GUI:/dish/CR35160--Keyboard_Shortcuts. Most of GEOM module actions are available for shortcut binding using UI.
This commit is contained in:
parent
20db2ca25d
commit
bbafce4b04
@ -32,6 +32,7 @@ SET( _res_files
|
||||
GEOMDS_Resources
|
||||
ShHealing
|
||||
Y14.5M-2009.ttf
|
||||
action_assets.json
|
||||
3dsketch.png
|
||||
isoline.png
|
||||
isoline_v.png
|
||||
@ -319,7 +320,3 @@ SALOME_CONFIGURE_FILE(GEOMCatalog.xml.in GEOMCatalog.xml INSTALL ${SALOME_GEOM_I
|
||||
SALOME_CONFIGURE_FILE(SalomeApp.xml.in SalomeApp.xml INSTALL ${SALOME_GEOM_INSTALL_RES_DATA})
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml RENAME SalomeAppSL.xml DESTINATION ${SALOME_GEOM_INSTALL_RES_DATA})
|
||||
SALOME_CONFIGURE_FILE(Plugin.in Plugin INSTALL ${SALOME_GEOM_INSTALL_RES_DATA})
|
||||
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
3283
resources/action_assets.json
Normal file
3283
resources/action_assets.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -914,9 +914,10 @@ void GeometryGUI::OnMousePress( SUIT_ViewWindow* w, QMouseEvent* e )
|
||||
//=======================================================================
|
||||
// function : createGeomAction
|
||||
// purpose :
|
||||
// \param inModuleActionID is passed further without modifications. It is required by SUIT_ShortcutMgr.
|
||||
//=======================================================================
|
||||
void GeometryGUI::createGeomAction( const int id, const QString& label, const QString& icolabel,
|
||||
const int accel, const bool toggle, const QString& shortcutAction )
|
||||
const int accel, const bool toggle, const QString& inModuleActionID )
|
||||
{
|
||||
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||
QPixmap icon = icolabel.isEmpty() ? resMgr->loadPixmap( "GEOM", tr( (QString( "ICO_" )+label).toLatin1().constData() ), false )
|
||||
@ -930,7 +931,18 @@ void GeometryGUI::createGeomAction( const int id, const QString& label, const QS
|
||||
application()->desktop(),
|
||||
toggle,
|
||||
this, SLOT( OnGUIEvent() ),
|
||||
shortcutAction );
|
||||
inModuleActionID );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : createGeomAction
|
||||
// purpose :
|
||||
// Generates in module action automatically.
|
||||
//=======================================================================
|
||||
void GeometryGUI::createGeomAction( const int id, const QString& label, const QString& icolabel,
|
||||
const int accel, const bool toggle)
|
||||
{
|
||||
createGeomAction( id, label, icolabel, accel, toggle, QString( "STB_%1" ).arg( label ) );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -1192,15 +1204,15 @@ void GeometryGUI::initialize( CAM_Application* app )
|
||||
|
||||
// Create actions for increase/decrease transparency shortcuts
|
||||
createGeomAction( GEOMOp::OpIncrTransparency, "", "", 0, false,
|
||||
"Geometry:Increase transparency");
|
||||
"Transparency/Increase");
|
||||
createGeomAction( GEOMOp::OpDecrTransparency, "", "", 0, false,
|
||||
"Geometry:Decrease transparency");
|
||||
"Transparency/Decrease");
|
||||
|
||||
// Create actions for increase/decrease number of isolines
|
||||
createGeomAction( GEOMOp::OpIncrNbIsos, "", "", 0, false,
|
||||
"Geometry:Increase number of isolines");
|
||||
"Isolines/Increase number");
|
||||
createGeomAction( GEOMOp::OpDecrNbIsos, "", "", 0, false,
|
||||
"Geometry:Decrease number of isolines");
|
||||
"Isolines/Decrease number");
|
||||
|
||||
//createGeomAction( GEOMOp::OpPipeTShape, "PIPETSHAPE" );
|
||||
//createGeomAction( GEOMOp::OpDividedDisk, "DIVIDEDDISK" );
|
||||
@ -1830,11 +1842,12 @@ void GeometryGUI::addPluginActions()
|
||||
icon,
|
||||
tr( actionName.toLatin1().constData() ),
|
||||
tr( actionStat.toLatin1().constData() ),
|
||||
QKeySequence( tr( adata.accel.c_str() ) ),
|
||||
QKeySequence( tr( adata.accel.c_str() ) ), // Applied, if does not conflict with shortcuts in SUIT_ShortcutMgr.
|
||||
application()->desktop(),
|
||||
false /*toggle*/,
|
||||
this, SLOT( OnGUIEvent() ),
|
||||
QString() /*shortcutAction*/ );
|
||||
QString::fromStdString(pdata.name + "/" + adata.label)
|
||||
);
|
||||
|
||||
int menuId = -1;
|
||||
foreach ( QString subMenu, smenus ) {
|
||||
|
@ -195,10 +195,14 @@ protected:
|
||||
private:
|
||||
GEOMGUI* getLibrary( const QString& libraryName );
|
||||
GEOMPluginGUI* getPluginLibrary( const QString& libraryName );
|
||||
void createGeomAction( const int id, const QString& po_id,
|
||||
const QString& icon_id,
|
||||
const int key, const bool toggle,
|
||||
const QString& shortcutAction);
|
||||
void createGeomAction( const int id, const QString& po_id,
|
||||
const QString& icon_id = QString(""),
|
||||
const int key = 0, const bool toggle = false,
|
||||
const QString& shortcutAction = QString() );
|
||||
const int key = 0, const bool toggle = false);
|
||||
|
||||
void createPopupItem( const int, const QString& clients, const QString& types,
|
||||
const bool isSingle = false, const int isVisible = -1,
|
||||
const bool isExpandAll = false, const bool isOCC = false,
|
||||
|
Loading…
Reference in New Issue
Block a user