summaryrefslogtreecommitdiffstats
path: root/libtdeedu
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-11-06 11:38:51 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-11-07 11:17:57 +0900
commitc8e3d1d47df0efdc66fe6b96f8b1c78a2cb18ee6 (patch)
tree546585ccc13868dc2e89ed4728a4911123bd3849 /libtdeedu
parent402e94ba9dc2f1ac6e929b18919e9c31c228b47e (diff)
downloadtdeedu-c8e3d1d47df0efdc66fe6b96f8b1c78a2cb18ee6.tar.gz
tdeedu-c8e3d1d47df0efdc66fe6b96f8b1c78a2cb18ee6.zip
Replace Qt with TQt
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'libtdeedu')
-rw-r--r--libtdeedu/extdate/extdatetbl.cpp6
-rw-r--r--libtdeedu/extdate/extdatetime.cpp72
-rw-r--r--libtdeedu/extdate/extdatetime.h14
-rw-r--r--libtdeedu/extdate/extdatetimeedit.cpp4
4 files changed, 48 insertions, 48 deletions
diff --git a/libtdeedu/extdate/extdatetbl.cpp b/libtdeedu/extdate/extdatetbl.cpp
index dc12d180..087c674e 100644
--- a/libtdeedu/extdate/extdatetbl.cpp
+++ b/libtdeedu/extdate/extdatetbl.cpp
@@ -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();
@@ -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;
diff --git a/libtdeedu/extdate/extdatetime.cpp b/libtdeedu/extdate/extdatetime.cpp
index 5d92ebd6..60d6ea56 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
@@ -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,7 +721,7 @@ 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;
@@ -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() );
}
@@ -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 );
}
diff --git a/libtdeedu/extdate/extdatetime.h b/libtdeedu/extdate/extdatetime.h
index 61ddf126..7e0a64b0 100644
--- a/libtdeedu/extdate/extdatetime.h
+++ b/libtdeedu/extdate/extdatetime.h
@@ -65,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
@@ -84,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 );
@@ -137,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
@@ -159,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 e351f440..8449c044 100644
--- a/libtdeedu/extdate/extdatetimeedit.cpp
+++ b/libtdeedu/extdate/extdatetimeedit.cpp
@@ -112,7 +112,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 +142,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" );