summaryrefslogtreecommitdiffstats
path: root/libtdeedu/extdate/extdatetimeedit.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:30:46 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:30:46 -0600
commit999f961ff5278b84c8ffd8a91addb9343e589cf0 (patch)
treeed392c698357e3037e6d9f5f40a33797b72e6129 /libtdeedu/extdate/extdatetimeedit.cpp
parent2d7b541a4e0095d40e37aaefbf9c4a9b9d149302 (diff)
downloadtdeedu-999f961ff5278b84c8ffd8a91addb9343e589cf0.tar.gz
tdeedu-999f961ff5278b84c8ffd8a91addb9343e589cf0.zip
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'libtdeedu/extdate/extdatetimeedit.cpp')
-rw-r--r--libtdeedu/extdate/extdatetimeedit.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/libtdeedu/extdate/extdatetimeedit.cpp b/libtdeedu/extdate/extdatetimeedit.cpp
index 796bd858..2d75c12a 100644
--- a/libtdeedu/extdate/extdatetimeedit.cpp
+++ b/libtdeedu/extdate/extdatetimeedit.cpp
@@ -266,7 +266,7 @@ public:
{
int fw = 0;
if ( frm )
- fw = style.tqpixelMetric(TQStyle::PM_DefaultFrameWidth);
+ fw = style.pixelMetric(TQStyle::PM_DefaultFrameWidth);
parag->truncate( 0 );
parag->append( txt );
@@ -433,9 +433,9 @@ void ExtDateTimeEditor::paintEvent( TQPaintEvent * )
TQSharedDoubleBuffer buffer( this );
const TQBrush &bg =
- tqcolorGroup().brush( isEnabled() ? TQColorGroup::Base : TQColorGroup::Background );
+ colorGroup().brush( isEnabled() ? TQColorGroup::Base : TQColorGroup::Background );
buffer.painter()->fillRect( 0, 0, width(), height(), bg );
- d->paint( txt, hasFocus(), *buffer.painter(), tqcolorGroup(), rect(),
+ d->paint( txt, hasFocus(), *buffer.painter(), colorGroup(), rect(),
tqstyle() );
buffer.end();
}
@@ -740,9 +740,9 @@ public:
with a date, e.g.
\code
- ExtDateEdit *dateEdit = new ExtDateEdit( ExtDate::tqcurrentDate(), this );
- dateEdit->setRange( ExtDate::tqcurrentDate().addDays( -365 ),
- ExtDate::tqcurrentDate().addDays( 365 ) );
+ ExtDateEdit *dateEdit = new ExtDateEdit( ExtDate::currentDate(), this );
+ dateEdit->setRange( ExtDate::currentDate().addDays( -365 ),
+ ExtDate::currentDate().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;
- tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
+ setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
refcount++;
}
@@ -970,11 +970,11 @@ void ExtDateEdit::resizeEvent( TQResizeEvent * )
/*! \reimp
*/
-TQSize ExtDateEdit::tqsizeHint() const
+TQSize ExtDateEdit::sizeHint() const
{
constPolish();
TQFontMetrics fm( font() );
- int fw = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, this );
+ int fw = tqstyle().pixelMetric( 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::tqsizeHint() const
/*! \reimp
*/
-TQSize ExtDateEdit::tqminimumSizeHint() const
+TQSize ExtDateEdit::minimumSizeHint() const
{
- return tqsizeHint();
+ return sizeHint();
}
@@ -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.
- tqcurrentDate()). That way, attempts to set the date property to an
+ currentDate()). 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
@@ -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 tqcurrentDate( y, m, d );
- if ( tqcurrentDate > maxValue() || tqcurrentDate < minValue() ) {
+ ExtDate currentDate( y, m, d );
+ if ( currentDate > maxValue() || currentDate < minValue() ) {
//## outOfRange should set overwrite?
return TRUE;
}
@@ -1475,7 +1475,7 @@ void ExtDateEdit::fix()
changed = TRUE;
}
- int currentYear = ExtDate::tqcurrentDate().year();
+ int currentYear = ExtDate::currentDate().year();
int year = d->y;
/* No longer valid for extended dates
if ( year < 100 ) {
@@ -1764,7 +1764,7 @@ public:
// d->max = TQTime( 23, 59, 59 );
// d->changed = FALSE;
//
-// tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
+// setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
//
// refcount++;
// }
@@ -2187,12 +2187,12 @@ public:
// if ( lAM )
// txt = *lAM;
// else
-// txt = TQString::tqfromLatin1( "AM" );
+// txt = TQString::fromLatin1( "AM" );
// } else {
// if ( lPM )
// txt = *lPM;
// else
-// txt = TQString::tqfromLatin1( "PM" );
+// txt = TQString::fromLatin1( "PM" );
// }
// break;
// default:
@@ -2430,11 +2430,11 @@ public:
//
// /*! \reimp
// */
-// TQSize TQTimeEdit::tqsizeHint() const
+// TQSize TQTimeEdit::sizeHint() const
// {
// constPolish();
// TQFontMetrics fm( font() );
-// int fw = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, this );
+// int fw = tqstyle().pixelMetric( 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::tqfromLatin1( "AM" ) ) + 4;
+// w += fm.width( TQString::fromLatin1( "AM" ) ) + 4;
// }
//
// return TQSize( w, TQMAX(h + fw * 2,20) ).expandedTo( TQApplication::globalStrut() );
@@ -2450,9 +2450,9 @@ public:
//
// /*! \reimp
// */
-// TQSize TQTimeEdit::tqminimumSizeHint() const
+// TQSize TQTimeEdit::minimumSizeHint() const
// {
-// return tqsizeHint();
+// return sizeHint();
// }
//
// /*!
@@ -2507,9 +2507,9 @@ public:
It is recommended that the ExtDateTimeEdit is initialised with a
datetime, e.g.
\code
- ExtDateTimeEdit *dateTimeEdit = new ExtDateTimeEdit( ExtDateTime::tqcurrentDateTime(), this );
- dateTimeEdit->dateEdit()->setRange( ExtDateTime::tqcurrentDate(),
- ExtDateTime::tqcurrentDate().addDays( 7 ) );
+ ExtDateTimeEdit *dateTimeEdit = new ExtDateTimeEdit( ExtDateTime::currentDateTime(), this );
+ dateTimeEdit->dateEdit()->setRange( ExtDateTime::currentDate(),
+ ExtDateTime::currentDate().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->tqsizeHint().width();
- int tw = te->tqsizeHint().width();
+ int dw = de->sizeHint().width();
+ int tw = te->sizeHint().width();
int w = width();
int h = height();
int extra = w - ( dw + tw );
@@ -2593,10 +2593,10 @@ void ExtDateTimeEdit::resizeEvent( TQResizeEvent * )
/*! \reimp
*/
-TQSize ExtDateTimeEdit::tqminimumSizeHint() const
+TQSize ExtDateTimeEdit::minimumSizeHint() const
{
- TQSize dsh = de->tqminimumSizeHint();
- TQSize tsh = te->tqminimumSizeHint();
+ TQSize dsh = de->minimumSizeHint();
+ TQSize tsh = te->minimumSizeHint();
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 );
- tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
+ setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
}
/*! \reimp
*/
-TQSize ExtDateTimeEdit::tqsizeHint() const
+TQSize ExtDateTimeEdit::sizeHint() const
{
constPolish();
- TQSize dsh = de->tqsizeHint();
- TQSize tsh = te->tqsizeHint();
+ TQSize dsh = de->sizeHint();
+ TQSize tsh = te->sizeHint();
return TQSize( dsh.width() + tsh.width(),
TQMAX( dsh.height(), tsh.height() ) );
}