summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/specialdates
diff options
context:
space:
mode:
Diffstat (limited to 'kontact/plugins/specialdates')
-rw-r--r--kontact/plugins/specialdates/kcmsdsummary.cpp14
-rw-r--r--kontact/plugins/specialdates/sdsummarywidget.cpp52
2 files changed, 33 insertions, 33 deletions
diff --git a/kontact/plugins/specialdates/kcmsdsummary.cpp b/kontact/plugins/specialdates/kcmsdsummary.cpp
index a59406590..eb954ccf2 100644
--- a/kontact/plugins/specialdates/kcmsdsummary.cpp
+++ b/kontact/plugins/specialdates/kcmsdsummary.cpp
@@ -25,7 +25,7 @@
#include <tqbuttongroup.h>
#include <tqcheckbox.h>
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqradiobutton.h>
#include <tqspinbox.h>
@@ -85,10 +85,10 @@ void KCMSDSummary::customDaysChanged( int value )
void KCMSDSummary::initGUI()
{
- TQGridLayout *tqlayout = new TQGridLayout( this, 3, 2, KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 3, 2, KDialog::spacingHint() );
mDaysGroup = new TQButtonGroup( 0, Qt::Vertical, i18n( "Special Dates Summary" ), this );
- TQVBoxLayout *boxLayout = new TQVBoxLayout( mDaysGroup->tqlayout(),
+ TQVBoxLayout *boxLayout = new TQVBoxLayout( mDaysGroup->layout(),
KDialog::spacingHint() );
TQLabel *label = new TQLabel( i18n( "How many days should the special dates summary show at once?" ), mDaysGroup );
@@ -117,7 +117,7 @@ void KCMSDSummary::initGUI()
hbox->addStretch( 1 );
- tqlayout->addMultiCellWidget( mDaysGroup, 0, 0, 0, 1 );
+ layout->addMultiCellWidget( mDaysGroup, 0, 0, 0, 1 );
mCalendarGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Special Dates From Calendar" ), this );
@@ -132,10 +132,10 @@ void KCMSDSummary::initGUI()
mShowBirthdaysFromKAB = new TQCheckBox( i18n( "Show birthdays" ), mContactGroup );
mShowAnniversariesFromKAB = new TQCheckBox( i18n( "Show anniversaries" ), mContactGroup );
- tqlayout->addWidget( mCalendarGroup, 1, 0 );
- tqlayout->addWidget( mContactGroup, 1, 1 );
+ layout->addWidget( mCalendarGroup, 1, 0 );
+ layout->addWidget( mContactGroup, 1, 1 );
- tqlayout->setRowStretch( 2, 1 );
+ layout->setRowStretch( 2, 1 );
}
void KCMSDSummary::load()
diff --git a/kontact/plugins/specialdates/sdsummarywidget.cpp b/kontact/plugins/specialdates/sdsummarywidget.cpp
index 3fbac9d2e..733ef1ac4 100644
--- a/kontact/plugins/specialdates/sdsummarywidget.cpp
+++ b/kontact/plugins/specialdates/sdsummarywidget.cpp
@@ -24,7 +24,7 @@
#include <tqcursor.h>
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqimage.h>
#include <tqtooltip.h>
@@ -183,8 +183,8 @@ int SDSummaryWidget::span( KCal::Event *event )
int span=1;
if ( event->isMultiDay() && event->doesFloat() ) {
TQDate d = event->dtStart().date();
- if ( d < TQDate::tqcurrentDate() ) {
- d = TQDate::tqcurrentDate();
+ if ( d < TQDate::currentDate() ) {
+ d = TQDate::currentDate();
}
while ( d < event->dtEnd().date() ) {
span++;
@@ -199,8 +199,8 @@ int SDSummaryWidget::dayof( KCal::Event *event, const TQDate& date )
{
int dayof=1;
TQDate d = event->dtStart().date();
- if ( d < TQDate::tqcurrentDate() ) {
- d = TQDate::tqcurrentDate();
+ if ( d < TQDate::currentDate() ) {
+ d = TQDate::currentDate();
}
while ( d < event->dtEnd().date() ) {
if ( d < date ) {
@@ -269,9 +269,9 @@ void SDSummaryWidget::updateView()
// Search for Birthdays, Anniversaries, Holidays, and Special Occasions
// in the Calendar
TQDate dt;
- TQDate tqcurrentDate = TQDate::tqcurrentDate();
- for ( dt=tqcurrentDate;
- dt<=tqcurrentDate.addDays( mDaysAhead - 1 );
+ TQDate currentDate = TQDate::currentDate();
+ for ( dt=currentDate;
+ dt<=currentDate.addDays( mDaysAhead - 1 );
dt=dt.addDays(1) ) {
KCal::Event::List events = mCalendar->events( dt,
KCal::EventSortStartDate,
@@ -358,8 +358,8 @@ void SDSummaryWidget::updateView()
// Seach for Holidays
if ( mShowHolidays ) {
if ( initHolidays() ) {
- for ( dt=tqcurrentDate;
- dt<=tqcurrentDate.addDays( mDaysAhead - 1 );
+ for ( dt=currentDate;
+ dt<=currentDate.addDays( mDaysAhead - 1 );
dt=dt.addDays(1) ) {
TQValueList<KHoliday> holidays = mHolidays->getHolidays( dt );
TQValueList<KHoliday>::ConstIterator it = holidays.begin();
@@ -429,8 +429,8 @@ void SDSummaryWidget::updateView()
} else {
label->setPixmap( icon_img );
}
- label->setMaximumWidth( label->tqminimumSizeHint().width() );
- label->tqsetAlignment( AlignVCenter );
+ label->setMaximumWidth( label->minimumSizeHint().width() );
+ label->setAlignment( AlignVCenter );
mLayout->addWidget( label, counter, 0 );
mLabels.append( label );
@@ -438,7 +438,7 @@ void SDSummaryWidget::updateView()
TQString datestr;
//Muck with the year -- change to the year 'daysTo' days away
- int year = tqcurrentDate.addDays( (*addrIt).daysTo ).year();
+ int year = currentDate.addDays( (*addrIt).daysTo ).year();
TQDate sD = TQDate( year, (*addrIt).date.month(), (*addrIt).date.day() );
if ( (*addrIt).daysTo == 0 ) {
@@ -457,7 +457,7 @@ void SDSummaryWidget::updateView()
}
label = new TQLabel( datestr, this );
- label->tqsetAlignment( AlignLeft | AlignVCenter );
+ label->setAlignment( AlignLeft | AlignVCenter );
mLayout->addWidget( label, counter, 1 );
mLabels.append( label );
if ( makeBold ) {
@@ -474,7 +474,7 @@ void SDSummaryWidget::updateView()
label->setText( i18n( "in 1 day", "in %n days", (*addrIt).daysTo ) );
}
- label->tqsetAlignment( AlignLeft | AlignVCenter );
+ label->setAlignment( AlignLeft | AlignVCenter );
mLayout->addWidget( label, counter, 2 );
mLabels.append( label );
@@ -492,7 +492,7 @@ void SDSummaryWidget::updateView()
}
label = new TQLabel( this );
label->setText( what );
- label->tqsetAlignment( AlignLeft | AlignVCenter );
+ label->setAlignment( AlignLeft | AlignVCenter );
mLayout->addWidget( label, counter, 3 );
mLabels.append( label );
@@ -530,7 +530,7 @@ void SDSummaryWidget::updateView()
} else {
label->setText( i18n( "one year", "%n years", (*addrIt).yearsOld ) );
}
- label->tqsetAlignment( AlignLeft | AlignVCenter );
+ label->setAlignment( AlignLeft | AlignVCenter );
mLayout->addWidget( label, counter, 5 );
mLabels.append( label );
}
@@ -542,7 +542,7 @@ void SDSummaryWidget::updateView()
i18n( "No special dates within the next 1 day",
"No special dates pending within the next %n days",
mDaysAhead ), this, "nothing to see" );
- label->tqsetAlignment( AlignHCenter | AlignVCenter );
+ label->setAlignment( AlignHCenter | AlignVCenter );
mLayout->addMultiCellWidget( label, 0, 0, 0, 4 );
mLabels.append( label );
}
@@ -595,7 +595,7 @@ bool SDSummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
if ( obj->inherits( "KURLLabel" ) ) {
KURLLabel* label = static_cast<KURLLabel*>( TQT_TQWIDGET(obj) );
if ( e->type() == TQEvent::Enter )
- emit message( i18n( "Mail to:\"%1\"" ).tqarg( label->text() ) );
+ emit message( i18n( "Mail to:\"%1\"" ).arg( label->text() ) );
if ( e->type() == TQEvent::Leave )
emit message( TQString() );
}
@@ -605,27 +605,27 @@ bool SDSummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
void SDSummaryWidget::dateDiff( const TQDate &date, int &days, int &years )
{
- TQDate tqcurrentDate;
+ TQDate currentDate;
TQDate eventDate;
if ( TQDate::leapYear( date.year() ) && date.month() == 2 && date.day() == 29 ) {
- tqcurrentDate = TQDate( date.year(), TQDate::tqcurrentDate().month(), TQDate::tqcurrentDate().day() );
- if ( !TQDate::leapYear( TQDate::tqcurrentDate().year() ) )
+ currentDate = TQDate( date.year(), TQDate::currentDate().month(), TQDate::currentDate().day() );
+ if ( !TQDate::leapYear( TQDate::currentDate().year() ) )
eventDate = TQDate( date.year(), date.month(), 28 ); // celebrate one day earlier ;)
else
eventDate = TQDate( date.year(), date.month(), date.day() );
} else {
- tqcurrentDate = TQDate( 0, TQDate::tqcurrentDate().month(), TQDate::tqcurrentDate().day() );
+ currentDate = TQDate( 0, TQDate::currentDate().month(), TQDate::currentDate().day() );
eventDate = TQDate( 0, date.month(), date.day() );
}
- int offset = tqcurrentDate.daysTo( eventDate );
+ int offset = currentDate.daysTo( eventDate );
if ( offset < 0 ) {
days = 365 + offset;
- years = TQDate::tqcurrentDate().year() + 1 - date.year();
+ years = TQDate::currentDate().year() + 1 - date.year();
} else {
days = offset;
- years = TQDate::tqcurrentDate().year() - date.year();
+ years = TQDate::currentDate().year() - date.year();
}
}