[Kstars-devel] KDE/kdeedu/libkdeedu/extdate
Jason Harris
kstars at 30doradus.org
Sun Nov 13 06:01:29 CET 2005
SVN commit 480082 by harris:
Qt Designer wants widgets to have a ctor with only one argument: pointer
to the parent widget. Adding such a ctor to ExtDateEdit and
ExtDateTimeEdit.
CCMAIL: kstars-devel at kde.org
M +11 -1 extdatetimeedit.cpp
M +18 -8 extdatetimeedit.h
--- trunk/KDE/kdeedu/libkdeedu/extdate/extdatetimeedit.cpp #480081:480082
@@ -55,6 +55,11 @@
ExtDateEdit( ed, parent );
}
+ExtDateEdit::ExtDateEdit( QWidget *p ) {
+ ExtDate ed = ExtDate::currentDate();
+ ExtDateEdit( ed, p );
+}
+
ExtDateEdit::~ExtDateEdit() {
}
@@ -129,7 +134,7 @@
else setValue( v );
}
-QValidator::State ExtDateEdit::validate( QString &input, int &pos ) {
+QValidator::State ExtDateEdit::validate( QString &input, int & ) {
if ( ExtDate::fromString( input, m_DateFormat ).isValid() )
return QValidator::Acceptable;
else
@@ -211,6 +216,11 @@
ExtDateTimeEdit( dt, parent );
}
+ExtDateTimeEdit::ExtDateTimeEdit( QWidget *p ) {
+ ExtDateTime edt = ExtDateTime::currentDateTime();
+ ExtDateTimeEdit( edt, p );
+}
+
ExtDateTimeEdit::~ExtDateTimeEdit() {
}
--- trunk/KDE/kdeedu/libkdeedu/extdate/extdatetimeedit.h #480081:480082
@@ -50,10 +50,9 @@
#include <QSpinBox>
#include <QWidget>
#include <QLineEdit>
-class QTime;
-class QTimeEdit;
-class ExtDate;
-class ExtDateTime;
+#include <QTime>
+#include <QTimeEdit>
+#include "extdatetime.h"
class ExtDateEdit : public QSpinBox {
Q_OBJECT
@@ -66,6 +65,7 @@
*@p parent pointer to the parent widget (default: 0)
*/
ExtDateEdit( const ExtDate &date = ExtDate::currentDate(), QWidget *parent = 0 );
+
/**
*@short Constructor. Creates an ExtDateEdit displaying the
*given date.
@@ -75,7 +75,13 @@
*@p parent pointer to the parent widget (default: 0)
*/
ExtDateEdit( int jd, QWidget *parent = 0 );
+
/**
+ *@short Constructor for UI files (contains only a parent widget argument)
+ */
+ ExtDateEdit( QWidget *parent );
+
+/**
*@short Default destructor. Empty.
*/
~ExtDateEdit();
@@ -236,11 +242,10 @@
*to be displayed (defaults to the system's current date and time)
*@p p pointer to the parent widget (default: 0)
*/
- ExtDateTimeEdit( const ExtDateTime &dt = ExtDateTime::currentDateTime(),
-QWidget *p=0 );
+ ExtDateTimeEdit( const ExtDateTime &dt = ExtDateTime::currentDateTime(), QWidget *p=0 );
/**
- *@short Default Constructor. Displays the given Date and Time.
+ *@short Constructor. Displays the given Date and Time.
*
*This is essentially identical to the above function, differing only in
*the type of its arguments.
@@ -248,9 +253,14 @@
*@p t reference to a QTime which is to be displayed in the time box
*@p p pointer to the parent widget (default: 0)
*/
- ExtDateTimeEdit( const ExtDate &date, const QTime &time, QWidget *p=0 );
+ ExtDateTimeEdit( const ExtDate &date, const QTime &time, QWidget *p=0 );
/**
+ *@short Constructor for UI files (contains only a parent widget argument)
+ */
+ ExtDateTimeEdit( QWidget *p );
+
+/**
*@short Default Destructor. Empty.
*/
~ExtDateTimeEdit();
More information about the Kstars-devel
mailing list