#include <SUIT_Study.h>
#include <SUIT_ViewManager.h>
#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
#include <SVTK_ViewManager.h>
#include <SVTK_ViewModel.h>
theMenu->addAction( action( EditLocalCSId ) );
}
+void HYDROGUI_Module::createPreferences()
+{
+ int genTab = addPreference( tr( "PREF_TAB_GENERAL" ) );
+ int CursorGroup = addPreference( tr( "PREF_GROUP_CURSOR" ), genTab );
+
+ int typeOfCursor = addPreference( tr( "PREF_TYPE_OF_CURSOR" ), CursorGroup,
+ LightApp_Preferences::Selector, "preferences", "type_of_cursor" );
+
+ // Set property cursor type
+ QList<QVariant> aCursorTypeIndicesList;
+ QList<QVariant> aCursorTypeIconsList;
+
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ for ( int i = CT_ArrowCursor; i < CT_User; i++ ) {
+ QString icoFile = QString( "ICON_CURSOR_%1" ).arg( i+1 );
+ QPixmap pixmap = resMgr->loadPixmap( "HYDRO", tr( qPrintable( icoFile ) ) );
+ aCursorTypeIndicesList << i;
+ aCursorTypeIconsList << pixmap;
+ }
+
+ setPreferenceProperty( typeOfCursor, "indexes", aCursorTypeIndicesList );
+ setPreferenceProperty( typeOfCursor, "icons", aCursorTypeIconsList );
+}
+
void HYDROGUI_Module::update( const int flags )
{
if( !isUpdateEnabled() )
enum CustomEvent { NewViewEvent = QEvent::User + 100 };
+ enum CursorType
+ {
+ CT_ArrowCursor = 0,
+ CT_UpArrowCursor,
+ CT_CrossCursor,
+ CT_IBeamCursor,
+ CT_WaitCursor,
+ CT_BusyCursor,
+ CT_ForbiddenCursor,
+ CT_PointingHandCursor,
+ CT_WhatsThisCursor,
+ CT_SizeVerCursor,
+ CT_SizeHorCursor,
+ CT_SizeBDiagCursor,
+ CT_SizeFDiagCursor,
+ CT_SizeAllCursor,
+ CT_SplitVCursor,
+ CT_SplitHCursor,
+ CT_OpenHandCursor,
+ CT_ClosedHandCursor,
+ CT_User
+ };
+
public:
enum ViewManagerRole
virtual void viewManagers( QStringList& ) const;
virtual void contextMenuPopup( const QString&, QMenu*, QString& );
+ virtual void createPreferences();
virtual void update( const int );
virtual void updateCommandsStatus();
<translation>icon_profile_interpolate_image.png</translation>
</message>
+ <!-- Cursors icons -->
+ <message>
+ <source>ICON_CURSOR_1</source>
+ <translation>icon_cursor_1.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_2</source>
+ <translation>icon_cursor_2.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_3</source>
+ <translation>icon_cursor_3.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_4</source>
+ <translation>icon_cursor_4.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_5</source>
+ <translation>icon_cursor_5.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_6</source>
+ <translation>icon_cursor_6.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_7</source>
+ <translation>icon_cursor_7.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_8</source>
+ <translation>icon_cursor_8.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_9</source>
+ <translation>icon_cursor_9.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_10</source>
+ <translation>icon_cursor_10.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_11</source>
+ <translation>icon_cursor_11.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_12</source>
+ <translation>icon_cursor_12.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_13</source>
+ <translation>icon_cursor_13.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_14</source>
+ <translation>icon_cursor_14.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_15</source>
+ <translation>icon_cursor_15.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_16</source>
+ <translation>icon_cursor_16.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_17</source>
+ <translation>icon_cursor_17.png</translation>
+ </message>
+ <message>
+ <source>ICON_CURSOR_18</source>
+ <translation>icon_cursor_18.png</translation>
+ </message>
+
</context>
</TS>
<source>STREAM_PROFILES</source>
<translation>Profiles</translation>
</message>
+ <message>
+ <source>PREF_TAB_GENERAL</source>
+ <translation>General</translation>
+ </message>
+ <message>
+ <source>PREF_GROUP_CURSOR</source>
+ <translation>Cursor for edition operations</translation>
+ </message>
+ <message>
+ <source>PREF_TYPE_OF_CURSOR</source>
+ <translation>Type</translation>
+ </message>
</context>
<context>
<parameter value="${HYDRO_ROOT_DIR}/share/salome/resources/hydro" name="HYDROGUI" />
<parameter value="${GEOM_ROOT_DIR}/share/salome/resources/geom" name="GEOM"/>
</section>
+ <section name="preferences" >
+ <parameter name="type_of_cursor" value="2"/>
+ </section>
</document>