From: stv Date: Fri, 3 Jun 2005 05:24:37 +0000 (+0000) Subject: Removed limit for minimum size of Plot2d window X-Git-Tag: T3_0_0_a1~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=513a8860e8ae211ccb2b63836838e18a800e41b7;p=modules%2Fgui.git Removed limit for minimum size of Plot2d window --- diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index da1d2c5a6..fa5105239 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -142,9 +142,9 @@ Plot2d_ViewFrame::Plot2d_ViewFrame( QWidget* parent, const QString& title ) myXMode( 0 ), myYMode( 0 ), mySecondY( false ) { /* Plot 2d View */ - QGridLayout* aLayout = new QGridLayout( this ); + QVBoxLayout* aLayout = new QVBoxLayout( this ); myPlot = new Plot2d_Plot2d( this ); - aLayout->addWidget( myPlot, 0, 0); + aLayout->addWidget( myPlot ); // createActions(); @@ -1687,13 +1687,24 @@ void Plot2d_Plot2d::getNextMarker( QwtSymbol::Style& typeMarker, QColor& color, */ } +QSizePolicy Plot2d_Plot2d::sizePolicy() const +{ + return QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); +} + +QSize Plot2d_Plot2d::sizeHint() const +{ + return QwtPlot::minimumSizeHint(); +} + /*! return minimum size for qwt plot */ QSize Plot2d_Plot2d::minimumSizeHint() const { - QSize aSize = QwtPlot::minimumSizeHint(); - return QSize(aSize.width()*3/4, aSize.height()); + return QSize( 0, 0 ); +// QSize aSize = QwtPlot::minimumSizeHint(); +// return QSize(aSize.width()*3/4, aSize.height()); } /*! Checks if marker belongs to any enitity diff --git a/src/Plot2d/Plot2d_ViewFrame.h b/src/Plot2d/Plot2d_ViewFrame.h index f02fbd1d6..1c5f3037d 100755 --- a/src/Plot2d/Plot2d_ViewFrame.h +++ b/src/Plot2d/Plot2d_ViewFrame.h @@ -151,7 +151,9 @@ public: return legend(); /* mpv: porting to the Qwt 4.2.0 */ #endif } - virtual QSize minimumSizeHint() const; + virtual QSize sizeHint() const; + virtual QSizePolicy sizePolicy() const; + virtual QSize minimumSizeHint() const; protected: bool existMarker( const QwtSymbol::Style typeMarker, const QColor& color, const Qt::PenStyle typeLine );