summaryrefslogtreecommitdiffstats
path: root/kresources/birthdays
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 /kresources/birthdays
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 'kresources/birthdays')
-rw-r--r--kresources/birthdays/resourcekabc.cpp74
-rw-r--r--kresources/birthdays/resourcekabc.h34
-rw-r--r--kresources/birthdays/resourcekabcconfig.cpp44
-rw-r--r--kresources/birthdays/resourcekabcconfig.h12
4 files changed, 82 insertions, 82 deletions
diff --git a/kresources/birthdays/resourcekabc.cpp b/kresources/birthdays/resourcekabc.cpp
index 9d86aa3dd..dc902c5bf 100644
--- a/kresources/birthdays/resourcekabc.cpp
+++ b/kresources/birthdays/resourcekabc.cpp
@@ -22,9 +22,9 @@
#include <typeinfo>
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <klocale.h>
#include <kdebug.h>
@@ -65,7 +65,7 @@ extern "C"
}
ResourceKABC::ResourceKABC( const KConfig* config )
- : ResourceCalendar( config ), mCalendar( QString::fromLatin1( "UTC" ) ),
+ : ResourceCalendar( config ), mCalendar( TQString::fromLatin1( "UTC" ) ),
mAlarmDays( 0 ), mAlarm( true ), mUseCategories( false )
{
if ( config ) {
@@ -76,7 +76,7 @@ ResourceKABC::ResourceKABC( const KConfig* config )
}
ResourceKABC::ResourceKABC()
- : ResourceCalendar( 0 ), mCalendar( QString::fromLatin1( "UTC" ) ),
+ : ResourceCalendar( 0 ), mCalendar( TQString::fromLatin1( "UTC" ) ),
mAlarmDays( 0 ), mAlarm( true ), mUseCategories( false )
{
init();
@@ -121,7 +121,7 @@ bool ResourceKABC::doOpen()
kdDebug(5800) << "ResourceKABC::doOpen()" << endl;
mAddressbook = KABC::StdAddressBook::self( true );
- connect( mAddressbook, SIGNAL(addressBookChanged(AddressBook*)), SLOT( reload() ) );
+ connect( mAddressbook, TQT_SIGNAL(addressBookChanged(AddressBook*)), TQT_SLOT( reload() ) );
return true;
}
@@ -133,9 +133,9 @@ bool ResourceKABC::doLoad()
mCalendar.close();
// import from kabc
- QString summary;
- QStringList::ConstIterator strIt;
- const QStringList::ConstIterator endStrIt = mCategories.end();
+ TQString summary;
+ TQStringList::ConstIterator strIt;
+ const TQStringList::ConstIterator endStrIt = mCategories.end();
KABC::Addressee::List anniversaries;
KABC::Addressee::List::Iterator addrIt;
@@ -145,7 +145,7 @@ bool ResourceKABC::doLoad()
if ( mUseCategories ) {
bool hasCategory = false;
- QStringList categories = (*it).categories();
+ TQStringList categories = (*it).categories();
for ( strIt = mCategories.begin(); strIt != endStrIt; ++strIt )
if ( categories.contains( *strIt ) ) {
hasCategory = true;
@@ -156,8 +156,8 @@ bool ResourceKABC::doLoad()
continue;
}
- QDate birthdate = (*it).birthday().date();
- QString name_1, email_1, uid_1;
+ TQDate birthdate = (*it).birthday().date();
+ TQString name_1, email_1, uid_1;
if ( birthdate.isValid() ) {
kdDebug(5800) << "found a birthday " << birthdate.toString() << endl;
@@ -213,21 +213,21 @@ bool ResourceKABC::doLoad()
kdDebug(5800) << "imported " << birthdate.toString() << endl;
}
- QString anniversary_string = (*it).custom( "KADDRESSBOOK", "X-Anniversary" );
+ TQString anniversary_string = (*it).custom( "KADDRESSBOOK", "X-Anniversary" );
if (anniversary_string.isEmpty() )
continue;
- QDateTime anniversary = QDate::fromString( anniversary_string, Qt::ISODate );
+ TQDateTime anniversary = TQDate::fromString( anniversary_string, Qt::ISODate );
if ( !anniversary.isValid() )
continue;
- QString name = (*it).custom( "KADDRESSBOOK", "X-SpousesName" );
+ TQString name = (*it).custom( "KADDRESSBOOK", "X-SpousesName" );
if ( name.isEmpty() )
anniversaries.append( *it );
else {
bool found = false;
for ( addrIt = anniversaries.begin(); addrIt != anniversaries.end(); ++addrIt ) {
if ( name == (*addrIt).realName() ) {
- QDateTime spouseAnniversary = QDate::fromString( (*addrIt).custom( "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate );
+ TQDateTime spouseAnniversary = TQDate::fromString( (*addrIt).custom( "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate );
if ( anniversary == spouseAnniversary ) {
found = true;
break;
@@ -242,21 +242,21 @@ bool ResourceKABC::doLoad()
}
for ( addrIt = anniversaries.begin(); addrIt != anniversaries.end(); ++addrIt ) {
- QDate anniversary = QDate::fromString( (*addrIt).custom( "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate );
+ TQDate anniversary = TQDate::fromString( (*addrIt).custom( "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate );
kdDebug(5800) << "found a anniversary " << anniversary.toString() << endl;
- QString name;
- QString name_1 = (*addrIt).nickName();
- QString uid_1 = (*addrIt).uid();
- QString email_1 = (*addrIt).fullEmail();
+ TQString name;
+ TQString name_1 = (*addrIt).nickName();
+ TQString uid_1 = (*addrIt).uid();
+ TQString email_1 = (*addrIt).fullEmail();
if ( name_1.isEmpty() )
name_1 = (*addrIt).realName();
- QString spouseName = (*addrIt).custom( "KADDRESSBOOK", "X-SpousesName" );
- QString name_2,email_2,uid_2;
+ TQString spouseName = (*addrIt).custom( "KADDRESSBOOK", "X-SpousesName" );
+ TQString name_2,email_2,uid_2;
if ( !spouseName.isEmpty() ) {
//TODO: find a KABC:Addressee of the spouse
- // Probably easiest would be to use a QMap (as the spouse's entry was already searched above!
+ // Probably easiest would be to use a TQMap (as the spouse's entry was already searched above!
KABC::Addressee spouse;
spouse.setNameFromString( spouseName );
uid_2 = spouse.uid();
@@ -341,12 +341,12 @@ int ResourceKABC::alarmDays()
return mAlarmDays;
}
-void ResourceKABC::setCategories( const QStringList &categories )
+void ResourceKABC::setCategories( const TQStringList &categories )
{
mCategories = categories;
}
-QStringList ResourceKABC::categories() const
+TQStringList ResourceKABC::categories() const
{
return mCategories;
}
@@ -389,25 +389,25 @@ bool ResourceKABC::deleteEvent(Event*)
}
-Event *ResourceKABC::event( const QString &uid )
+Event *ResourceKABC::event( const TQString &uid )
{
return mCalendar.event( uid );
}
-Event::List ResourceKABC::rawEventsForDate( const QDate &date,
+Event::List ResourceKABC::rawEventsForDate( const TQDate &date,
EventSortField sortField,
SortDirection sortDirection )
{
return mCalendar.rawEventsForDate( date, sortField, sortDirection );
}
-Event::List ResourceKABC::rawEvents( const QDate &start, const QDate &end,
+Event::List ResourceKABC::rawEvents( const TQDate &start, const TQDate &end,
bool inclusive )
{
return mCalendar.rawEvents( start, end, inclusive );
}
-Event::List ResourceKABC::rawEventsForDate(const QDateTime &qdt)
+Event::List ResourceKABC::rawEventsForDate(const TQDateTime &qdt)
{
return mCalendar.rawEventsForDate( qdt.date() );
}
@@ -433,12 +433,12 @@ Todo::List ResourceKABC::rawTodos( TodoSortField sortField, SortDirection sortDi
return mCalendar.rawTodos( sortField, sortDirection );
}
-Todo *ResourceKABC::todo( const QString &uid )
+Todo *ResourceKABC::todo( const TQString &uid )
{
return mCalendar.todo( uid );
}
-Todo::List ResourceKABC::rawTodosForDate( const QDate &date )
+Todo::List ResourceKABC::rawTodosForDate( const TQDate &date )
{
return mCalendar.rawTodosForDate( date );
}
@@ -454,7 +454,7 @@ bool ResourceKABC::deleteJournal(Journal*)
return false;
}
-Journal *ResourceKABC::journal(const QString &uid)
+Journal *ResourceKABC::journal(const TQString &uid)
{
return mCalendar.journal( uid );
}
@@ -464,17 +464,17 @@ Journal::List ResourceKABC::rawJournals( JournalSortField sortField, SortDirecti
return mCalendar.rawJournals( sortField, sortDirection );
}
-Journal::List ResourceKABC::rawJournalsForDate( const QDate &date )
+Journal::List ResourceKABC::rawJournalsForDate( const TQDate &date )
{
return mCalendar.rawJournalsForDate( date );
}
-Alarm::List ResourceKABC::alarmsTo( const QDateTime &to )
+Alarm::List ResourceKABC::alarmsTo( const TQDateTime &to )
{
return mCalendar.alarmsTo( to );
}
-Alarm::List ResourceKABC::alarms( const QDateTime &from, const QDateTime &to )
+Alarm::List ResourceKABC::alarms( const TQDateTime &from, const TQDateTime &to )
{
// kdDebug(5800) << "ResourceKABC::alarms(" << from.toString() << " - " << to.toString() << ")\n";
@@ -492,7 +492,7 @@ void ResourceKABC::reload()
emit resourceChanged( this );
}
-void ResourceKABC::setTimeZoneId( const QString& tzid )
+void ResourceKABC::setTimeZoneId( const TQString& tzid )
{
mCalendar.setTimeZoneId( tzid );
}
diff --git a/kresources/birthdays/resourcekabc.h b/kresources/birthdays/resourcekabc.h
index 9f9a75994..eebe087e9 100644
--- a/kresources/birthdays/resourcekabc.h
+++ b/kresources/birthdays/resourcekabc.h
@@ -21,9 +21,9 @@
#ifndef KCAL_RESOURCEKABC_H
#define KCAL_RESOURCEKABC_H
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include <kconfig.h>
@@ -65,8 +65,8 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
void setAlarmDays( int );
int alarmDays();
- void setCategories( const QStringList &categories );
- QStringList categories() const;
+ void setCategories( const TQStringList &categories );
+ TQStringList categories() const;
void setUseCategories( bool useCategories );
bool useCategories() const;
@@ -83,7 +83,7 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
/**
Retrieves an event on the basis of the unique string ID.
*/
- Event *event(const QString &UniqueStr);
+ Event *event(const TQString &UniqueStr);
/**
Return unfiltered list of all events in calendar.
*/
@@ -92,16 +92,16 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
Builds and then returns a list of all events that match for the
date specified. useful for dayView, etc. etc.
*/
- Event::List rawEventsForDate( const QDate &date, EventSortField sortField = EventSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
+ Event::List rawEventsForDate( const TQDate &date, EventSortField sortField = EventSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
/**
Get unfiltered events for date \a qdt.
*/
- Event::List rawEventsForDate( const QDateTime &qdt );
+ Event::List rawEventsForDate( const TQDateTime &qdt );
/**
Get unfiltered events in a range of dates. If inclusive is set to true,
only events are returned, which are completely included in the range.
*/
- Event::List rawEvents( const QDate &start, const QDate &end,
+ Event::List rawEvents( const TQDate &start, const TQDate &end,
bool inclusive = false );
/**
@@ -116,7 +116,7 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
Searches todolist for an event with this unique string identifier,
returns a pointer or null.
*/
- Todo *todo( const QString &uid );
+ Todo *todo( const TQString &uid );
/**
Return list of all todos.
*/
@@ -124,13 +124,13 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
/**
Returns list of todos due on the specified date.
*/
- Todo::List rawTodosForDate( const QDate &date );
+ Todo::List rawTodosForDate( const TQDate &date );
/** Add a Journal entry to calendar */
virtual bool addJournal(Journal *);
/** Remove journal from the calendar. */
bool deleteJournal( Journal * );
/** Return Journal with given UID */
- virtual Journal *journal(const QString &uid);
+ virtual Journal *journal(const TQString &uid);
/**
Return list of all journals.
*/
@@ -138,17 +138,17 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
/**
Returns list of journals for the given date.
*/
- Journal::List rawJournalsForDate( const QDate &date );
+ Journal::List rawJournalsForDate( const TQDate &date );
/** Return all alarms, which ocur in the given time interval. */
- Alarm::List alarms( const QDateTime &from, const QDateTime &to );
+ Alarm::List alarms( const TQDateTime &from, const TQDateTime &to );
/** Return all alarms, which ocur before given date. */
- Alarm::List alarmsTo( const QDateTime &to );
+ Alarm::List alarmsTo( const TQDateTime &to );
void dump() const;
- void setTimeZoneId( const QString &timeZoneId );
+ void setTimeZoneId( const TQString &timeZoneId );
protected:
bool doOpen();
@@ -165,7 +165,7 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
int mAlarmDays;
bool mAlarm;
- QStringList mCategories;
+ TQStringList mCategories;
bool mUseCategories;
KABC::AddressBook *mAddressbook;
diff --git a/kresources/birthdays/resourcekabcconfig.cpp b/kresources/birthdays/resourcekabcconfig.cpp
index 9fcbdcb61..2f7671dc7 100644
--- a/kresources/birthdays/resourcekabcconfig.cpp
+++ b/kresources/birthdays/resourcekabcconfig.cpp
@@ -21,8 +21,8 @@
#include <typeinfo>
-#include <qheader.h>
-#include <qlayout.h>
+#include <tqheader.h>
+#include <tqlayout.h>
#include <kabprefs.h>
#include <kdebug.h>
@@ -33,26 +33,26 @@
using namespace KCal;
-ResourceKABCConfig::ResourceKABCConfig( QWidget* parent, const char* name )
+ResourceKABCConfig::ResourceKABCConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- QGridLayout *topLayout = new QGridLayout( this, 5, 1, 11, 6 );
+ TQGridLayout *topLayout = new TQGridLayout( this, 5, 1, 11, 6 );
- mAlarm = new QCheckBox(i18n("Set reminder"), this);
+ mAlarm = new TQCheckBox(i18n("Set reminder"), this);
topLayout->addWidget(mAlarm, 0, 0);
- QBoxLayout *alarmLayout = new QHBoxLayout(topLayout);
+ TQBoxLayout *alarmLayout = new TQHBoxLayout(topLayout);
- mALabel = new QLabel(i18n("Reminder before (in days):"), this);
+ mALabel = new TQLabel(i18n("Reminder before (in days):"), this);
alarmLayout->addWidget(mALabel);
mAlarmTimeEdit = new KRestrictedLine(this, "alarmTimeEdit", "1234567890");
mAlarmTimeEdit->setText("0");
alarmLayout->addWidget(mAlarmTimeEdit);
- QFrame *line = new QFrame( this );
- line->setFrameStyle( QFrame::Sunken | QFrame::HLine );
+ TQFrame *line = new TQFrame( this );
+ line->setFrameStyle( TQFrame::Sunken | TQFrame::HLine );
topLayout->addMultiCellWidget( line, 2, 2, 0, 1 );
- mUseCategories = new QCheckBox( i18n( "Filter by categories" ), this );
+ mUseCategories = new TQCheckBox( i18n( "Filter by categories" ), this );
topLayout->addMultiCellWidget( mUseCategories, 3, 3, 0, 1 );
mCategoryView = new KListView( this );
@@ -61,21 +61,21 @@ ResourceKABCConfig::ResourceKABCConfig( QWidget* parent, const char* name )
mCategoryView->setEnabled( false );
topLayout->addMultiCellWidget( mCategoryView, 4, 4, 0, 1 );
- connect( mUseCategories, SIGNAL( toggled( bool ) ),
- mCategoryView, SLOT( setEnabled( bool ) ) );
+ connect( mUseCategories, TQT_SIGNAL( toggled( bool ) ),
+ mCategoryView, TQT_SLOT( setEnabled( bool ) ) );
mAlarmTimeEdit->setDisabled(true);
mALabel->setDisabled(true);
- connect(mAlarm, SIGNAL(clicked()), SLOT(alarmClicked()));
+ connect(mAlarm, TQT_SIGNAL(clicked()), TQT_SLOT(alarmClicked()));
setReadOnly( true );
KABPrefs *prefs = KABPrefs::instance();
- const QStringList categories = prefs->customCategories();
- QStringList::ConstIterator it;
+ const TQStringList categories = prefs->customCategories();
+ TQStringList::ConstIterator it;
for ( it = categories.begin(); it != categories.end(); ++it )
- new QCheckListItem( mCategoryView, *it, QCheckListItem::CheckBox );
+ new TQCheckListItem( mCategoryView, *it, TQCheckListItem::CheckBox );
}
void ResourceKABCConfig::loadSettings( KRES::Resource *resource )
@@ -83,17 +83,17 @@ void ResourceKABCConfig::loadSettings( KRES::Resource *resource )
ResourceKABC *res = static_cast<ResourceKABC *>( resource );
if ( res ) {
mAlarm->setChecked( res->alarm() );
- QString days;
+ TQString days;
mAlarmTimeEdit->setText( days.setNum(res->alarmDays()) );
mAlarmTimeEdit->setEnabled( res->alarm() );
mALabel->setEnabled( res->alarm() );
- const QStringList categories = res->categories();
- QListViewItemIterator it( mCategoryView );
+ const TQStringList categories = res->categories();
+ TQListViewItemIterator it( mCategoryView );
while ( it.current() ) {
if ( categories.contains( it.current()->text( 0 ) ) ) {
- QCheckListItem *item = static_cast<QCheckListItem*>( it.current() );
+ TQCheckListItem *item = static_cast<TQCheckListItem*>( it.current() );
item->setOn( true );
}
++it;
@@ -113,8 +113,8 @@ void ResourceKABCConfig::saveSettings( KRES::Resource *resource )
res->setAlarmDays( mAlarmTimeEdit->text().toInt() );
setReadOnly( true );
- QStringList categories;
- QListViewItemIterator it( mCategoryView, QListViewItemIterator::Checked );
+ TQStringList categories;
+ TQListViewItemIterator it( mCategoryView, TQListViewItemIterator::Checked );
while ( it.current() ) {
categories.append( it.current()->text( 0 ) );
++it;
diff --git a/kresources/birthdays/resourcekabcconfig.h b/kresources/birthdays/resourcekabcconfig.h
index b67d38847..7d3ddf098 100644
--- a/kresources/birthdays/resourcekabcconfig.h
+++ b/kresources/birthdays/resourcekabcconfig.h
@@ -23,8 +23,8 @@
#ifndef KCAL_RESOURCEKABCCONFIG_H
#define KCAL_RESOURCEKABCCONFIG_H
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <krestrictedline.h>
@@ -42,7 +42,7 @@ class ResourceKABCConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- ResourceKABCConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceKABCConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource);
@@ -52,10 +52,10 @@ class ResourceKABCConfig : public KRES::ConfigWidget
void alarmClicked();
private:
- QCheckBox *mAlarm;
+ TQCheckBox *mAlarm;
KRestrictedLine *mAlarmTimeEdit;
- QLabel *mALabel;
- QCheckBox *mUseCategories;
+ TQLabel *mALabel;
+ TQCheckBox *mUseCategories;
KListView *mCategoryView;
class Private;