From f8ffe135fe12d9e037f9268ed5a8c94d9b1367a5 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 26 Oct 2005 07:40:45 +0000 Subject: [PATCH] This commit was generated by cvs2git to create tag 'ForTest2_3_1_0a2'. Sprout from master 2005-10-24 08:09:22 UTC mkr '*** empty log message ***' Cherrypick from master 2005-10-14 12:21:53 UTC asl 'PAL9994': src/Plot2d/Plot2d_ViewFrame.cxx src/Plot2d/Plot2d_ViewFrame.h src/SUIT/SUIT_Application.cxx Cherrypick from master 2005-10-26 07:40:44 UTC vsr 'Update version number: 3.1.0a2': INSTALL doc/salome/Makefile.in --- INSTALL | 4 +- doc/salome/Makefile.in | 41 ++++++++++++------- src/Plot2d/Plot2d_ViewFrame.cxx | 70 +++++++++++---------------------- src/Plot2d/Plot2d_ViewFrame.h | 8 ---- src/SUIT/SUIT_Application.cxx | 3 +- 5 files changed, 53 insertions(+), 73 deletions(-) diff --git a/INSTALL b/INSTALL index e8781467c..74fe5ad69 100644 --- a/INSTALL +++ b/INSTALL @@ -1,3 +1,3 @@ -This is the version 3.1.0a of SALOMEGUI +This is the version 3.1.0a2 of SALOMEGUI Compatible with : - - KERNEL 3.1.0a + - KERNEL 3.1.0a2 diff --git a/doc/salome/Makefile.in b/doc/salome/Makefile.in index 883f7641c..8f93f433b 100644 --- a/doc/salome/Makefile.in +++ b/doc/salome/Makefile.in @@ -1,33 +1,44 @@ -# Copyright (C) 2003 CEA/DEN, EDF R&D -# + +# -* Makefile *- # +# Author : Patrick GOLDBRONN (CEA) +# Date : 30/11/2001 +# $Header$ # -# File : Makefile.in -# Author : Vasily Rusyaev (Open Cascade NN) -# Module : doc -# $Header: - +# source path top_srcdir=@top_srcdir@ top_builddir=../.. srcdir=@srcdir@ VPATH=.:@srcdir@ +SUBDIRS= tui gui + @COMMENCE@ docs: - cp -fr $(srcdir)/GUI ./ - -find $(PWD) -name CVS -exec rm -rf {} \; + @@SETX@; for d in $(SUBDIRS); do \ + (cd $$d && $(MAKE) $@) || exit 1; \ + done; \ + cp -f $(srcdir)/GUI_index.html GUI_index.html clean: - rm -fr `ls | grep -v "Makefile"` + @@SETX@; for d in $(SUBDIRS); do \ + (cd $$d && $(MAKE) $@) || exit 1; \ + done distclean: clean - rm -fr GUI + @@SETX@; for d in $(SUBDIRS); do \ + (cd $$d && $(MAKE) $@) || exit 1; \ + done install: - mkdir -p $(docdir) - cp -rf GUI $(docdir) - -find $(PWD) -name CVS -exec rm -rf {} \; + $(MAKE) docs + (cd tui && $(MAKE) install); + (cd gui && $(MAKE) install); + cp -f GUI_index.html $(docdir) uninstall: - rm -rf $(docdir)/GUI + @@SETX@; for d in $(SUBDIRS); do \ + (cd $$d && $(MAKE) $@) || exit 1; \ + done; \ + rm -fr $(docdir)/GUI_index.html diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 4875b6a62..880ce2136 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -824,49 +824,6 @@ void Plot2d_ViewFrame::fitArea( const QRect& area ) myPlot->replot(); } -/*! - "Fit Data" command for TUI interface -*/ -void Plot2d_ViewFrame::fitData(const int mode, - const double xMin, const double xMax, - const double yMin, const double yMax, - double y2Min, double y2Max) -{ - if ( mode == 0 || mode == 2 ) { - myPlot->setAxisScale( QwtPlot::yLeft, yMax, yMin ); - if (mySecondY) - myPlot->setAxisScale( QwtPlot::yRight, y2Max, y2Min ); - } - if ( mode == 0 || mode == 1 ) - myPlot->setAxisScale( QwtPlot::xBottom, xMin, xMax ); - myPlot->replot(); -} - -/*! - Gets current fit ranges for view frame -*/ -void Plot2d_ViewFrame::getFitRanges(double& xMin,double& xMax, - double& yMin, double& yMax, - double& y2Min, double& y2Max) -{ - int ixMin = myPlot->canvasMap( QwtPlot::xBottom ).i1(); - int ixMax = myPlot->canvasMap( QwtPlot::xBottom ).i2(); - int iyMin = myPlot->canvasMap( QwtPlot::yLeft ).i1(); - int iyMax = myPlot->canvasMap( QwtPlot::yLeft ).i2(); - xMin = myPlot->invTransform(QwtPlot::xBottom, ixMin); - xMax = myPlot->invTransform(QwtPlot::xBottom, ixMax); - yMin = myPlot->invTransform(QwtPlot::yLeft, iyMin); - yMax = myPlot->invTransform(QwtPlot::yLeft, iyMax); - y2Min = 0; - y2Max = 0; - if (mySecondY) { - int iyMin = myPlot->canvasMap( QwtPlot::yRight ).i1(); - int iyMax = myPlot->canvasMap( QwtPlot::yRight ).i2(); - y2Min = myPlot->invTransform(QwtPlot::yRight, iyMin); - y2Max = myPlot->invTransform(QwtPlot::yRight, iyMax); - } -} - /*! Tests if it is necessary to start operation on mouse action */ @@ -1023,13 +980,34 @@ void Plot2d_ViewFrame::onSettings() void Plot2d_ViewFrame::onFitData() { Plot2d_FitDataDlg* dlg = new Plot2d_FitDataDlg( this, mySecondY ); - double xMin,xMax,yMin,yMax,y2Min,y2Max; - getFitRanges(xMin,xMax,yMin,yMax,y2Min,y2Max); + int ixMin = myPlot->canvasMap( QwtPlot::xBottom ).i1(); + int ixMax = myPlot->canvasMap( QwtPlot::xBottom ).i2(); + int iyMin = myPlot->canvasMap( QwtPlot::yLeft ).i1(); + int iyMax = myPlot->canvasMap( QwtPlot::yLeft ).i2(); + double xMin = myPlot->invTransform(QwtPlot::xBottom, ixMin); + double xMax = myPlot->invTransform(QwtPlot::xBottom, ixMax); + double yMin = myPlot->invTransform(QwtPlot::yLeft, iyMin); + double yMax = myPlot->invTransform(QwtPlot::yLeft, iyMax); + double y2Min = 0; + double y2Max = 0; + if (mySecondY) { + int iyMin = myPlot->canvasMap( QwtPlot::yRight ).i1(); + int iyMax = myPlot->canvasMap( QwtPlot::yRight ).i2(); + y2Min = myPlot->invTransform(QwtPlot::yRight, iyMin); + y2Max = myPlot->invTransform(QwtPlot::yRight, iyMax); + } dlg->setRange( xMin, xMax, yMin, yMax, y2Min, y2Max ); if ( dlg->exec() == QDialog::Accepted ) { int mode = dlg->getRange( xMin, xMax, yMin, yMax, y2Min, y2Max ); - fitData(mode,xMin,xMax,yMin,yMax,y2Min,y2Max); + if ( mode == 0 || mode == 2 ) { + myPlot->setAxisScale( QwtPlot::yLeft, yMax, yMin ); + if (mySecondY) + myPlot->setAxisScale( QwtPlot::yRight, y2Max, y2Min ); + } + if ( mode == 0 || mode == 1 ) + myPlot->setAxisScale( QwtPlot::xBottom, xMin, xMax ); + myPlot->replot(); } delete dlg; } diff --git a/src/Plot2d/Plot2d_ViewFrame.h b/src/Plot2d/Plot2d_ViewFrame.h index 6cc8ff364..bd5d988f8 100755 --- a/src/Plot2d/Plot2d_ViewFrame.h +++ b/src/Plot2d/Plot2d_ViewFrame.h @@ -51,14 +51,6 @@ public: void updateLegend( const Plot2d_Prs* prs ); void fitAll(); void fitArea( const QRect& area ); - void fitData(const int mode, - const double xMin, const double xMax, - const double yMin, const double yMax, - const double y2Min = 0, const double y2Max = 0); - - void getFitRanges(double& xMin, double& xMax, - double& yMin, double& yMax, - double& y2Min, double& y2Max); /* view parameters */ void copyPreferences( Plot2d_ViewFrame* ); diff --git a/src/SUIT/SUIT_Application.cxx b/src/SUIT/SUIT_Application.cxx index 380820055..f9d210d55 100755 --- a/src/SUIT/SUIT_Application.cxx +++ b/src/SUIT/SUIT_Application.cxx @@ -99,8 +99,7 @@ void SUIT_Application::putInfo ( const QString& msg, const int msec ) desktop()->statusBar()->addWidget(myStatusLabel, /*int stretch = */1); } myStatusLabel->setText(msg); - if( msec != -1 ) - QTimer::singleShot(msec <= 0 ? DEFAULT_MESSAGE_DELAY : msec, myStatusLabel, SLOT(clear())); + QTimer::singleShot(msec <= 0 ? DEFAULT_MESSAGE_DELAY : msec, myStatusLabel, SLOT(clear())); } } -- 2.39.2