author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/komonthview.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | korganizer/komonthview.cpp | 218 |
1 files changed, 115 insertions, 103 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 85e9166..ca55c43 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -19,9 +19,9 @@ | |||
19 | 19 | ||
20 | #include <qpopupmenu.h> | 20 | #include <q3popupmenu.h> |
21 | #include <qfont.h> | 21 | #include <qfont.h> |
22 | #include <qfontmetrics.h> | 22 | #include <qfontmetrics.h> |
23 | #include <qkeycode.h> | 23 | #include <qnamespace.h> |
24 | #include <qhbox.h> | 24 | #include <q3hbox.h> |
25 | #include <qvbox.h> | 25 | #include <q3vbox.h> |
26 | #include <qwidgetstack.h> | 26 | #include <q3widgetstack.h> |
27 | #include <qpushbutton.h> | 27 | #include <qpushbutton.h> |
@@ -30,3 +30,3 @@ | |||
30 | #include <qtimer.h> | 30 | #include <qtimer.h> |
31 | #include <qwhatsthis.h> | 31 | #include <q3whatsthis.h> |
32 | #ifndef DESKTOP_VERSION | 32 | #ifndef DESKTOP_VERSION |
@@ -35,2 +35,14 @@ | |||
35 | #include <qapplication.h> | 35 | #include <qapplication.h> |
36 | #include <QDesktopWidget> | ||
37 | //Added by qt3to4: | ||
38 | #include <QResizeEvent> | ||
39 | #include <QLabel> | ||
40 | #include <QPixmap> | ||
41 | #include <QFocusEvent> | ||
42 | #include <QMouseEvent> | ||
43 | #include <QKeyEvent> | ||
44 | #include <Q3VBoxLayout> | ||
45 | #include <Q3Frame> | ||
46 | #include <Q3PointArray> | ||
47 | #include <Q3PtrList> | ||
36 | #endif | 48 | #endif |
@@ -61,6 +73,6 @@ QToolTipGroup *MonthViewCell::mToolTipGroup = 0; | |||
61 | #endif | 73 | #endif |
62 | class KNOWhatsThis :public QWhatsThis | 74 | class KNOWhatsThis :public Q3WhatsThis |
63 | { | 75 | { |
64 | public: | 76 | public: |
65 | KNOWhatsThis( KNoScrollListBox* sbox ) : QWhatsThis( sbox ), _wid( sbox) { }; | 77 | KNOWhatsThis( KNoScrollListBox* sbox ) : Q3WhatsThis( sbox ), _wid( sbox) { }; |
66 | //~KNOWhatsThis( ) {qDebug("~KNOWhatsThis( ) "); }; | 78 | //~KNOWhatsThis( ) {qDebug("~KNOWhatsThis( ) "); }; |
@@ -79,3 +91,3 @@ private: | |||
79 | KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) | 91 | KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) |
80 | : QListBox(parent, name, WRepaintNoErase) | 92 | : Q3ListBox(parent, name, Qt::WNoAutoErase) |
81 | { | 93 | { |
@@ -87,4 +99,4 @@ KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) | |||
87 | resetOnFocusIn = true; | 99 | resetOnFocusIn = true; |
88 | setVScrollBarMode(QScrollView::AlwaysOff); | 100 | setVScrollBarMode(Q3ScrollView::AlwaysOff); |
89 | setHScrollBarMode(QScrollView::AlwaysOff); | 101 | setHScrollBarMode(Q3ScrollView::AlwaysOff); |
90 | } | 102 | } |
@@ -102,3 +114,3 @@ void KNoScrollListBox::focusInEvent ( QFocusEvent * e ) | |||
102 | { | 114 | { |
103 | QListBox::focusInEvent ( e ); | 115 | Q3ListBox::focusInEvent ( e ); |
104 | if ( count() ){ | 116 | if ( count() ){ |
@@ -114,3 +126,3 @@ void KNoScrollListBox::focusInEvent ( QFocusEvent * e ) | |||
114 | if ( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) { | 126 | if ( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) { |
115 | QListBoxItem *fi = firstItem (); | 127 | Q3ListBoxItem *fi = firstItem (); |
116 | if (fi ) { | 128 | if (fi ) { |
@@ -119,15 +131,15 @@ void KNoScrollListBox::focusInEvent ( QFocusEvent * e ) | |||
119 | if ( hei < height() - horizontalScrollBar()->height () ) { | 131 | if ( hei < height() - horizontalScrollBar()->height () ) { |
120 | setVScrollBarMode(QScrollView::AlwaysOff); | 132 | setVScrollBarMode(Q3ScrollView::AlwaysOff); |
121 | } | 133 | } |
122 | else | 134 | else |
123 | setVScrollBarMode(QScrollView::Auto); | 135 | setVScrollBarMode(Q3ScrollView::Auto); |
124 | if ( ihei *3 > height() ) { | 136 | if ( ihei *3 > height() ) { |
125 | setHScrollBarMode(QScrollView::AlwaysOff); | 137 | setHScrollBarMode(Q3ScrollView::AlwaysOff); |
126 | } | 138 | } |
127 | else { | 139 | else { |
128 | setHScrollBarMode(QScrollView::Auto); | 140 | setHScrollBarMode(Q3ScrollView::Auto); |
129 | } | 141 | } |
130 | } else { | 142 | } else { |
131 | setVScrollBarMode(QScrollView::Auto); | 143 | setVScrollBarMode(Q3ScrollView::Auto); |
132 | setHScrollBarMode(QScrollView::Auto); | 144 | setHScrollBarMode(Q3ScrollView::Auto); |
133 | } | 145 | } |
@@ -143,6 +155,6 @@ void KNoScrollListBox::focusOutEvent ( QFocusEvent * e ) | |||
143 | } | 155 | } |
144 | QListBox::focusOutEvent ( e ); | 156 | Q3ListBox::focusOutEvent ( e ); |
145 | } | 157 | } |
146 | setVScrollBarMode(QScrollView::AlwaysOff); | 158 | setVScrollBarMode(Q3ScrollView::AlwaysOff); |
147 | setHScrollBarMode(QScrollView::AlwaysOff); | 159 | setHScrollBarMode(Q3ScrollView::AlwaysOff); |
148 | if ( ! mBlockDeselect ) | 160 | if ( ! mBlockDeselect ) |
@@ -154,3 +166,3 @@ QString KNoScrollListBox::getWhatsThisText(QPoint p) | |||
154 | { | 166 | { |
155 | QListBoxItem* item = itemAt ( p ); | 167 | Q3ListBoxItem* item = itemAt ( p ); |
156 | if ( ! item ) { | 168 | if ( ! item ) { |
@@ -167,3 +179,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) | |||
167 | switch(e->key()) { | 179 | switch(e->key()) { |
168 | case Key_Right: | 180 | case Qt::Key_Right: |
169 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 181 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
@@ -175,3 +187,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) | |||
175 | break; | 187 | break; |
176 | case Key_Left: | 188 | case Qt::Key_Left: |
177 | if (e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 189 | if (e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
@@ -183,3 +195,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) | |||
183 | break; | 195 | break; |
184 | case Key_Up: | 196 | case Qt::Key_Up: |
185 | if( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { | 197 | if( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { |
@@ -203,3 +215,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) | |||
203 | break; | 215 | break; |
204 | case Key_Down: | 216 | case Qt::Key_Down: |
205 | if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { | 217 | if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { |
@@ -223,3 +235,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) | |||
223 | break; | 235 | break; |
224 | case Key_I: | 236 | case Qt::Key_I: |
225 | QTimer::singleShot( 1, this, SLOT ( oneDown() ) ); | 237 | QTimer::singleShot( 1, this, SLOT ( oneDown() ) ); |
@@ -227,4 +239,4 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) | |||
227 | break; | 239 | break; |
228 | case Key_Return: | 240 | case Qt::Key_Return: |
229 | case Key_Enter: | 241 | case Qt::Key_Enter: |
230 | { | 242 | { |
@@ -238,3 +250,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) | |||
238 | break; | 250 | break; |
239 | case Key_Shift: | 251 | case Qt::Key_Shift: |
240 | emit shiftDown(); | 252 | emit shiftDown(); |
@@ -268,3 +280,3 @@ void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e) | |||
268 | switch(e->key()) { | 280 | switch(e->key()) { |
269 | case Key_Shift: | 281 | case Qt::Key_Shift: |
270 | emit shiftUp(); | 282 | emit shiftUp(); |
@@ -278,5 +290,5 @@ void KNoScrollListBox::mousePressEvent(QMouseEvent *e) | |||
278 | { | 290 | { |
279 | QListBox::mousePressEvent(e); | 291 | Q3ListBox::mousePressEvent(e); |
280 | 292 | ||
281 | if(e->button() == RightButton) { | 293 | if(e->button() == Qt::RightButton) { |
282 | emit rightClick(); | 294 | emit rightClick(); |
@@ -286,3 +298,3 @@ void KNoScrollListBox::mousePressEvent(QMouseEvent *e) | |||
286 | MonthViewItem::MonthViewItem( Incidence *incidence, const QString & s) | 298 | MonthViewItem::MonthViewItem( Incidence *incidence, const QString & s) |
287 | : QListBoxItem() | 299 | : Q3ListBoxItem() |
288 | { | 300 | { |
@@ -397,3 +409,3 @@ void MonthViewItem::paint(QPainter *p) | |||
397 | if ( mMultiday == 2 || mMultiday == 3 ) { | 409 | if ( mMultiday == 2 || mMultiday == 3 ) { |
398 | QPointArray pa ( 3 ); | 410 | Q3PointArray pa ( 3 ); |
399 | pa.setPoint (0, x, yyy ); | 411 | pa.setPoint (0, x, yyy ); |
@@ -404,3 +416,3 @@ void MonthViewItem::paint(QPainter *p) | |||
404 | if ( mMultiday == 2 || mMultiday == 1 ) { | 416 | if ( mMultiday == 2 || mMultiday == 1 ) { |
405 | QPointArray pa ( 3 ); | 417 | Q3PointArray pa ( 3 ); |
406 | pa.setPoint (0, x+sizeM +sizeM/2, yyy ); | 418 | pa.setPoint (0, x+sizeM +sizeM/2, yyy ); |
@@ -464,3 +476,3 @@ void MonthViewItem::paint(QPainter *p) | |||
464 | 476 | ||
465 | int MonthViewItem::height(const QListBox *lb) const | 477 | int MonthViewItem::height(const Q3ListBox *lb) const |
466 | { | 478 | { |
@@ -472,3 +484,3 @@ int MonthViewItem::height(const QListBox *lb) const | |||
472 | 484 | ||
473 | int MonthViewItem::width(const QListBox *lb) const | 485 | int MonthViewItem::width(const Q3ListBox *lb) const |
474 | { | 486 | { |
@@ -516,6 +528,6 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par ) | |||
516 | mLabel->setFlat( true ); | 528 | mLabel->setFlat( true ); |
517 | mLabel->setFocusPolicy(NoFocus); | 529 | mLabel->setFocusPolicy(Qt::NoFocus); |
518 | //mItemList = new KNoScrollListBox( this ); | 530 | //mItemList = new KNoScrollListBox( this ); |
519 | setMinimumSize( 10, 10 ); | 531 | setMinimumSize( 10, 10 ); |
520 | setFrameStyle( QFrame::Panel | QFrame::Plain ); | 532 | setFrameStyle( Q3Frame::Panel | Q3Frame::Plain ); |
521 | setLineWidth( 1 ); | 533 | setLineWidth( 1 ); |
@@ -531,9 +543,9 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par ) | |||
531 | connect( mLabel, SIGNAL( clicked( )), SLOT( showDay() )); | 543 | connect( mLabel, SIGNAL( clicked( )), SLOT( showDay() )); |
532 | connect( this , SIGNAL( doubleClicked( QListBoxItem *) ), | 544 | connect( this , SIGNAL( doubleClicked( Q3ListBoxItem *) ), |
533 | SLOT( defaultAction( QListBoxItem * ) ) ); | 545 | SLOT( defaultAction( Q3ListBoxItem * ) ) ); |
534 | connect( this, SIGNAL( rightButtonPressed( QListBoxItem *, | 546 | connect( this, SIGNAL( rightButtonPressed( Q3ListBoxItem *, |
535 | const QPoint &) ), | 547 | const QPoint &) ), |
536 | SLOT( contextMenu( QListBoxItem * ) ) ); | 548 | SLOT( contextMenu( Q3ListBoxItem * ) ) ); |
537 | connect( this, SIGNAL( highlighted( QListBoxItem *) ), | 549 | connect( this, SIGNAL( highlighted( Q3ListBoxItem *) ), |
538 | SLOT( selection( QListBoxItem * ) ) ); | 550 | SLOT( selection( Q3ListBoxItem * ) ) ); |
539 | 551 | ||
@@ -547,3 +559,3 @@ QToolTipGroup *MonthViewCell::toolTipGroup() | |||
547 | { | 559 | { |
548 | if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); | 560 | /* TODO:hacker: if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); */ |
549 | return mToolTipGroup; | 561 | return mToolTipGroup; |
@@ -639,3 +651,3 @@ void MonthViewCell::startUpdateCell() | |||
639 | mdayCount = 0; | 651 | mdayCount = 0; |
640 | setFocusPolicy(NoFocus); | 652 | setFocusPolicy(Qt::NoFocus); |
641 | if ( !mMonthView->isUpdatePossible() ) | 653 | if ( !mMonthView->isUpdatePossible() ) |
@@ -694,3 +706,3 @@ int MonthViewCell::insertEvent(Event *event) | |||
694 | QString mToolTipText; | 706 | QString mToolTipText; |
695 | setFocusPolicy(WheelFocus); | 707 | setFocusPolicy(Qt::WheelFocus); |
696 | if ( !(event->doesRecur() == Recurrence::rNone) ) { | 708 | if ( !(event->doesRecur() == Recurrence::rNone) ) { |
@@ -836,3 +848,3 @@ int MonthViewCell::insertEvent(Event *event) | |||
836 | // qDebug("i %d mday %u count %d ",i,itcount,mdayCount ); | 848 | // qDebug("i %d mday %u count %d ",i,itcount,mdayCount ); |
837 | QListBoxItem* it = this->item ( i ); | 849 | Q3ListBoxItem* it = this->item ( i ); |
838 | if ( it && text < it->text() ) { | 850 | if ( it && text < it->text() ) { |
@@ -852,3 +864,3 @@ void MonthViewCell::insertTodo(Todo *todo) | |||
852 | { | 864 | { |
853 | setFocusPolicy(WheelFocus); | 865 | setFocusPolicy(Qt::WheelFocus); |
854 | QString text; | 866 | QString text; |
@@ -924,3 +936,3 @@ void MonthViewCell::finishUpdateCell() | |||
924 | mToolTip.sort(); | 936 | mToolTip.sort(); |
925 | QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),""); | 937 | /* TODO: hacker: QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),""); */ |
926 | } | 938 | } |
@@ -940,3 +952,3 @@ void MonthViewCell::updateCell() | |||
940 | //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); | 952 | //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); |
941 | QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); | 953 | Q3PtrList<Event> events = mMonthView->calendar()->events( mDate, true ); |
942 | Event *event; | 954 | Event *event; |
@@ -946,3 +958,3 @@ void MonthViewCell::updateCell() | |||
946 | // insert due todos | 958 | // insert due todos |
947 | QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); | 959 | Q3PtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); |
948 | Todo *todo; | 960 | Todo *todo; |
@@ -994,3 +1006,3 @@ void MonthViewCell::enableScrollBars( bool enabled ) | |||
994 | if ( enabled ) { | 1006 | if ( enabled ) { |
995 | QListBoxItem *fi = firstItem (); | 1007 | Q3ListBoxItem *fi = firstItem (); |
996 | if (fi ) { | 1008 | if (fi ) { |
@@ -999,19 +1011,19 @@ void MonthViewCell::enableScrollBars( bool enabled ) | |||
999 | if ( hei < height() - horizontalScrollBar()->height () ) { | 1011 | if ( hei < height() - horizontalScrollBar()->height () ) { |
1000 | setVScrollBarMode(QScrollView::AlwaysOff); | 1012 | setVScrollBarMode(Q3ScrollView::AlwaysOff); |
1001 | } | 1013 | } |
1002 | else | 1014 | else |
1003 | setVScrollBarMode(QScrollView::Auto); | 1015 | setVScrollBarMode(Q3ScrollView::Auto); |
1004 | if ( ihei *3 > height() ) { | 1016 | if ( ihei *3 > height() ) { |
1005 | setHScrollBarMode(QScrollView::AlwaysOff); | 1017 | setHScrollBarMode(Q3ScrollView::AlwaysOff); |
1006 | } | 1018 | } |
1007 | else { | 1019 | else { |
1008 | setHScrollBarMode(QScrollView::Auto); | 1020 | setHScrollBarMode(Q3ScrollView::Auto); |
1009 | } | 1021 | } |
1010 | } else { | 1022 | } else { |
1011 | setVScrollBarMode(QScrollView::Auto); | 1023 | setVScrollBarMode(Q3ScrollView::Auto); |
1012 | setHScrollBarMode(QScrollView::Auto); | 1024 | setHScrollBarMode(Q3ScrollView::Auto); |
1013 | } | 1025 | } |
1014 | } else { | 1026 | } else { |
1015 | setVScrollBarMode(QScrollView::AlwaysOff); | 1027 | setVScrollBarMode(Q3ScrollView::AlwaysOff); |
1016 | setHScrollBarMode(QScrollView::AlwaysOff); | 1028 | setHScrollBarMode(Q3ScrollView::AlwaysOff); |
1017 | } | 1029 | } |
@@ -1085,3 +1097,3 @@ void MonthViewCell::resizeEvent ( QResizeEvent * e ) | |||
1085 | 1097 | ||
1086 | void MonthViewCell::defaultAction( QListBoxItem *item ) | 1098 | void MonthViewCell::defaultAction( Q3ListBoxItem *item ) |
1087 | { | 1099 | { |
@@ -1107,3 +1119,3 @@ void MonthViewCell::newEvent() | |||
1107 | } | 1119 | } |
1108 | void MonthViewCell::cellClicked( QListBoxItem *item ) | 1120 | void MonthViewCell::cellClicked( Q3ListBoxItem *item ) |
1109 | { | 1121 | { |
@@ -1118,3 +1130,3 @@ void MonthViewCell::cellClicked( QListBoxItem *item ) | |||
1118 | 1130 | ||
1119 | void MonthViewCell::contextMenu( QListBoxItem *item ) | 1131 | void MonthViewCell::contextMenu( Q3ListBoxItem *item ) |
1120 | { | 1132 | { |
@@ -1135,3 +1147,3 @@ void MonthViewCell::contextMenu( QListBoxItem *item ) | |||
1135 | 1147 | ||
1136 | void MonthViewCell::selection( QListBoxItem *item ) | 1148 | void MonthViewCell::selection( Q3ListBoxItem *item ) |
1137 | { | 1149 | { |
@@ -1187,4 +1199,4 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
1187 | mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" ); | 1199 | mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" ); |
1188 | mWidStack = new QWidgetStack( this ); | 1200 | mWidStack = new Q3WidgetStack( this ); |
1189 | QVBoxLayout* hb = new QVBoxLayout( this ); | 1201 | Q3VBoxLayout* hb = new Q3VBoxLayout( this ); |
1190 | mMonthView = new QWidget( mWidStack ); | 1202 | mMonthView = new QWidget( mWidStack ); |
@@ -1217,5 +1229,5 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
1217 | label->setFont(bfont); | 1229 | label->setFont(bfont); |
1218 | label->setFrameStyle(QFrame::Panel|QFrame::Raised); | 1230 | label->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised); |
1219 | label->setLineWidth(1); | 1231 | label->setLineWidth(1); |
1220 | label->setAlignment(AlignCenter); | 1232 | label->setAlignment(Qt::AlignCenter); |
1221 | mDayLabels.insert( i, label ); | 1233 | mDayLabels.insert( i, label ); |
@@ -1223,5 +1235,5 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
1223 | label->setFont(bfont); | 1235 | label->setFont(bfont); |
1224 | label->setFrameStyle(QFrame::Panel|QFrame::Raised); | 1236 | label->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised); |
1225 | label->setLineWidth(1); | 1237 | label->setLineWidth(1); |
1226 | label->setAlignment(AlignCenter); | 1238 | label->setAlignment(Qt::AlignCenter); |
1227 | mDayLabelsW.insert( i, label ); | 1239 | mDayLabelsW.insert( i, label ); |
@@ -1234,3 +1246,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
1234 | KOWeekButton *label = new KOWeekButton( mMonthView ); | 1246 | KOWeekButton *label = new KOWeekButton( mMonthView ); |
1235 | label->setFocusPolicy(NoFocus); | 1247 | label->setFocusPolicy(Qt::NoFocus); |
1236 | label->setFont(bfont); | 1248 | label->setFont(bfont); |
@@ -1238,3 +1250,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
1238 | label->setFlat(true); | 1250 | label->setFlat(true); |
1239 | QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); | 1251 | Q3WhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); |
1240 | //label->setFrameStyle(QFrame::Panel|QFrame::Raised); | 1252 | //label->setFrameStyle(QFrame::Panel|QFrame::Raised); |
@@ -1245,4 +1257,4 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
1245 | mWeekLabels[mNumWeeks]->setText( i18n("W")); | 1257 | mWeekLabels[mNumWeeks]->setText( i18n("W")); |
1246 | mWeekLabels[mNumWeeks]->setFocusPolicy(WheelFocus); | 1258 | mWeekLabels[mNumWeeks]->setFocusPolicy(Qt::WheelFocus); |
1247 | QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); | 1259 | Q3WhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); |
1248 | 1260 | ||
@@ -1250,3 +1262,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
1250 | KOWeekButton *label = new KOWeekButton( mWeekView ); | 1262 | KOWeekButton *label = new KOWeekButton( mWeekView ); |
1251 | label->setFocusPolicy(NoFocus); | 1263 | label->setFocusPolicy(Qt::NoFocus); |
1252 | label->setFont(bfont); | 1264 | label->setFont(bfont); |
@@ -1254,3 +1266,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
1254 | label->setFlat(true); | 1266 | label->setFlat(true); |
1255 | QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); | 1267 | Q3WhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); |
1256 | //label->setFrameStyle(QFrame::Panel|QFrame::Raised); | 1268 | //label->setFrameStyle(QFrame::Panel|QFrame::Raised); |
@@ -1261,3 +1273,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
1261 | mWeekLabelsW[1]->setText( i18n("W")); | 1273 | mWeekLabelsW[1]->setText( i18n("W")); |
1262 | mWeekLabelsW[1]->setFocusPolicy(WheelFocus); | 1274 | mWeekLabelsW[1]->setFocusPolicy(Qt::WheelFocus); |
1263 | 1275 | ||
@@ -1307,9 +1319,9 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
1307 | mContextMenu = eventPopup(); | 1319 | mContextMenu = eventPopup(); |
1308 | mContextMenu->addAdditionalItem(QIconSet(QPixmap()), | 1320 | mContextMenu->addAdditionalItem(QIcon(QPixmap()), |
1309 | i18n("New Event..."),this, | 1321 | i18n("New Event..."),this, |
1310 | SLOT(slotNewEvent()),false); | 1322 | SLOT(slotNewEvent()),false); |
1311 | mContextMenu->addAdditionalItem(QIconSet(QPixmap()), | 1323 | mContextMenu->addAdditionalItem(QIcon(QPixmap()), |
1312 | i18n("New Todo..."),this, | 1324 | i18n("New Todo..."),this, |
1313 | SLOT(slotNewTodo()),false); | 1325 | SLOT(slotNewTodo()),false); |
1314 | mContextMenu->addAdditionalItem(QIconSet(QPixmap()), | 1326 | mContextMenu->addAdditionalItem(QIcon(QPixmap()), |
1315 | i18n("Journal"),this, | 1327 | i18n("Journal"),this, |
@@ -1327,3 +1339,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
1327 | pathString += "iconsmini/"; | 1339 | pathString += "iconsmini/"; |
1328 | mNewItemMenu = new QPopupMenu( this ); | 1340 | mNewItemMenu = new Q3PopupMenu( this ); |
1329 | mNewItemMenu->insertItem( SmallIcon( pathString +"newevent" ), i18n("New Event..."),this, SLOT(slotNewEvent())); | 1341 | mNewItemMenu->insertItem( SmallIcon( pathString +"newevent" ), i18n("New Event..."),this, SLOT(slotNewEvent())); |
@@ -1399,3 +1411,3 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int | |||
1399 | } | 1411 | } |
1400 | QPtrVector<MonthViewCell> *cells; | 1412 | Q3PtrVector<MonthViewCell> *cells; |
1401 | if ( weekview ) | 1413 | if ( weekview ) |
@@ -1497,5 +1509,5 @@ int KOMonthView::currentDateCount() | |||
1497 | 1509 | ||
1498 | QPtrList<Incidence> KOMonthView::selectedIncidences() | 1510 | Q3PtrList<Incidence> KOMonthView::selectedIncidences() |
1499 | { | 1511 | { |
1500 | QPtrList<Incidence> selected; | 1512 | Q3PtrList<Incidence> selected; |
1501 | 1513 | ||
@@ -1563,3 +1575,3 @@ void KOMonthView::updateConfig() | |||
1563 | #ifdef DESKTOP_VERSION | 1575 | #ifdef DESKTOP_VERSION |
1564 | MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); | 1576 | /* TODO:hacker: MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); */ |
1565 | #endif | 1577 | #endif |
@@ -1571,3 +1583,3 @@ void KOMonthView::updateDayLabels() | |||
1571 | 1583 | ||
1572 | QPtrVector<QLabel> *mDayLabelsT; | 1584 | Q3PtrVector<QLabel> *mDayLabelsT; |
1573 | 1585 | ||
@@ -1612,5 +1624,5 @@ void KOMonthView::showDates(const QDate &start, const QDate &) | |||
1612 | 1624 | ||
1613 | QPtrVector<MonthViewCell> *cells; | 1625 | Q3PtrVector<MonthViewCell> *cells; |
1614 | QPtrVector<QLabel> *dayLabels; | 1626 | Q3PtrVector<QLabel> *dayLabels; |
1615 | QPtrVector<KOWeekButton> *weekLabels; | 1627 | Q3PtrVector<KOWeekButton> *weekLabels; |
1616 | uint weekNum = 6; | 1628 | uint weekNum = 6; |
@@ -1670,3 +1682,3 @@ void KOMonthView::showDates(const QDate &start, const QDate &) | |||
1670 | 1682 | ||
1671 | void KOMonthView::showEvents(QPtrList<Event>) | 1683 | void KOMonthView::showEvents(Q3PtrList<Event>) |
1672 | { | 1684 | { |
@@ -1692,3 +1704,3 @@ void KOMonthView::updateView() | |||
1692 | clearSelection(); | 1704 | clearSelection(); |
1693 | QPtrVector<MonthViewCell> *cells; | 1705 | Q3PtrVector<MonthViewCell> *cells; |
1694 | if ( mShowWeekView ) { | 1706 | if ( mShowWeekView ) { |
@@ -1707,3 +1719,3 @@ void KOMonthView::updateView() | |||
1707 | 1719 | ||
1708 | QPtrList<Event> events = calendar()->events(); | 1720 | Q3PtrList<Event> events = calendar()->events(); |
1709 | Event *event; | 1721 | Event *event; |
@@ -1771,3 +1783,3 @@ void KOMonthView::updateView() | |||
1771 | // insert due todos | 1783 | // insert due todos |
1772 | QPtrList<Todo> todos = calendar()->todos( ); | 1784 | Q3PtrList<Todo> todos = calendar()->todos( ); |
1773 | Todo *todo; | 1785 | Todo *todo; |
@@ -2227,3 +2239,3 @@ void KOMonthView::processSelectionChange() | |||
2227 | { | 2239 | { |
2228 | QPtrList<Incidence> incidences = selectedIncidences(); | 2240 | Q3PtrList<Incidence> incidences = selectedIncidences(); |
2229 | if (incidences.count() > 0) { | 2241 | if (incidences.count() > 0) { |
@@ -2263,3 +2275,3 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) | |||
2263 | switch(e->key()) { | 2275 | switch(e->key()) { |
2264 | case Key_Up: | 2276 | case Qt::Key_Up: |
2265 | { | 2277 | { |
@@ -2274,3 +2286,3 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) | |||
2274 | break; | 2286 | break; |
2275 | case Key_Down: | 2287 | case Qt::Key_Down: |
2276 | { | 2288 | { |
@@ -2286,4 +2298,4 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) | |||
2286 | break; | 2298 | break; |
2287 | case Key_Return: | 2299 | case Qt::Key_Return: |
2288 | case Key_Enter: | 2300 | case Qt::Key_Enter: |
2289 | { | 2301 | { |
@@ -2293,3 +2305,3 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) | |||
2293 | break; | 2305 | break; |
2294 | case Key_D: | 2306 | case Qt::Key_D: |
2295 | if ( mSelectedCell ) { | 2307 | if ( mSelectedCell ) { |