]> Git trees. - libqmvoc.git/commitdiff
Remove useless ctor and improve the order of the other
authorCarsten Niehaus <cniehaus@gmx.de>
Wed, 18 Oct 2006 15:44:06 +0000 (15:44 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Wed, 18 Oct 2006 15:44:06 +0000 (15:44 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=596819

kdeeduplot/kplotwidget.cpp
kdeeduplot/kplotwidget.h

index f9494eed11b3a93e418e1dbedb0aaa4a8074a736..dff2dbcaa538998a3afbb3e79882c79f5b7ddcb1 100644 (file)
 #define XPADDING 20
 #define YPADDING 20
 
-KPlotWidget::KPlotWidget( QWidget *parent )
- : QFrame( parent ), ShowGrid( false ), ShowObjectToolTips( true ), UseAntialias( false )
-{
-       setAttribute( Qt::WA_NoBackground, true );
-
-  double x1 = 0.0;
-  double x2 = 1.0;
-  double y1 = 0.0;
-  double y2 = 1.0;
-
-       // create the axes
-       mAxes[LeftAxis] = new KPlotAxis();
-       mAxes[BottomAxis] = new KPlotAxis();
-       mAxes[RightAxis] = new KPlotAxis();
-       mAxes[TopAxis] = new KPlotAxis();
-
-       //set DataRect
-       setLimits( x1, x2, y1, y2 );
-       SecondDataRect = QRect(); //default: no secondary data rect
-
-       //By default, the left and bottom axes have tickmark labels
-       axis(LeftAxis)->setShowTickLabels( true );
-       axis(BottomAxis)->setShowTickLabels( true );
-
-       setDefaultPaddings();
-
-       //default colors:
-       setBackgroundColor( Qt::black );
-       setForegroundColor( Qt::white );
-       setGridColor( Qt::gray );
-
-       setMinimumSize( 150, 150 );
-
-}
-
-KPlotWidget::KPlotWidget( double x1, double x2, double y1, double y2, QWidget *parent )
+KPlotWidget::KPlotWidget( QWidget *parent, double x1, double x2, double y1, double y2 )
  : QFrame( parent ), ShowGrid( false ), ShowObjectToolTips( true ), UseAntialias( false )
 {
        setAttribute( Qt::WA_NoBackground, true );
index 653de10e90d47bd099c475b5a609201991ff6887..c1339e3a4ccc065b272e0739cb8848dec87c781a 100644 (file)
@@ -53,7 +53,7 @@ class KPlotObject;
  *
  *Example of usage:
  *
- *  KPlotWidget *kpw = new KPlotWidget( 0.0, 1.0, 0.0, 1.0, this );
+ *  KPlotWidget *kpw = new KPlotWidget( this, 0.0, 1.0, 0.0, 1.0 );
  *  KPlotObject *kpo = new KPlotObject( "parabola", QColor(Qt::red), KPlotObject::CURVE );
  *
  *  //Add points to kpo:
@@ -84,19 +84,13 @@ class EDUPLOT_EXPORT KPlotWidget : public QFrame {
 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
-        * @param parent the parent widget
-        */
-       KPlotWidget( double x1=0.0, double x2=1.0, double y1=0.0, double y2=1.0, QWidget *parent=0 );
-       
-       /**
-        * @short Constructor. x and y limits will be set to 0.0 and 1.0 (min/max)
-        * @param parent the parent widget
         */
-  KPlotWidget( QWidget *parent=0 );
+       KPlotWidget( QWidget *parent=0, double x1=0.0, double x2=1.0, double y1=0.0, double y2=1.0 );
 
        /**
         * Destructor.