summaryrefslogtreecommitdiffstats
path: root/libtdeedu/extdate
diff options
context:
space:
mode:
Diffstat (limited to 'libtdeedu/extdate')
-rw-r--r--libtdeedu/extdate/extcalendarsystemgregorian.cpp2
-rw-r--r--libtdeedu/extdate/extdatepicker.cpp32
-rw-r--r--libtdeedu/extdate/extdatepicker.h6
-rw-r--r--libtdeedu/extdate/extdatetbl.cpp40
-rw-r--r--libtdeedu/extdate/extdatetbl.h8
-rw-r--r--libtdeedu/extdate/extdatetime.cpp22
-rw-r--r--libtdeedu/extdate/extdatetime.h6
-rw-r--r--libtdeedu/extdate/extdatetimeedit.cpp106
-rw-r--r--libtdeedu/extdate/extdatetimeedit.h12
-rw-r--r--libtdeedu/extdate/extdatewidget.cpp14
-rw-r--r--libtdeedu/extdate/test_extdate.cc16
-rw-r--r--libtdeedu/extdate/testwidget.cpp6
12 files changed, 135 insertions, 135 deletions
diff --git a/libtdeedu/extdate/extcalendarsystemgregorian.cpp b/libtdeedu/extdate/extcalendarsystemgregorian.cpp
index fc3fe51a..0b167ce9 100644
--- a/libtdeedu/extdate/extcalendarsystemgregorian.cpp
+++ b/libtdeedu/extdate/extcalendarsystemgregorian.cpp
@@ -294,7 +294,7 @@ int ExtCalendarSystemGregorian::weekDayOfPray() const
TQString ExtCalendarSystemGregorian::calendarName() const
{
- return TQString::fromLatin1("gregorian");
+ return TQString::tqfromLatin1("gregorian");
}
bool ExtCalendarSystemGregorian::isLunar() const
diff --git a/libtdeedu/extdate/extdatepicker.cpp b/libtdeedu/extdate/extdatepicker.cpp
index 8d927a21..2b267d8e 100644
--- a/libtdeedu/extdate/extdatepicker.cpp
+++ b/libtdeedu/extdate/extdatepicker.cpp
@@ -20,7 +20,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <layout.h>
+#include <tqlayout.h>
#include <tqstyle.h>
#include <tqtoolbutton.h>
#include <tqtooltip.h>
@@ -77,7 +77,7 @@ void ExtDatePicker::fillWeeksCombo(const ExtDate &date)
for (; day <= lastDay; day = d->calendar->addDays(day, 7 /*calendar->daysOfWeek()*/) )
{
int year = 0;
- TQString week = i18n("Week %1").arg(d->calendar->weekNumber(day, &year));
+ TQString week = i18n("Week %1").tqarg(d->calendar->weekNumber(day, &year));
if ( year != date.year() ) week += "*"; // show that this is a week from a different year
d->selectWeek->insertItem(week);
}
@@ -98,7 +98,7 @@ ExtDatePicker::ExtDatePicker(TQWidget *parent, ExtDate dt, const char *name, WFl
ExtDatePicker::ExtDatePicker( TQWidget *parent, const char *name )
: TQFrame(parent,name)
{
- init( ExtDate::currentDate() );
+ init( ExtDate::tqcurrentDate() );
}
void ExtDatePicker::init( const ExtDate &dt )
@@ -166,17 +166,17 @@ void ExtDatePicker::init( const ExtDate &dt )
if ( TQApplication::reverseLayout() )
{
- yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow")));
- yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow")));
- monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow")));
- monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow")));
+ yearForward->setIconSet(BarIconSet(TQString::tqfromLatin1("2leftarrow")));
+ yearBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("2rightarrow")));
+ monthForward->setIconSet(BarIconSet(TQString::tqfromLatin1("1leftarrow")));
+ monthBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("1rightarrow")));
}
else
{
- yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow")));
- yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow")));
- monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow")));
- monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow")));
+ yearForward->setIconSet(BarIconSet(TQString::tqfromLatin1("2rightarrow")));
+ yearBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("2leftarrow")));
+ monthForward->setIconSet(BarIconSet(TQString::tqfromLatin1("1rightarrow")));
+ monthBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("1leftarrow")));
}
connect(table, TQT_SIGNAL(dateChanged(const ExtDate&)), TQT_SLOT(dateChangedSlot(const ExtDate&)));
connect(table, TQT_SIGNAL(tableClicked()), TQT_SLOT(tableClickedSlot()));
@@ -386,7 +386,7 @@ ExtDatePicker::selectYearClicked()
KPopupFrame* popup = new KPopupFrame(this);
ExtDateInternalYearSelector* picker = new ExtDateInternalYearSelector(popup);
// -----
- picker->resize(picker->sizeHint());
+ picker->resize(picker->tqsizeHint());
popup->setMainWidget(picker);
connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int)));
picker->setFocus();
@@ -446,13 +446,13 @@ ExtDatePicker::lineEnterPressed()
void
ExtDatePicker::todayButtonClicked()
{
- setDate(ExtDate::currentDate());
+ setDate(ExtDate::tqcurrentDate());
}
TQSize
-ExtDatePicker::sizeHint() const
+ExtDatePicker::tqsizeHint() const
{
- return TQWidget::sizeHint();
+ return TQWidget::tqsizeHint();
}
void
@@ -512,7 +512,7 @@ ExtDatePicker::setCloseButton( bool enable )
TQToolTip::add(d->closeButton, i18n("Close"));
d->closeButton->setPixmap( SmallIcon("remove") );
connect( d->closeButton, TQT_SIGNAL( clicked() ),
- topLevelWidget(), TQT_SLOT( close() ) );
+ tqtopLevelWidget(), TQT_SLOT( close() ) );
}
else {
delete d->closeButton;
diff --git a/libtdeedu/extdate/extdatepicker.h b/libtdeedu/extdate/extdatepicker.h
index f8295dfe..794ccea6 100644
--- a/libtdeedu/extdate/extdatepicker.h
+++ b/libtdeedu/extdate/extdatepicker.h
@@ -62,7 +62,7 @@ public:
* initially.
**/
ExtDatePicker(TQWidget *parent=0,
- ExtDate=ExtDate::currentDate(),
+ ExtDate=ExtDate::tqcurrentDate(),
const char *name=0);
/** The usual constructor. The given date will be displayed
@@ -92,7 +92,7 @@ public:
* size hint, try adding 28 to each of the reported numbers of
* pixels.
**/
- TQSize sizeHint() const;
+ TQSize tqsizeHint() const;
/**
* Sets the date.
@@ -138,7 +138,7 @@ public:
/**
* By calling this method with @p enable = true, ExtDatePicker will show
* a little close-button in the upper button-row. Clicking the
- * close-button will cause the ExtDatePicker's topLevelWidget()'s close()
+ * close-button will cause the ExtDatePicker's tqtopLevelWidget()'s close()
* method being called. This is mostly useful for toplevel datepickers
* without a window manager decoration.
* @see hasCloseButton
diff --git a/libtdeedu/extdate/extdatetbl.cpp b/libtdeedu/extdate/extdatetbl.cpp
index 78c7c9a8..55458417 100644
--- a/libtdeedu/extdate/extdatetbl.cpp
+++ b/libtdeedu/extdate/extdatetbl.cpp
@@ -124,7 +124,7 @@ ExtDateTable::ExtDateTable(TQWidget *parent, ExtDate date_, const char* name, WF
if(!date_.isValid())
{
kdDebug() << "ExtDateTable ctor: WARNING: Given date is invalid, using current date." << endl;
- date_=ExtDate::currentDate();
+ date_=ExtDate::tqcurrentDate();
}
setFocusPolicy( TQ_StrongFocus );
setNumRows(7); // 6 weeks max + headline
@@ -204,7 +204,7 @@ ExtDateTable::paintCell(TQPainter *painter, int row, int col)
normalday=false;
TQBrush brushTitle();
- TQBrush brushInvertTitle(colorGroup().base());
+ TQBrush brushInvertTitle(tqcolorGroup().base());
TQColor titleColor(isEnabled()?( KGlobalSettings::activeTitleColor() ):( KGlobalSettings::inactiveTitleColor() ) );
TQColor textColor(isEnabled()?( KGlobalSettings::activeTextColor() ):( KGlobalSettings::inactiveTextColor() ) );
if (!normalday)
@@ -221,7 +221,7 @@ ExtDateTable::paintCell(TQPainter *painter, int row, int col)
}
painter->drawText(0, 0, w, h-1, AlignCenter,
d->calendar->weekDayName(daynum, true), -1, &rect);
- painter->setPen(colorGroup().text());
+ painter->setPen(tqcolorGroup().text());
painter->moveTo(0, h-1);
painter->lineTo(w-1, h-1);
// ----- draw the weekday:
@@ -238,7 +238,7 @@ ExtDateTable::paintCell(TQPainter *painter, int row, int col)
// � painting a day of the previous month or
// � painting a day of the following month
// TODO: don't hardcode gray here! Use a color with less contrast to the background than normal text.
- painter->setPen( colorGroup().mid() );
+ painter->setPen( tqcolorGroup().mid() );
// painter->setPen(gray);
} else { // paint a day of the current month
if ( d->useCustomColors )
@@ -263,9 +263,9 @@ ExtDateTable::paintCell(TQPainter *painter, int row, int col)
}
painter->setPen( mode->fgColor );
} else
- painter->setPen(colorGroup().text());
+ painter->setPen(tqcolorGroup().text());
} else //if ( firstWeekDay < 4 ) // <- this doesn' make sense at all!
- painter->setPen(colorGroup().text());
+ painter->setPen(tqcolorGroup().text());
}
pen=painter->pen();
@@ -276,19 +276,19 @@ ExtDateTable::paintCell(TQPainter *painter, int row, int col)
if( ((offset+dy) == (pos+1)) && hasFocus())
{
// draw the currently selected date
- painter->setPen(colorGroup().highlight());
- painter->setBrush(colorGroup().highlight());
- pen=TQPen(colorGroup().highlightedText());
+ painter->setPen(tqcolorGroup().highlight());
+ painter->setBrush(tqcolorGroup().highlight());
+ pen=TQPen(tqcolorGroup().highlightedText());
} else {
painter->setBrush(paletteBackgroundColor());
painter->setPen(paletteBackgroundColor());
-// painter->setBrush(colorGroup().base());
-// painter->setPen(colorGroup().base());
+// painter->setBrush(tqcolorGroup().base());
+// painter->setPen(tqcolorGroup().base());
}
- if ( pCellDate == ExtDate::currentDate() )
+ if ( pCellDate == ExtDate::tqcurrentDate() )
{
- painter->setPen(colorGroup().text());
+ painter->setPen(tqcolorGroup().text());
}
if ( paintRect ) painter->drawRect(0, 0, w, h);
@@ -347,7 +347,7 @@ ExtDateTable::keyPressEvent( TQKeyEvent *e )
setDate(date.addDays(1));
return;
case Key_N:
- setDate(ExtDate::currentDate());
+ setDate(ExtDate::tqcurrentDate());
return;
case Key_Return:
case Key_Enter:
@@ -390,7 +390,7 @@ ExtDateTable::setFontSize(int size)
maxCell.setHeight(TQMAX(maxCell.height(), rect.height()));
}
// ----- compare with a real wide number and add some space:
- rect=metrics.boundingRect(TQString::fromLatin1("88"));
+ rect=metrics.boundingRect(TQString::tqfromLatin1("88"));
maxCell.setWidth(TQMAX(maxCell.width()+2, rect.width()));
maxCell.setHeight(TQMAX(maxCell.height()+4, rect.height()));
}
@@ -519,14 +519,14 @@ void ExtDateTable::focusOutEvent( TQFocusEvent *e )
}
TQSize
-ExtDateTable::sizeHint() const
+ExtDateTable::tqsizeHint() const
{
if(maxCell.height()>0 && maxCell.width()>0)
{
return TQSize(maxCell.width()*numCols()+2*frameWidth(),
(maxCell.height()+2)*numRows()+2*frameWidth());
} else {
- kdDebug() << "ExtDateTable::sizeHint: obscure failure - " << endl;
+ kdDebug() << "ExtDateTable::tqsizeHint: obscure failure - " << endl;
return TQSize(-1, -1);
}
}
@@ -677,7 +677,7 @@ ExtDateInternalMonthPicker::ExtDateInternalMonthPicker
}
TQSize
-ExtDateInternalMonthPicker::sizeHint() const
+ExtDateInternalMonthPicker::tqsizeHint() const
{
return TQSize((max.width()+6)*numCols()+2*frameWidth(),
(max.height()+6)*numRows()+2*frameWidth());
@@ -779,7 +779,7 @@ ExtDateInternalMonthPicker::contentsMouseMoveEvent(TQMouseEvent *e)
updateCell( row, col /*, false */ ); // mark the new active cell
}
}
- if ( tmpRow > -1 ) // repaint the former active cell
+ if ( tmpRow > -1 ) // tqrepaint the former active cell
updateCell( tmpRow, tmpCol /*, true */ );
}
}
@@ -947,7 +947,7 @@ int
KPopupFrame::exec(TQPoint pos)
{
popup(pos);
- repaint();
+ tqrepaint();
tqApp->enter_loop();
hide();
return result;
diff --git a/libtdeedu/extdate/extdatetbl.h b/libtdeedu/extdate/extdatetbl.h
index de55408c..fbbc880b 100644
--- a/libtdeedu/extdate/extdatetbl.h
+++ b/libtdeedu/extdate/extdatetbl.h
@@ -101,7 +101,7 @@ public:
/**
* The size hint.
*/
- TQSize sizeHint() const;
+ TQSize tqsizeHint() const;
/**
* Return the result. 0 means no selection (reject()), 1..12 are the
* months.
@@ -278,7 +278,7 @@ public:
* The constructor.
*/
ExtDateTable(TQWidget *parent=0,
- ExtDate date=ExtDate::currentDate(),
+ ExtDate date=ExtDate::tqcurrentDate(),
const char* name=0, WFlags f=0);
/**
@@ -291,9 +291,9 @@ public:
* To save some time, the size of the largest used cell content is
* calculated in each paintCell() call, since all calculations have
* to be done there anyway. The size is stored in maxCell. The
- * sizeHint() simply returns a multiple of maxCell.
+ * tqsizeHint() simply returns a multiple of maxCell.
*/
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
/**
* Set the font size of the date table.
*/
diff --git a/libtdeedu/extdate/extdatetime.cpp b/libtdeedu/extdate/extdatetime.cpp
index fa87a85f..d8984eee 100644
--- a/libtdeedu/extdate/extdatetime.cpp
+++ b/libtdeedu/extdate/extdatetime.cpp
@@ -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::tqcurrentDate(Qt::TimeSpec ts)
{
time_t a_current_time;
struct tm a_current_time_tm;
@@ -559,7 +559,7 @@ int ExtDate::dayOfYear(int y, int m, int d)
A ExtDateTime object is typically created either by giving a date
and time explicitly in the constructor, or by using the static
- function currentDateTime(), which returns a ExtDateTime object set
+ function tqcurrentDateTime(), which returns a ExtDateTime object set
to the system clock's time. The date and time can be changed with
setDate() and setTime(). A datetime can also be set using the
setTime_t() function, which takes a POSIX-standard "number of
@@ -933,7 +933,7 @@ int ExtDateTime::daysTo( const ExtDateTime &dt ) const
Example:
\code
- ExtDateTime dt = ExtDateTime::currentDateTime();
+ ExtDateTime dt = ExtDateTime::tqcurrentDateTime();
ExtDateTime xmas( ExtDate(dt.date().year(),12,24), TQTime(17,00) );
kdDebug( ) << "There are " << dt.secsTo(xmas) << " seconds to Christmas" << endl;
\endcode
@@ -1023,28 +1023,28 @@ bool ExtDateTime::operator>=( const ExtDateTime &dt ) const
Returns the current datetime, as reported by the system clock.
- \sa ExtDate::currentDate(), TQTime::currentTime()
+ \sa ExtDate::tqcurrentDate(), TQTime::currentTime()
*/
-ExtDateTime ExtDateTime::currentDateTime()
+ExtDateTime ExtDateTime::tqcurrentDateTime()
{
- return currentDateTime( Qt::LocalTime );
+ return tqcurrentDateTime( Qt::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::tqcurrentDate(), TQTime::currentTime(), Qt::TimeSpec
*/
-ExtDateTime ExtDateTime::currentDateTime( Qt::TimeSpec ts )
+ExtDateTime ExtDateTime::tqcurrentDateTime( Qt::TimeSpec ts )
{
ExtDateTime dt;
- dt.setDate( ExtDate::currentDate(ts) );
+ dt.setDate( ExtDate::tqcurrentDate(ts) );
TQTime t = t.currentTime(ts);
if ( t.hour()==0 && t.minute()==0 ) // midnight or right after?
- dt.setDate( ExtDate::currentDate(ts) ); // fetch date again
+ dt.setDate( ExtDate::tqcurrentDate(ts) ); // fetch date again
dt.setTime( t );
return dt;
}
@@ -1099,7 +1099,7 @@ ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f )
TQTime time;
TQString sd = s;
int hour, minute, second;
- int pivot = s.find( TQRegExp(TQString::fromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) );
+ int pivot = s.find( TQRegExp(TQString::tqfromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) );
if ( pivot != -1 ) {
hour = s.mid( pivot, 2 ).toInt();
minute = s.mid( pivot+3, 2 ).toInt();
diff --git a/libtdeedu/extdate/extdatetime.h b/libtdeedu/extdate/extdatetime.h
index 479d1fae..0ebe324f 100644
--- a/libtdeedu/extdate/extdatetime.h
+++ b/libtdeedu/extdate/extdatetime.h
@@ -88,7 +88,7 @@ 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 tqcurrentDate( Qt::TimeSpec ts = Qt::LocalTime );
#ifndef TQT_NO_DATESTRING
static ExtDate fromString( const TQString &s );
static ExtDate fromString( const TQString &s, Qt::DateFormat f );
@@ -162,8 +162,8 @@ public:
bool operator>( const ExtDateTime &dt ) const;
bool operator>=( const ExtDateTime &dt ) const;
- static ExtDateTime currentDateTime();
- static ExtDateTime currentDateTime( Qt::TimeSpec );
+ static ExtDateTime tqcurrentDateTime();
+ static ExtDateTime tqcurrentDateTime( Qt::TimeSpec );
#ifndef TQT_NO_DATESTRING
static ExtDateTime fromString( const TQString &s );
static ExtDateTime fromString( const TQString &s, Qt::DateFormat f );
diff --git a/libtdeedu/extdate/extdatetimeedit.cpp b/libtdeedu/extdate/extdatetimeedit.cpp
index b2468107..796bd858 100644
--- a/libtdeedu/extdate/extdatetimeedit.cpp
+++ b/libtdeedu/extdate/extdatetimeedit.cpp
@@ -266,7 +266,7 @@ public:
{
int fw = 0;
if ( frm )
- fw = style.pixelMetric(TQStyle::PM_DefaultFrameWidth);
+ fw = style.tqpixelMetric(TQStyle::PM_DefaultFrameWidth);
parag->truncate( 0 );
parag->append( txt );
@@ -295,7 +295,7 @@ public:
TQRect r( rect.x(), rect.y(), rect.width() - 2 * ( 2 + fw ), rect.height() );
parag->pseudoDocument()->docRect = r;
- parag->invalidate(0);
+ parag->tqinvalidate(0);
parag->format();
int xoff = 2 + fw - offset;
@@ -433,9 +433,9 @@ void ExtDateTimeEditor::paintEvent( TQPaintEvent * )
TQSharedDoubleBuffer buffer( this );
const TQBrush &bg =
- colorGroup().brush( isEnabled() ? TQColorGroup::Base : TQColorGroup::Background );
+ tqcolorGroup().brush( isEnabled() ? TQColorGroup::Base : TQColorGroup::Background );
buffer.painter()->fillRect( 0, 0, width(), height(), bg );
- d->paint( txt, hasFocus(), *buffer.painter(), colorGroup(), rect(),
+ d->paint( txt, hasFocus(), *buffer.painter(), tqcolorGroup(), rect(),
tqstyle() );
buffer.end();
}
@@ -465,7 +465,7 @@ void ExtDateTimeEditor::mousePressEvent( TQMouseEvent *e )
int sec = sectionAt( p );
if ( sec != -1 ) {
cw->setFocusSection( sec );
- repaint( rect(), FALSE );
+ tqrepaint( rect(), FALSE );
}
}
@@ -481,13 +481,13 @@ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
case Key_Right:
if ( d->focusSection() < (int)d->sectionCount()-1 ) {
if ( cw->setFocusSection( focusSection()+1 ) )
- repaint( rect(), FALSE );
+ tqrepaint( rect(), FALSE );
}
return TRUE;
case Key_Left:
if ( d->focusSection() > 0 ) {
if ( cw->setFocusSection( focusSection()-1 ) )
- repaint( rect(), FALSE );
+ tqrepaint( rect(), FALSE );
}
return TRUE;
case Key_Up:
@@ -547,7 +547,7 @@ 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 );
+ tqrepaint( rect(), FALSE );
}
return TRUE;
} else if ( !txt.isEmpty() && ::tqqt_cast<TQTimeEdit*>(cw) && focusSection() == (int) d->sectionCount()-1 ) {
@@ -740,9 +740,9 @@ public:
with a date, e.g.
\code
- ExtDateEdit *dateEdit = new ExtDateEdit( ExtDate::currentDate(), this );
- dateEdit->setRange( ExtDate::currentDate().addDays( -365 ),
- ExtDate::currentDate().addDays( 365 ) );
+ ExtDateEdit *dateEdit = new ExtDateEdit( ExtDate::tqcurrentDate(), this );
+ dateEdit->setRange( ExtDate::tqcurrentDate().addDays( -365 ),
+ ExtDate::tqcurrentDate().addDays( 365 ) );
dateEdit->setOrder( ExtDateEdit::MDY );
dateEdit->setAutoAdvance( TRUE );
\endcode
@@ -856,7 +856,7 @@ void ExtDateEdit::init()
d->max = ExtDate( 50000, 12, 31 );
d->changed = FALSE;
- setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
+ tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
refcount++;
}
@@ -970,11 +970,11 @@ void ExtDateEdit::resizeEvent( TQResizeEvent * )
/*! \reimp
*/
-TQSize ExtDateEdit::sizeHint() const
+TQSize ExtDateEdit::tqsizeHint() const
{
constPolish();
TQFontMetrics fm( font() );
- int fw = tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth, this );
+ int fw = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, this );
int h = TQMAX( fm.lineSpacing(), 14 ) + 2;
int w = 2 + fm.width( '9' ) * 8 + fm.width( d->ed->separator() ) * 2
+ d->controls->upRect().width() + fw * 4;
@@ -985,9 +985,9 @@ TQSize ExtDateEdit::sizeHint() const
/*! \reimp
*/
-TQSize ExtDateEdit::minimumSizeHint() const
+TQSize ExtDateEdit::tqminimumSizeHint() const
{
- return sizeHint();
+ return tqsizeHint();
}
@@ -1133,7 +1133,7 @@ void ExtDateEdit::setOrder( ExtDateEdit::Order order )
}
if ( isVisible() )
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->tqrepaint( d->ed->rect(), FALSE );
}
@@ -1171,7 +1171,7 @@ void ExtDateEdit::stepUp()
emit valueChanged( date() );
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->tqrepaint( d->ed->rect(), FALSE );
}
@@ -1205,7 +1205,7 @@ void ExtDateEdit::stepDown()
emit valueChanged( date() );
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->tqrepaint( d->ed->rect(), FALSE );
}
/*!
@@ -1268,7 +1268,7 @@ void ExtDateEdit::setDay( int day )
If the date property is not valid, the editor displays all zeroes
and ExtDateEdit::date() will return an invalid date. It is strongly
recommended that the editor is given a default date value (e.g.
- currentDate()). That way, attempts to set the date property to an
+ tqcurrentDate()). That way, attempts to set the date property to an
invalid date will fail.
When changing the date property, if the date is less than
@@ -1292,7 +1292,7 @@ void ExtDateEdit::setDate( const ExtDate& date )
emit valueChanged( date );
}
d->changed = FALSE;
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->tqrepaint( d->ed->rect(), FALSE );
}
ExtDate ExtDateEdit::date() const
@@ -1314,8 +1314,8 @@ ExtDate ExtDateEdit::date() const
bool ExtDateEdit::outOfRange( int y, int m, int d ) const
{
if ( ExtDate::isValid( y, m, d ) ) {
- ExtDate currentDate( y, m, d );
- if ( currentDate > maxValue() || currentDate < minValue() ) {
+ ExtDate tqcurrentDate( y, m, d );
+ if ( tqcurrentDate > maxValue() || tqcurrentDate < minValue() ) {
//## outOfRange should set overwrite?
return TRUE;
}
@@ -1428,7 +1428,7 @@ void ExtDateEdit::addNumber( int sec, int num )
}
d->overwrite = overwrite;
d->timerId = startTimer( tqApp->doubleClickInterval()*4 );
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->tqrepaint( d->ed->rect(), FALSE );
}
@@ -1475,7 +1475,7 @@ void ExtDateEdit::fix()
changed = TRUE;
}
- int currentYear = ExtDate::currentDate().year();
+ int currentYear = ExtDate::tqcurrentDate().year();
int year = d->y;
/* No longer valid for extended dates
if ( year < 100 ) {
@@ -1581,7 +1581,7 @@ void ExtDateEdit::removeFirstNumber( int sec )
d->d = txt.toInt();
d->dayCache = d->d;
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->tqrepaint( d->ed->rect(), FALSE );
}
/*! \reimp
@@ -1607,7 +1607,7 @@ void ExtDateEdit::removeLastNumber( int sec )
d->d = txt.toInt();
d->dayCache = d->d;
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->tqrepaint( d->ed->rect(), FALSE );
}
/*!
@@ -1764,7 +1764,7 @@ public:
// d->max = TQTime( 23, 59, 59 );
// d->changed = FALSE;
//
-// setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
+// tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
//
// refcount++;
// }
@@ -1882,7 +1882,7 @@ public:
// emit valueChanged( time );
// }
// d->changed = FALSE;
-// d->ed->repaint( d->ed->rect(), FALSE );
+// d->ed->tqrepaint( d->ed->rect(), FALSE );
// }
//
// TQTime TQTimeEdit::time() const
@@ -2012,7 +2012,7 @@ public:
// d->changed = TRUE;
// emit valueChanged( time() );
// }
-// d->ed->repaint( d->ed->rect(), FALSE );
+// d->ed->tqrepaint( d->ed->rect(), FALSE );
// }
//
//
@@ -2061,7 +2061,7 @@ public:
// d->changed = TRUE;
// emit valueChanged( time() );
// }
-// d->ed->repaint( d->ed->rect(), FALSE );
+// d->ed->tqrepaint( d->ed->rect(), FALSE );
// }
//
//
@@ -2187,12 +2187,12 @@ public:
// if ( lAM )
// txt = *lAM;
// else
-// txt = TQString::fromLatin1( "AM" );
+// txt = TQString::tqfromLatin1( "AM" );
// } else {
// if ( lPM )
// txt = *lPM;
// else
-// txt = TQString::fromLatin1( "PM" );
+// txt = TQString::tqfromLatin1( "PM" );
// }
// break;
// default:
@@ -2343,7 +2343,7 @@ public:
// emit valueChanged( time() );
// d->overwrite = overwrite;
// d->timerId = startTimer( tqApp->doubleClickInterval()*4 );
-// d->ed->repaint( d->ed->rect(), FALSE );
+// d->ed->tqrepaint( d->ed->rect(), FALSE );
// }
//
//
@@ -2383,7 +2383,7 @@ public:
// d->s = txt.toInt();
// break;
// }
-// d->ed->repaint( d->ed->rect(), FALSE );
+// d->ed->tqrepaint( d->ed->rect(), FALSE );
// }
//
// /*! \reimp
@@ -2418,7 +2418,7 @@ public:
// d->s = txt.toInt();
// break;
// }
-// d->ed->repaint( d->ed->rect(), FALSE );
+// d->ed->tqrepaint( d->ed->rect(), FALSE );
// }
//
// /*! \reimp
@@ -2430,11 +2430,11 @@ public:
//
// /*! \reimp
// */
-// TQSize TQTimeEdit::sizeHint() const
+// TQSize TQTimeEdit::tqsizeHint() const
// {
// constPolish();
// TQFontMetrics fm( font() );
-// int fw = tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth, this );
+// int fw = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, this );
// int h = fm.lineSpacing() + 2;
// int w = 2 + fm.width( '9' ) * 6 + fm.width( d->ed->separator() ) * 2 +
// d->controls->upRect().width() + fw * 4;
@@ -2442,7 +2442,7 @@ public:
// if ( lAM )
// w += fm.width( *lAM ) + 4;
// else
-// w += fm.width( TQString::fromLatin1( "AM" ) ) + 4;
+// w += fm.width( TQString::tqfromLatin1( "AM" ) ) + 4;
// }
//
// return TQSize( w, TQMAX(h + fw * 2,20) ).expandedTo( TQApplication::globalStrut() );
@@ -2450,9 +2450,9 @@ public:
//
// /*! \reimp
// */
-// TQSize TQTimeEdit::minimumSizeHint() const
+// TQSize TQTimeEdit::tqminimumSizeHint() const
// {
-// return sizeHint();
+// return tqsizeHint();
// }
//
// /*!
@@ -2507,9 +2507,9 @@ public:
It is recommended that the ExtDateTimeEdit is initialised with a
datetime, e.g.
\code
- ExtDateTimeEdit *dateTimeEdit = new ExtDateTimeEdit( ExtDateTime::currentDateTime(), this );
- dateTimeEdit->dateEdit()->setRange( ExtDateTime::currentDate(),
- ExtDateTime::currentDate().addDays( 7 ) );
+ ExtDateTimeEdit *dateTimeEdit = new ExtDateTimeEdit( ExtDateTime::tqcurrentDateTime(), this );
+ dateTimeEdit->dateEdit()->setRange( ExtDateTime::tqcurrentDate(),
+ ExtDateTime::tqcurrentDate().addDays( 7 ) );
\endcode
Here we've created a new ExtDateTimeEdit set to the current date and
time, and set the date to have a minimum date of now and a maximum
@@ -2573,8 +2573,8 @@ ExtDateTimeEdit::~ExtDateTimeEdit()
void ExtDateTimeEdit::resizeEvent( TQResizeEvent * )
{
- int dw = de->sizeHint().width();
- int tw = te->sizeHint().width();
+ int dw = de->tqsizeHint().width();
+ int tw = te->tqsizeHint().width();
int w = width();
int h = height();
int extra = w - ( dw + tw );
@@ -2593,10 +2593,10 @@ void ExtDateTimeEdit::resizeEvent( TQResizeEvent * )
/*! \reimp
*/
-TQSize ExtDateTimeEdit::minimumSizeHint() const
+TQSize ExtDateTimeEdit::tqminimumSizeHint() const
{
- TQSize dsh = de->minimumSizeHint();
- TQSize tsh = te->minimumSizeHint();
+ TQSize dsh = de->tqminimumSizeHint();
+ TQSize tsh = te->tqminimumSizeHint();
return TQSize( dsh.width() + tsh.width(),
TQMAX( dsh.height(), tsh.height() ) );
}
@@ -2615,17 +2615,17 @@ void ExtDateTimeEdit::init()
connect( te, TQT_SIGNAL( valueChanged( const TQTime& ) ),
this, TQT_SLOT( newValue( const TQTime& ) ) );
setFocusProxy( de );
- setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
+ tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
}
/*! \reimp
*/
-TQSize ExtDateTimeEdit::sizeHint() const
+TQSize ExtDateTimeEdit::tqsizeHint() const
{
constPolish();
- TQSize dsh = de->sizeHint();
- TQSize tsh = te->sizeHint();
+ TQSize dsh = de->tqsizeHint();
+ TQSize tsh = te->tqsizeHint();
return TQSize( dsh.width() + tsh.width(),
TQMAX( dsh.height(), tsh.height() ) );
}
diff --git a/libtdeedu/extdate/extdatetimeedit.h b/libtdeedu/extdate/extdatetimeedit.h
index 13520923..4a2aaa16 100644
--- a/libtdeedu/extdate/extdatetimeedit.h
+++ b/libtdeedu/extdate/extdatetimeedit.h
@@ -82,8 +82,8 @@ public:
YMD /**< Year-Month-Day, also the default */,
YDM /**< Year-Day-Month @deprecated Included for completeness. */ };
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
+ TQSize tqsizeHint() const;
+ TQSize tqminimumSizeHint() const;
public slots:
virtual void setDate( const ExtDate& date );
@@ -169,8 +169,8 @@ private:
// TQTimeEdit( const TQTime& time, TQWidget* parent=0, const char* name=0 );
// ~TQTimeEdit();
//
-// TQSize sizeHint() const;
-// TQSize minimumSizeHint() const;
+// TQSize tqsizeHint() const;
+// TQSize tqminimumSizeHint() const;
//
// public slots:
// virtual void setTime( const TQTime& time );
@@ -242,8 +242,8 @@ public:
const char* name=0 );
~ExtDateTimeEdit();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
+ TQSize tqsizeHint() const;
+ TQSize tqminimumSizeHint() const;
public slots:
virtual void setDateTime( const ExtDateTime & dt );
diff --git a/libtdeedu/extdate/extdatewidget.cpp b/libtdeedu/extdate/extdatewidget.cpp
index 4eaf858e..f1c7269b 100644
--- a/libtdeedu/extdate/extdatewidget.cpp
+++ b/libtdeedu/extdate/extdatewidget.cpp
@@ -21,7 +21,7 @@
#include <tqcombobox.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlineedit.h>
#include <knuminput.h>
@@ -36,7 +36,7 @@ public:
ExtDateWidgetSpinBox(int min, int max, TQWidget *parent)
: TQSpinBox(min, max, 1, parent)
{
- editor()->setAlignment(AlignRight);
+ editor()->tqsetAlignment(AlignRight);
}
};
@@ -56,7 +56,7 @@ public:
ExtDateWidget::ExtDateWidget( TQWidget *parent, const char *name )
: TQWidget( parent, name )
{
- init(ExtDate::currentDate());
+ init(ExtDate::tqcurrentDate());
setDate(ExtDate());
}
@@ -74,8 +74,8 @@ ExtDateWidget::ExtDateWidget( const ExtDate &date, TQWidget *parent,
// {
// d = new ExtDateWidgetPrivate;
// KLocale *locale = KGlobal::locale();
-// TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
-// layout->setAutoAdd(true);
+// TQHBoxLayout *tqlayout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
+// tqlayout->setAutoAdd(true);
// d->m_day = new ExtDateWidgetSpinBox(1, 1, this);
// d->m_month = new TQComboBox(false, this);
// for (int i = 1; ; ++i)
@@ -98,8 +98,8 @@ void ExtDateWidget::init(const ExtDate& date)
{
d = new ExtDateWidgetPrivate;
//KLocale *locale = KGlobal::locale();
- TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
- layout->setAutoAdd(true);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
+ tqlayout->setAutoAdd(true);
d->m_day = new ExtDateWidgetSpinBox(1, 1, this);
d->m_month = new TQComboBox(false, this);
for (int i = 1; ; ++i)
diff --git a/libtdeedu/extdate/test_extdate.cc b/libtdeedu/extdate/test_extdate.cc
index d70d3e94..63b2120b 100644
--- a/libtdeedu/extdate/test_extdate.cc
+++ b/libtdeedu/extdate/test_extdate.cc
@@ -277,16 +277,16 @@ void test6()
void test7()
{
std::cout << "Express the current date:\n" << std::endl;
- TQDate q = TQDate::currentDate(TQt::LocalTime);
- ExtDate e = ExtDate::currentDate(TQt::TimeSpec(TQt::LocalTime));
+ TQDate q = TQDate::tqcurrentDate(TQt::LocalTime);
+ ExtDate e = ExtDate::tqcurrentDate(TQt::TimeSpec(TQt::LocalTime));
std::cout << "TQt::LocalTime :: ExtDate : " << e.toString().local8Bit() << " TQDate : "
<< q.toString().local8Bit() << std::endl;
- q = TQDate::currentDate(TQt::UTC);
- e = ExtDate::currentDate(TQt::UTC);
+ q = TQDate::tqcurrentDate(TQt::UTC);
+ e = ExtDate::tqcurrentDate(TQt::UTC);
std::cout << "TQt::UTC :: ExtDate : " << e.toString().local8Bit() << " TQDate : "
<< q.toString().local8Bit() << std::endl;
- q = TQDate::currentDate();
- e = ExtDate::currentDate();
+ q = TQDate::tqcurrentDate();
+ e = ExtDate::tqcurrentDate();
std::cout << "<default> :: ExtDate : " << e.toString().local8Bit() << " TQDate : "
<< q.toString().local8Bit() << std::endl;
std::cout << "--------------------" << std::endl;
@@ -311,8 +311,8 @@ void test8() {
void test9() {
std::cout << "TQDateTime : ExtDateTime: \n" << std::endl;
- TQDateTime q = TQDateTime::currentDateTime();
- ExtDateTime e = ExtDateTime::currentDateTime();
+ TQDateTime q = TQDateTime::tqcurrentDateTime();
+ ExtDateTime e = ExtDateTime::tqcurrentDateTime();
std::cout << q.toString().local8Bit() << " : " << e.toString().local8Bit() << std::endl;
std::cout << "--------------------" << std::endl;
diff --git a/libtdeedu/extdate/testwidget.cpp b/libtdeedu/extdate/testwidget.cpp
index 3a88946c..a6489cce 100644
--- a/libtdeedu/extdate/testwidget.cpp
+++ b/libtdeedu/extdate/testwidget.cpp
@@ -18,7 +18,7 @@
#include <kdatepicker.h>
#include <kdatewidget.h>
#include <klineedit.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlabel.h>
#include "extdatepicker.h"
@@ -39,8 +39,8 @@ TestWidget::TestWidget( TQWidget *p=0, const char *name=0 ) : KMainWindow( p, na
edpEdit = new KLineEdit(w);
edpEdit->setReadOnly( TRUE );
- kdw = new KDateWidget( TQDate::currentDate(), w );
- edw = new ExtDateWidget( ExtDate::currentDate(), w );
+ kdw = new KDateWidget( TQDate::tqcurrentDate(), w );
+ edw = new ExtDateWidget( ExtDate::tqcurrentDate(), w );
glay->addWidget( kdpLabel, 0, 0 );
glay->addWidget( edpLabel, 0, 1 );