summaryrefslogtreecommitdiffstats
path: root/korganizer/komonthview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /korganizer/komonthview.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/komonthview.cpp')
-rw-r--r--korganizer/komonthview.cpp34
1 files changed, 15 insertions, 19 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 930e6c8d3..ad03aec43 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -19,8 +19,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
- with any edition of Qt, and distribute the resulting executable,
- without including the source code for Qt in the source distribution.
+ with any edition of TQt, and distribute the resulting executable,
+ without including the source code for TQt in the source distribution.
*/
#include <tqpopupmenu.h>
@@ -61,11 +61,11 @@
//--------------------------------------------------------------------------
-KOMonthCellToolTip::KOMonthCellToolTip( TQWidget *parent,
+KOMonthCellToolTip::KOMonthCellToolTip( TQWidget *tqparent,
Calendar *calendar,
const TQDate &date,
KNoScrollListBox *lv )
- : TQToolTip( parent ), mCalendar( calendar ), mDate( date )
+ : TQToolTip( tqparent ), mCalendar( calendar ), mDate( date )
{
eventlist = lv;
}
@@ -87,8 +87,8 @@ void KOMonthCellToolTip::maybeTip( const TQPoint &pos )
}
}
-KNoScrollListBox::KNoScrollListBox( TQWidget *parent, const char *name )
- : TQListBox( parent, name ),
+KNoScrollListBox::KNoScrollListBox( TQWidget *tqparent, const char *name )
+ : TQListBox( tqparent, name ),
mSqueezing( false )
{
TQPalette pal = palette();
@@ -239,11 +239,7 @@ TQColor MonthViewItem::catColor() const
void MonthViewItem::paint( TQPainter *p )
{
-#if QT_VERSION >= 0x030000
bool sel = isSelected();
-#else
- bool sel = selected();
-#endif
TQColor bgColor = TQColor(); // Default invalid color;
if ( mIncidence && mTodo ) {
@@ -347,8 +343,8 @@ void MonthViewItem::paint( TQPainter *p )
}
TQFontMetrics fm = p->fontMetrics();
int yPos;
- int pmheight = QMAX( mRecurPixmap.height(),
- QMAX( mAlarmPixmap.height(), mReplyPixmap.height() ) );
+ int pmheight = TQMAX( mRecurPixmap.height(),
+ TQMAX( mAlarmPixmap.height(), mReplyPixmap.height() ) );
if( pmheight < fm.height() )
yPos = fm.ascent() + fm.leading()/2;
else
@@ -361,8 +357,8 @@ void MonthViewItem::paint( TQPainter *p )
int MonthViewItem::height( const TQListBox *lb ) const
{
- return QMAX( QMAX( mRecurPixmap.height(), mReplyPixmap.height() ),
- QMAX( mAlarmPixmap.height(), lb->fontMetrics().lineSpacing()+1) );
+ return TQMAX( TQMAX( mRecurPixmap.height(), mReplyPixmap.height() ),
+ TQMAX( mAlarmPixmap.height(), lb->fontMetrics().lineSpacing()+1) );
}
int MonthViewItem::width( const TQListBox *lb ) const
@@ -382,9 +378,9 @@ int MonthViewItem::width( const TQListBox *lb ) const
}
-MonthViewCell::MonthViewCell( KOMonthView *parent)
- : TQWidget( parent ),
- mMonthView( parent ), mPrimary( false ), mHoliday( false ),
+MonthViewCell::MonthViewCell( KOMonthView *tqparent)
+ : TQWidget( tqparent ),
+ mMonthView( tqparent ), mPrimary( false ), mHoliday( false ),
isSelected( false )
{
TQVBoxLayout *topLayout = new TQVBoxLayout( this );
@@ -814,8 +810,8 @@ void MonthViewCell::contextMenu( TQListBoxItem *item )
}
-KOMonthView::KOMonthView( Calendar *calendar, TQWidget *parent, const char *name )
- : KOEventView( calendar, parent, name ),
+KOMonthView::KOMonthView( Calendar *calendar, TQWidget *tqparent, const char *name )
+ : KOEventView( calendar, tqparent, name ),
mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ),
mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 )
{