[kde-edu]: KDE/kdeedu/libkdeedu

Jason Harris kstars at 30doradus.org
Sun Dec 18 01:34:04 CET 2005


SVN commit 489303 by harris:

Fix in extdatetime.h: overloaded ExtDateTime::fromString() functions 
were ambiguous; fixed by removing a default parameter from one of them.

KPlotWidget must be derived from QFrame rather than QWidget, otherwise 
it is not usable in Qt designer.  In designer, you place a custom widget 
by using the widget's baseclass, and then "promoting" it.  However, 
designer does not provide a QWidget!  So, it would seem that custom 
widgets cannot be derived directly from QWidget.  This may be a bug in 
designer.

CCMAIL: kde-edu at kde.org
CCMAIL: kstars-devel at kde.org



 M  +1 -1      extdate/extdatetime.h  
 M  +1 -1      kdeeduplot/kplotwidget.cpp  
 M  +4 -5      kdeeduplot/kplotwidget.h  


--- trunk/KDE/kdeedu/libkdeedu/extdate/extdatetime.h #489302:489303
@@ -167,7 +167,7 @@
     static ExtDateTime currentDateTime( Qt::TimeSpec );
 #ifndef QT_NO_DATESTRING
     static ExtDateTime fromString( const QString& s );
-    static ExtDateTime fromString( const QString& s, Qt::DateFormat f = Qt::TextDate );
+    static ExtDateTime fromString( const QString& s, Qt::DateFormat f );
 #endif
 private:
     ExtDate  d;
--- trunk/KDE/kdeedu/libkdeedu/kdeeduplot/kplotwidget.cpp #489302:489303
@@ -28,7 +28,7 @@
 #include "kplotobject.h"
 
 KPlotWidget::KPlotWidget( double x1, double x2, double y1, double y2, QWidget *parent )
- : QWidget( parent, Qt::WNoAutoErase ),
+ : QFrame( parent ),
    dXtick(0.0), dYtick(0.0),
    nmajX(0), nminX(0), nmajY(0), nminY(0),
    ShowTickMarks( true ), ShowTickLabels( true ), ShowGrid( false )
--- trunk/KDE/kdeedu/libkdeedu/kdeeduplot/kplotwidget.h #489302:489303
@@ -18,10 +18,9 @@
 #ifndef KPLOTWIDGET_H
 #define KPLOTWIDGET_H
 
-#include <qcolor.h>
-#include <qrect.h>
-#include <qwidget.h>
-#include <qlist.h>
+#include <QFrame>
+#include <QList>
+
 #include "kplotaxis.h"
 
 #define BIGTICKSIZE 10
@@ -45,7 +44,7 @@
  * @version 1.1
  */
 
-class KDE_EXPORT KPlotWidget : public QWidget {
+class KDE_EXPORT KPlotWidget : public QFrame {
 	Q_OBJECT
 public:
 	/**


More information about the kde-edu mailing list