diff options
Diffstat (limited to 'libtdeedu')
28 files changed, 316 insertions, 498 deletions
diff --git a/libtdeedu/extdate/Makefile.am b/libtdeedu/extdate/Makefile.am index a06b2eca..3d2a60a4 100644 --- a/libtdeedu/extdate/Makefile.am +++ b/libtdeedu/extdate/Makefile.am @@ -7,15 +7,15 @@ lib_LTLIBRARIES = libextdate.la libextdate_la_SOURCES = extdatetime.cpp extcalendarsystem.cpp extcalendarsystemgregorian.cpp extdatetbl.cpp extdatepicker.cpp extdatetimeedit.cpp extdatewidget.cpp libextdate_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 3:0:2 -libextdate_la_LIBADD = $(LIB_TDEUI) $(LIB_QT) $(LIB_TDECORE) +libextdate_la_LIBADD = $(LIB_TDEUI) $(LIB_TQT) $(LIB_TDECORE) test_extdate_SOURCES = test_extdate.cpp test_extdate_LDADD = libextdate.la -test_extdate_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +test_extdate_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor test_extdatepicker_SOURCES = testwidget.cpp main.cpp test_extdatepicker_LDADD = libextdate.la -test_extdatepicker_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +test_extdatepicker_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor METASOURCES = AUTO diff --git a/libtdeedu/extdate/extdatepicker.cpp b/libtdeedu/extdate/extdatepicker.cpp index ad347c31..b8874d75 100644 --- a/libtdeedu/extdate/extdatepicker.cpp +++ b/libtdeedu/extdate/extdatepicker.cpp @@ -178,17 +178,17 @@ void ExtDatePicker::init( const ExtDate &dt ) monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow"))); monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow"))); } - connect(table, TQT_SIGNAL(dateChanged(const ExtDate&)), TQT_SLOT(dateChangedSlot(const ExtDate&))); - connect(table, TQT_SIGNAL(tableClicked()), TQT_SLOT(tableClickedSlot())); - connect(monthForward, TQT_SIGNAL(clicked()), TQT_SLOT(monthForwardClicked())); - connect(monthBackward, TQT_SIGNAL(clicked()), TQT_SLOT(monthBackwardClicked())); - connect(yearForward, TQT_SIGNAL(clicked()), TQT_SLOT(yearForwardClicked())); - connect(yearBackward, TQT_SIGNAL(clicked()), TQT_SLOT(yearBackwardClicked())); - connect(d->selectWeek, TQT_SIGNAL(activated(int)), TQT_SLOT(weekSelected(int))); - connect(d->todayButton, TQT_SIGNAL(clicked()), TQT_SLOT(todayButtonClicked())); - connect(selectMonth, TQT_SIGNAL(clicked()), TQT_SLOT(selectMonthClicked())); - connect(selectYear, TQT_SIGNAL(toggled(bool)), TQT_SLOT(selectYearClicked())); - connect(line, TQT_SIGNAL(returnPressed()), TQT_SLOT(lineEnterPressed())); + connect(table, TQ_SIGNAL(dateChanged(const ExtDate&)), TQ_SLOT(dateChangedSlot(const ExtDate&))); + connect(table, TQ_SIGNAL(tableClicked()), TQ_SLOT(tableClickedSlot())); + connect(monthForward, TQ_SIGNAL(clicked()), TQ_SLOT(monthForwardClicked())); + connect(monthBackward, TQ_SIGNAL(clicked()), TQ_SLOT(monthBackwardClicked())); + connect(yearForward, TQ_SIGNAL(clicked()), TQ_SLOT(yearForwardClicked())); + connect(yearBackward, TQ_SIGNAL(clicked()), TQ_SLOT(yearBackwardClicked())); + connect(d->selectWeek, TQ_SIGNAL(activated(int)), TQ_SLOT(weekSelected(int))); + connect(d->todayButton, TQ_SIGNAL(clicked()), TQ_SLOT(todayButtonClicked())); + connect(selectMonth, TQ_SIGNAL(clicked()), TQ_SLOT(selectMonthClicked())); + connect(selectYear, TQ_SIGNAL(toggled(bool)), TQ_SLOT(selectYearClicked())); + connect(line, TQ_SIGNAL(returnPressed()), TQ_SLOT(lineEnterPressed())); table->setFocus(); @@ -388,7 +388,7 @@ ExtDatePicker::selectYearClicked() // ----- picker->resize(picker->sizeHint()); popup->setMainWidget(picker); - connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int))); + connect(picker, TQ_SIGNAL(closeMe(int)), popup, TQ_SLOT(close(int))); picker->setFocus(); if(popup->exec(selectYear->mapToGlobal(TQPoint(0, selectMonth->height())))) { @@ -490,7 +490,7 @@ ExtDatePicker::setFontSize(int s) maxMonthRect.setHeight(TQMAX(r.height(), maxMonthRect.height())); } - TQSize metricBound = style().tqsizeFromContents(TQStyle::CT_ToolButton, + TQSize metricBound = style().sizeFromContents(TQStyle::CT_ToolButton, selectMonth, maxMonthRect); selectMonth->setMinimumSize(metricBound); @@ -511,8 +511,8 @@ ExtDatePicker::setCloseButton( bool enable ) d->navigationLayout->addWidget(d->closeButton); TQToolTip::add(d->closeButton, i18n("Close")); d->closeButton->setPixmap( SmallIcon("remove") ); - connect( d->closeButton, TQT_SIGNAL( clicked() ), - topLevelWidget(), TQT_SLOT( close() ) ); + connect( d->closeButton, TQ_SIGNAL( clicked() ), + topLevelWidget(), TQ_SLOT( close() ) ); } else { delete d->closeButton; diff --git a/libtdeedu/extdate/extdatepicker.h b/libtdeedu/extdate/extdatepicker.h index 0d0b63d1..29d35b5c 100644 --- a/libtdeedu/extdate/extdatepicker.h +++ b/libtdeedu/extdate/extdatepicker.h @@ -49,9 +49,9 @@ class ExtDateTable; * * @short A date selection widget. **/ -class KDE_EXPORT ExtDatePicker: public TQFrame +class TDE_EXPORT ExtDatePicker: public TQFrame { - Q_OBJECT + TQ_OBJECT // TQ_PROPERTY( ExtDate date READ date WRITE setDate) TQ_PROPERTY( bool closeButton READ hasCloseButton WRITE setCloseButton ) @@ -106,7 +106,7 @@ public: * Returns the selected date. * @deprecated **/ - const ExtDate& getDate() const KDE_DEPRECATED; + const ExtDate& getDate() const TDE_DEPRECATED; /** * @returns the selected date. diff --git a/libtdeedu/extdate/extdatetbl.cpp b/libtdeedu/extdate/extdatetbl.cpp index 7b60954b..662e8a7c 100644 --- a/libtdeedu/extdate/extdatetbl.cpp +++ b/libtdeedu/extdate/extdatetbl.cpp @@ -83,7 +83,7 @@ public: ExtDateValidator::ExtDateValidator(TQWidget* parent, const char* name) - : TQValidator(TQT_TQOBJECT(parent), name) + : TQValidator(parent, name) { } @@ -126,7 +126,7 @@ ExtDateTable::ExtDateTable(TQWidget *parent, ExtDate date_, const char* name, WF kdDebug() << "ExtDateTable ctor: WARNING: Given date is invalid, using current date." << endl; date_=ExtDate::currentDate(); } - setFocusPolicy( TQ_StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); setNumRows(7); // 6 weeks max + headline setNumCols(7); // 7 days a week setHScrollBarMode(AlwaysOff); @@ -448,7 +448,7 @@ ExtDateTable::contentsMousePressEvent(TQMouseEvent *e) emit tableClicked(); - if ( e->button() == Qt::RightButton && d->popupMenuEnabled ) + if ( e->button() == TQt::RightButton && d->popupMenuEnabled ) { TDEPopupMenu *menu = new TDEPopupMenu(); @@ -567,7 +567,7 @@ void ExtDateTable::unsetCustomDatePainting( const ExtDate &date ) ExtDateInternalWeekSelector::ExtDateInternalWeekSelector (TQWidget* parent, const char* name) : KLineEdit(parent, name), - val(new TQIntValidator(TQT_TQOBJECT(this))), + val(new TQIntValidator(this)), result(0) { TQFont font; @@ -576,7 +576,7 @@ ExtDateInternalWeekSelector::ExtDateInternalWeekSelector setFont(font); setFrameStyle(TQFrame::NoFrame); setValidator(val); - connect(this, TQT_SIGNAL(returnPressed()), TQT_SLOT(weekEnteredSlot())); + connect(this, TQ_SIGNAL(returnPressed()), TQ_SLOT(weekEnteredSlot())); } void @@ -720,7 +720,7 @@ ExtDateInternalMonthPicker::paintCell(TQPainter* painter, int row, int col) void ExtDateInternalMonthPicker::contentsMousePressEvent(TQMouseEvent *e) { - if(!isEnabled() || e->button() != Qt::LeftButton) + if(!isEnabled() || e->button() != TQt::LeftButton) { KNotifyClient::beep(); return; @@ -747,7 +747,7 @@ ExtDateInternalMonthPicker::contentsMousePressEvent(TQMouseEvent *e) void ExtDateInternalMonthPicker::contentsMouseMoveEvent(TQMouseEvent *e) { - if (e->state() & Qt::LeftButton) + if (e->state() & TQt::LeftButton) { int row, col; TQPoint mouseCoord; @@ -813,7 +813,7 @@ ExtDateInternalMonthPicker::contentsMouseReleaseEvent(TQMouseEvent *e) ExtDateInternalYearSelector::ExtDateInternalYearSelector (TQWidget* parent, const char* name) : TQLineEdit(parent, name), - val(new TQIntValidator(TQT_TQOBJECT(this))), + val(new TQIntValidator(this)), result(0), d(new ExtDateInternalYearPrivate()) { @@ -826,7 +826,7 @@ ExtDateInternalYearSelector::ExtDateInternalYearSelector //there si also a year limit in ExtCalendarSystemGregorian... val->setRange(-50000, 50000); setValidator(val); - connect(this, TQT_SIGNAL(returnPressed()), TQT_SLOT(yearEnteredSlot())); + connect(this, TQ_SIGNAL(returnPressed()), TQ_SLOT(yearEnteredSlot())); } ExtDateInternalYearSelector::~ExtDateInternalYearSelector() { diff --git a/libtdeedu/extdate/extdatetbl.h b/libtdeedu/extdate/extdatetbl.h index 622b45e8..0c931824 100644 --- a/libtdeedu/extdate/extdatetbl.h +++ b/libtdeedu/extdate/extdatetbl.h @@ -40,7 +40,7 @@ class TDEPopupMenu; */ class ExtDateInternalWeekSelector : public KLineEdit { - Q_OBJECT + TQ_OBJECT protected: TQIntValidator *val; @@ -68,7 +68,7 @@ private: */ class ExtDateInternalMonthPicker : public TQGridView { - Q_OBJECT + TQ_OBJECT protected: /** @@ -142,7 +142,7 @@ private: */ class ExtDateInternalYearSelector : public TQLineEdit { - Q_OBJECT + TQ_OBJECT protected: TQIntValidator *val; @@ -179,7 +179,7 @@ private: */ class TDEPopupFrame : public TQFrame { - Q_OBJECT + TQ_OBJECT protected: /** @@ -268,7 +268,7 @@ public: */ class ExtDateTable : public TQGridView { - Q_OBJECT + TQ_OBJECT //TQ_PROPERTY( ExtDate date READ getDate WRITE setDate ) TQ_PROPERTY( bool popupMenu READ popupMenuEnabled WRITE setPopupMenuEnabled ) diff --git a/libtdeedu/extdate/extdatetime.cpp b/libtdeedu/extdate/extdatetime.cpp index e5cc7b6c..696e7d84 100644 --- a/libtdeedu/extdate/extdatetime.cpp +++ b/libtdeedu/extdate/extdatetime.cpp @@ -241,7 +241,7 @@ TQString ExtDate::longDayName( int weekday ) {return m_longDayNames[weekday-1];} #ifndef TQT_NO_TEXTSTRING #if !defined(TQT_NO_SPRINTF) -TQString ExtDate::toString( Qt::DateFormat f) const +TQString ExtDate::toString( TQt::DateFormat f) const { TQString a_format; @@ -249,15 +249,15 @@ TQString ExtDate::toString( Qt::DateFormat f) const switch (f) { - case Qt::TextDate : // Sat May 20 1995 + case TQt::TextDate : // Sat May 20 1995 a_format = "%a %b %e %Y"; break; - case Qt::ISODate : // YYYY-MM-DD + case TQt::ISODate : // YYYY-MM-DD a_format = "%Y-%m-%d"; break; - case Qt::LocalDate : // local settings + case TQt::LocalDate : // local settings a_format = TDEGlobal::locale()->dateFormat(); break; @@ -377,7 +377,7 @@ int ExtDate::daysTo( const ExtDate & a_date) const return a_date.jd() - jd(); } -ExtDate ExtDate::currentDate(Qt::TimeSpec ts) +ExtDate ExtDate::currentDate(TQt::TimeSpec ts) { time_t a_current_time; struct tm a_current_time_tm; @@ -404,19 +404,19 @@ ExtDate ExtDate::currentDate(Qt::TimeSpec ts) //Try both DateFormat values ExtDate ExtDate::fromString( const TQString& s ) { - ExtDate dResult = ExtDate::fromString( s, Qt::TextDate ); + ExtDate dResult = ExtDate::fromString( s, TQt::TextDate ); if ( dResult.isValid() ) return dResult; - dResult = ExtDate::fromString( s, Qt::ISODate ); + dResult = ExtDate::fromString( s, TQt::ISODate ); if ( dResult.isValid() ) return dResult; else return ExtDate(); //invalid } -ExtDate ExtDate::fromString( const TQString& s, Qt::DateFormat f ) +ExtDate ExtDate::fromString( const TQString& s, TQt::DateFormat f ) { ExtDate dt = ExtDate(); //initialize invalid date if ( s.isEmpty() ) { return dt; } - if ( f == Qt::LocalDate ) { //can't use LocalFormat + if ( f == TQt::LocalDate ) { //can't use LocalFormat #if defined(TQT_CHECK_RANGE) tqWarning( "TQDate::fromString: Parameter out of range" ); #endif @@ -424,7 +424,7 @@ ExtDate ExtDate::fromString( const TQString& s, Qt::DateFormat f ) } switch( f ) { - case Qt::ISODate : + case TQt::ISODate : { int year( s.mid( 0, 4 ).toInt() ); int month( s.mid( 5, 2 ).toInt() ); @@ -437,7 +437,7 @@ ExtDate ExtDate::fromString( const TQString& s, Qt::DateFormat f ) default : #ifndef TQT_NO_TEXTDATE - case Qt::TextDate : + case TQt::TextDate : { //Three possible date formats: //dd mth yyyy; mth dd yyyy; wkd mth dd yyyy @@ -623,8 +623,8 @@ ExtDateTime::ExtDateTime( const ExtDate &date, const TQTime &time ) /*! \fn bool ExtDateTime::isNull() const - Returns TRUE if both the date and the time are null; otherwise - returns FALSE. A null datetime is invalid. + Returns true if both the date and the time are null; otherwise + returns false. A null datetime is invalid. \sa ExtDate::isNull(), TQTime::isNull() */ @@ -632,8 +632,8 @@ ExtDateTime::ExtDateTime( const ExtDate &date, const TQTime &time ) /*! \fn bool ExtDateTime::isValid() const - Returns TRUE if both the date and the time are valid; otherwise - returns FALSE. + Returns true if both the date and the time are valid; otherwise + returns false. \sa ExtDate::isValid(), TQTime::isValid() */ @@ -706,7 +706,7 @@ uint ExtDateTime::toTime_t() const void ExtDateTime::setTime_t( uint secsSince1Jan1970UTC ) { - setTime_t( secsSince1Jan1970UTC, Qt::LocalTime ); + setTime_t( secsSince1Jan1970UTC, TQt::LocalTime ); } /*! @@ -721,12 +721,12 @@ void ExtDateTime::setTime_t( uint secsSince1Jan1970UTC ) \sa toTime_t() */ -void ExtDateTime::setTime_t( uint secsSince1Jan1970UTC, Qt::TimeSpec ts ) +void ExtDateTime::setTime_t( uint secsSince1Jan1970UTC, TQt::TimeSpec ts ) { time_t tmp = (time_t) secsSince1Jan1970UTC; tm *brokenDown = 0; -#if defined(Q_OS_UNIX) && defined(QT_THREAD_SUPPORT) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) +#if defined(Q_OS_UNIX) && defined(TQT_THREAD_SUPPORT) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) // posix compliant system // use the reentrant versions of localtime() and gmtime() where available tm res; @@ -771,16 +771,16 @@ void ExtDateTime::setTime_t( uint secsSince1Jan1970UTC, Qt::TimeSpec ts ) Returns the datetime as a string. The \a f parameter determines the format of the string. - If \a f is \c Qt::TextDate, the string format is "Wed May 20 + If \a f is \c TQt::TextDate, the string format is "Wed May 20 03:40:13 1998" (using ExtDate::shortDayName(), ExtDate::shortMonthName(), and TQTime::toString() to generate the string, so the day and month names will have localized names). - If \a f is \c Qt::ISODate, the string format corresponds to the + If \a f is \c TQt::ISODate, the string format corresponds to the ISO 8601 extended specification for representations of dates and times, which is YYYY-MM-DDTHH:MM:SS. - If \a f is \c Qt::LocalDate, the string format depends on the + If \a f is \c TQt::LocalDate, the string format depends on the locale settings of the system. If the format \a f is invalid or the datetime is invalid, toString() @@ -789,20 +789,20 @@ void ExtDateTime::setTime_t( uint secsSince1Jan1970UTC, Qt::TimeSpec ts ) \sa ExtDate::toString() TQTime::toString() */ -TQString ExtDateTime::toString( Qt::DateFormat f ) const +TQString ExtDateTime::toString( TQt::DateFormat f ) const { if ( !isValid() ) return TQString(); - if ( f == Qt::ISODate ) { - return d.toString( Qt::ISODate ) + "T" + t.toString( Qt::ISODate ); + if ( f == TQt::ISODate ) { + return d.toString( TQt::ISODate ) + "T" + t.toString( TQt::ISODate ); } #ifndef TQT_NO_TEXTDATE - else if ( f == Qt::TextDate ) { + else if ( f == TQt::TextDate ) { return toString( "%a %b %e %Y %H:%M:%S" ); } #endif - else if ( f == Qt::LocalDate ) { + else if ( f == TQt::LocalDate ) { return toString( TDEGlobal::locale()->dateFormat() + " " + TDEGlobal::locale()->timeFormat() ); } @@ -948,7 +948,7 @@ int ExtDateTime::secsTo( const ExtDateTime &dt ) const /*! - Returns TRUE if this datetime is equal to \a dt; otherwise returns FALSE. + Returns true if this datetime is equal to \a dt; otherwise returns false. \sa operator!=() */ @@ -959,8 +959,8 @@ bool ExtDateTime::operator==( const ExtDateTime &dt ) const } /*! - Returns TRUE if this datetime is different from \a dt; otherwise - returns FALSE. + Returns true if this datetime is different from \a dt; otherwise + returns false. \sa operator==() */ @@ -971,8 +971,8 @@ bool ExtDateTime::operator!=( const ExtDateTime &dt ) const } /*! - Returns TRUE if this datetime is earlier than \a dt; otherwise - returns FALSE. + Returns true if this datetime is earlier than \a dt; otherwise + returns false. */ bool ExtDateTime::operator<( const ExtDateTime &dt ) const @@ -983,8 +983,8 @@ bool ExtDateTime::operator<( const ExtDateTime &dt ) const } /*! - Returns TRUE if this datetime is earlier than or equal to \a dt; - otherwise returns FALSE. + Returns true if this datetime is earlier than or equal to \a dt; + otherwise returns false. */ bool ExtDateTime::operator<=( const ExtDateTime &dt ) const @@ -995,8 +995,8 @@ bool ExtDateTime::operator<=( const ExtDateTime &dt ) const } /*! - Returns TRUE if this datetime is later than \a dt; otherwise - returns FALSE. + Returns true if this datetime is later than \a dt; otherwise + returns false. */ bool ExtDateTime::operator>( const ExtDateTime &dt ) const @@ -1007,8 +1007,8 @@ bool ExtDateTime::operator>( const ExtDateTime &dt ) const } /*! - Returns TRUE if this datetime is later than or equal to \a dt; - otherwise returns FALSE. + Returns true if this datetime is later than or equal to \a dt; + otherwise returns false. */ bool ExtDateTime::operator>=( const ExtDateTime &dt ) const @@ -1028,17 +1028,17 @@ bool ExtDateTime::operator>=( const ExtDateTime &dt ) const ExtDateTime ExtDateTime::currentDateTime() { - return currentDateTime( Qt::LocalTime ); + return currentDateTime( TQt::LocalTime ); } /*! Returns the current datetime, as reported by the system clock, for the TimeSpec \a ts. The default TimeSpec is LocalTime. - \sa ExtDate::currentDate(), TQTime::currentTime(), Qt::TimeSpec + \sa ExtDate::currentDate(), TQTime::currentTime(), TQt::TimeSpec */ -ExtDateTime ExtDateTime::currentDateTime( Qt::TimeSpec ts ) +ExtDateTime ExtDateTime::currentDateTime( TQt::TimeSpec ts ) { ExtDateTime dt; dt.setDate( ExtDate::currentDate(ts) ); @@ -1054,28 +1054,28 @@ ExtDateTime ExtDateTime::currentDateTime( Qt::TimeSpec ts ) Returns the ExtDateTime represented by the string \a s, using the format \a f, or an invalid datetime if this is not possible. - Note for \c Qt::TextDate: It is recommended that you use the + Note for \c TQt::TextDate: It is recommended that you use the English short month names (e.g. "Jan"). Although localized month names can also be used, they depend on the user's locale settings. - \warning Note that \c Qt::LocalDate cannot be used here. + \warning Note that \c TQt::LocalDate cannot be used here. */ ExtDateTime ExtDateTime::fromString( const TQString& s ) { - ExtDateTime dtResult = ExtDateTime::fromString( s, Qt::TextDate ); + ExtDateTime dtResult = ExtDateTime::fromString( s, TQt::TextDate ); if ( dtResult.isValid() ) return dtResult; - dtResult = ExtDateTime::fromString( s, Qt::ISODate ); + dtResult = ExtDateTime::fromString( s, TQt::ISODate ); if ( dtResult.isValid() ) return dtResult; else return ExtDateTime(); //invalid } -ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f ) +ExtDateTime ExtDateTime::fromString( const TQString& s, TQt::DateFormat f ) { ExtDateTime dt; - if ( ( s.isEmpty() ) || ( f == Qt::LocalDate ) ) { + if ( ( s.isEmpty() ) || ( f == TQt::LocalDate ) ) { #if defined(TQT_CHECK_RANGE) tqWarning( "ExtDateTime::fromString: Parameter out of range" ); #endif @@ -1083,17 +1083,17 @@ ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f ) return dt; } - if ( f == Qt::ISODate ) { + if ( f == TQt::ISODate ) { if ( s.length() <= 10 || ! s.contains( ':' ) ) { //no time specified TQTime t = TQTime(0,0,0); - return ExtDateTime( ExtDate::fromString( s.mid(0,10), Qt::ISODate ) ); + return ExtDateTime( ExtDate::fromString( s.mid(0,10), TQt::ISODate ) ); } else { - return ExtDateTime( ExtDate::fromString( s.mid(0,10), Qt::ISODate ), - TQTime::fromString( s.mid(11), Qt::ISODate ) ); + return ExtDateTime( ExtDate::fromString( s.mid(0,10), TQt::ISODate ), + TQTime::fromString( s.mid(11), TQt::ISODate ) ); } } #if !defined(TQT_NO_REGEXP) && !defined(TQT_NO_TEXTDATE) - else if ( f == Qt::TextDate ) { + else if ( f == TQt::TextDate ) { //parse the time, if it exists. TQTime time; @@ -1110,7 +1110,7 @@ ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f ) } //sd is now just the date string. - ExtDate date = ExtDate::fromString( s, Qt::TextDate ); + ExtDate date = ExtDate::fromString( s, TQt::TextDate ); return ExtDateTime( date, time ); } @@ -1121,12 +1121,12 @@ ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f ) #ifndef TQT_NO_DATASTREAM -KDE_EXPORT TQDataStream &operator<<( TQDataStream & ostream, const ExtDate & date) +TDE_EXPORT TQDataStream &operator<<( TQDataStream & ostream, const ExtDate & date) { return ostream << (TQ_UINT32)(date.jd()); } -KDE_EXPORT TQDataStream &operator>>( TQDataStream & ostream, ExtDate & date) +TDE_EXPORT TQDataStream &operator>>( TQDataStream & ostream, ExtDate & date) { TQ_UINT32 julday; ostream >> julday; @@ -1134,14 +1134,14 @@ KDE_EXPORT TQDataStream &operator>>( TQDataStream & ostream, ExtDate & date) return ostream; } -KDE_EXPORT TQDataStream &operator<<( TQDataStream & ostream, const ExtDateTime & dt) +TDE_EXPORT TQDataStream &operator<<( TQDataStream & ostream, const ExtDateTime & dt) { ostream << dt.d; ostream << dt.t; return ostream; } -KDE_EXPORT TQDataStream &operator>>( TQDataStream & ostream, ExtDateTime & dt) +TDE_EXPORT TQDataStream &operator>>( TQDataStream & ostream, ExtDateTime & dt) { ostream >> dt.d >> dt.t; return ostream; diff --git a/libtdeedu/extdate/extdatetime.h b/libtdeedu/extdate/extdatetime.h index 479d1fae..d07eaa4a 100644 --- a/libtdeedu/extdate/extdatetime.h +++ b/libtdeedu/extdate/extdatetime.h @@ -20,7 +20,7 @@ #include "tqstring.h" #include "tqnamespace.h" #include "tqdatetime.h" -#include <kdemacros.h> +#include <tdemacros.h> #define INVALID_DAY LONG_MIN @@ -34,7 +34,7 @@ extern void test2_unit(int y, int m, int d); class ExtDateTime; -class KDE_EXPORT ExtDate +class TDE_EXPORT ExtDate { public: ExtDate() : m_jd(INVALID_DAY), m_year(0), m_month(0), m_day(0) {} @@ -58,10 +58,6 @@ public: long int jd() const { return m_jd; } #ifndef TQT_NO_TEXTDATE -#ifndef TQT_NO_COMPAT - static TQString monthName( int month ) { return shortMonthName( month ); } - static TQString dayName( int weekday ) { return shortDayName( weekday ); } -#endif static TQString shortMonthName( int month ); static TQString shortDayName( int weekday ); static TQString longMonthName( int month ); @@ -69,7 +65,7 @@ public: #endif //TQT_NO_TEXTDATE #ifndef TQT_NO_TEXTSTRING #if !defined(TQT_NO_SPRINTF) - TQString toString( Qt::DateFormat f = Qt::TextDate ) const; + TQString toString( TQt::DateFormat f = TQt::TextDate ) const; #endif TQString toString( const TQString& format ) const; #endif @@ -88,10 +84,10 @@ public: bool operator>( const ExtDate &d ) const { return m_jd > d.jd(); } bool operator>=( const ExtDate &d ) const { return m_jd >= d.jd(); } - static ExtDate currentDate( Qt::TimeSpec ts = Qt::LocalTime ); + static ExtDate currentDate( TQt::TimeSpec ts = TQt::LocalTime ); #ifndef TQT_NO_DATESTRING static ExtDate fromString( const TQString &s ); - static ExtDate fromString( const TQString &s, Qt::DateFormat f ); + static ExtDate fromString( const TQString &s, TQt::DateFormat f ); #endif static bool isValid( int y, int m, int d ); static bool leapYear( int year ); @@ -125,7 +121,7 @@ private: ExtDateTime class *****************************************************************************/ -class KDE_EXPORT ExtDateTime +class TDE_EXPORT ExtDateTime { public: ExtDateTime() {} // set null date and null time @@ -141,10 +137,10 @@ public: void setDate( const ExtDate &date ) { d = date; } void setTime( const TQTime &time ) { t = time; } void setTime_t( uint secsSince1Jan1970UTC ); - void setTime_t( uint secsSince1Jan1970UTC, Qt::TimeSpec ); + void setTime_t( uint secsSince1Jan1970UTC, TQt::TimeSpec ); #ifndef TQT_NO_DATESTRING #ifndef TQT_NO_SPRINTF - TQString toString( Qt::DateFormat f = Qt::TextDate ) const; + TQString toString( TQt::DateFormat f = TQt::TextDate ) const; #endif TQString toString( const TQString& format ) const; #endif @@ -163,10 +159,10 @@ public: bool operator>=( const ExtDateTime &dt ) const; static ExtDateTime currentDateTime(); - static ExtDateTime currentDateTime( Qt::TimeSpec ); + static ExtDateTime currentDateTime( TQt::TimeSpec ); #ifndef TQT_NO_DATESTRING static ExtDateTime fromString( const TQString &s ); - static ExtDateTime fromString( const TQString &s, Qt::DateFormat f ); + static ExtDateTime fromString( const TQString &s, TQt::DateFormat f ); #endif private: ExtDate d; diff --git a/libtdeedu/extdate/extdatetimeedit.cpp b/libtdeedu/extdate/extdatetimeedit.cpp index 21e74809..4a7527aa 100644 --- a/libtdeedu/extdate/extdatetimeedit.cpp +++ b/libtdeedu/extdate/extdatetimeedit.cpp @@ -27,10 +27,8 @@ #ifndef TQT_NO_DATETIMEEDIT -//#include "../kernel/tqinternal_p.h" -//#include "../kernel/tqrichtext_p.h" -#include <tqinternal_p.h> -#include <tqrichtext_p.h> +#include <private/tqinternal_p.h> +#include <private/tqrichtext_p.h> #include <tqrangecontrol.h> #include <tqapplication.h> #include <tqpixmap.h> @@ -44,7 +42,7 @@ static TQString *lDateSep = 0; static TQString *lTimeSep = 0; -static bool lAMPM = FALSE; +static bool lAMPM = false; static TQString *lAM = 0; static TQString *lPM = 0; static ExtDateEdit::Order lOrder = ExtDateEdit::YMD; @@ -112,7 +110,7 @@ static void readLocaleSettings() *lDateSep = "-"; *lTimeSep = ":"; #endif - TQString d = ExtDate( 1999, 11, 22 ).toString( Qt::LocalDate ); + TQString d = ExtDate( 1999, 11, 22 ).toString( TQt::LocalDate ); dpos = d.find( "22" ); mpos = d.find( "11" ); ypos = d.find( "99" ); @@ -142,7 +140,7 @@ static void readLocaleSettings() } #ifndef TQ_WS_WIN - TQString t = TQTime( 11, 22, 33 ).toString( Qt::LocalDate ); + TQString t = TQTime( 11, 22, 33 ).toString( TQt::LocalDate ); dpos = t.find( "11" ); mpos = t.find( "22" ); ypos = t.find( "33" ); @@ -181,11 +179,11 @@ class ExtDateTimeEditorPrivate { public: ExtDateTimeEditorPrivate() - : frm( TRUE ), - parag( new TQTextParagraph( 0, 0, 0, FALSE ) ), + : frm( true ), + parag( new TQTextParagraph( 0, 0, 0, false ) ), focusSec(0) { - parag->formatter()->setWrapEnabled( FALSE ); + parag->formatter()->setWrapEnabled( false ); cursor = new TQTextCursor( 0 ); cursor->setParagraph( parag ); offset = 0; @@ -242,13 +240,13 @@ public: bool setFocusSection( int idx ) { if ( idx > (int)sections.count()-1 || idx < 0 ) - return FALSE; + return false; if ( idx != focusSec ) { focusSec = idx; applyFocusSelection(); - return TRUE; + return true; } - return FALSE; + return false; } bool inSectionSelection( int idx ) @@ -256,9 +254,9 @@ public: for ( uint i = 0; i < sections.count(); ++i ) { if ( idx >= sections[i].selectionStart() && idx <= sections[i].selectionEnd() ) - return TRUE; + return true; } - return FALSE; + return false; } void paint( const TQString& txt, bool focus, TQPainter& p, @@ -304,7 +302,7 @@ public: yoff = 0; p.translate( xoff, yoff ); - parag->paint( p, cg, 0, TRUE ); + parag->paint( p, cg, 0, true ); if ( frm ) p.translate( -xoff, -yoff ); } @@ -372,7 +370,7 @@ void ExtDateTimeEditor::init() setBackgroundMode( PaletteBase ); setFocusSection( -1 ); installEventFilter( this ); - setFocusPolicy( TQ_WheelFocus ); + setFocusPolicy( TQWidget::WheelFocus ); } @@ -465,7 +463,7 @@ void ExtDateTimeEditor::mousePressEvent( TQMouseEvent *e ) int sec = sectionAt( p ); if ( sec != -1 ) { cw->setFocusSection( sec ); - repaint( rect(), FALSE ); + repaint( rect(), false ); } } @@ -474,71 +472,71 @@ void ExtDateTimeEditor::mousePressEvent( TQMouseEvent *e ) */ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e ) { - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) { + if ( o == this ) { if ( e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; switch ( ke->key() ) { case Key_Right: if ( d->focusSection() < (int)d->sectionCount()-1 ) { if ( cw->setFocusSection( focusSection()+1 ) ) - repaint( rect(), FALSE ); + repaint( rect(), false ); } - return TRUE; + return true; case Key_Left: if ( d->focusSection() > 0 ) { if ( cw->setFocusSection( focusSection()-1 ) ) - repaint( rect(), FALSE ); + repaint( rect(), false ); } - return TRUE; + return true; case Key_Up: cw->stepUp(); - return TRUE; + return true; case Key_Down: cw->stepDown(); - return TRUE; + return true; case Key_Backspace: - if ( ::tqqt_cast<ExtDateEdit*>(cw) ) + if ( ::tqt_cast<ExtDateEdit*>(cw) ) ((ExtDateEdit*)cw)->removeFirstNumber( d->focusSection() ); - else if ( ::tqqt_cast<TQTimeEdit*>(cw) ) + else if ( ::tqt_cast<TQTimeEdit*>(cw) ) ((TQTimeEdit*)cw)->removeFirstNumber( d->focusSection() ); - return TRUE; + return true; case Key_Delete: cw->removeLastNumber( d->focusSection() ); - return TRUE; + return true; case Key_Tab: case Key_BackTab: { if ( ke->state() == TQt::ControlButton ) - return FALSE; + return false; TQWidget *w = this; - bool hadDateEdit = FALSE; + bool hadDateEdit = false; while ( w ) { - if ( ::tqqt_cast<ExtDateTimeSpinWidget*>(w) && qstrcmp( w->name(), "qt_spin_widget" ) != 0 || - ::tqqt_cast<ExtDateTimeEdit*>(w) ) + if ( ::tqt_cast<ExtDateTimeSpinWidget*>(w) && qstrcmp( w->name(), "qt_spin_widget" ) != 0 || + ::tqt_cast<ExtDateTimeEdit*>(w) ) break; - hadDateEdit = hadDateEdit || ::tqqt_cast<ExtDateEdit*>(w); + hadDateEdit = hadDateEdit || ::tqt_cast<ExtDateEdit*>(w); w = w->parentWidget(); } if ( w ) { - if ( !::tqqt_cast<ExtDateTimeEdit*>(w) ) { + if ( !::tqt_cast<ExtDateTimeEdit*>(w) ) { w = w->parentWidget(); } else { ExtDateTimeEdit *ed = (ExtDateTimeEdit*)w; if ( hadDateEdit && ke->key() == Key_Tab ) { ed->timeEdit()->setFocus(); - return TRUE; + return true; } else if ( !hadDateEdit && ke->key() == Key_BackTab ) { ed->dateEdit()->setFocus(); - return TRUE; + return true; } else { - while ( w && !::tqqt_cast<ExtDateTimeEdit*>(w) ) + while ( w && !::tqt_cast<ExtDateTimeEdit*>(w) ) w = w->parentWidget(); } } tqApp->sendEvent( w, e ); - return TRUE; + return true; } } break; default: @@ -547,10 +545,10 @@ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e ) // do the same thing as KEY_RIGHT when the user presses the separator key if ( d->focusSection() < 2 ) { if ( cw->setFocusSection( focusSection()+1 ) ) - repaint( rect(), FALSE ); + repaint( rect(), false ); } - return TRUE; - } else if ( !txt.isEmpty() && ::tqqt_cast<TQTimeEdit*>(cw) && focusSection() == (int) d->sectionCount()-1 ) { + return true; + } else if ( !txt.isEmpty() && ::tqt_cast<TQTimeEdit*>(cw) && focusSection() == (int) d->sectionCount()-1 ) { // the first character of the AM/PM indicator toggles if the section has focus TQTimeEdit *te = (TQTimeEdit*)cw; TQTime time = te->time(); @@ -568,12 +566,12 @@ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e ) int num = txt[0].digitValue(); if ( num != -1 ) { cw->addNumber( d->focusSection(), num ); - return TRUE; + return true; } } } } - return FALSE; + return false; } @@ -744,13 +742,13 @@ public: dateEdit->setRange( ExtDate::currentDate().addDays( -365 ), ExtDate::currentDate().addDays( 365 ) ); dateEdit->setOrder( ExtDateEdit::MDY ); - dateEdit->setAutoAdvance( TRUE ); + dateEdit->setAutoAdvance( true ); \endcode Here we've created a new ExtDateEdit object initialised with today's date and restricted the valid date range to today plus or minus 365 days. We've set the order to month, day, year. If the auto - advance property is TRUE (as we've set it here) when the user + advance property is true (as we've set it here) when the user completes a section of the date, e.g. enters two digits for the month, they are automatically taken to the next section. @@ -830,10 +828,10 @@ void ExtDateEdit::init() d->ed = new ExtDateTimeEditor( this, "date editor" ); d->controls->setEditWidget( d->ed ); setFocusProxy( d->ed ); - connect( d->controls, TQT_SIGNAL( stepUpPressed() ), TQT_SLOT( stepUp() ) ); - connect( d->controls, TQT_SIGNAL( stepDownPressed() ), TQT_SLOT( stepDown() ) ); - connect( this, TQT_SIGNAL( valueChanged(const ExtDate&) ), - TQT_SLOT( updateButtons() ) ); + connect( d->controls, TQ_SIGNAL( stepUpPressed() ), TQ_SLOT( stepUp() ) ); + connect( d->controls, TQ_SIGNAL( stepDownPressed() ), TQ_SLOT( stepDown() ) ); + connect( this, TQ_SIGNAL( valueChanged(const ExtDate&) ), + TQ_SLOT( updateButtons() ) ); d->ed->appendSection( TQNumberSection( 0,4 ) ); d->ed->appendSection( TQNumberSection( 5,7 ) ); d->ed->appendSection( TQNumberSection( 8,10 ) ); @@ -848,13 +846,13 @@ void ExtDateEdit::init() d->dayCache = 0; setOrder( localOrder() ); setFocusSection( 0 ); - d->overwrite = TRUE; - d->adv = FALSE; + d->overwrite = true; + d->adv = false; d->timerId = 0; - d->typing = FALSE; + d->typing = false; d->min = ExtDate( -50000, 1, 1 ); d->max = ExtDate( 50000, 12, 31 ); - d->changed = FALSE; + d->changed = false; setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); @@ -1133,7 +1131,7 @@ void ExtDateEdit::setOrder( ExtDateEdit::Order order ) } if ( isVisible() ) - d->ed->repaint( d->ed->rect(), FALSE ); + d->ed->repaint( d->ed->rect(), false ); } @@ -1149,29 +1147,29 @@ ExtDateEdit::Order ExtDateEdit::order() const void ExtDateEdit::stepUp() { int sec = d->ed->focusSection(); - bool accepted = FALSE; + bool accepted = false; if ( sec == d->yearSection ) { if ( !outOfRange( d->y+1, d->m, d->d ) ) { - accepted = TRUE; + accepted = true; setYear( d->y+1 ); } } else if ( sec == d->monthSection ) { if ( !outOfRange( d->y, d->m+1, d->d ) ) { - accepted = TRUE; + accepted = true; setMonth( d->m+1 ); } } else if ( sec == d->daySection ) { if ( !outOfRange( d->y, d->m, d->d+1 ) ) { - accepted = TRUE; + accepted = true; setDay( d->d+1 ); } } if ( accepted ) { - d->changed = TRUE; + d->changed = true; emit valueChanged( date() ); } - d->ed->repaint( d->ed->rect(), FALSE ); + d->ed->repaint( d->ed->rect(), false ); } @@ -1183,29 +1181,29 @@ void ExtDateEdit::stepUp() void ExtDateEdit::stepDown() { int sec = d->ed->focusSection(); - bool accepted = FALSE; + bool accepted = false; if ( sec == d->yearSection ) { if ( !outOfRange( d->y-1, d->m, d->d ) ) { - accepted = TRUE; + accepted = true; setYear( d->y-1 ); } } else if ( sec == d->monthSection ) { if ( !outOfRange( d->y, d->m-1, d->d ) ) { - accepted = TRUE; + accepted = true; setMonth( d->m-1 ); } } else if ( sec == d->daySection ) { if ( !outOfRange( d->y, d->m, d->d-1 ) ) { - accepted = TRUE; + accepted = true; setDay( d->d-1 ); } } if ( accepted ) { - d->changed = TRUE; + d->changed = true; emit valueChanged( date() ); } - d->ed->repaint( d->ed->rect(), FALSE ); + d->ed->repaint( d->ed->rect(), false ); } /*! @@ -1291,8 +1289,8 @@ void ExtDateEdit::setDate( const ExtDate& date ) d->dayCache = d->d; emit valueChanged( date ); } - d->changed = FALSE; - d->ed->repaint( d->ed->rect(), FALSE ); + d->changed = false; + d->ed->repaint( d->ed->rect(), false ); } ExtDate ExtDateEdit::date() const @@ -1304,8 +1302,8 @@ ExtDate ExtDateEdit::date() const /*! \internal - Returns TRUE if \a y, \a m, \a d is out of range, otherwise returns - FALSE. + Returns true if \a y, \a m, \a d is out of range, otherwise returns + false. \sa setRange() @@ -1317,11 +1315,11 @@ bool ExtDateEdit::outOfRange( int y, int m, int d ) const ExtDate currentDate( y, m, d ); if ( currentDate > maxValue() || currentDate < minValue() ) { //## outOfRange should set overwrite? - return TRUE; + return true; } - return FALSE; + return false; } - return FALSE; /* assume ok */ + return false; /* assume ok */ } /*! \reimp @@ -1333,25 +1331,25 @@ void ExtDateEdit::addNumber( int sec, int num ) if ( sec == -1 ) return; killTimer( d->timerId ); - bool overwrite = FALSE; - bool accepted = FALSE; - d->typing = TRUE; + bool overwrite = false; + bool accepted = false; + d->typing = true; TQString txt; if ( sec == d->yearSection ) { if ( d->overwrite ) { d->y = num; - d->overwrite = FALSE; - accepted = TRUE; + d->overwrite = false; + accepted = true; } else { txt = TQString::number( 10*d->y + num ); if ( txt.length() > 5 ) txt = txt.mid(1); d->y = txt.toInt(); - accepted = TRUE; + accepted = true; } /* txt = TQString::number( d->y ); if ( d->overwrite || txt.length() == 4 ) { - accepted = TRUE; + accepted = true; d->y = num; } else { txt += TQString::number( num ); @@ -1364,23 +1362,23 @@ void ExtDateEdit::addNumber( int sec, int num ) else if ( outOfRange( val, d->m, d->d ) ) txt = TQString::number( d->y ); else { - accepted = TRUE; + accepted = true; d->y = val; } } else { - accepted = TRUE; + accepted = true; d->y = txt.toInt(); } if ( d->adv && txt.length() == 4 ) { d->ed->setFocusSection( d->ed->focusSection()+1 ); - overwrite = TRUE; + overwrite = true; } } */ } else if ( sec == d->monthSection ) { txt = TQString::number( d->m ); if ( d->overwrite || txt.length() == 2 ) { - accepted = TRUE; + accepted = true; d->m = num; } else { txt += TQString::number( num ); @@ -1390,18 +1388,18 @@ void ExtDateEdit::addNumber( int sec, int num ) if ( outOfRange( d->y, temp, d->d ) ) txt = TQString::number( d->m ); else { - accepted = TRUE; + accepted = true; d->m = temp; } if ( d->adv && txt.length() == 2 ) { d->ed->setFocusSection( d->ed->focusSection()+1 ); - overwrite = TRUE; + overwrite = true; } } } else if ( sec == d->daySection ) { txt = TQString::number( d->d ); if ( d->overwrite || txt.length() == 2 ) { - accepted = TRUE; + accepted = true; d->d = num; d->dayCache = d->d; } else { @@ -1412,23 +1410,23 @@ void ExtDateEdit::addNumber( int sec, int num ) if ( outOfRange( d->y, d->m, temp ) ) txt = TQString::number( d->d ); else { - accepted = TRUE; + accepted = true; d->d = temp; d->dayCache = d->d; } if ( d->adv && txt.length() == 2 ) { d->ed->setFocusSection( d->ed->focusSection()+1 ); - overwrite = TRUE; + overwrite = true; } } } if ( accepted ) { - d->changed = TRUE; + d->changed = true; emit valueChanged( date() ); } d->overwrite = overwrite; d->timerId = startTimer( tqApp->doubleClickInterval()*4 ); - d->ed->repaint( d->ed->rect(), FALSE ); + d->ed->repaint( d->ed->rect(), false ); } @@ -1440,8 +1438,8 @@ bool ExtDateEdit::setFocusSection( int s ) { if ( s != d->ed->focusSection() ) { killTimer( d->timerId ); - d->overwrite = TRUE; - d->typing = FALSE; + d->overwrite = true; + d->typing = false; fix(); // will emit valueChanged if necessary } return d->ed->setFocusSection( s ); @@ -1466,13 +1464,13 @@ bool ExtDateEdit::setFocusSection( int s ) void ExtDateEdit::fix() { - bool changed = FALSE; + bool changed = false; ExtDate test = ExtDate( d->y, d->m, 1 ); if ( d->d > test.daysInMonth() ) { d->d = test.daysInMonth(); - changed = TRUE; + changed = true; } int currentYear = ExtDate::currentDate().year(); @@ -1488,11 +1486,11 @@ void ExtDateEdit::fix() if ( year >= currentYear + 30 ) year -= 100; } - changed = TRUE; + changed = true; } else if ( year < 1000 ) { int currentMillennium = currentYear / 10; year += currentMillennium * 10; - changed = TRUE; + changed = true; } */ if ( changed && outOfRange( year, d->m, d->d ) ) { @@ -1513,7 +1511,7 @@ void ExtDateEdit::fix() if ( changed ) { // emit valueChanged( date() ); -// d->changed = FALSE; +// d->changed = false; } } @@ -1525,8 +1523,8 @@ void ExtDateEdit::fix() bool ExtDateEdit::event( TQEvent *e ) { if( e->type() == TQEvent::FocusOut ) { - d->typing = FALSE; - d->overwrite = TRUE; + d->typing = false; + d->overwrite = true; // the following can't be done in fix() because fix() called // from all over the place and it will break the old behaviour if ( !ExtDate::isValid( d->y, d->m, d->d ) ) { @@ -1537,12 +1535,12 @@ bool ExtDateEdit::event( TQEvent *e ) if ( ExtDate::isValid( d->y, d->m, d->d ) ) break; } - d->changed = TRUE; + d->changed = true; } if ( d->changed ) { fix(); emit valueChanged( date() ); - d->changed = FALSE; + d->changed = false; } } else if ( e->type() == TQEvent::LocaleChange ) { readLocaleSettings(); @@ -1581,7 +1579,7 @@ void ExtDateEdit::removeFirstNumber( int sec ) d->d = txt.toInt(); d->dayCache = d->d; } - d->ed->repaint( d->ed->rect(), FALSE ); + d->ed->repaint( d->ed->rect(), false ); } /*! \reimp @@ -1607,7 +1605,7 @@ void ExtDateEdit::removeLastNumber( int sec ) d->d = txt.toInt(); d->dayCache = d->d; } - d->ed->repaint( d->ed->rect(), FALSE ); + d->ed->repaint( d->ed->rect(), false ); } /*! @@ -1615,9 +1613,9 @@ void ExtDateEdit::removeLastNumber( int sec ) \brief whether the editor automatically advances to the next section - If autoAdvance is TRUE, the editor will automatically advance + If autoAdvance is true, the editor will automatically advance focus to the next date section if a user has completed a section. - The default is FALSE. + The default is false. */ void ExtDateEdit::setAutoAdvance( bool advance ) @@ -1636,7 +1634,7 @@ bool ExtDateEdit::autoAdvance() const void ExtDateEdit::timerEvent( TQTimerEvent * ) { - d->overwrite = TRUE; + d->overwrite = true; } /*! @@ -1740,12 +1738,12 @@ public: // d->controls = new ExtDateTimeSpinWidget( this, qstrcmp( name(), "qt_datetime_timeedit" ) == 0 ? "qt_spin_widget" : "time edit controls" ); // d->controls->setEditWidget( d->ed ); // setFocusProxy( d->ed ); -// connect( d->controls, TQT_SIGNAL( stepUpPressed() ), TQT_SLOT( stepUp() ) ); -// connect( d->controls, TQT_SIGNAL( stepDownPressed() ), TQT_SLOT( stepDown() ) ); +// connect( d->controls, TQ_SIGNAL( stepUpPressed() ), TQ_SLOT( stepUp() ) ); +// connect( d->controls, TQ_SIGNAL( stepDownPressed() ), TQ_SLOT( stepDown() ) ); // -// d->ed->appendSection( TQNumberSection( 0,0, TRUE, 0 ) ); -// d->ed->appendSection( TQNumberSection( 0,0, TRUE, 1 ) ); -// d->ed->appendSection( TQNumberSection( 0,0, TRUE, 2 ) ); +// d->ed->appendSection( TQNumberSection( 0,0, true, 0 ) ); +// d->ed->appendSection( TQNumberSection( 0,0, true, 1 ) ); +// d->ed->appendSection( TQNumberSection( 0,0, true, 2 ) ); // d->ed->setSeparator( localTimeSep() ); // // d->h = 0; @@ -1754,15 +1752,15 @@ public: // d->display = Hours | Minutes | Seconds; // if ( lAMPM ) { // d->display |= AMPM; -// d->ed->appendSection( TQNumberSection( 0,0, FALSE, 3 ) ); +// d->ed->appendSection( TQNumberSection( 0,0, false, 3 ) ); // } -// d->adv = FALSE; -// d->overwrite = TRUE; +// d->adv = false; +// d->overwrite = true; // d->timerId = 0; -// d->typing = FALSE; +// d->typing = false; // d->min = TQTime( 0, 0, 0 ); // d->max = TQTime( 23, 59, 59 ); -// d->changed = FALSE; +// d->changed = false; // // setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); // @@ -1842,13 +1840,13 @@ public: // d->ed->clearSections(); // d->display = display; // if ( d->display & Hours ) -// d->ed->appendSection( TQNumberSection( 0,0, TRUE, 0 ) ); +// d->ed->appendSection( TQNumberSection( 0,0, true, 0 ) ); // if ( d->display & Minutes ) -// d->ed->appendSection( TQNumberSection( 0,0, TRUE, 1 ) ); +// d->ed->appendSection( TQNumberSection( 0,0, true, 1 ) ); // if ( d->display & Seconds ) -// d->ed->appendSection( TQNumberSection( 0,0, TRUE, 2 ) ); +// d->ed->appendSection( TQNumberSection( 0,0, true, 2 ) ); // if ( d->display & AMPM ) -// d->ed->appendSection( TQNumberSection( 0,0, FALSE, 3 ) ); +// d->ed->appendSection( TQNumberSection( 0,0, false, 3 ) ); // // d->ed->setFocusSection( 0 ); // d->ed->update(); @@ -1881,8 +1879,8 @@ public: // d->s = time.second(); // emit valueChanged( time ); // } -// d->changed = FALSE; -// d->ed->repaint( d->ed->rect(), FALSE ); +// d->changed = false; +// d->ed->repaint( d->ed->rect(), false ); // } // // TQTime TQTimeEdit::time() const @@ -1897,9 +1895,9 @@ public: // \brief whether the editor automatically advances to the next // section // -// If autoAdvance is TRUE, the editor will automatically advance +// If autoAdvance is true, the editor will automatically advance // focus to the next time section if a user has completed a section. -// The default is FALSE. +// The default is false. // */ // // void TQTimeEdit::setAutoAdvance( bool advance ) @@ -1946,10 +1944,10 @@ public: // bool TQTimeEdit::event( TQEvent *e ) // { // if ( e->type() == TQEvent::FocusOut ) { -// d->typing = FALSE; +// d->typing = false; // if ( d->changed ) { // emit valueChanged( time() ); -// d->changed = FALSE; +// d->changed = false; // } // } else if ( e->type() == TQEvent::LocaleChange ) { // readLocaleSettings(); @@ -1964,7 +1962,7 @@ public: // // void TQTimeEdit::timerEvent( TQTimerEvent * ) // { -// d->overwrite = TRUE; +// d->overwrite = true; // } // // @@ -1975,7 +1973,7 @@ public: // void TQTimeEdit::stepUp() // { // int sec = d->ed->mapSection( d->ed->focusSection() ); -// bool accepted = TRUE; +// bool accepted = true; // switch( sec ) { // case 0: // if ( !outOfRange( d->h+1, d->m, d->s ) ) @@ -2002,17 +2000,17 @@ public: // setHour( d->h-12 ); // break; // default: -// accepted = FALSE; +// accepted = false; // #ifdef TQT_CHECK_RANGE // tqWarning( "TQTimeEdit::stepUp: Focus section out of range!" ); // #endif // break; // } // if ( accepted ) { -// d->changed = TRUE; +// d->changed = true; // emit valueChanged( time() ); // } -// d->ed->repaint( d->ed->rect(), FALSE ); +// d->ed->repaint( d->ed->rect(), false ); // } // // @@ -2024,7 +2022,7 @@ public: // { // int sec = d->ed->mapSection( d->ed->focusSection() ); // -// bool accepted = TRUE; +// bool accepted = true; // switch( sec ) { // case 0: // if ( !outOfRange( d->h-1, d->m, d->s ) ) @@ -2051,17 +2049,17 @@ public: // setHour( d->h+12 ); // break; // default: -// accepted = FALSE; +// accepted = false; // #ifdef TQT_CHECK_RANGE // tqWarning( "TQTimeEdit::stepDown: Focus section out of range!" ); // #endif // break; // } // if ( accepted ) { -// d->changed = TRUE; +// d->changed = true; // emit valueChanged( time() ); // } -// d->ed->repaint( d->ed->rect(), FALSE ); +// d->ed->repaint( d->ed->rect(), false ); // } // // @@ -2094,15 +2092,15 @@ public: // { // if ( sec != d->ed->focusSection() ) { // killTimer( d->timerId ); -// d->overwrite = TRUE; -// d->typing = FALSE; +// d->overwrite = true; +// d->typing = false; // TQString txt = sectionText( sec ); // txt = txt.rightJustify( 2, EXTDATETIMEEDIT_HIDDEN_CHAR ); // int offset = sec*2+sec*separator().length() + txt.length(); // d->ed->setSectionSelection( sec, offset - txt.length(), offset ); // if ( d->changed ) { // emit valueChanged( time() ); -// d->changed = FALSE; +// d->changed = false; // } // } // return d->ed->setFocusSection( sec ); @@ -2203,7 +2201,7 @@ public: // // // /*! \internal -// Returns TRUE if \a h, \a m, and \a s are out of range. +// Returns true if \a h, \a m, and \a s are out of range. // */ // // bool TQTimeEdit::outOfRange( int h, int m, int s ) const @@ -2212,11 +2210,11 @@ public: // TQTime currentTime( h, m, s ); // if ( currentTime > maxValue() || // currentTime < minValue() ) -// return TRUE; +// return true; // else -// return FALSE; +// return false; // } -// return TRUE; +// return true; // } // // /*! \reimp @@ -2229,9 +2227,9 @@ public: // return; // sec = d->ed->mapSection( sec ); // killTimer( d->timerId ); -// bool overwrite = FALSE; -// bool accepted = FALSE; -// d->typing = TRUE; +// bool overwrite = false; +// bool accepted = false; +// d->typing = true; // TQString txt; // // switch( sec ) { @@ -2245,7 +2243,7 @@ public: // if ( d->display & AMPM && d->h > 11 ) // num += 12; // if ( !outOfRange( num, d->m, d->s ) ) { -// accepted = TRUE; +// accepted = true; // d->h = num; // } // } else { @@ -2257,19 +2255,19 @@ public: // if ( d->h < 12 ) { // temp = 0; // } -// accepted = TRUE; +// accepted = true; // } else if ( outOfRange( temp + 12, d->m, d->s ) ) { // txt = TQString::number( d->h ); // } else { // if ( d->h > 11 ) { // temp += 12; // } -// accepted = TRUE; +// accepted = true; // } // } else if ( !(d->display & AMPM) && outOfRange( temp, d->m, d->s ) ) { // txt = TQString::number( d->h ); // } else { -// accepted = TRUE; +// accepted = true; // } // // if ( accepted ) @@ -2277,7 +2275,7 @@ public: // // if ( d->adv && txt.length() == 2 ) { // setFocusSection( d->ed->focusSection()+1 ); -// overwrite = TRUE; +// overwrite = true; // } // } // break; @@ -2286,7 +2284,7 @@ public: // txt = TQString::number( d->m ); // if ( d->overwrite || txt.length() == 2 ) { // if ( !outOfRange( d->h, num, d->s ) ) { -// accepted = TRUE; +// accepted = true; // d->m = num; // } // } else { @@ -2297,12 +2295,12 @@ public: // if ( outOfRange( d->h, temp, d->s ) ) // txt = TQString::number( d->m ); // else { -// accepted = TRUE; +// accepted = true; // d->m = temp; // } // if ( d->adv && txt.length() == 2 ) { // setFocusSection( d->ed->focusSection()+1 ); -// overwrite = TRUE; +// overwrite = true; // } // } // break; @@ -2311,7 +2309,7 @@ public: // txt = TQString::number( d->s ); // if ( d->overwrite || txt.length() == 2 ) { // if ( !outOfRange( d->h, d->m, num ) ) { -// accepted = TRUE; +// accepted = true; // d->s = num; // } // } else { @@ -2322,12 +2320,12 @@ public: // if ( outOfRange( d->h, d->m, temp ) ) // txt = TQString::number( d->s ); // else { -// accepted = TRUE; +// accepted = true; // d->s = temp; // } // if ( d->adv && txt.length() == 2 ) { // setFocusSection( d->ed->focusSection()+1 ); -// overwrite = TRUE; +// overwrite = true; // } // } // break; @@ -2343,7 +2341,7 @@ public: // emit valueChanged( time() ); // d->overwrite = overwrite; // d->timerId = startTimer( tqApp->doubleClickInterval()*4 ); -// d->ed->repaint( d->ed->rect(), FALSE ); +// d->ed->repaint( d->ed->rect(), false ); // } // // @@ -2383,7 +2381,7 @@ public: // d->s = txt.toInt(); // break; // } -// d->ed->repaint( d->ed->rect(), FALSE ); +// d->ed->repaint( d->ed->rect(), false ); // } // // /*! \reimp @@ -2418,7 +2416,7 @@ public: // d->s = txt.toInt(); // break; // } -// d->ed->repaint( d->ed->rect(), FALSE ); +// d->ed->repaint( d->ed->rect(), false ); // } // // /*! \reimp @@ -2609,11 +2607,11 @@ void ExtDateTimeEdit::init() d = new ExtDateTimeEditPrivate(); de = new ExtDateEdit( this, "qt_datetime_dateedit" ); te = new TQTimeEdit( this, "qt_datetime_timeedit" ); - d->adv = FALSE; - connect( de, TQT_SIGNAL( valueChanged( const ExtDate& ) ), - this, TQT_SLOT( newValue( const ExtDate& ) ) ); - connect( te, TQT_SIGNAL( valueChanged( const TQTime& ) ), - this, TQT_SLOT( newValue( const TQTime& ) ) ); + d->adv = false; + connect( de, TQ_SIGNAL( valueChanged( const ExtDate& ) ), + this, TQ_SLOT( newValue( const ExtDate& ) ) ); + connect( te, TQ_SIGNAL( valueChanged( const TQTime& ) ), + this, TQ_SLOT( newValue( const TQTime& ) ) ); setFocusProxy( de ); setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); } @@ -2684,7 +2682,7 @@ void ExtDateTimeEdit::newValue( const TQTime& ) /*! Sets the auto advance property of the editor to \a advance. If set - to TRUE, the editor will automatically advance focus to the next + to true, the editor will automatically advance focus to the next date or time section if the user has completed a section. */ @@ -2695,7 +2693,7 @@ void ExtDateTimeEdit::setAutoAdvance( bool advance ) } /*! - Returns TRUE if auto-advance is enabled, otherwise returns FALSE. + Returns true if auto-advance is enabled, otherwise returns false. \sa setAutoAdvance() */ diff --git a/libtdeedu/extdate/extdatetimeedit.h b/libtdeedu/extdate/extdatetimeedit.h index 449839c8..c4feaed7 100644 --- a/libtdeedu/extdate/extdatetimeedit.h +++ b/libtdeedu/extdate/extdatetimeedit.h @@ -37,7 +37,7 @@ class TQTimeEdit; class ExtDateTimeEditBase : public TQWidget { - Q_OBJECT + TQ_OBJECT public: ExtDateTimeEditBase( TQWidget* parent=0, const char* name=0 ) @@ -61,9 +61,9 @@ private: class ExtDateEditPrivate; -class KDE_EXPORT ExtDateEdit : public ExtDateTimeEditBase +class TDE_EXPORT ExtDateEdit : public ExtDateTimeEditBase { - Q_OBJECT + TQ_OBJECT TQ_ENUMS( Order ) TQ_PROPERTY( Order order READ order WRITE setOrder ) @@ -147,7 +147,7 @@ private: // // class TQ_EXPORT TQTimeEdit : public ExtDateTimeEditBase // { -// Q_OBJECT +// TQ_OBJECT // // TQ_SETS( Display ) // TQ_PROPERTY( TQTime time READ time WRITE setTime ) @@ -230,9 +230,9 @@ private: class ExtDateTimeEditPrivate; -class KDE_EXPORT ExtDateTimeEdit : public TQWidget +class TDE_EXPORT ExtDateTimeEdit : public TQWidget { - Q_OBJECT + TQ_OBJECT // TQ_PROPERTY( ExtDateTime dateTime READ dateTime WRITE setDateTime ) @@ -285,7 +285,7 @@ private: class TQNumberSection { public: - TQNumberSection( int selStart = 0, int selEnd = 0, bool separat = TRUE, int actual = -1 ) + TQNumberSection( int selStart = 0, int selEnd = 0, bool separat = true, int actual = -1 ) : selstart( selStart ), selend( selEnd ), act( actual ), sep( separat ) {} int selectionStart() const { return selstart; } @@ -307,7 +307,7 @@ class ExtDateTimeEditorPrivate; class ExtDateTimeEditor : public TQWidget { - Q_OBJECT + TQ_OBJECT public: ExtDateTimeEditor( ExtDateTimeEditBase * parent=0, @@ -343,7 +343,7 @@ private: class ExtDateTimeSpinWidget : public TQSpinWidget { - Q_OBJECT + TQ_OBJECT public: ExtDateTimeSpinWidget( TQWidget *parent, const char *name ) diff --git a/libtdeedu/extdate/extdatewidget.cpp b/libtdeedu/extdate/extdatewidget.cpp index 5d790bf4..87252215 100644 --- a/libtdeedu/extdate/extdatewidget.cpp +++ b/libtdeedu/extdate/extdatewidget.cpp @@ -89,9 +89,9 @@ ExtDateWidget::ExtDateWidget( const ExtDate &date, TQWidget *parent, // d->m_year = new ExtDateWidgetSpinBox(d->calendar->minValidYear(), // d->calendar->maxValidYear(), this); // -// connect(d->m_day, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged())); -// connect(d->m_month, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDateChanged())); -// connect(d->m_year, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged())); +// connect(d->m_day, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(slotDateChanged())); +// connect(d->m_month, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotDateChanged())); +// connect(d->m_year, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(slotDateChanged())); // } void ExtDateWidget::init(const ExtDate& date) @@ -113,9 +113,9 @@ void ExtDateWidget::init(const ExtDate& date) d->m_year = new ExtDateWidgetSpinBox(d->calendar->minValidYear(), d->calendar->maxValidYear(), this); - connect(d->m_day, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged())); - connect(d->m_month, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDateChanged())); - connect(d->m_year, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged())); + connect(d->m_day, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(slotDateChanged())); + connect(d->m_month, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotDateChanged())); + connect(d->m_year, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(slotDateChanged())); } ExtDateWidget::~ExtDateWidget() diff --git a/libtdeedu/extdate/extdatewidget.h b/libtdeedu/extdate/extdatewidget.h index 99c0c5fd..acc02713 100644 --- a/libtdeedu/extdate/extdatewidget.h +++ b/libtdeedu/extdate/extdatewidget.h @@ -32,9 +32,9 @@ * @short A pushbutton to display or allow user selection of a date. * @version $Id$ */ -class KDE_EXPORT ExtDateWidget : public TQWidget +class TDE_EXPORT ExtDateWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT // TQ_PROPERTY( ExtDate date READ date WRITE setDate ) diff --git a/libtdeedu/extdate/main.cpp b/libtdeedu/extdate/main.cpp index 53e8d92f..c444d655 100644 --- a/libtdeedu/extdate/main.cpp +++ b/libtdeedu/extdate/main.cpp @@ -25,6 +25,6 @@ int main( int argc, char *argv[] ) TDEApplication a; TestWidget *t = new TestWidget(0,0); t->show(); - TQObject::connect(kapp, TQT_SIGNAL(lastWindowClosed()), kapp, TQT_SLOT(quit())); + TQObject::connect(tdeApp, TQ_SIGNAL(lastWindowClosed()), tdeApp, TQ_SLOT(quit())); return a.exec(); } diff --git a/libtdeedu/extdate/test_extdate.cpp b/libtdeedu/extdate/test_extdate.cpp index d70d3e94..e787f6e4 100644 --- a/libtdeedu/extdate/test_extdate.cpp +++ b/libtdeedu/extdate/test_extdate.cpp @@ -237,8 +237,8 @@ void test5() void test6_unit(int y, int m, int d) { std::cout << d << "/" << m << "/" << y << " :: " - << ( ExtDate::isValid(y, m, d) ? "TRUE" : "FALSE" ) << " : " - << ( TQDate::isValid(y, m, d) ? "TRUE" : "FALSE" ) << std::endl; + << ( ExtDate::isValid(y, m, d) ? "true" : "false" ) << " : " + << ( TQDate::isValid(y, m, d) ? "true" : "false" ) << std::endl; } void test6() diff --git a/libtdeedu/extdate/testwidget.cpp b/libtdeedu/extdate/testwidget.cpp index a6912ef4..e78546e4 100644 --- a/libtdeedu/extdate/testwidget.cpp +++ b/libtdeedu/extdate/testwidget.cpp @@ -35,9 +35,9 @@ TestWidget::TestWidget( TQWidget *p, const char *name ) : TDEMainWindow( p, name kdp = new KDatePicker(w); edp = new ExtDatePicker(w); kdpEdit = new KLineEdit(w); - kdpEdit->setReadOnly( TRUE ); + kdpEdit->setReadOnly( true ); edpEdit = new KLineEdit(w); - edpEdit->setReadOnly( TRUE ); + edpEdit->setReadOnly( true ); kdw = new KDateWidget( TQDate::currentDate(), w ); edw = new ExtDateWidget( ExtDate::currentDate(), w ); @@ -53,8 +53,8 @@ TestWidget::TestWidget( TQWidget *p, const char *name ) : TDEMainWindow( p, name setCentralWidget(w); - connect( kdp, TQT_SIGNAL( dateChanged(TQDate) ), this, TQT_SLOT( slotKDateChanged(TQDate) ) ); - connect( edp, TQT_SIGNAL( dateChanged(const ExtDate&) ), this, TQT_SLOT( slotExtDateChanged(const ExtDate&) ) ); + connect( kdp, TQ_SIGNAL( dateChanged(TQDate) ), this, TQ_SLOT( slotKDateChanged(TQDate) ) ); + connect( edp, TQ_SIGNAL( dateChanged(const ExtDate&) ), this, TQ_SLOT( slotExtDateChanged(const ExtDate&) ) ); } void TestWidget::slotKDateChanged(TQDate d) { diff --git a/libtdeedu/extdate/testwidget.h b/libtdeedu/extdate/testwidget.h index 6b6db294..04d045f3 100644 --- a/libtdeedu/extdate/testwidget.h +++ b/libtdeedu/extdate/testwidget.h @@ -30,7 +30,7 @@ class TQDate; class ExtDate; class TestWidget : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: TestWidget(TQWidget *parent = NULL, const char *name = NULL); diff --git a/libtdeedu/tdeeducore/Makefile.am b/libtdeedu/tdeeducore/Makefile.am index 856037fd..61c56091 100644 --- a/libtdeedu/tdeeducore/Makefile.am +++ b/libtdeedu/tdeeducore/Makefile.am @@ -11,7 +11,7 @@ libtdeeducore_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 3:0:2 libtdeeducode_includedir = $(includedir)/libtdeedu libtdeeducode_include_HEADERS = keduvocdata.h -libtdeeducore_la_LIBADD = $(LIB_TDECORE) $(LIB_QT) +libtdeeducore_la_LIBADD = $(LIB_TDECORE) $(LIB_TQT) METASOURCES = AUTO diff --git a/libtdeedu/tdeeducore/keduvocdata.h b/libtdeedu/tdeeducore/keduvocdata.h index b8ac6676..5006488a 100644 --- a/libtdeedu/tdeeducore/keduvocdata.h +++ b/libtdeedu/tdeeducore/keduvocdata.h @@ -21,9 +21,9 @@ #include <tqdom.h> #include <tqvaluelist.h> -#include <kdemacros.h> +#include <tdemacros.h> -class KDE_EXPORT KEduVocDataItem +class TDE_EXPORT KEduVocDataItem { public: KEduVocDataItem(); @@ -42,7 +42,7 @@ private: typedef TQValueList<KEduVocDataItem> KEduVocDataItemList; -class KDE_EXPORT KEduVocData +class TDE_EXPORT KEduVocData { public: static KEduVocDataItemList parse(const TQString &fileName); diff --git a/libtdeedu/tdeeducore/tdeeducore.kdevprj b/libtdeedu/tdeeducore/tdeeducore.kdevprj deleted file mode 100644 index 5cd1dc62..00000000 --- a/libtdeedu/tdeeducore/tdeeducore.kdevprj +++ /dev/null @@ -1,84 +0,0 @@ -[./Makefile.am] -files=./tdeeducore.kdevprj, -sub_dirs= -type=normal - -[./tdeeducore.kdevprj] -dist=true -install=false -install_location= -type=DATA - -[Config for BinMakefileAm] -addcxxflags= -bin_program=tdeeducore -cflags= -cppflags= -cxxflags=\s-O0 -ldadd= -ldflags=\s -libtool_dir= -path_to_bin_program=. - -[General] -author=earnold -configure_args=\s--build=i386-linux --host=i386-linux --target=i386-linux\s -dir_where_make_will_be_called= -email=earnold@venus -kdevprj_version=1.3 -lfv_open_groups= -make_options=\s-j1 all\s -makefiles=./Makefile.am,Makefile.am,tests/Makefile.am -modifyMakefiles=false -project_name=tdeeducore -project_type=normal_empty -short_info= -sub_dir= -version=1.0 -version_control=CVS -workspace=1 - -[LFV Groups] -GNU=AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,NEWS, -Headers=*.h,*.hxx,*.hpp,*.H, -Others=*, -Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l, -Translations=*.ts,*.po, -User Interface=*.ui,*.kdevdlg,*.rc, -groups=Headers,Sources,GNU,Translations,User Interface,Others - -[Makefile.am] -dist=true -files=Makefile.am,kedudata.cpp,kedudata.h -install=false -install_location= -sub_dirs=tests -type=static_library - -[kedudata.cpp] -dist=true -install=false -install_location= -type=SOURCE - -[kedudata.h] -dist=true -install=false -install_location= -type=HEADER - -[tests/Makefile.am] -dist=true -files=tests/loader.cpp,tests/Makefile.am -install=false -install_location= -sharedlib_LDFLAGS=-version-info 0:0:0 -sharedlib_rootname=tests -sub_dirs= -type=DATA - -[tests/loader.cpp] -dist=true -install=false -install_location= -type=SOURCE diff --git a/libtdeedu/tdeeduplot/Makefile.am b/libtdeedu/tdeeduplot/Makefile.am index 21b84f2a..00d8f278 100644 --- a/libtdeedu/tdeeduplot/Makefile.am +++ b/libtdeedu/tdeeduplot/Makefile.am @@ -9,7 +9,7 @@ libtdeeduplotinclude_HEADERS = kplotobject.h kplotaxis.h kplotwidget.h libtdeeduplot_la_SOURCES = kplotobject.cpp kplotaxis.cpp kplotwidget.cpp libtdeeduplot_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 3:0:2 -libtdeeduplot_la_LIBADD = $(LIB_TDECORE) $(LIB_QT) +libtdeeduplot_la_LIBADD = $(LIB_TDECORE) $(LIB_TQT) METASOURCES = AUTO diff --git a/libtdeedu/tdeeduplot/README b/libtdeedu/tdeeduplot/README index ab695f9a..e9a52c23 100644 --- a/libtdeedu/tdeeduplot/README +++ b/libtdeedu/tdeeduplot/README @@ -1,6 +1,6 @@ This library provides KPlotWidget and KPlotObject classes. -KPlotWidget is a QWidget-derived class that provides a virtual baseclass +KPlotWidget is a TQWidget-derived class that provides a virtual baseclass for easy data-plotting. The idea behind KPlotWidget is that you only have to specify information in "data units"; i.e., the natural units of the data being plotted. KPlotWidget automatically converts everything diff --git a/libtdeedu/tdeeduplot/kplotaxis.h b/libtdeedu/tdeeduplot/kplotaxis.h index 3209b18c..901bc4a3 100644 --- a/libtdeedu/tdeeduplot/kplotaxis.h +++ b/libtdeedu/tdeeduplot/kplotaxis.h @@ -20,14 +20,14 @@ #include <tqstring.h> -#include <kdemacros.h> +#include <tdemacros.h> /**class KPlotAxis *@short Contains all data for drawing an axis including format specification axis labels. *@author Andreas Nicolai *@version 1.0 */ -class KDE_EXPORT KPlotAxis { +class TDE_EXPORT KPlotAxis { public: /**@short Default constructor, creates a default axis. */ diff --git a/libtdeedu/tdeeduplot/kplotobject.h b/libtdeedu/tdeeduplot/kplotobject.h index f1074cb6..70fe608f 100644 --- a/libtdeedu/tdeeduplot/kplotobject.h +++ b/libtdeedu/tdeeduplot/kplotobject.h @@ -22,14 +22,14 @@ class TQString; class TQPainter; -#include <kdemacros.h> +#include <tdemacros.h> /**class DRect *@short equivalent of TQRect with double x,y coordinates *@author Jason Harris *@version 1.0 */ -class KDE_EXPORT DRect { +class TDE_EXPORT DRect { public: DRect() { DRect( 0.0, 0.0, 1.0, 1.0 ); } DRect( double x, double y, double w, double h ) { X = x; Y = y; W = w; H = h; } @@ -56,7 +56,7 @@ private: *@author Jason Harris *@version 1.0 */ -class KDE_EXPORT DPoint { +class TDE_EXPORT DPoint { public: DPoint() { DPoint( 0.0, 0.0 ); } DPoint( double x, double y ) { setX( x ); setY( y ); } @@ -87,7 +87,7 @@ private: *about the object's appearance, depending on its type. There is a draw function *for plotting the object on a KPlotWidget's TQPainter. */ -class KDE_EXPORT KPlotObject{ +class TDE_EXPORT KPlotObject{ public: /**@enum PTYPE *The Type classification of the KPlotObject diff --git a/libtdeedu/tdeeduplot/kplotwidget.h b/libtdeedu/tdeeduplot/kplotwidget.h index fd3504df..98566edd 100644 --- a/libtdeedu/tdeeduplot/kplotwidget.h +++ b/libtdeedu/tdeeduplot/kplotwidget.h @@ -38,8 +38,8 @@ class TQPixmap; *tickmarks and labels and a list of KPlotObjects to be drawn. */ -class KDE_EXPORT KPlotWidget : public TQWidget { - Q_OBJECT +class TDE_EXPORT KPlotWidget : public TQWidget { + TQ_OBJECT public: /**@short Constructor. Sets the primary x and y limits in data units. diff --git a/libtdeedu/tdeeduui/Makefile.am b/libtdeedu/tdeeduui/Makefile.am index 0cc29e05..3b19aeea 100644 --- a/libtdeedu/tdeeduui/Makefile.am +++ b/libtdeedu/tdeeduui/Makefile.am @@ -10,7 +10,7 @@ libtdeeduuiincludedir = $(includedir)/libtdeedu libtdeeduuiinclude_HEADERS = tdeeduglossary.h libtdeeduui_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 3:5:0 -libtdeeduui_la_LIBADD = $(LIB_TDECORE) $(LIB_TDEIO) $(LIB_TDEUI) $(LIB_TDEHTML) $(LIB_QT) +libtdeeduui_la_LIBADD = $(LIB_TDECORE) $(LIB_TDEIO) $(LIB_TDEUI) $(LIB_TDEHTML) $(LIB_TQT) METASOURCES = AUTO diff --git a/libtdeedu/tdeeduui/kedusimpleentrydlg.h b/libtdeedu/tdeeduui/kedusimpleentrydlg.h index ae560f76..72d0f512 100644 --- a/libtdeedu/tdeeduui/kedusimpleentrydlg.h +++ b/libtdeedu/tdeeduui/kedusimpleentrydlg.h @@ -6,7 +6,7 @@ class KEduSimpleEntryDlg : public KEduSimpleEntryDlgForm { - Q_OBJECT + TQ_OBJECT public: diff --git a/libtdeedu/tdeeduui/tdeeduglossary.cpp b/libtdeedu/tdeeduui/tdeeduglossary.cpp index 50443f2f..9ae67588 100644 --- a/libtdeedu/tdeeduui/tdeeduglossary.cpp +++ b/libtdeedu/tdeeduui/tdeeduglossary.cpp @@ -17,7 +17,7 @@ #include <tdeglobal.h> #include <tdelistview.h> #include <tdelistviewsearchline.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdeactioncollection.h> #include <tqfile.h> @@ -203,9 +203,9 @@ GlossaryDialog::GlossaryDialog( bool folded, TQWidget *parent, const char *name) m_htmlpart = new TDEHTMLPart( vs, "html-part" ); - connect( m_htmlpart->browserExtension(), TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), this, TQT_SLOT( displayItem( const KURL &, const KParts::URLArgs & ) ) ); - connect( m_glosstree, TQT_SIGNAL(clicked( TQListViewItem * )), this, TQT_SLOT(slotClicked( TQListViewItem * ))); - connect( clear, TQT_SIGNAL(clicked()), m_search, TQT_SLOT(clear())); + connect( m_htmlpart->browserExtension(), TQ_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), this, TQ_SLOT( displayItem( const KURL &, const KParts::URLArgs & ) ) ); + connect( m_glosstree, TQ_SIGNAL(clicked( TQListViewItem * )), this, TQ_SLOT(slotClicked( TQListViewItem * ))); + connect( clear, TQ_SIGNAL(clicked()), m_search, TQ_SLOT(clear())); resize( 600, 400 ); } diff --git a/libtdeedu/tdeeduui/tdeeduglossary.h b/libtdeedu/tdeeduui/tdeeduglossary.h index dcb510d4..cef411b5 100644 --- a/libtdeedu/tdeeduui/tdeeduglossary.h +++ b/libtdeedu/tdeeduui/tdeeduglossary.h @@ -34,7 +34,7 @@ class GlossaryItem; * This class stores all items to be displayed. It also * has access-methods to the items */ -class KDE_EXPORT Glossary +class TDE_EXPORT Glossary { public: Glossary(); @@ -176,7 +176,7 @@ class KDE_EXPORT Glossary * a number of pictures or references associated to it. * These are stored as TQStringLists. */ -class KDE_EXPORT GlossaryItem +class TDE_EXPORT GlossaryItem { public: GlossaryItem(){} @@ -237,9 +237,9 @@ class KDE_EXPORT GlossaryItem * @author Pino Toscano * @author Carsten Niehaus */ -class KDE_EXPORT GlossaryDialog : public KDialogBase +class TDE_EXPORT GlossaryDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/libtdeedu/tdeeduui/tdeeduui.kdevprj b/libtdeedu/tdeeduui/tdeeduui.kdevprj deleted file mode 100644 index 1fa59784..00000000 --- a/libtdeedu/tdeeduui/tdeeduui.kdevprj +++ /dev/null @@ -1,92 +0,0 @@ -[./Makefile.am] -files=./tdeeduui.kdevprj, -sub_dirs= -type=normal - -[./tdeeduui.kdevprj] -dist=true -install=false -install_location= -type=DATA - -[Config for BinMakefileAm] -addcxxflags= -bin_program=tdeeduui -cflags= -cppflags= -cxxflags=\s-O0 -ldadd= -ldflags=\s \s -libtool_dir= -path_to_bin_program=. - -[General] -author=earnold -configure_args=\s--build=i386-linux --host=i386-linux --target=i386-linux\s -dir_where_make_will_be_called=\s -email=earnold@venus -kdevprj_version=1.3 -lfv_open_groups=Others -make_options=\s-j1 all\s -makefiles=./Makefile.am,Makefile.am,tests/Makefile.am -modifyMakefiles=false -project_name=tdeeduui -project_type=normal_empty -short_info= -sub_dir= -version=1.0 -version_control=CVS -workspace=1 - -[LFV Groups] -GNU=AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,NEWS, -Headers=*.h,*.hxx,*.hpp,*.H, -Others=*, -Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l, -Translations=*.ts,*.po, -User Interface=*.ui,*.kdevdlg,*.rc, -groups=Headers,Sources,GNU,Translations,User Interface,Others - -[Makefile.am] -dist=true -files=Makefile.am,kedusimpleentrydlg.h,kedusimpleentrydlgForm.ui,kedusimpleentrydlg.cpp -install=false -install_location= -sharedlib_LDFLAGS=-version-info 0:0:0 -sharedlib_rootname=. -sub_dirs=tests -type=static_library - -[kedusimpleentrydlg.cpp] -dist=true -install=false -install_location= -type=SOURCE - -[kedusimpleentrydlg.h] -dist=true -install=false -install_location= -type=HEADER - -[kedusimpleentrydlgForm.ui] -dist=true -install=false -install_location= -type=SOURCE - -[tests/Makefile.am] -dist=true -files=tests/entrydialogs.cpp,tests/Makefile.am -install=false -install_location= -sharedlib_LDFLAGS=-version-info 0:0:0 -sharedlib_rootname=tests -sub_dirs= -type=DATA - -[tests/entrydialogs.cpp] -dist=true -install=false -install_location= -type=SOURCE |