summaryrefslogtreecommitdiffstats
path: root/korganizer/komonthview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'korganizer/komonthview.cpp')
-rw-r--r--korganizer/komonthview.cpp274
1 files changed, 137 insertions, 137 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 3c88bb01f..f54a6a183 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -23,19 +23,19 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpopupmenu.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qkeycode.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qpainter.h>
-#include <qcursor.h>
-#include <qlistbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqpopupmenu.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqkeycode.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
+#include <tqlistbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <klocale.h>
@@ -61,59 +61,59 @@
//--------------------------------------------------------------------------
-KOMonthCellToolTip::KOMonthCellToolTip( QWidget *parent,
+KOMonthCellToolTip::KOMonthCellToolTip( TQWidget *parent,
KNoScrollListBox *lv )
- : QToolTip( parent )
+ : TQToolTip( parent )
{
eventlist = lv;
}
-void KOMonthCellToolTip::maybeTip( const QPoint & pos )
+void KOMonthCellToolTip::maybeTip( const TQPoint & pos )
{
- QRect r;
- QListBoxItem *it = eventlist->itemAt( pos );
+ TQRect r;
+ TQListBoxItem *it = eventlist->itemAt( pos );
MonthViewItem *i = static_cast<MonthViewItem*>( it );
if( i && KOPrefs::instance()->mEnableToolTips ) {
/* Calculate the rectangle. */
r=eventlist->itemRect( it );
/* Show the tip */
- QString tipText( IncidenceFormatter::toolTipString( i->incidence() ) );
+ TQString tipText( IncidenceFormatter::toolTipString( i->incidence() ) );
if ( !tipText.isEmpty() ) {
tip( r, tipText );
}
}
}
-KNoScrollListBox::KNoScrollListBox( QWidget *parent, const char *name )
- : QListBox( parent, name ),
+KNoScrollListBox::KNoScrollListBox( TQWidget *parent, const char *name )
+ : TQListBox( parent, name ),
mSqueezing( false )
{
- QPalette pal = palette();
- pal.setColor( QColorGroup::Foreground, KOPrefs::instance()->agendaBgColor().dark( 150 ) );
- pal.setColor( QColorGroup::Base, KOPrefs::instance()->agendaBgColor() );
+ TQPalette pal = palette();
+ pal.setColor( TQColorGroup::Foreground, KOPrefs::instance()->agendaBgColor().dark( 150 ) );
+ pal.setColor( TQColorGroup::Base, KOPrefs::instance()->agendaBgColor() );
setPalette( pal );
}
void KNoScrollListBox::setBackground( bool primary, bool workDay )
{
- QColor color;
+ TQColor color;
if ( workDay ) {
color = KOPrefs::instance()->workingHoursColor();
} else {
color = KOPrefs::instance()->agendaBgColor();
}
- QPalette pal = palette();
+ TQPalette pal = palette();
if ( primary ) {
- pal.setColor( QColorGroup::Base, color );
+ pal.setColor( TQColorGroup::Base, color );
} else {
- pal.setColor( QColorGroup::Base, color.dark( 115 ) );
+ pal.setColor( TQColorGroup::Base, color.dark( 115 ) );
}
setPalette( pal );
}
-void KNoScrollListBox::keyPressEvent( QKeyEvent *e )
+void KNoScrollListBox::keyPressEvent( TQKeyEvent *e )
{
switch( e->key() ) {
case Key_Right:
@@ -151,7 +151,7 @@ void KNoScrollListBox::keyPressEvent( QKeyEvent *e )
}
}
-void KNoScrollListBox::keyReleaseEvent( QKeyEvent *e )
+void KNoScrollListBox::keyReleaseEvent( TQKeyEvent *e )
{
switch( e->key() ) {
case Key_Shift:
@@ -162,36 +162,36 @@ void KNoScrollListBox::keyReleaseEvent( QKeyEvent *e )
}
}
-void KNoScrollListBox::mousePressEvent( QMouseEvent *e )
+void KNoScrollListBox::mousePressEvent( TQMouseEvent *e )
{
- QListBox::mousePressEvent( e );
+ TQListBox::mousePressEvent( e );
if ( e->button() == RightButton ) {
emit rightClick();
}
}
-void KNoScrollListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void KNoScrollListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
- QListBox::contentsMouseDoubleClickEvent( e );
- QListBoxItem *item = itemAt( e->pos() );
+ TQListBox::contentsMouseDoubleClickEvent( e );
+ TQListBoxItem *item = itemAt( e->pos() );
if ( !item ) {
emit doubleClicked( item );
}
}
-void KNoScrollListBox::resizeEvent( QResizeEvent *e )
+void KNoScrollListBox::resizeEvent( TQResizeEvent *e )
{
bool s = count() && ( maxItemWidth() > e->size().width() );
if ( mSqueezing || s )
triggerUpdate( false );
mSqueezing = s;
- QListBox::resizeEvent( e );
+ TQListBox::resizeEvent( e );
}
-MonthViewItem::MonthViewItem( Incidence *incidence, const QDateTime &qd,
- const QString & s ) : QListBoxItem()
+MonthViewItem::MonthViewItem( Incidence *incidence, const TQDateTime &qd,
+ const TQString & s ) : TQListBoxItem()
{
setText( s );
@@ -205,7 +205,7 @@ MonthViewItem::MonthViewItem( Incidence *incidence, const QDateTime &qd,
mRecurPixmap = KOGlobals::self()->smallIcon( "recur" );
mReplyPixmap = KOGlobals::self()->smallIcon( "mail_reply" );
- mResourceColor = QColor();
+ mResourceColor = TQColor();
mEvent = false;
mTodo = false;
mTodoDone = false;
@@ -214,7 +214,7 @@ MonthViewItem::MonthViewItem( Incidence *incidence, const QDateTime &qd,
mReply = false;
}
-void MonthViewItem::paint( QPainter *p )
+void MonthViewItem::paint( TQPainter *p )
{
#if QT_VERSION >= 0x030000
bool sel = isSelected();
@@ -222,8 +222,8 @@ void MonthViewItem::paint( QPainter *p )
bool sel = selected();
#endif
- QColor bgColor = palette().color( QPalette::Normal,
- sel ? QColorGroup::Highlight : QColorGroup::Background );
+ TQColor bgColor = palette().color( TQPalette::Normal,
+ sel ? TQColorGroup::Highlight : TQColorGroup::Background );
int offset=0;
if ( KOPrefs::instance()->monthViewUsesResourceColor() &&
mResourceColor.isValid() ) {
@@ -261,7 +261,7 @@ void MonthViewItem::paint( QPainter *p )
p->drawPixmap(x, 0, mReplyPixmap );
x += mReplyPixmap.width() + 2;
}
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int yPos;
int pmheight = QMAX( mRecurPixmap.height(),
QMAX( mAlarmPixmap.height(), mReplyPixmap.height() ) );
@@ -269,19 +269,19 @@ void MonthViewItem::paint( QPainter *p )
yPos = fm.ascent() + fm.leading()/2;
else
yPos = pmheight/2 - fm.height()/2 + fm.ascent();
- QColor textColor = getTextColor( bgColor );
+ TQColor textColor = getTextColor( bgColor );
p->setPen( textColor );
KWordWrap::drawFadeoutText( p, x, yPos, listBox()->width() - x, text() );
}
-int MonthViewItem::height( const QListBox *lb ) const
+int MonthViewItem::height( const TQListBox *lb ) const
{
return QMAX( QMAX( mRecurPixmap.height(), mReplyPixmap.height() ),
QMAX( mAlarmPixmap.height(), lb->fontMetrics().lineSpacing()+1) );
}
-int MonthViewItem::width( const QListBox *lb ) const
+int MonthViewItem::width( const TQListBox *lb ) const
{
int x = 3;
if( mRecur ) {
@@ -299,19 +299,19 @@ int MonthViewItem::width( const QListBox *lb ) const
MonthViewCell::MonthViewCell( KOMonthView *parent)
- : QWidget( parent ),
+ : TQWidget( parent ),
mMonthView( parent ), mPrimary( false ), mHoliday( false )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this );
- mLabel = new QLabel( this );
- mLabel->setFrameStyle( QFrame::Panel | QFrame::Plain );
+ mLabel = new TQLabel( this );
+ mLabel->setFrameStyle( TQFrame::Panel | TQFrame::Plain );
mLabel->setLineWidth( 1 );
mLabel->setAlignment( AlignCenter );
mItemList = new KNoScrollListBox( this );
mItemList->setMinimumSize( 10, 10 );
- mItemList->setFrameStyle( QFrame::Panel | QFrame::Plain );
+ mItemList->setFrameStyle( TQFrame::Panel | TQFrame::Plain );
mItemList->setLineWidth( 1 );
new KOMonthCellToolTip( mItemList->viewport(),
@@ -327,16 +327,16 @@ MonthViewCell::MonthViewCell( KOMonthView *parent)
updateConfig();
- connect( mItemList, SIGNAL( doubleClicked( QListBoxItem *) ),
- SLOT( defaultAction( QListBoxItem * ) ) );
- connect( mItemList, SIGNAL( rightButtonPressed( QListBoxItem *,
- const QPoint &) ),
- SLOT( contextMenu( QListBoxItem * ) ) );
- connect( mItemList, SIGNAL( clicked( QListBoxItem * ) ),
- SLOT( select() ) );
+ connect( mItemList, TQT_SIGNAL( doubleClicked( TQListBoxItem *) ),
+ TQT_SLOT( defaultAction( TQListBoxItem * ) ) );
+ connect( mItemList, TQT_SIGNAL( rightButtonPressed( TQListBoxItem *,
+ const TQPoint &) ),
+ TQT_SLOT( contextMenu( TQListBoxItem * ) ) );
+ connect( mItemList, TQT_SIGNAL( clicked( TQListBoxItem * ) ),
+ TQT_SLOT( select() ) );
}
-void MonthViewCell::setDate( const QDate &date )
+void MonthViewCell::setDate( const TQDate &date )
{
// kdDebug(5850) << "MonthViewCell::setDate(): " << date.toString() << endl;
@@ -344,23 +344,23 @@ void MonthViewCell::setDate( const QDate &date )
setFrameWidth();
- QString text;
+ TQString text;
if ( KOGlobals::self()->calendarSystem()->day( date ) == 1 ) {
text = i18n("'Month day' for month view cells", "%1 %2")
.arg( KOGlobals::self()->calendarSystem()->monthName( date, true ) )
.arg( KOGlobals::self()->calendarSystem()->day(mDate) );
- QFontMetrics fm( mLabel->font() );
- mLabel->resize( mLabelSize + QSize( fm.width( text ), 0 ) );
+ TQFontMetrics fm( mLabel->font() );
+ mLabel->resize( mLabelSize + TQSize( fm.width( text ), 0 ) );
} else {
mLabel->resize( mLabelSize );
- text = QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
+ text = TQString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
}
mLabel->setText( text );
resizeEvent( 0 );
}
-QDate MonthViewCell::date() const
+TQDate MonthViewCell::date() const
{
return mDate;
}
@@ -368,7 +368,7 @@ QDate MonthViewCell::date() const
void MonthViewCell::setFrameWidth()
{
// show current day with a thicker frame
- if ( mDate == QDate::currentDate() )
+ if ( mDate == TQDate::currentDate() )
mItemList->setLineWidth( 3 );
else
mItemList->setLineWidth( 1 );
@@ -403,7 +403,7 @@ void MonthViewCell::setHoliday( bool holiday )
}
}
-void MonthViewCell::setHolidayString( const QString &holiday )
+void MonthViewCell::setHolidayString( const TQString &holiday )
{
mHolidayString = holiday;
}
@@ -412,11 +412,11 @@ void MonthViewCell::updateCell()
{
setFrameWidth();
- if ( mDate == QDate::currentDate() ) {
+ if ( mDate == TQDate::currentDate() ) {
setPalette( mTodayPalette );
- QPalette pal = mItemList->palette();
- pal.setColor( QColorGroup::Foreground, KOPrefs::instance()->highlightColor() );
+ TQPalette pal = mItemList->palette();
+ pal.setColor( TQColorGroup::Foreground, KOPrefs::instance()->highlightColor() );
mItemList->setPalette( pal );
}
else {
@@ -425,15 +425,15 @@ void MonthViewCell::updateCell()
else
setPalette( mStandardPalette );
- QPalette pal = mItemList->palette();
- pal.setColor( QColorGroup::Foreground, KOPrefs::instance()->agendaBgColor().dark( 150 ) );
+ TQPalette pal = mItemList->palette();
+ pal.setColor( TQColorGroup::Foreground, KOPrefs::instance()->agendaBgColor().dark( 150 ) );
mItemList->setPalette( pal );
}
mItemList->clear();
if ( !mHolidayString.isEmpty() ) {
- MonthViewItem *item = new MonthViewItem( 0, QDateTime( mDate ), mHolidayString );
+ MonthViewItem *item = new MonthViewItem( 0, TQDateTime( mDate ), mHolidayString );
item->setPalette( mHolidayPalette );
mItemList->insertItem( item );
}
@@ -445,7 +445,7 @@ class MonthViewCell::CreateItemVisitor :
public:
CreateItemVisitor() : mItem(0) { emails = KOPrefs::instance()->allEmails(); }
- bool act( IncidenceBase *incidence, QDate date, QPalette stdPal, int multiDay )
+ bool act( IncidenceBase *incidence, TQDate date, TQPalette stdPal, int multiDay )
{
mItem = 0;
mDate = date;
@@ -454,14 +454,14 @@ class MonthViewCell::CreateItemVisitor :
return incidence->accept( *this );
}
MonthViewItem *item() const { return mItem; }
- QStringList emails;
+ TQStringList emails;
protected:
bool visit( Event *event ) {
- QString text;
- QDateTime dt( mDate );
+ TQString text;
+ TQDateTime dt( mDate );
// take the time 0:00 into account, which is non-inclusive
- QDate dtEnd = event->dtEnd().addSecs( event->doesFloat() ? 0 : -1).date();
+ TQDate dtEnd = event->dtEnd().addSecs( event->doesFloat() ? 0 : -1).date();
int length = event->dtStart().daysTo( dtEnd );
if ( event->isMultiDay() ) {
if ( mDate == event->dtStart().date()
@@ -476,7 +476,7 @@ class MonthViewCell::CreateItemVisitor :
text = "-- " + event->summary() + " --";
} else {
text = "----------------";
- dt = QDateTime( mDate );
+ dt = TQDateTime( mDate );
}
} else {
if (event->doesFloat())
@@ -491,12 +491,12 @@ class MonthViewCell::CreateItemVisitor :
mItem = new MonthViewItem( event, dt, text );
mItem->setEvent( true );
if (KOPrefs::instance()->monthViewUsesCategoryColor()) {
- QStringList categories = event->categories();
- QString cat = categories.first();
+ TQStringList categories = event->categories();
+ TQString cat = categories.first();
if (cat.isEmpty()) {
- mItem->setPalette(QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor));
+ mItem->setPalette(TQPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor));
} else {
- mItem->setPalette(QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))));
+ mItem->setPalette(TQPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))));
}
} else {
mItem->setPalette( mStandardPalette );
@@ -510,10 +510,10 @@ class MonthViewCell::CreateItemVisitor :
return true;
}
bool visit( Todo *todo ) {
- QString text;
+ TQString text;
if ( !KOPrefs::instance()->showAllDayTodo() )
return false;
- QDateTime dt( mDate );
+ TQDateTime dt( mDate );
if ( todo->hasDueDate() && !todo->doesFloat() ) {
text += KGlobal::locale()->formatTime( todo->dtDue().time() );
text += ' ';
@@ -533,8 +533,8 @@ class MonthViewCell::CreateItemVisitor :
}
protected:
MonthViewItem *mItem;
- QDate mDate;
- QPalette mStandardPalette;
+ TQDate mDate;
+ TQPalette mStandardPalette;
int mMultiDay;
};
@@ -547,7 +547,7 @@ void MonthViewCell::addIncidence( Incidence *incidence, CreateItemVisitor& v, in
item->setAlarm( incidence->isAlarmEnabled() );
item->setRecur( incidence->recurrenceType() );
- QColor resourceColor = KOHelper::resourceColor( mCalendar, incidence );
+ TQColor resourceColor = KOHelper::resourceColor( mCalendar, incidence );
if ( !resourceColor.isValid() )
resourceColor = KOPrefs::instance()->mEventColor;
item->setResourceColor( resourceColor );
@@ -557,10 +557,10 @@ void MonthViewCell::addIncidence( Incidence *incidence, CreateItemVisitor& v, in
// chronologically sorted.
uint i = 0;
int pos = -1;
- QDateTime dt( item->incidenceDateTime() );
+ TQDateTime dt( item->incidenceDateTime() );
while ( i < mItemList->count() && pos<0 ) {
- QListBoxItem *item = mItemList->item( i );
+ TQListBoxItem *item = mItemList->item( i );
MonthViewItem *mvitem = dynamic_cast<MonthViewItem*>( item );
if ( mvitem && mvitem->incidenceDateTime()>dt ) {
pos = i;
@@ -588,12 +588,12 @@ void MonthViewCell::updateConfig()
{
setFont( KOPrefs::instance()->mMonthViewFont );
- QFontMetrics fm( font() );
+ TQFontMetrics fm( font() );
mLabelSize = fm.size( 0, "30" ) +
- QSize( mLabel->frameWidth() * 2, mLabel->frameWidth() * 2 ) +
- QSize( 2, 2 );
+ TQSize( mLabel->frameWidth() * 2, mLabel->frameWidth() * 2 ) +
+ TQSize( 2, 2 );
// mStandardPalette = mOriginalPalette;
- QColor bg = mStandardPalette.color( QPalette::Active, QColorGroup::Background );
+ TQColor bg = mStandardPalette.color( TQPalette::Active, TQColorGroup::Background );
int h,s,v;
bg.getHsv( &h, &s, &v );
if ( date().month() %2 == 0 ) {
@@ -604,17 +604,17 @@ void MonthViewCell::updateConfig()
}
}
setPaletteBackgroundColor( bg );
-// mStandardPalette.setColor( QColorGroup::Background, bg);*/
+// mStandardPalette.setColor( TQColorGroup::Background, bg);*/
mHolidayPalette = mStandardPalette;
- mHolidayPalette.setColor( QColorGroup::Foreground,
+ mHolidayPalette.setColor( TQColorGroup::Foreground,
KOPrefs::instance()->holidayColor() );
- mHolidayPalette.setColor( QColorGroup::Text,
+ mHolidayPalette.setColor( TQColorGroup::Text,
KOPrefs::instance()->holidayColor() );
mTodayPalette = mStandardPalette;
- mTodayPalette.setColor( QColorGroup::Foreground,
+ mTodayPalette.setColor( TQColorGroup::Foreground,
KOPrefs::instance()->highlightColor() );
- mTodayPalette.setColor( QColorGroup::Text,
+ mTodayPalette.setColor( TQColorGroup::Text,
KOPrefs::instance()->highlightColor() );
updateCell();
@@ -624,11 +624,11 @@ void MonthViewCell::updateConfig()
void MonthViewCell::enableScrollBars( bool enabled )
{
if ( enabled ) {
- mItemList->setVScrollBarMode( QScrollView::Auto );
- mItemList->setHScrollBarMode( QScrollView::Auto );
+ mItemList->setVScrollBarMode( TQScrollView::Auto );
+ mItemList->setHScrollBarMode( TQScrollView::Auto );
} else {
- mItemList->setVScrollBarMode( QScrollView::AlwaysOff );
- mItemList->setHScrollBarMode( QScrollView::AlwaysOff );
+ mItemList->setVScrollBarMode( TQScrollView::AlwaysOff );
+ mItemList->setHScrollBarMode( TQScrollView::AlwaysOff );
}
}
@@ -645,9 +645,9 @@ Incidence *MonthViewCell::selectedIncidence()
return item->incidence();
}
-QDate MonthViewCell::selectedIncidenceDate()
+TQDate MonthViewCell::selectedIncidenceDate()
{
- QDate qd;
+ TQDate qd;
int index = mItemList->currentItem();
if ( index < 0 ) return qd;
@@ -668,8 +668,8 @@ void MonthViewCell::select()
enableScrollBars( true );
// don't mess up the cell when it represents today
- if( mDate != QDate::currentDate() ) {
- mItemList->setFrameStyle( QFrame::Sunken | QFrame::Panel );
+ if( mDate != TQDate::currentDate() ) {
+ mItemList->setFrameStyle( TQFrame::Sunken | TQFrame::Panel );
mItemList->setLineWidth( 3 );
}
}
@@ -677,18 +677,18 @@ void MonthViewCell::select()
void MonthViewCell::deselect()
{
mItemList->clearSelection();
- mItemList->setFrameStyle( QFrame::Plain | QFrame::Panel );
+ mItemList->setFrameStyle( TQFrame::Plain | TQFrame::Panel );
setFrameWidth();
enableScrollBars( false );
}
-void MonthViewCell::resizeEvent ( QResizeEvent * )
+void MonthViewCell::resizeEvent ( TQResizeEvent * )
{
mLabel->move( width() - mLabel->width(), height() - mLabel->height() );
}
-void MonthViewCell::defaultAction( QListBoxItem *item )
+void MonthViewCell::defaultAction( TQListBoxItem *item )
{
select();
@@ -701,7 +701,7 @@ void MonthViewCell::defaultAction( QListBoxItem *item )
}
}
-void MonthViewCell::contextMenu( QListBoxItem *item )
+void MonthViewCell::contextMenu( TQListBoxItem *item )
{
select();
@@ -716,27 +716,27 @@ void MonthViewCell::contextMenu( QListBoxItem *item )
}
-KOMonthView::KOMonthView( Calendar *calendar, QWidget *parent, const char *name )
+KOMonthView::KOMonthView( Calendar *calendar, TQWidget *parent, const char *name )
: KOEventView( calendar, parent, name ),
mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ),
mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 )
{
mCells.setAutoDelete( true );
- QGridLayout *dayLayout = new QGridLayout( this );
+ TQGridLayout *dayLayout = new TQGridLayout( this );
- QFont bfont = font();
+ TQFont bfont = font();
bfont.setBold( true );
- QFont mfont = bfont;
+ TQFont mfont = bfont;
mfont.setPointSize( 20 );
// month name on top
- mLabel = new QLabel( this );
+ mLabel = new TQLabel( this );
mLabel->setFont( mfont );
mLabel->setAlignment( AlignCenter );
mLabel->setLineWidth( 0 );
- mLabel->setFrameStyle( QFrame::Plain );
+ mLabel->setFrameStyle( TQFrame::Plain );
dayLayout->addMultiCellWidget( mLabel, 0, 0, 0, mDaysPerWeek );
@@ -745,9 +745,9 @@ KOMonthView::KOMonthView( Calendar *calendar, QWidget *parent, const char *name
mDayLabels.resize( mDaysPerWeek );
int i;
for( i = 0; i < mDaysPerWeek; i++ ) {
- QLabel *label = new QLabel( this );
+ TQLabel *label = new TQLabel( this );
label->setFont( bfont );
- label->setFrameStyle( QFrame::Panel | QFrame::Raised );
+ label->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
label->setLineWidth( 1 );
label->setAlignment( AlignCenter );
@@ -768,10 +768,10 @@ KOMonthView::KOMonthView( Calendar *calendar, QWidget *parent, const char *name
mCells.insert( row * mDaysPerWeek + col, cell );
dayLayout->addWidget( cell, row + 2, col );
- connect( cell, SIGNAL( defaultAction( Incidence * ) ),
- SLOT( defaultAction( Incidence * ) ) );
- connect( cell, SIGNAL( newEventSignal( const QDate & ) ),
- SIGNAL( newEventSignal( const QDate & ) ) );
+ connect( cell, TQT_SIGNAL( defaultAction( Incidence * ) ),
+ TQT_SLOT( defaultAction( Incidence * ) ) );
+ connect( cell, TQT_SIGNAL( newEventSignal( const TQDate & ) ),
+ TQT_SIGNAL( newEventSignal( const TQDate & ) ) );
}
dayLayout->setRowStretch( row + 2, 1 );
}
@@ -815,14 +815,14 @@ DateList KOMonthView::selectedDates()
DateList selected;
if ( mSelectedCell ) {
- QDate qd = mSelectedCell->selectedIncidenceDate();
+ TQDate qd = mSelectedCell->selectedIncidenceDate();
if ( qd.isValid() ) selected.append( qd );
}
return selected;
}
-bool KOMonthView::eventDurationHint( QDateTime &startDt, QDateTime &endDt, bool &allDay )
+bool KOMonthView::eventDurationHint( TQDateTime &startDt, TQDateTime &endDt, bool &allDay )
{
if ( mSelectedCell ) {
startDt.setDate( mSelectedCell->date() );
@@ -837,7 +837,7 @@ void KOMonthView::updateConfig()
{
mWeekStartDay = KGlobal::locale()->weekStartDay();
- QFontMetrics fontmetric( mDayLabels[0]->font() );
+ TQFontMetrics fontmetric( mDayLabels[0]->font() );
mWidthLongDayLabel = 0;
for ( int i = 0; i < 7; ++i ) {
@@ -866,7 +866,7 @@ void KOMonthView::updateDayLabels()
}
}
-void KOMonthView::showDates( const QDate &start, const QDate & )
+void KOMonthView::showDates( const TQDate &start, const TQDate & )
{
// kdDebug(5850) << "KOMonthView::showDates(): " << start.toString() << endl;
@@ -892,7 +892,7 @@ void KOMonthView::showDates( const QDate &start, const QDate & )
bool primary = false;
uint i;
for( i = 0; i < mCells.size(); ++i ) {
- QDate date = mStartDate.addDays( i );
+ TQDate date = mStartDate.addDays( i );
if ( calSys->day( date ) == 1 ) {
primary = !primary;
}
@@ -909,7 +909,7 @@ void KOMonthView::showDates( const QDate &start, const QDate & )
mCells[i]->setHoliday( isHoliday );
// add holiday, if present
- QStringList holidays( KOGlobals::self()->holiday( date ) );
+ TQStringList holidays( KOGlobals::self()->holiday( date ) );
mCells[i]->setHolidayString( holidays.join( i18n("delimiter for joining holiday names", ", " ) ) );
}
@@ -930,8 +930,8 @@ class KOMonthView::GetDateVisitor : public IncidenceBase::Visitor
{
return incidence->accept( *this );
}
- QDateTime startDate() const { return mStartDate; }
- QDateTime endDate() const { return mEndDate; }
+ TQDateTime startDate() const { return mStartDate; }
+ TQDateTime endDate() const { return mEndDate; }
protected:
bool visit( Event *event ) {
@@ -953,8 +953,8 @@ class KOMonthView::GetDateVisitor : public IncidenceBase::Visitor
return true;
}
protected:
- QDateTime mStartDate;
- QDateTime mEndDate;
+ TQDateTime mStartDate;
+ TQDateTime mEndDate;
};
void KOMonthView::changeIncidenceDisplayAdded( Incidence *incidence, MonthViewCell::CreateItemVisitor& v)
@@ -982,8 +982,8 @@ void KOMonthView::changeIncidenceDisplayAdded( Incidence *incidence, MonthViewCe
} else {
// addSecs(-1) is added to handle 0:00 cases (because it's non-inclusive according to rfc)
if ( gdv.endDate().isValid() ) {
- QDate endDate = gdv.endDate().addSecs( floats ? 0 : -1).date();
- for ( QDate date = gdv.startDate().date();
+ TQDate endDate = gdv.endDate().addSecs( floats ? 0 : -1).date();
+ for ( TQDate date = gdv.startDate().date();
date <= endDate; date = date.addDays( 1 ) ) {
MonthViewCell *mvc = mDateToCell[ date ];
if ( mvc ) mvc->addIncidence( incidence, v );
@@ -1029,7 +1029,7 @@ void KOMonthView::updateView()
processSelectionChange();
}
-void KOMonthView::resizeEvent( QResizeEvent * )
+void KOMonthView::resizeEvent( TQResizeEvent * )
{
// select the appropriate heading string size. E.g. "Wednesday" or "Wed".
// note this only changes the text if the requested size crosses the
@@ -1048,7 +1048,7 @@ void KOMonthView::resizeEvent( QResizeEvent * )
}
}
-void KOMonthView::showEventContextMenu( Incidence *incidence, const QDate &qd )
+void KOMonthView::showEventContextMenu( Incidence *incidence, const TQDate &qd )
{
mEventContextMenu->showIncidencePopup( incidence, qd );
}