summaryrefslogtreecommitdiffstats
path: root/korganizer/kdatenavigator.cpp
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 /korganizer/kdatenavigator.cpp
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 'korganizer/kdatenavigator.cpp')
-rw-r--r--korganizer/kdatenavigator.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index 900a7b24e..1dea017a2 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -23,12 +23,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstring.h>
-#include <qkeycode.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qframe.h>
-#include <qlabel.h>
+#include <tqstring.h>
+#include <tqkeycode.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqframe.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <klocale.h>
@@ -45,27 +45,27 @@
#include "kdatenavigator.h"
-KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
- : QFrame( parent, name ), mBaseDate( 1970, 1, 1 )
+KDateNavigator::KDateNavigator( TQWidget *parent, const char *name )
+ : TQFrame( parent, name ), mBaseDate( 1970, 1, 1 )
{
- QGridLayout* topLayout = new QGridLayout( this, 8, 8 );
+ TQGridLayout* topLayout = new TQGridLayout( this, 8, 8 );
mNavigatorBar = new NavigatorBar( this );
topLayout->addMultiCellWidget( mNavigatorBar, 0, 0, 0, 7 );
- connect( mNavigatorBar, SIGNAL( goPrevYear() ), SIGNAL( goPrevYear() ) );
- connect( mNavigatorBar, SIGNAL( goPrevMonth() ), SIGNAL( goPrevMonth() ) );
- connect( mNavigatorBar, SIGNAL( goNextMonth() ), SIGNAL( goNextMonth() ) );
- connect( mNavigatorBar, SIGNAL( goNextYear() ), SIGNAL( goNextYear() ) );
- connect( mNavigatorBar, SIGNAL( goMonth( int ) ), SIGNAL( goMonth( int ) ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goPrevYear() ), TQT_SIGNAL( goPrevYear() ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goPrevMonth() ), TQT_SIGNAL( goPrevMonth() ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goNextMonth() ), TQT_SIGNAL( goNextMonth() ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goNextYear() ), TQT_SIGNAL( goNextYear() ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goMonth( int ) ), TQT_SIGNAL( goMonth( int ) ) );
int i;
- QString generalFont = KGlobalSettings::generalFont().family();
+ TQString generalFont = KGlobalSettings::generalFont().family();
// Set up the heading fields.
for( i = 0; i < 7; i++ ) {
- mHeadings[i] = new QLabel( this );
- mHeadings[i]->setFont( QFont( generalFont, 10, QFont::Bold ) );
+ mHeadings[i] = new TQLabel( this );
+ mHeadings[i]->setFont( TQFont( generalFont, 10, TQFont::Bold ) );
mHeadings[i]->setAlignment( AlignCenter );
topLayout->addWidget( mHeadings[i], 1, i + 1 );
@@ -73,9 +73,9 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
// Create the weeknumber labels
for( i = 0; i < 6; i++ ) {
- mWeeknos[i] = new QLabel( this );
+ mWeeknos[i] = new TQLabel( this );
mWeeknos[i]->setAlignment( AlignCenter );
- mWeeknos[i]->setFont( QFont( generalFont, 10 ) );
+ mWeeknos[i]->setFont( TQFont( generalFont, 10 ) );
mWeeknos[i]->installEventFilter( this );
topLayout->addWidget( mWeeknos[i], i + 2, 0 );
@@ -83,13 +83,13 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
mDayMatrix = new KODayMatrix( this, "KDateNavigator::dayMatrix" );
- connect( mDayMatrix, SIGNAL( selected( const KCal::DateList & ) ),
- SIGNAL( datesSelected( const KCal::DateList & ) ) );
+ connect( mDayMatrix, TQT_SIGNAL( selected( const KCal::DateList & ) ),
+ TQT_SIGNAL( datesSelected( const KCal::DateList & ) ) );
- connect( mDayMatrix, SIGNAL( incidenceDropped( Incidence *, const QDate & ) ),
- SIGNAL( incidenceDropped( Incidence *, const QDate & ) ) );
- connect( mDayMatrix, SIGNAL( incidenceDroppedMove( Incidence * , const QDate & ) ),
- SIGNAL( incidenceDroppedMove( Incidence *, const QDate & ) ) );
+ connect( mDayMatrix, TQT_SIGNAL( incidenceDropped( Incidence *, const TQDate & ) ),
+ TQT_SIGNAL( incidenceDropped( Incidence *, const TQDate & ) ) );
+ connect( mDayMatrix, TQT_SIGNAL( incidenceDroppedMove( Incidence * , const TQDate & ) ),
+ TQT_SIGNAL( incidenceDroppedMove( Incidence *, const TQDate & ) ) );
topLayout->addMultiCellWidget( mDayMatrix, 2, 7, 1, 7 );
@@ -107,7 +107,7 @@ void KDateNavigator::setCalendar( Calendar *cal )
mDayMatrix->setCalendar( cal );
}
-void KDateNavigator::setBaseDate( const QDate &date )
+void KDateNavigator::setBaseDate( const TQDate &date )
{
if ( date != mBaseDate ) {
mBaseDate = date;
@@ -125,10 +125,10 @@ void KDateNavigator::setBaseDate( const QDate &date )
}
}
-QSizePolicy KDateNavigator::sizePolicy () const
+TQSizePolicy KDateNavigator::sizePolicy () const
{
- return QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::MinimumExpanding );
+ return TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::MinimumExpanding );
}
void KDateNavigator::updateToday()
@@ -136,10 +136,10 @@ void KDateNavigator::updateToday()
mDayMatrix->recalculateToday();
mDayMatrix->repaint();
}
-QDate KDateNavigator::startDate() const
+TQDate KDateNavigator::startDate() const
{
// Find the first day of the week of the current month.
- QDate dayone( mBaseDate.year(), mBaseDate.month(), mBaseDate.day() );
+ TQDate dayone( mBaseDate.year(), mBaseDate.month(), mBaseDate.day() );
int d2 = KOGlobals::self()->calendarSystem()->day( dayone );
//int di = d1 - d2 + 1;
dayone = dayone.addDays( -d2 + 1 );
@@ -160,7 +160,7 @@ QDate KDateNavigator::startDate() const
return dayone;
}
-QDate KDateNavigator::endDate() const
+TQDate KDateNavigator::endDate() const
{
return startDate().addDays( 6*7 );
}
@@ -168,7 +168,7 @@ QDate KDateNavigator::endDate() const
void KDateNavigator::updateDates()
{
// kdDebug(5850) << "KDateNavigator::updateDates(), this=" << this << endl;
- QDate dayone = startDate();
+ TQDate dayone = startDate();
mDayMatrix->updateView( dayone );
@@ -177,11 +177,11 @@ void KDateNavigator::updateDates()
// set the week numbers.
for( int i = 0; i < 6; i++ ) {
// Use QDate's weekNumber method to determine the week number!
- QDate dtStart = mDayMatrix->getDate( i * 7 );
- QDate dtEnd = mDayMatrix->getDate( ( i + 1 ) * 7 - 1 );
+ TQDate dtStart = mDayMatrix->getDate( i * 7 );
+ TQDate dtEnd = mDayMatrix->getDate( ( i + 1 ) * 7 - 1 );
int weeknumstart = calsys->weekNumber( dtStart );
int weeknumend = calsys->weekNumber( dtEnd );
- QString weeknum;
+ TQString weeknum;
if ( weeknumstart != weeknumend ) {
weeknum = i18n("start/end week number of line in date picker", "%1/%2")
@@ -217,7 +217,7 @@ void KDateNavigator::updateConfig()
int weekstart = KGlobal::locale()->weekStartDay();
for( int i = 0; i < 7; i++ ) {
day = weekstart + i <= 7 ? weekstart + i : ( weekstart + i ) % 7;
- QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( day,
+ TQString dayName = KOGlobals::self()->calendarSystem()->weekDayName( day,
true );
if ( KOPrefs::instance()->mCompactDialogs ) dayName = dayName.left( 1 );
mHeadings[i]->setText( dayName );
@@ -251,7 +251,7 @@ void KDateNavigator::selectDates( const DateList &dateList )
}
}
-void KDateNavigator::wheelEvent ( QWheelEvent *e )
+void KDateNavigator::wheelEvent ( TQWheelEvent *e )
{
if( e->delta() > 0 ) emit goPrevious();
else emit goNext();
@@ -259,13 +259,13 @@ void KDateNavigator::wheelEvent ( QWheelEvent *e )
e->accept();
}
-bool KDateNavigator::eventFilter ( QObject *o, QEvent *e )
+bool KDateNavigator::eventFilter ( TQObject *o, TQEvent *e )
{
- if ( e->type() == QEvent::MouseButtonPress ) {
+ if ( e->type() == TQEvent::MouseButtonPress ) {
int i;
for( i = 0; i < 6; ++i ) {
if ( o == mWeeknos[ i ] ) {
- QDate weekstart = mDayMatrix->getDate( i * 7 );
+ TQDate weekstart = mDayMatrix->getDate( i * 7 );
emit weekClicked( weekstart );
break;
}