From: Pino Toscano Date: Fri, 16 Feb 2007 17:49:24 +0000 (+0000) Subject: API change: deprecated the constructor with the limits, in flavour of a simple constr... X-Git-Tag: v3.80.3~50 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=995a82ff6c4a31f23d6647a15d29d3e7d643b7b6;p=libqmvoc.git API change: deprecated the constructor with the limits, in flavour of a simple constructor; setLimits() is going to be used. svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=634247 --- diff --git a/kdeeduplot/kplotwidget.cpp b/kdeeduplot/kplotwidget.cpp index d8720af..013719e 100644 --- a/kdeeduplot/kplotwidget.cpp +++ b/kdeeduplot/kplotwidget.cpp @@ -91,6 +91,20 @@ KPlotWidget::KPlotWidget( QWidget *parent, double x1, double x2, double y1, doub setMinimumSize( 150, 150 ); } +KPlotWidget::KPlotWidget( QWidget * parent ) + : QFrame( parent ), d( new Private( this ) ) +{ + setAttribute( Qt::WA_NoBackground, true ); + + // sets the default limits + setLimits( 0.0, 1.0, 0.0, 1.0 ); + SecondDataRect = QRect(); //default: no secondary data rect + + setDefaultPaddings(); + + setMinimumSize( 150, 150 ); +} + KPlotWidget::~KPlotWidget() { qDeleteAll( ObjectList ); diff --git a/kdeeduplot/kplotwidget.h b/kdeeduplot/kplotwidget.h index 169a72d..42494fc 100644 --- a/kdeeduplot/kplotwidget.h +++ b/kdeeduplot/kplotwidget.h @@ -84,14 +84,15 @@ class KDEEDUPLOT_EXPORT KPlotWidget : public QFrame { Q_PROPERTY(bool objectToolTip READ areObjectToolTipsShown WRITE setShowObjectToolTips) public: /** - * @short Constructor. Sets the primary x and y limits in data units. - * @param parent the parent widget - * @param x1 the minimum X value in data units - * @param x2 the maximum X value in data units - * @param y1 the minimum Y value in data units - * @param y2 the maximum Y value in data units + * @deprecated use the normal constructor and setLimits() */ - KPlotWidget( QWidget *parent=0, double x1=0.0, double x2=1.0, double y1=0.0, double y2=1.0 ); + KDE_DEPRECATED KPlotWidget( QWidget *parent, double x1, double x2, double y1, double y2 ); + + /** + * Constructor. + * @param parent the parent widget + */ + explicit KPlotWidget( QWidget * parent = 0 ); /** * Destructor. diff --git a/widgets/kdeedu.widgets b/widgets/kdeedu.widgets index b6864b7..0e90aac 100644 --- a/widgets/kdeedu.widgets +++ b/widgets/kdeedu.widgets @@ -7,7 +7,6 @@ Init=new KComponentData("kdeeduwidgets"); ToolTip=A plot widget (KDE-Edu) WhatsThis=A widget for easily making 2-dimensional plots Group=Plot (KDE-Edu) -ConstructorArgs=(parent, 0.0, 1.0, 0.0, 1.0) [ExtDateEdit] ToolTip=spinbox-based extended date editor (KDE-Edu)