summaryrefslogtreecommitdiffstats
path: root/libtdeedu/extdate/extdatetimeedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libtdeedu/extdate/extdatetimeedit.cpp')
-rw-r--r--libtdeedu/extdate/extdatetimeedit.cpp106
1 files changed, 53 insertions, 53 deletions
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() ) );
}