DIST_SUBDIRS = idl adm_local resources src doc bin
-DISTCLEANFILES = a.out aclocal.m4 configure local-install.sh
+DISTCLEANFILES = a.out aclocal.m4 configure local-install.sh hack_libtool
salomeinclude_DATA = GUI_version.h
$(pwd)/hack_libtool \1 \"\$[@]\" \n\
}\n\
CC=\"hack_libtool\"%g" libtool
+sed -i "s%\(\s*\)for searchdir in \$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path; do%\1searchdirs=\"\$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path\"\n\1for searchdir in \$searchdirs; do%g" libtool
+sed -i "s%\(\s*\)searchdirs=\"\$newlib_search_path \$lib_search_path \(.*\)\"%\1searchdirs=\"\$newlib_search_path \$lib_search_path\"\n\1sss_beg=\"\"\n\1sss_end=\"\2\"%g" libtool
+sed -i "s%\(\s*\)\(for searchdir in \$searchdirs; do\)%\1for sss in \$searchdirs; do\n\1 if ! test -d \$sss; then continue; fi\n\1 ssss=\$(cd \$sss; pwd)\n\1 if test \"\$ssss\" != \"\" \&\& test -d \$ssss; then\n\1 case \$ssss in\n\1 /usr/lib | /usr/lib64 ) ;;\n\1 * ) sss_beg=\"\$sss_beg \$ssss\" ;;\n\1 esac\n\1 fi\n\1done\n\1searchdirs=\"\$sss_beg \$sss_end\"\n\1\2%g" libtool
],[])
# This list is initiated using autoscan and must be updated manually
side)</li>
<li><b>Y</b>: ordinate of the origin of the bar (from the bottom)</li>
</ul>
+<li><b>Distribution</b> in this menu you can Show/Hide distribution histogram of the values of the <b>Scalar Bar</b> and specify the <b>Coloring Type</b> of the histogram</li>
+<ul>
+<li><b>Multicolor</b> the histogram is colored as <b>Scalar Bar</b></li>
+<li><b>Monocolor</b> the histogram is colored as selected with <b>Distribution color</b> selector</li>
+<ul>
</ul>
*/
</message>
<message>
<source>PREF_ZOOMING_AT_CENTER</source>
- <translation>Relative to the view's center</translation>
+ <translation>Relative to the view's center</translation>
</message>
<message>
<source>PREF_ZOOMING_AT_CURSOR</source>
<translation>Preferences for module "%1" not supported</translation>
</message>
<message>
- <source>PREF_TAB_SHORTCUTS</source>
+ <source>PREF_TAB_SHORTCUTS</source>
<translation>Shortcuts</translation>
</message>
<message>
<source>PREF_KEYFREE_STYLE</source>
<translation>Style sans clavier</translation>
</message>
+ <message>
+ <source>PREF_ZOOMING</source>
+ <translation>Mode de zoom:</translation>
+ </message>
+ <message>
+ <source>PREF_ZOOMING_AT_CENTER</source>
+ <translation>Relatif au centre de la vue</translation>
+ </message>
+ <message>
+ <source>PREF_ZOOMING_AT_CURSOR</source>
+ <translation>Relatif au curseur</translation>
+ </message>
<message>
<source>PREF_INCREMENTAL_SPEED</source>
<translation>Incrément de vitesse:</translation>
<source>PREF_VIEWER_BACKGROUND</source>
<translation>Couleur de l'arrière-plan</translation>
</message>
+ <message>
+ <source>PREF_XYVIEWER_BACKGROUND</source>
+ <translation>Couleur de l'arrière-plan (vue XY)</translation>
+ </message>
+ <message>
+ <source>PREF_XZVIEWER_BACKGROUND</source>
+ <translation>Couleur de l'arrière-plan (vue XZ)</translation>
+ </message>
+ <message>
+ <source>PREF_YZVIEWER_BACKGROUND</source>
+ <translation>Couleur de l'arrière-plan (vue YZ)</translation>
+ </message>
+ <message>
+ <source>PREF_3DVIEWER_BACKGROUND</source>
+ <translation>Couleur de l'arrière-plan (vue 3D)</translation>
+ </message>
<message>
<source>PREF_FONT</source>
<translation>Police</translation>
}
}
+//**************************************************************************************
+void OCCViewer_ViewFrame::setZoomingStyle( const int i )
+{
+ foreach (OCCViewer_ViewWindow* aView, myViews) {
+ aView->setZoomingStyle(i);
+ }
+}
//**************************************************************************************
void OCCViewer_ViewFrame::connectViewSignals(OCCViewer_ViewWindow* theView)
virtual int interactionStyle() const { return getView(MAIN_VIEW)->interactionStyle(); }
virtual void setInteractionStyle( const int i );
+ virtual int zoomingStyle() const { return getView(MAIN_VIEW)->zoomingStyle(); }
+ virtual void setZoomingStyle( const int );
+
virtual void setViewManager( SUIT_ViewManager* );
virtual bool eventFilter(QObject* watched, QEvent* e) { return SUIT_ViewWindow::eventFilter(watched, e); }
case QEvent::Wheel:
{
QWheelEvent* aEvent = (QWheelEvent*) e;
- double aDelta = aEvent->delta();
- double aScale = (aDelta < 0) ? 100./(-aDelta) : aDelta/100.;
- myViewPort->getView()->SetZoom(aScale);
+ myViewPort->startZoomAtPoint( aEvent->x(), aEvent->y() );
+ double delta = (double)( aEvent->delta() ) / ( 15 * 8 );
+ int x = aEvent->x();
+ int y = aEvent->y();
+ int x1 = (int)( aEvent->x() + width()*delta/100 );
+ int y1 = (int)( aEvent->y() + height()*delta/100 );
+ myViewPort->zoom( x, y, x1, y1 );
}
return true;
virtual int interactionStyle() const;
virtual void setInteractionStyle( const int );
- int zoomingStyle() const;
- void setZoomingStyle( const int );
+ virtual int zoomingStyle() const;
+ virtual void setZoomingStyle( const int );
void setTransformEnabled( const OperationType, const bool );
bool transformEnabled( const OperationType ) const;
{
if ( event->button() == Qt::LeftButton ) {
QTextEdit::mouseReleaseEvent( event );
- copy();
+ //copy();
}
else if ( event->button() == Qt::MidButton ) {
QString text;
QString iPart = src.left( idx );
QString fPart = src.mid( idx + 1 );
+ QString ePart = "";
+ int idx1 = fPart.lastIndexOf( QRegExp( "e[+|-]?[0-9]+" ) );
+ if ( idx1 >= 0 ) {
+ ePart = fPart.mid( idx1 );
+ fPart = fPart.left( idx1 );
+ }
- while ( !fPart.isEmpty() && fPart.at( fPart.length() - 1 ) == '0' )
- fPart.remove( fPart.length() - 1, 1 );
+ fPart.remove( QRegExp( "0+$" ) );
QString res = iPart;
if ( !fPart.isEmpty() )
res += delim + fPart;
+ res += ePart;
return res;
}
v.setNotation( myPrecision >= 0 ? QDoubleValidator::StandardNotation :
QDoubleValidator::ScientificNotation );
- if ( overhead == 0 ) {
+ if ( overhead == 0 )
state = v.validate( str, pos );
- }
else
{
if ( str.length() >= overhead && str.startsWith( pref ) &&
x, y );
}
+/*!
+ To handle mouse wheel forward event (reimplemented from #vtkInteractorStyle)
+*/
+void SVTK_InteractorStyle::OnMouseWheelForward()
+{
+ int x, y;
+ GetEventPosition( this->Interactor, x, y );
+ myOtherPoint = QPoint(x, y);
+}
+
+/*!
+ To handle mouse wheel backward event (reimplemented from #vtkInteractorStyle)
+*/
+void SVTK_InteractorStyle::OnMouseWheelBackward()
+{
+ int x, y;
+ GetEventPosition( this->Interactor, x, y );
+ myOtherPoint = QPoint(x, y);
+}
+
/*!
To handle mouse move event
*/
//! To handle right mouse button up event (reimplemented from #vtkInteractorStyle)
virtual void OnRightButtonUp();
+ //! To handle mouse wheel forward event (reimplemented from #vtkInteractorStyle)
+ virtual void OnMouseWheelForward();
+
+ //! To handle mouse wheel backward event (reimplemented from #vtkInteractorStyle)
+ virtual void OnMouseWheelBackward();
+
//! To handle keyboard event (reimplemented from #vtkInteractorStyle)
virtual void OnChar();
{
activateWindow();
setFocus();
+ GetDevice()->SetEventInformationFlipY(event->x(),
+ event->y(),
+ event->modifiers() & Qt::ControlModifier,
+ event->modifiers() & Qt::ShiftModifier);
+ if ( event->delta()>0)
+ GetDevice()->MouseWheelForwardEvent();
+ else
+ GetDevice()->MouseWheelBackwardEvent();
}