From: vsv Date: Fri, 11 Oct 2013 07:02:12 +0000 (+0000) Subject: Patch for PPGP X-Git-Tag: BR_hydro_v_0_3_1~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=97017956b9e7717ea4a86d22e6df78d9ec83953c;p=modules%2Fgui.git Patch for PPGP --- diff --git a/src/Plot2d/Plot2d_Curve.cxx b/src/Plot2d/Plot2d_Curve.cxx index facfa6882..615d5dfd8 100755 --- a/src/Plot2d/Plot2d_Curve.cxx +++ b/src/Plot2d/Plot2d_Curve.cxx @@ -159,6 +159,8 @@ void Plot2d_Curve::updatePlotItem( QwtPlotItem* theItem ) } else { aCurve->clearDeviationData(); } + } else { + aCurve->setData( NULL, NULL, 0 ); } } diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index b6ccc6d2c..76caaec02 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -3506,9 +3506,11 @@ bool Plot2d_ViewFrame::print( const QString& file, const QString& format ) const if( myPlot ) { QPaintDevice* pd = 0; - if( format=="PS" || format=="EPS" ) + if( format=="PS" || format=="EPS" || format == "PDF" ) { QPrinter* pr = new QPrinter( QPrinter::HighResolution ); + if(format == "PDF") + pr->setOutputFormat(QPrinter::PdfFormat); pr->setPageSize( QPrinter::A4 ); pr->setOutputFileName( file ); pr->setPrintProgram( "" ); diff --git a/src/Plot2d/Plot2d_ViewWindow.cxx b/src/Plot2d/Plot2d_ViewWindow.cxx index f4fa5e1bb..6df2c8a22 100755 --- a/src/Plot2d/Plot2d_ViewWindow.cxx +++ b/src/Plot2d/Plot2d_ViewWindow.cxx @@ -773,6 +773,7 @@ bool Plot2d_ViewWindow::dumpViewToFormat( const QImage& img, QString Plot2d_ViewWindow::filter() const { QStringList filters = SUIT_ViewWindow::filter().split( ";;", QString::SkipEmptyParts ); + filters << tr( "PDF_FILES" ); filters << tr( "POSTSCRIPT_FILES" ); filters << tr( "ENCAPSULATED_POSTSCRIPT_FILES" ); return filters.join( ";;" ); diff --git a/src/Plot2d/resources/Plot2d_msg_en.ts b/src/Plot2d/resources/Plot2d_msg_en.ts index f512d87d9..3f7bea97e 100644 --- a/src/Plot2d/resources/Plot2d_msg_en.ts +++ b/src/Plot2d/resources/Plot2d_msg_en.ts @@ -71,6 +71,10 @@ ENCAPSULATED_POSTSCRIPT_FILES Encapsulated PostScript files (*.eps) + + PDF_FILES + PDF files (*.pdf) + DSC_GLOBALPAN_VIEW Selection of a new center of the view @@ -771,4 +775,4 @@ Please, check input parameters!!! Scale factor - \ No newline at end of file + diff --git a/src/Plot2d/resources/Plot2d_msg_fr.ts b/src/Plot2d/resources/Plot2d_msg_fr.ts index cc78b0374..480806403 100755 --- a/src/Plot2d/resources/Plot2d_msg_fr.ts +++ b/src/Plot2d/resources/Plot2d_msg_fr.ts @@ -71,6 +71,10 @@ ENCAPSULATED_POSTSCRIPT_FILES Fichiers PostScript encapsulés (*.eps) + + PDF_FILES + Fichiers PDF (*.pdf) + DSC_GLOBALPAN_VIEW Sélection d'un nouveau centre de vue @@ -771,4 +775,4 @@ Merci de vérifier les paramètres d'entrée Facteur d'échelle - \ No newline at end of file + diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx index 07e412052..eac5e7515 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx @@ -53,6 +53,7 @@ #include #include +#include /*! \brief Get the currently active application. @@ -1522,51 +1523,6 @@ void SalomePyQt::helpContext( const QString& source, const QString& context ) ProcessVoidEvent( new TEvent( source, context ) ); } -/*! - \fn bool SalomePyQt::dumpView( const QString& filename ); - \brief Dump the contents of the currently active view window - to the image file in the specified format. - - For the current moment JPEG, PNG and BMP images formats are supported. - The image format is defined automatically by the file name extension. - By default, BMP format is used. - - \param filename image file name - \return operation status (\c true on success) -*/ - -class TDumpViewEvent: public SALOME_Event -{ -public: - typedef bool TResult; - TResult myResult; - QString myFileName; - TDumpViewEvent( const QString& filename ) - : myResult ( false ), myFileName( filename ) {} - virtual void Execute() - { - if ( LightApp_Application* anApp = getApplication() ) { - SUIT_ViewManager* vm = anApp->activeViewManager(); - if ( vm ) { - SUIT_ViewWindow* vw = vm->getActiveView(); - if ( vw ) { - QImage im = vw->dumpView(); - if ( !im.isNull() && !myFileName.isEmpty() ) { - QString fmt = SUIT_Tools::extension( myFileName ).toUpper(); - if ( fmt.isEmpty() ) fmt = QString( "BMP" ); // default format - if ( fmt == "JPG" ) fmt = "JPEG"; - myResult = im.save( myFileName, fmt.toLatin1() ); - } - } - } - } - } -}; -bool SalomePyQt::dumpView( const QString& filename ) -{ - return ProcessEvent( new TDumpViewEvent( filename ) ); -} - /*! \fn int SalomePyQt::defaultMenuGroup(); \brief Get detault menu group identifier which can be used when @@ -2336,6 +2292,75 @@ static SUIT_ViewWindow* getWnd( const int id ) return resWnd; } +/*! + \fn bool SalomePyQt::dumpView( const QString& filename, const int id = 0 ); + \brief Dump the contents of the id view window. If id is 0 then current active view is processed. + to the image file in the specified format. + + For the current moment JPEG, PNG and BMP images formats are supported. + The image format is defined automatically by the file name extension. + By default, BMP format is used. + + \param filename image file name + \return operation status (\c true on success) +*/ + +class TDumpViewEvent: public SALOME_Event +{ +public: + typedef bool TResult; + TResult myResult; + QString myFileName; + int myWndId; + TDumpViewEvent( const QString& filename, const int id ) + : myResult ( false ), myFileName( filename ), myWndId(id) {} + virtual void Execute() + { + SUIT_ViewWindow* wnd = NULL; + if(myWndId == 0) + { + if ( LightApp_Application* anApp = getApplication() ) { + SUIT_ViewManager* vm = anApp->activeViewManager(); + if ( vm ) + wnd = vm->getActiveView(); + } + myWndId = wnd->getId(); + } + else + { + wnd = dynamic_cast(getWnd( myWndId )); + } + if ( wnd ) { + QString fmt = SUIT_Tools::extension( myFileName ).toUpper(); + Plot2d_ViewWindow* wnd2D = dynamic_cast(wnd); + if(fmt == "PS" || fmt == "EPS" || fmt == "PDF") { + if(wnd2D) { + myResult = wnd2D->getViewFrame()->print(myFileName, fmt); + } else { + myResult = false; + } + } else { + if(wnd2D) { + qApp->postEvent( wnd2D->getViewFrame(), new QPaintEvent( QRect( 0, 0, wnd2D->getViewFrame()->width(), wnd2D->getViewFrame()->height() ) ) ); + qApp->postEvent( wnd2D, new QPaintEvent( QRect( 0, 0, wnd2D->width(), wnd2D->height() ) ) ); + qApp->processEvents(); + } + QImage im = wnd->dumpView(); + if ( !im.isNull() && !myFileName.isEmpty() ) { + if ( fmt.isEmpty() ) fmt = QString( "BMP" ); // default format + if ( fmt == "JPG" ) fmt = "JPEG"; + myResult = im.save( myFileName, fmt.toLatin1() ); + } + } + } + } +}; +bool SalomePyQt::dumpView( const QString& filename, const int id ) +{ + return ProcessEvent( new TDumpViewEvent( filename, id ) ); +} + + /*! \fn QList SalomePyQt::getViews(); \brief Get list of integer identifiers of all the currently opened views @@ -2571,9 +2596,12 @@ bool SalomePyQt::activateView( const int id ) } /*! - \fn int SalomePyQt::createView( const QString& type ); + \fn int SalomePyQt::createView( const QString& type, bool visible = true, const int width = 0, const int height = 0 ); \brief Create new view and activate it \param type viewer type + \param visible + \param width + \param height \return integer identifier of created view (or -1 if view could not be created) */ @@ -2583,27 +2611,47 @@ public: typedef int TResult; TResult myResult; QString myType; - TCreateView( const QString& theType ) + bool myVisible; + int myWidth; + int myHeight; + TCreateView( const QString& theType, bool visible, const int width, const int height ) : myResult( -1 ), - myType( theType ) {} + myType( theType ), + myVisible(visible), + myWidth(width), + myHeight(height) {} virtual void Execute() { LightApp_Application* app = getApplication(); if ( app ) - { - SUIT_ViewManager* viewMgr = app->createViewManager( myType ); - if ( viewMgr ) { - SUIT_ViewWindow* wnd = viewMgr->getActiveView(); - if ( wnd ) - myResult = wnd->getId(); + SUIT_ViewManager* viewMgr = app->createViewManager( myType ); + if ( viewMgr ) + { + SUIT_ViewWindow* wnd = viewMgr->getActiveView(); + if ( wnd ) { + wnd->setShown(myVisible); + if(!myVisible && myWidth == 0 && myHeight == 0) { + myWidth = 1024; + myHeight = 768; + } + if(myWidth > 0 && myHeight > 0) { + Plot2d_ViewWindow* wnd2D = dynamic_cast(wnd); + if(wnd2D) { + wnd2D->getViewFrame()->setGeometry(0,0,myWidth,myHeight); + } else { + wnd->setGeometry(0,0,myWidth,myHeight); + } + } + myResult = wnd->getId(); + } + } } - } } }; -int SalomePyQt::createView( const QString& type ) +int SalomePyQt::createView( const QString& type, bool visible, const int width, const int height ) { - return ProcessEvent( new TCreateView( type ) ); + return ProcessEvent( new TCreateView( type, visible, width, height ) ); } /*! @@ -2732,6 +2780,31 @@ int SalomePyQt::cloneView( const int id ) return ProcessEvent( new TCloneView( id ) ); } +/*! + \fn bool SalomePyQt::setViewVisible( const int id, const bool visible ) + \brief Set view visibility. + \param id window identifier + \param visible new visiblity +*/ + +void SalomePyQt::setViewVisible( const int id, const bool visible ) +{ + class TEvent: public SALOME_Event + { + int myWndId; + bool myVisible; + public: + TEvent( const int id, const bool visible ) + : myWndId( id ), myVisible( visible ) {} + virtual void Execute() + { + SUIT_ViewWindow* wnd = getWnd( myWndId ); + if ( wnd ) wnd->setVisible( myVisible ); + } + }; + ProcessVoidEvent( new TEvent( id, visible ) ); +} + /*! \fn bool SalomePyQt::isViewVisible( const int id ); \brief Check whether view is visible ( i.e. it is on the top of the views stack) @@ -3463,3 +3536,289 @@ QStringList SalomePyQt::getChildren( const QString& entry, const bool recursive { return ProcessEvent( new TGetChildrenEvent( entry, recursive ) ); } + + +/*! + \fn void SalomePyQt::displayCurve( const int id, Plot2d_Curve* theCurve ) + \brief Display theCurve in view + \param id window identifier + \param theCurve curve to display +*/ + +class TDisplayCurve: public SALOME_Event +{ +public: + int myWndId; + Plot2d_Curve* myCurve; + TDisplayCurve(const int id, Plot2d_Curve* theCurve) : myWndId(id), myCurve(theCurve) {} + virtual void Execute() { + Plot2d_ViewWindow* wnd = dynamic_cast(getWnd( myWndId )); + if ( wnd ) + { + wnd->getViewFrame()->displayCurve(myCurve); + } + } +}; +void SalomePyQt::displayCurve(const int id, Plot2d_Curve* theCurve) +{ + ProcessVoidEvent( new TDisplayCurve(id, theCurve) ); +} + +/*! + \fn void SalomePyQt::eraseCurve( const int id, Plot2d_Curve* theCurve ) + \brief Erase theCurve in view + \param id window identifier + \param theCurve curve to erase +*/ + +class TEraseCurve: public SALOME_Event +{ +public: + int myWndId; + Plot2d_Curve* myCurve; + TEraseCurve(const int id, Plot2d_Curve* theCurve) : myWndId(id), myCurve(theCurve) {} + virtual void Execute() { + Plot2d_ViewWindow* wnd = dynamic_cast(getWnd( myWndId )); + if ( wnd ) + { + wnd->getViewFrame()->eraseCurve(myCurve); + } + } +}; +void SalomePyQt::eraseCurve(const int id, Plot2d_Curve* theCurve) +{ + ProcessVoidEvent( new TEraseCurve(id, theCurve) ); +} + +/*! + \fn void SalomePyQt::deleteCurve( Plot2d_Curve* theCurve ) + \brief Delete theCurve from all views + \param theCurve curve to delete +*/ + +class TDeleteCurve: public SALOME_Event +{ +public: + Plot2d_Curve* myCurve; + TDeleteCurve(Plot2d_Curve* theCurve) : myCurve(theCurve) {} + virtual void Execute() { + LightApp_Application* app = getApplication(); + if ( app ) + { + STD_TabDesktop* tabDesk = dynamic_cast( app->desktop() ); + if ( tabDesk ) + { + QList wndlist = tabDesk->windows(); + SUIT_ViewWindow* wnd; + foreach ( wnd, wndlist ) + { + Plot2d_ViewWindow* aP2d = dynamic_cast(wnd); + if(aP2d) + { + aP2d->getViewFrame()->eraseObject(myCurve); + } + } + } + } + } +}; +void SalomePyQt::eraseCurve(Plot2d_Curve * theCurve) +{ + ProcessVoidEvent( new TDeleteCurve(theCurve) ); +} + +/*! + \brief updateCurves (repaint) curves in view window. +*/ +void SalomePyQt::updateCurves(const int id) +{ + class TEvent: public SALOME_Event + { + public: + int myWndId; + TEvent( const int id ) : myWndId( id ) {} + virtual void Execute() + { + Plot2d_ViewWindow* wnd = dynamic_cast(getWnd( myWndId )); + if ( wnd ) + { + wnd->getViewFrame()->DisplayAll(); + } + } + }; + ProcessVoidEvent( new TEvent(id) ); +} + +/*! + \fn QString SalomePyQt::getPlot2dTitle( const int id, ObjectType type = MainTitle ) + \brief Get title of corresponding type + \param id window identifier + \param type is type of title + \return title of corresponding type +*/ + +class TGetPlot2dTitle: public SALOME_Event +{ +public: + typedef QString TResult; + TResult myResult; + int myWndId; + ObjectType myType; + TGetPlot2dTitle(const int id, ObjectType type) : + myWndId(id), + myType(type) {} + virtual void Execute() { + Plot2d_ViewWindow* wnd = dynamic_cast(getWnd( myWndId )); + if ( wnd ) + { + myResult = wnd->getViewFrame()->getTitle((Plot2d_ViewFrame::ObjectType)myType); + } + } +}; +QString SalomePyQt::getPlot2dTitle(const int id, ObjectType type) +{ + return ProcessEvent( new TGetPlot2dTitle(id, type) ); +} + + +/*! + \fn void SalomePyQt::setPlot2dTitle( const int id, const QString& title, ObjectType type = MainTitle, bool show = true ) + \brief Set title of corresponding type + \param id window identifier + \param title + \param type is type of title + \param show +*/ + +class TSetPlot2dTitle: public SALOME_Event +{ +public: + int myWndId; + Plot2d_Curve* myCurve; + QString myTitle; + ObjectType myType; + bool myShow; + TSetPlot2dTitle(const int id, const QString& title, ObjectType type, bool show) : + myWndId(id), + myTitle(title), + myType(type), + myShow(show) {} + virtual void Execute() { + Plot2d_ViewWindow* wnd = dynamic_cast(getWnd( myWndId )); + if ( wnd ) + { + wnd->getViewFrame()->setTitle(myShow, myTitle, (Plot2d_ViewFrame::ObjectType)myType, false); + } + } +}; +void SalomePyQt::setPlot2dTitle(const int id, const QString& title, ObjectType type, bool show) +{ + ProcessVoidEvent( new TSetPlot2dTitle(id, title, type, show) ); +} + +/*! + \fn QList SalomePyQt::getPlot2dFitRangeByCurves( const int id ) + \brief Get list of Plot2d view ranges + \param id window identifier + \return list of view ranges (XMin, XMax, YMin, YMax) +*/ + +class TFitRangeByCurves: public SALOME_Event +{ +public: + typedef QList TResult; + TResult myResult; + int myWndId; + TFitRangeByCurves( const int id ) + : myWndId( id ) {} + virtual void Execute() + { + myResult.clear(); + Plot2d_ViewWindow* wnd = dynamic_cast(getWnd( myWndId )); + if ( wnd ) + { + double XMin, XMax, YMin, YMax, Y2Min, Y2Max; + wnd->getViewFrame()->getFitRangeByCurves(XMin, XMax, YMin, YMax, Y2Min, Y2Max); + myResult.append(XMin); + myResult.append(XMax); + myResult.append(YMin); + myResult.append(YMax); + } + } +}; +QList SalomePyQt::getPlot2dFitRangeByCurves( const int id ) +{ + return ProcessEvent( new TFitRangeByCurves( id ) ); +} + +/*! + \fn QList SalomePyQt::getPlot2dFitRangeCurrent( const int id ) + \brief Get list of current Plot2d view ranges + \param id window identifier + \return list of view ranges (XMin, XMax, YMin, YMax) +*/ + +class TFitRangeCurrent: public SALOME_Event +{ +public: + typedef QList TResult; + TResult myResult; + int myWndId; + TFitRangeCurrent( const int id ) + : myWndId( id ) {} + virtual void Execute() + { + myResult.clear(); + Plot2d_ViewWindow* wnd = dynamic_cast(getWnd( myWndId )); + if ( wnd ) + { + double XMin, XMax, YMin, YMax, Y2Min, Y2Max; + wnd->getViewFrame()->getFitRanges(XMin, XMax, YMin, YMax, Y2Min, Y2Max); + myResult.append(XMin); + myResult.append(XMax); + myResult.append(YMin); + myResult.append(YMax); + } + } +}; +QList SalomePyQt::getPlot2dFitRangeCurrent( const int id ) +{ + return ProcessEvent( new TFitRangeCurrent( id ) ); +} + +/*! + \fn void SalomePyQt::setPlot2dFitRange( const int id, const double XMin, const double XMax, const double YMin, const double YMax ) + \brief Set range of Plot2d view + \param id window identifier + \param XMin + \param XMax + \param YMin + \param YMax +*/ + +class TPlot2dFitRange: public SALOME_Event +{ +public: + int myWndId; + double myXMin; + double myXMax; + double myYMin; + double myYMax; + TPlot2dFitRange(const int id, const double XMin, const double XMax, const double YMin, const double YMax) : + myWndId(id), + myXMin(XMin), + myXMax(XMax), + myYMin(YMin), + myYMax(YMax) {} + virtual void Execute() { + Plot2d_ViewWindow* wnd = dynamic_cast(getWnd( myWndId )); + if ( wnd ) + { + wnd->getViewFrame()->fitData(0, myXMin, myXMax, myYMin, myYMax); + } + } +}; +void SalomePyQt::setPlot2dFitRange(const int id, const double XMin, const double XMax, const double YMin, const double YMax) +{ + ProcessVoidEvent( new TPlot2dFitRange(id, XMin, XMax, YMin, YMax) ); +} diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h index 561b5d475..9f7247fb0 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h @@ -34,6 +34,7 @@ #include #include +#include class LightApp_SelectionMgr; class QMenuBar; @@ -42,6 +43,7 @@ class QWidget; class QAction; class QTreeView; class QtxActionGroup; +class Plot2d_Curve; class SALOME_Selection : public QObject { @@ -115,6 +117,18 @@ enum Action { SplitAt = 2 //!< the view area is splitted in such a way, that specified view and all views which follow it, are moved to the new area }; +//! Type of titles in Plot3d View +enum ObjectType +{ + MainTitle = Plot2d_ViewFrame::MainTitle, + XTitle = Plot2d_ViewFrame::XTitle, + YTitle = Plot2d_ViewFrame::YTitle, + Y2Title = Plot2d_ViewFrame::Y2Title, + XAxis = Plot2d_ViewFrame::XAxis, + YAxis = Plot2d_ViewFrame::YAxis, + Y2Axis = Plot2d_ViewFrame::Y2Axis +}; + class SalomePyQt { public: @@ -161,7 +175,7 @@ public: static void helpContext( const QString&, const QString& ); - static bool dumpView( const QString& ); + static bool dumpView( const QString&, const int = 0 ); static int defaultMenuGroup(); @@ -228,10 +242,11 @@ public: static QString getViewTitle( const int ); static QList findViews( const QString& ); static bool activateView( const int ); - static int createView( const QString& ); + static int createView( const QString&, bool visible = true, const int width = 0, const int height = 0 ); static int createView( const QString&, QWidget* ); static bool closeView( const int ); static int cloneView( const int ); + static void setViewVisible( const int id, bool visible = true ); static bool isViewVisible( const int ); static void setViewClosable( const int, const bool ); static bool isViewClosable( const int ); @@ -241,6 +256,16 @@ public: static bool moveView( const int, const int, const bool ); static QList neighbourViews( const int ); + static void displayCurve(const int, Plot2d_Curve*); + static void eraseCurve(const int, Plot2d_Curve*); + static void eraseCurve(Plot2d_Curve*); + static void updateCurves( const int ); + static QString getPlot2dTitle(const int, ObjectType = MainTitle); + static void setPlot2dTitle(const int, const QString&, ObjectType = MainTitle, bool = true); + static QList getPlot2dFitRangeByCurves(const int); + static QList getPlot2dFitRangeCurrent(const int); + static void setPlot2dFitRange(const int, const double XMin, const double XMax, const double YMin, const double YMax); + // the following methods are obsolete static void addStringSetting( const QString&, const QString&, bool = true ); static void addIntSetting ( const QString&, const int, bool = true ); diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip index ecf50e17c..161c378c5 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip @@ -33,6 +33,7 @@ #include #include #include +#include %End class SALOME_Selection : QObject @@ -196,6 +197,62 @@ private: QtxActionGroup( const QtxActionGroup& ); }; +enum ObjectType +{ + MainTitle, + XTitle, + YTitle, + Y2Title, + XAxis, + YAxis, + Y2Axis +}; + +class Plot2d_Curve +{ +%TypeHeaderCode +#include +%End + +%ConvertToSubClassCode + if ( dynamic_cast( sipCpp ) ) + sipClass = sipClass_Plot2d_Curve; + else + sipClass = NULL; +%End + +public: + Plot2d_Curve(); + virtual ~Plot2d_Curve(); + void setName( const QString& ); + void addPoint( double, double ); + void addPoints(SIP_PYLIST X, SIP_PYLIST Y); +%MethodCode + int nx = PyList_Size(a0); + int ny = PyList_Size(a1); + + if( nx != ny ) { + PyErr_Format(PyExc_TypeError,"The dimention of x and y should be the same. It is %d and %d currently.", nx, ny); + } + + int i; + PyObject *pX, *pY; + + for (i=0; iaddPoint(aX, aY); + } +%End + void insertPoint( int, double, double ); + void deletePoint( int ); + void clearAllPoints(); +}; + class SalomePyQt { %TypeHeaderCode @@ -250,7 +307,7 @@ public: static QIcon loadIcon( const QString&, const QString& ) /ReleaseGIL/ ; static void helpContext( const QString&, const QString& ) /ReleaseGIL/ ; - static bool dumpView( const QString& ) /ReleaseGIL/ ; + static bool dumpView( const QString&, const int = 0 ) /ReleaseGIL/ ; static int defaultMenuGroup() /ReleaseGIL/ ; @@ -329,10 +386,11 @@ public: static QString getViewTitle( const int ) /ReleaseGIL/ ; static QList findViews( const QString& ) /ReleaseGIL/ ; static bool activateView( const int ) /ReleaseGIL/ ; - static int createView( const QString& ) /ReleaseGIL/ ; + static int createView( const QString&, bool visible = true, const int width = 0, const int height = 0 ) /ReleaseGIL/ ; static int createView( const QString&, QWidget* ) /ReleaseGIL/ ; static bool closeView( const int ) /ReleaseGIL/ ; static int cloneView( const int ) /ReleaseGIL/ ; + static void setViewVisible( const int id, bool visible = true ) /ReleaseGIL/ ; static bool isViewVisible( const int id ) /ReleaseGIL/ ; static void setViewClosable( const int id, const bool ) /ReleaseGIL/ ; static bool isViewClosable( const int id ) /ReleaseGIL/ ; @@ -341,4 +399,14 @@ public: static bool splitView( const int, Orientation, Action ) /ReleaseGIL/ ; static bool moveView( const int, const int, const bool ) /ReleaseGIL/ ; static QList neighbourViews( const int ) /ReleaseGIL/ ; + + static void displayCurve(const int, Plot2d_Curve*) /ReleaseGIL/ ; + static void eraseCurve(const int, Plot2d_Curve*) /ReleaseGIL/ ; + static void eraseCurve(Plot2d_Curve*) /ReleaseGIL/ ; + static void updateCurves( const int ) /ReleaseGIL/ ; + static QString getPlot2dTitle(const int, ObjectType = MainTitle) /ReleaseGIL/ ; + static void setPlot2dTitle(const int, const QString&, ObjectType = MainTitle, bool = true) /ReleaseGIL/ ; + static QList getPlot2dFitRangeByCurves(const int) /ReleaseGIL/ ; + static QList getPlot2dFitRangeCurrent(const int) /ReleaseGIL/ ; + static void setPlot2dFitRange(const int, const double XMin, const double XMax, const double YMin, const double YMax ) /ReleaseGIL/ ; };