summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/specialdates
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kontact/plugins/specialdates
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kontact/plugins/specialdates')
-rw-r--r--kontact/plugins/specialdates/kcmsdsummary.cpp66
-rw-r--r--kontact/plugins/specialdates/kcmsdsummary.h24
-rw-r--r--kontact/plugins/specialdates/sdsummarywidget.cpp182
-rw-r--r--kontact/plugins/specialdates/sdsummarywidget.h24
-rw-r--r--kontact/plugins/specialdates/specialdates_plugin.cpp4
-rw-r--r--kontact/plugins/specialdates/specialdates_plugin.h4
6 files changed, 152 insertions, 152 deletions
diff --git a/kontact/plugins/specialdates/kcmsdsummary.cpp b/kontact/plugins/specialdates/kcmsdsummary.cpp
index 9bb0211a5..326055855 100644
--- a/kontact/plugins/specialdates/kcmsdsummary.cpp
+++ b/kontact/plugins/specialdates/kcmsdsummary.cpp
@@ -22,12 +22,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -43,25 +43,25 @@
extern "C"
{
- KDE_EXPORT KCModule *create_sdsummary( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_sdsummary( TQWidget *parent, const char * )
{
return new KCMSDSummary( parent, "kcmsdsummary" );
}
}
-KCMSDSummary::KCMSDSummary( QWidget *parent, const char *name )
+KCMSDSummary::KCMSDSummary( TQWidget *parent, const char *name )
: KCModule( parent, name )
{
initGUI();
customDaysChanged( 1 );
- connect( mDaysGroup, SIGNAL( clicked( int ) ), SLOT( modified() ) );
- connect( mDaysGroup, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) );
- connect( mCalendarGroup, SIGNAL( clicked( int ) ), SLOT( modified() ) );
- connect( mContactGroup, SIGNAL( clicked( int ) ), SLOT( modified() ) );
- connect( mCustomDays, SIGNAL( valueChanged( int ) ), SLOT( modified() ) );
- connect( mCustomDays, SIGNAL( valueChanged( int ) ), SLOT( customDaysChanged( int ) ) );
+ connect( mDaysGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( modified() ) );
+ connect( mDaysGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( buttonClicked( int ) ) );
+ connect( mCalendarGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( modified() ) );
+ connect( mContactGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( modified() ) );
+ connect( mCustomDays, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( modified() ) );
+ connect( mCustomDays, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( customDaysChanged( int ) ) );
KAcceleratorManager::manage( this );
@@ -85,33 +85,33 @@ void KCMSDSummary::customDaysChanged( int value )
void KCMSDSummary::initGUI()
{
- QGridLayout *layout = new QGridLayout( this, 3, 2, KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 3, 2, KDialog::spacingHint() );
- mDaysGroup = new QButtonGroup( 0, Vertical, i18n( "Special Dates Summary" ), this );
- QVBoxLayout *boxLayout = new QVBoxLayout( mDaysGroup->layout(),
+ mDaysGroup = new TQButtonGroup( 0, Vertical, i18n( "Special Dates Summary" ), this );
+ TQVBoxLayout *boxLayout = new TQVBoxLayout( mDaysGroup->layout(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "How many days should the special dates summary show at once?" ), mDaysGroup );
+ TQLabel *label = new TQLabel( i18n( "How many days should the special dates summary show at once?" ), mDaysGroup );
boxLayout->addWidget( label );
- QRadioButton *button = new QRadioButton( i18n( "One day" ), mDaysGroup );
+ TQRadioButton *button = new TQRadioButton( i18n( "One day" ), mDaysGroup );
boxLayout->addWidget( button );
- button = new QRadioButton( i18n( "Five days" ), mDaysGroup );
+ button = new TQRadioButton( i18n( "Five days" ), mDaysGroup );
boxLayout->addWidget( button );
- button = new QRadioButton( i18n( "One week" ), mDaysGroup );
+ button = new TQRadioButton( i18n( "One week" ), mDaysGroup );
boxLayout->addWidget( button );
- button = new QRadioButton( i18n( "One month" ), mDaysGroup );
+ button = new TQRadioButton( i18n( "One month" ), mDaysGroup );
boxLayout->addWidget( button );
- QHBoxLayout *hbox = new QHBoxLayout( boxLayout, KDialog::spacingHint() );
+ TQHBoxLayout *hbox = new TQHBoxLayout( boxLayout, KDialog::spacingHint() );
- button = new QRadioButton( "", mDaysGroup );
+ button = new TQRadioButton( "", mDaysGroup );
hbox->addWidget( button );
- mCustomDays = new QSpinBox( 1, 365, 1, mDaysGroup );
+ mCustomDays = new TQSpinBox( 1, 365, 1, mDaysGroup );
mCustomDays->setEnabled( false );
hbox->addWidget( mCustomDays );
@@ -119,18 +119,18 @@ void KCMSDSummary::initGUI()
layout->addMultiCellWidget( mDaysGroup, 0, 0, 0, 1 );
- mCalendarGroup = new QButtonGroup( 1, Horizontal, i18n( "Special Dates From Calendar" ), this );
+ mCalendarGroup = new TQButtonGroup( 1, Horizontal, i18n( "Special Dates From Calendar" ), this );
- mShowBirthdaysFromCal = new QCheckBox( i18n( "Show birthdays" ), mCalendarGroup );
- mShowAnniversariesFromCal = new QCheckBox( i18n( "Show anniversaries" ), mCalendarGroup );
- mShowHolidays = new QCheckBox( i18n( "Show holidays" ), mCalendarGroup );
+ mShowBirthdaysFromCal = new TQCheckBox( i18n( "Show birthdays" ), mCalendarGroup );
+ mShowAnniversariesFromCal = new TQCheckBox( i18n( "Show anniversaries" ), mCalendarGroup );
+ mShowHolidays = new TQCheckBox( i18n( "Show holidays" ), mCalendarGroup );
- mShowSpecialsFromCal = new QCheckBox( i18n( "Show special occasions" ), mCalendarGroup );
+ mShowSpecialsFromCal = new TQCheckBox( i18n( "Show special occasions" ), mCalendarGroup );
- mContactGroup = new QButtonGroup( 1, Horizontal, i18n( "Special Dates From Contact List" ), this );
+ mContactGroup = new TQButtonGroup( 1, Horizontal, i18n( "Special Dates From Contact List" ), this );
- mShowBirthdaysFromKAB = new QCheckBox( i18n( "Show birthdays" ), mContactGroup );
- mShowAnniversariesFromKAB = new QCheckBox( i18n( "Show anniversaries" ), mContactGroup );
+ mShowBirthdaysFromKAB = new TQCheckBox( i18n( "Show birthdays" ), mContactGroup );
+ mShowAnniversariesFromKAB = new TQCheckBox( i18n( "Show anniversaries" ), mContactGroup );
layout->addWidget( mCalendarGroup, 1, 0 );
layout->addWidget( mContactGroup, 1, 1 );
diff --git a/kontact/plugins/specialdates/kcmsdsummary.h b/kontact/plugins/specialdates/kcmsdsummary.h
index 60b2ea082..589c1d91e 100644
--- a/kontact/plugins/specialdates/kcmsdsummary.h
+++ b/kontact/plugins/specialdates/kcmsdsummary.h
@@ -38,7 +38,7 @@ class KCMSDSummary : public KCModule
Q_OBJECT
public:
- KCMSDSummary( QWidget *parent = 0, const char *name = 0 );
+ KCMSDSummary( TQWidget *parent = 0, const char *name = 0 );
virtual void load();
virtual void save();
@@ -53,17 +53,17 @@ class KCMSDSummary : public KCModule
private:
void initGUI();
- QButtonGroup *mDaysGroup;
- QButtonGroup *mCalendarGroup;
- QButtonGroup *mContactGroup;
- QCheckBox *mShowBirthdaysFromKAB;
- QCheckBox *mShowBirthdaysFromCal;
- QCheckBox *mShowAnniversariesFromKAB;
- QCheckBox *mShowAnniversariesFromCal;
- QCheckBox *mShowHolidays;
- QCheckBox *mShowHolidaysFromCal;
- QCheckBox *mShowSpecialsFromCal;
- QSpinBox *mCustomDays;
+ TQButtonGroup *mDaysGroup;
+ TQButtonGroup *mCalendarGroup;
+ TQButtonGroup *mContactGroup;
+ TQCheckBox *mShowBirthdaysFromKAB;
+ TQCheckBox *mShowBirthdaysFromCal;
+ TQCheckBox *mShowAnniversariesFromKAB;
+ TQCheckBox *mShowAnniversariesFromCal;
+ TQCheckBox *mShowHolidays;
+ TQCheckBox *mShowHolidaysFromCal;
+ TQCheckBox *mShowSpecialsFromCal;
+ TQSpinBox *mCustomDays;
};
#endif
diff --git a/kontact/plugins/specialdates/sdsummarywidget.cpp b/kontact/plugins/specialdates/sdsummarywidget.cpp
index 721073490..44c671559 100644
--- a/kontact/plugins/specialdates/sdsummarywidget.cpp
+++ b/kontact/plugins/specialdates/sdsummarywidget.cpp
@@ -22,11 +22,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qimage.h>
-#include <qtooltip.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -65,9 +65,9 @@ class SDEntry
SDCategory category;
int yearsOld;
int daysTo;
- QDate date;
- QString summary;
- QString desc;
+ TQDate date;
+ TQString summary;
+ TQString desc;
int span; // #days in the special occassion.
KABC::Addressee addressee;
@@ -77,28 +77,28 @@ class SDEntry
}
};
-SDSummaryWidget::SDSummaryWidget( Kontact::Plugin *plugin, QWidget *parent,
+SDSummaryWidget::SDSummaryWidget( Kontact::Plugin *plugin, TQWidget *parent,
const char *name )
: Kontact::Summary( parent, name ), mPlugin( plugin ), mCalendar( 0 ), mHolidays( 0 )
{
// Create the Summary Layout
- QVBoxLayout *mainLayout = new QVBoxLayout( this, 3, 3 );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 3, 3 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "cookie",
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "cookie",
KIcon::Desktop, KIcon::SizeMedium );
- QWidget *header = createHeader( this, icon, i18n( "Special Dates" ) );
+ TQWidget *header = createHeader( this, icon, i18n( "Special Dates" ) );
mainLayout->addWidget(header);
- mLayout = new QGridLayout( mainLayout, 7, 6, 3 );
+ mLayout = new TQGridLayout( mainLayout, 7, 6, 3 );
mLayout->setRowStretch( 6, 1 );
// Setup the Addressbook
KABC::StdAddressBook *ab = KABC::StdAddressBook::self( true );
- connect( ab, SIGNAL( addressBookChanged( AddressBook* ) ),
- this, SLOT( updateView() ) );
- connect( mPlugin->core(), SIGNAL( dayChanged( const QDate& ) ),
- this, SLOT( updateView() ) );
+ connect( ab, TQT_SIGNAL( addressBookChanged( AddressBook* ) ),
+ this, TQT_SLOT( updateView() ) );
+ connect( mPlugin->core(), TQT_SIGNAL( dayChanged( const TQDate& ) ),
+ this, TQT_SLOT( updateView() ) );
// Setup the Calendar
mCalendar = new KCal::CalendarResources( KPimPrefs::timezone() );
@@ -108,9 +108,9 @@ SDSummaryWidget::SDSummaryWidget( Kontact::Plugin *plugin, QWidget *parent,
if ( manager->isEmpty() ) {
KConfig config( "korganizerrc" );
config.setGroup( "General" );
- QString fileName = config.readPathEntry( "Active Calendar" );
+ TQString fileName = config.readPathEntry( "Active Calendar" );
- QString resourceName;
+ TQString resourceName;
if ( fileName.isEmpty() ) {
fileName = locateLocal( "data", "korganizer/std.ics" );
resourceName = i18n( "Default KOrganizer resource" );
@@ -129,10 +129,10 @@ SDSummaryWidget::SDSummaryWidget( Kontact::Plugin *plugin, QWidget *parent,
mCalendar = KOrg::StdCalendar::self();
mCalendar->load();
- connect( mCalendar, SIGNAL( calendarChanged() ),
- this, SLOT( updateView() ) );
- connect( mPlugin->core(), SIGNAL( dayChanged( const QDate& ) ),
- this, SLOT( updateView() ) );
+ connect( mCalendar, TQT_SIGNAL( calendarChanged() ),
+ this, TQT_SLOT( updateView() ) );
+ connect( mPlugin->core(), TQT_SIGNAL( dayChanged( const TQDate& ) ),
+ this, TQT_SLOT( updateView() ) );
// Update Configuration
configUpdated();
@@ -169,7 +169,7 @@ bool SDSummaryWidget::initHolidays()
{
KConfig hconfig( "korganizerrc" );
hconfig.setGroup( "Time & Date" );
- QString location = hconfig.readEntry( "Holidays" );
+ TQString location = hconfig.readEntry( "Holidays" );
if ( !location.isEmpty() ) {
if ( mHolidays ) delete mHolidays;
mHolidays = new KHolidays( location );
@@ -183,9 +183,9 @@ int SDSummaryWidget::span( KCal::Event *event )
{
int span=1;
if ( event->isMultiDay() && event->doesFloat() ) {
- QDate d = event->dtStart().date();
- if ( d < QDate::currentDate() ) {
- d = QDate::currentDate();
+ TQDate d = event->dtStart().date();
+ if ( d < TQDate::currentDate() ) {
+ d = TQDate::currentDate();
}
while ( d < event->dtEnd().date() ) {
span++;
@@ -196,12 +196,12 @@ int SDSummaryWidget::span( KCal::Event *event )
}
// day of a multiday Event
-int SDSummaryWidget::dayof( KCal::Event *event, const QDate& date )
+int SDSummaryWidget::dayof( KCal::Event *event, const TQDate& date )
{
int dayof=1;
- QDate d = event->dtStart().date();
- if ( d < QDate::currentDate() ) {
- d = QDate::currentDate();
+ TQDate d = event->dtStart().date();
+ if ( d < TQDate::currentDate() ) {
+ d = TQDate::currentDate();
}
while ( d < event->dtEnd().date() ) {
if ( d < date ) {
@@ -221,18 +221,18 @@ void SDSummaryWidget::updateView()
mLabels.setAutoDelete( false );
KABC::StdAddressBook *ab = KABC::StdAddressBook::self( true );
- QValueList<SDEntry> dates;
- QLabel *label = 0;
+ TQValueList<SDEntry> dates;
+ TQLabel *label = 0;
// No reason to show the date year
- QString savefmt = KGlobal::locale()->dateFormat();
+ TQString savefmt = KGlobal::locale()->dateFormat();
KGlobal::locale()->setDateFormat( KGlobal::locale()->
dateFormat().replace( 'Y', ' ' ) );
// Search for Birthdays and Anniversaries in the Addressbook
KABC::AddressBook::Iterator it;
for ( it = ab->begin(); it != ab->end(); ++it ) {
- QDate birthday = (*it).birthday().date();
+ TQDate birthday = (*it).birthday().date();
if ( birthday.isValid() && mShowBirthdaysFromKAB ) {
SDEntry entry;
entry.type = IncidenceTypeContact;
@@ -246,10 +246,10 @@ void SDSummaryWidget::updateView()
dates.append( entry );
}
- QString anniversaryAsString =
+ TQString anniversaryAsString =
(*it).custom( "KADDRESSBOOK" , "X-Anniversary" );
if ( !anniversaryAsString.isEmpty() ) {
- QDate anniversary = QDate::fromString( anniversaryAsString, Qt::ISODate );
+ TQDate anniversary = TQDate::fromString( anniversaryAsString, Qt::ISODate );
if ( anniversary.isValid() && mShowAnniversariesFromKAB ) {
SDEntry entry;
entry.type = IncidenceTypeContact;
@@ -267,8 +267,8 @@ void SDSummaryWidget::updateView()
// Search for Birthdays, Anniversaries, Holidays, and Special Occasions
// in the Calendar
- QDate dt;
- QDate currentDate = QDate::currentDate();
+ TQDate dt;
+ TQDate currentDate = TQDate::currentDate();
for ( dt=currentDate;
dt<=currentDate.addDays( mDaysAhead - 1 );
dt=dt.addDays(1) ) {
@@ -280,8 +280,8 @@ void SDSummaryWidget::updateView()
for ( it=events.begin(); it!=events.end(); ++it ) {
ev = *it;
if ( !ev->categoriesStr().isEmpty() ) {
- QStringList::ConstIterator it2;
- QStringList c = ev->categories();
+ TQStringList::ConstIterator it2;
+ TQStringList c = ev->categories();
for ( it2=c.begin(); it2!=c.end(); ++it2 ) {
// Append Birthday Event?
@@ -360,8 +360,8 @@ void SDSummaryWidget::updateView()
for ( dt=currentDate;
dt<=currentDate.addDays( mDaysAhead - 1 );
dt=dt.addDays(1) ) {
- QValueList<KHoliday> holidays = mHolidays->getHolidays( dt );
- QValueList<KHoliday>::ConstIterator it = holidays.begin();
+ TQValueList<KHoliday> holidays = mHolidays->getHolidays( dt );
+ TQValueList<KHoliday>::ConstIterator it = holidays.begin();
for ( ; it != holidays.end(); ++it ) {
SDEntry entry;
entry.type = IncidenceTypeEvent;
@@ -382,21 +382,21 @@ void SDSummaryWidget::updateView()
if ( !dates.isEmpty() ) {
int counter = 0;
- QValueList<SDEntry>::Iterator addrIt;
- QString lines;
+ TQValueList<SDEntry>::Iterator addrIt;
+ TQString lines;
for ( addrIt = dates.begin(); addrIt != dates.end(); ++addrIt ) {
bool makeBold = (*addrIt).daysTo == 0; // i.e., today
// Pixmap
- QImage icon_img;
- QString icon_name;
+ TQImage icon_img;
+ TQString icon_name;
KABC::Picture pic;
switch( (*addrIt).category ) { // TODO: better icons
case CategoryBirthday:
icon_name = "cookie";
pic = (*addrIt).addressee.photo();
if ( pic.isIntern() && !pic.data().isNull() ) {
- QImage img = pic.data();
+ TQImage img = pic.data();
if ( img.width() > img.height() ) {
icon_img = img.scaleWidth( 32 );
} else {
@@ -408,7 +408,7 @@ void SDSummaryWidget::updateView()
icon_name = "kdmconfig";
pic = (*addrIt).addressee.photo();
if ( pic.isIntern() && !pic.data().isNull() ) {
- QImage img = pic.data();
+ TQImage img = pic.data();
if ( img.width() > img.height() ) {
icon_img = img.scaleWidth( 32 );
} else {
@@ -421,7 +421,7 @@ void SDSummaryWidget::updateView()
case CategoryOther:
icon_name = "cookie"; break;
}
- label = new QLabel( this );
+ label = new TQLabel( this );
if ( icon_img.isNull() ) {
label->setPixmap( KGlobal::iconLoader()->loadIcon( icon_name,
KIcon::Small ) );
@@ -434,11 +434,11 @@ void SDSummaryWidget::updateView()
mLabels.append( label );
// Event date
- QString datestr;
+ TQString datestr;
//Muck with the year -- change to the year 'daysTo' days away
int year = currentDate.addDays( (*addrIt).daysTo ).year();
- QDate sD = QDate::QDate( year,
+ TQDate sD = TQDate::TQDate( year,
(*addrIt).date.month(), (*addrIt).date.day() );
if ( (*addrIt).daysTo == 0 ) {
@@ -451,23 +451,23 @@ void SDSummaryWidget::updateView()
// Print the date span for multiday, floating events, for the
// first day of the event only.
if ( (*addrIt).span > 1 ) {
- QString endstr =
+ TQString endstr =
KGlobal::locale()->formatDate( sD.addDays( (*addrIt).span - 1 ) );
datestr += " -\n " + endstr;
}
- label = new QLabel( datestr, this );
+ label = new TQLabel( datestr, this );
label->setAlignment( AlignLeft | AlignVCenter );
mLayout->addWidget( label, counter, 1 );
mLabels.append( label );
if ( makeBold ) {
- QFont font = label->font();
+ TQFont font = label->font();
font.setBold( true );
label->setFont( font );
}
// Countdown
- label = new QLabel( this );
+ label = new TQLabel( this );
if ( (*addrIt).daysTo == 0 ) {
label->setText( i18n( "now" ) );
} else {
@@ -479,7 +479,7 @@ void SDSummaryWidget::updateView()
mLabels.append( label );
// What
- QString what;
+ TQString what;
switch( (*addrIt).category ) {
case CategoryBirthday:
what = i18n( "Birthday" ); break;
@@ -490,7 +490,7 @@ void SDSummaryWidget::updateView()
case CategoryOther:
what = i18n( "Special Occasion" ); break;
}
- label = new QLabel( this );
+ label = new TQLabel( this );
label->setText( what );
label->setAlignment( AlignLeft | AlignVCenter );
mLayout->addWidget( label, counter, 3 );
@@ -506,25 +506,25 @@ void SDSummaryWidget::updateView()
mLayout->addWidget( urlLabel, counter, 4 );
mLabels.append( urlLabel );
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SLOT( mailContact( const QString& ) ) );
- connect( urlLabel, SIGNAL( rightClickedURL( const QString& ) ),
- this, SLOT( popupMenu( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SLOT( mailContact( const TQString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( rightClickedURL( const TQString& ) ),
+ this, TQT_SLOT( popupMenu( const TQString& ) ) );
} else {
- label = new QLabel( this );
+ label = new TQLabel( this );
label->setText( (*addrIt).summary );
label->setTextFormat( Qt::RichText );
mLayout->addWidget( label, counter, 4 );
mLabels.append( label );
if ( !(*addrIt).desc.isEmpty() ) {
- QToolTip::add( label, (*addrIt).desc );
+ TQToolTip::add( label, (*addrIt).desc );
}
}
// Age
if ( (*addrIt).category == CategoryBirthday ||
(*addrIt).category == CategoryAnniversary ) {
- label = new QLabel( this );
+ label = new TQLabel( this );
if ( (*addrIt).yearsOld <= 0 ) {
label->setText( "" );
} else {
@@ -538,7 +538,7 @@ void SDSummaryWidget::updateView()
counter++;
}
} else {
- label = new QLabel(
+ label = new TQLabel(
i18n( "No special dates within the next 1 day",
"No special dates pending within the next %n days",
mDaysAhead ), this, "nothing to see" );
@@ -553,15 +553,15 @@ void SDSummaryWidget::updateView()
KGlobal::locale()->setDateFormat( savefmt );
}
-void SDSummaryWidget::mailContact( const QString &uid )
+void SDSummaryWidget::mailContact( const TQString &uid )
{
KABC::StdAddressBook *ab = KABC::StdAddressBook::self( true );
- QString email = ab->findByUid( uid ).fullEmail();
+ TQString email = ab->findByUid( uid ).fullEmail();
- kapp->invokeMailer( email, QString::null );
+ kapp->invokeMailer( email, TQString::null );
}
-void SDSummaryWidget::viewContact( const QString &uid )
+void SDSummaryWidget::viewContact( const TQString &uid )
{
if ( !mPlugin->isRunningStandalone() )
mPlugin->core()->selectPlugin( "kontact_kaddressbookplugin" );
@@ -569,10 +569,10 @@ void SDSummaryWidget::viewContact( const QString &uid )
mPlugin->bringToForeground();
DCOPRef dcopCall( "kaddressbook", "KAddressBookIface" );
- dcopCall.send( "showContactEditor(QString)", uid );
+ dcopCall.send( "showContactEditor(TQString)", uid );
}
-void SDSummaryWidget::popupMenu( const QString &uid )
+void SDSummaryWidget::popupMenu( const TQString &uid )
{
KPopupMenu popup( this );
popup.insertItem( KGlobal::iconLoader()->loadIcon( "kmail", KIcon::Small ),
@@ -580,7 +580,7 @@ void SDSummaryWidget::popupMenu( const QString &uid )
popup.insertItem( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Small ),
i18n( "View &Contact" ), 1 );
- switch ( popup.exec( QCursor::pos() ) ) {
+ switch ( popup.exec( TQCursor::pos() ) ) {
case 0:
mailContact( uid );
break;
@@ -590,48 +590,48 @@ void SDSummaryWidget::popupMenu( const QString &uid )
}
}
-bool SDSummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool SDSummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
{
if ( obj->inherits( "KURLLabel" ) ) {
KURLLabel* label = static_cast<KURLLabel*>( obj );
- if ( e->type() == QEvent::Enter )
+ if ( e->type() == TQEvent::Enter )
emit message( i18n( "Mail to:\"%1\"" ).arg( label->text() ) );
- if ( e->type() == QEvent::Leave )
- emit message( QString::null );
+ if ( e->type() == TQEvent::Leave )
+ emit message( TQString::null );
}
return Kontact::Summary::eventFilter( obj, e );
}
-void SDSummaryWidget::dateDiff( const QDate &date, int &days, int &years )
+void SDSummaryWidget::dateDiff( const TQDate &date, int &days, int &years )
{
- QDate currentDate;
- QDate eventDate;
+ TQDate currentDate;
+ TQDate eventDate;
- if ( QDate::leapYear( date.year() ) && date.month() == 2 && date.day() == 29 ) {
- currentDate = QDate( date.year(), QDate::currentDate().month(), QDate::currentDate().day() );
- if ( !QDate::leapYear( QDate::currentDate().year() ) )
- eventDate = QDate( date.year(), date.month(), 28 ); // celebrate one day earlier ;)
+ if ( TQDate::leapYear( date.year() ) && date.month() == 2 && date.day() == 29 ) {
+ 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 = QDate( date.year(), date.month(), date.day() );
+ eventDate = TQDate( date.year(), date.month(), date.day() );
} else {
- currentDate = QDate( 0, QDate::currentDate().month(), QDate::currentDate().day() );
- eventDate = QDate( 0, date.month(), date.day() );
+ currentDate = TQDate( 0, TQDate::currentDate().month(), TQDate::currentDate().day() );
+ eventDate = TQDate( 0, date.month(), date.day() );
}
int offset = currentDate.daysTo( eventDate );
if ( offset < 0 ) {
days = 365 + offset;
- years = QDate::currentDate().year() + 1 - date.year();
+ years = TQDate::currentDate().year() + 1 - date.year();
} else {
days = offset;
- years = QDate::currentDate().year() - date.year();
+ years = TQDate::currentDate().year() - date.year();
}
}
-QStringList SDSummaryWidget::configModules() const
+TQStringList SDSummaryWidget::configModules() const
{
- return QStringList( "kcmsdsummary.desktop" );
+ return TQStringList( "kcmsdsummary.desktop" );
}
#include "sdsummarywidget.moc"
diff --git a/kontact/plugins/specialdates/sdsummarywidget.h b/kontact/plugins/specialdates/sdsummarywidget.h
index 74cd08942..00e4da223 100644
--- a/kontact/plugins/specialdates/sdsummarywidget.h
+++ b/kontact/plugins/specialdates/sdsummarywidget.h
@@ -25,8 +25,8 @@
#ifndef SDSUMMARYWIDGET_H
#define SDSUMMARYWIDGET_H
-#include <qptrlist.h>
-#include <qwidget.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
#include <libkcal/calendarresources.h>
#include <libkholidays/kholidays.h>
@@ -45,29 +45,29 @@ class SDSummaryWidget : public Kontact::Summary
Q_OBJECT
public:
- SDSummaryWidget( Kontact::Plugin *plugin, QWidget *parent,
+ SDSummaryWidget( Kontact::Plugin *plugin, TQWidget *parent,
const char *name = 0 );
- QStringList configModules() const;
+ TQStringList configModules() const;
void configUpdated();
void updateSummary( bool force = false ) { Q_UNUSED( force ); updateView(); }
protected:
- virtual bool eventFilter( QObject *obj, QEvent* e );
+ virtual bool eventFilter( TQObject *obj, TQEvent* e );
private slots:
void updateView();
- void popupMenu( const QString &uid );
- void mailContact( const QString &uid );
- void viewContact( const QString &uid );
+ void popupMenu( const TQString &uid );
+ void mailContact( const TQString &uid );
+ void viewContact( const TQString &uid );
private:
int span( KCal::Event *event );
- int dayof( KCal::Event *event, const QDate &date );
+ int dayof( KCal::Event *event, const TQDate &date );
bool initHolidays();
- void dateDiff( const QDate &date, int &days, int &years );
- QGridLayout *mLayout;
- QPtrList<QLabel> mLabels;
+ void dateDiff( const TQDate &date, int &days, int &years );
+ TQGridLayout *mLayout;
+ TQPtrList<TQLabel> mLabels;
Kontact::Plugin *mPlugin;
KCal::CalendarResources *mCalendar;
int mDaysAhead;
diff --git a/kontact/plugins/specialdates/specialdates_plugin.cpp b/kontact/plugins/specialdates/specialdates_plugin.cpp
index f0149fd9a..9f78de3f6 100644
--- a/kontact/plugins/specialdates/specialdates_plugin.cpp
+++ b/kontact/plugins/specialdates/specialdates_plugin.cpp
@@ -36,7 +36,7 @@ typedef KGenericFactory< SpecialdatesPlugin, Kontact::Core > SpecialdatesPluginF
K_EXPORT_COMPONENT_FACTORY( libkontact_specialdatesplugin,
SpecialdatesPluginFactory( "kontact_specialdatesplugin" ) )
-SpecialdatesPlugin::SpecialdatesPlugin( Kontact::Core *core, const char *name, const QStringList& )
+SpecialdatesPlugin::SpecialdatesPlugin( Kontact::Core *core, const char *name, const TQStringList& )
: Kontact::Plugin( core, core, name ),
mAboutData( 0 )
{
@@ -47,7 +47,7 @@ SpecialdatesPlugin::~SpecialdatesPlugin()
{
}
-Kontact::Summary *SpecialdatesPlugin::createSummaryWidget( QWidget *parentWidget )
+Kontact::Summary *SpecialdatesPlugin::createSummaryWidget( TQWidget *parentWidget )
{
return new SDSummaryWidget( this, parentWidget );
}
diff --git a/kontact/plugins/specialdates/specialdates_plugin.h b/kontact/plugins/specialdates/specialdates_plugin.h
index 6534afb5c..59fc8dbba 100644
--- a/kontact/plugins/specialdates/specialdates_plugin.h
+++ b/kontact/plugins/specialdates/specialdates_plugin.h
@@ -32,14 +32,14 @@ class SDSummaryWidget;
class SpecialdatesPlugin : public Kontact::Plugin
{
public:
- SpecialdatesPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ SpecialdatesPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~SpecialdatesPlugin();
int weight() const { return 310; }
const KAboutData *aboutData();
- virtual Kontact::Summary *createSummaryWidget( QWidget *parentWidget );
+ virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget );
protected:
virtual KParts::ReadOnlyPart *createPart() { return false; }