summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Unidiff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index c4bc51b..df60564 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -7,97 +7,96 @@
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <qpopupmenu.h> 20#include <qpopupmenu.h>
21#include <qfont.h> 21#include <qfont.h>
22#include <qfontmetrics.h> 22#include <qfontmetrics.h>
23#include <qkeycode.h> 23#include <qkeycode.h>
24#include <qhbox.h> 24#include <qhbox.h>
25#include <qvbox.h> 25#include <qvbox.h>
26#include <qpushbutton.h> 26#include <qpushbutton.h>
27#include <qtooltip.h> 27#include <qtooltip.h>
28#include <qpainter.h> 28#include <qpainter.h>
29#include <qwhatsthis.h> 29#include <qwhatsthis.h>
30#ifndef DESKTOP_VERSION 30#ifndef DESKTOP_VERSION
31#include <qpe/qpeapplication.h> 31#include <qpe/qpeapplication.h>
32#else 32#else
33#include <qapplication.h> 33#include <qapplication.h>
34#endif 34#endif
35 35
36#include <kdebug.h> 36#include <kdebug.h>
37#include <klocale.h> 37#include <klocale.h>
38#include <kglobal.h> 38#include <kglobal.h>
39#include <kconfig.h> 39#include <kconfig.h>
40#include <kiconloader.h> 40#include <kiconloader.h>
41 41
42#include <kcalendarsystem.h> 42#include <kcalendarsystem.h>
43 43
44#ifndef KORG_NOPRINTER 44#ifndef KORG_NOPRINTER
45#include "calprinter.h" 45#include "calprinter.h"
46#endif 46#endif
47#include "koprefs.h" 47#include "koprefs.h"
48#ifndef KORG_NOPLUGINS 48#ifndef KORG_NOPLUGINS
49#include "kocore.h" 49#include "kocore.h"
50#endif 50#endif
51#include "koglobals.h" 51#include "koglobals.h"
52#include <libkdepim/kincidenceformatter.h> 52#include <libkdepim/kincidenceformatter.h>
53 53
54#include "komonthview.h" 54#include "komonthview.h"
55#include "komonthview.moc"
56 55
57#define PIXMAP_SIZE 5 56#define PIXMAP_SIZE 5
58 57
59class KNOWhatsThis :public QWhatsThis 58class KNOWhatsThis :public QWhatsThis
60{ 59{
61public: 60public:
62 KNOWhatsThis( KNoScrollListBox* sbox ) : QWhatsThis( sbox ), _wid( sbox) { }; 61 KNOWhatsThis( KNoScrollListBox* sbox ) : QWhatsThis( sbox ), _wid( sbox) { };
63 62
64protected: 63protected:
65 virtual QString text( const QPoint& p) 64 virtual QString text( const QPoint& p)
66 { 65 {
67 return _wid->getWhatsThisText(p) ; 66 return _wid->getWhatsThisText(p) ;
68 }; 67 };
69private: 68private:
70 KNoScrollListBox* _wid; 69 KNoScrollListBox* _wid;
71 70
72}; 71};
73 72
74 73
75KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) 74KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name)
76 : QListBox(parent, name) 75 : QListBox(parent, name)
77{ 76{
78#ifndef DESKTOP_VERSION 77#ifndef DESKTOP_VERSION
79 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); 78 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
80#endif 79#endif
81 new KNOWhatsThis(this); 80 new KNOWhatsThis(this);
82} 81}
83 82
84QString KNoScrollListBox::getWhatsThisText(QPoint p) 83QString KNoScrollListBox::getWhatsThisText(QPoint p)
85{ 84{
86 QListBoxItem* item = itemAt ( p ); 85 QListBoxItem* item = itemAt ( p );
87 if ( ! item ) { 86 if ( ! item ) {
88 return i18n("Click in the cell or\non the date label\nto add an event!"); 87 return i18n("Click in the cell or\non the date label\nto add an event!");
89 } 88 }
90 return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence()); 89 return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence());
91} 90}
92void KNoScrollListBox::keyPressEvent(QKeyEvent *e) 91void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
93{ 92{
94 93
95 switch(e->key()) { 94 switch(e->key()) {
96 case Key_Right: 95 case Key_Right:
97 // if ( e->state() == Qt::ControlButton ) 96 // if ( e->state() == Qt::ControlButton )
98 { 97 {
99 e->ignore(); 98 e->ignore();
100 return; 99 return;
101 } 100 }
102 scrollBy(4,0); 101 scrollBy(4,0);
103 break; 102 break;