if( isRoot )
theMenu->addAction( action( EditLocalCSId ) );
+
+ if( anIsObjectBrowser && anOwners.size()==1 )
+ {
+ Handle( HYDROData_Object ) anObject = Handle( HYDROData_Object )::DownCast( aSeq.First() );
+ if( !anObject.IsNull() )
+ {
+ theMenu->addSeparator();
+ theMenu->addAction( action( SubmersibleId ) );
+ action( SubmersibleId )->setCheckable( true );
+ action( SubmersibleId )->setChecked( anObject->IsSubmersible() );
+ }
+ }
}
+ 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 );
+
+ int viewerGroup = addPreference( tr( "PREF_GROUP_VIEWER" ), genTab );
+ addPreference( tr( "PREF_VIEWER_AUTO_FITALL" ), viewerGroup,
+ LightApp_Preferences::Bool, "HYDRO", "auto_fit_all" );
+ }
+
+ QCursor HYDROGUI_Module::getPrefEditCursor() const
+ {
+ int aCursorType = SUIT_Session::session()->resourceMgr()->integerValue("preferences", "type_of_cursor", (int)CT_CrossCursor );
+ if ( aCursorType >= Qt::BlankCursor)
+ aCursorType++;
+ QCursor aCursor = QCursor( Qt::CursorShape(aCursorType) );
+ return aCursor;
+ }
+
void HYDROGUI_Module::update( const int flags )
{
- if( !isUpdateEnabled() )
+ if ( !isUpdateEnabled() )
return;
QApplication::setOverrideCursor( Qt::WaitCursor );