author | zautrix <zautrix> | 2005-02-02 10:58:10 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-02 10:58:10 (UTC) |
commit | d2f6c50fb3b236e37aaa46ade819ab163f19868a (patch) (unidiff) | |
tree | 02b2c7bbcd6d78140def0650fa4b440199e04ef7 /korganizer/kolistview.cpp | |
parent | 5bc675bc7e9d5d6fa2d2bc48675a7cfa985ab2c7 (diff) | |
download | kdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.zip kdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.tar.gz kdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.tar.bz2 |
qwt added
-rw-r--r-- | korganizer/kolistview.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index b21b419..732fc46 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <qdialog.h> | 32 | #include <qdialog.h> |
33 | #include <qtextstream.h> | 33 | #include <qtextstream.h> |
34 | #include <qdir.h> | 34 | #include <qdir.h> |
35 | #include <qwhatsthis.h> | ||
35 | #include <qregexp.h> | 36 | #include <qregexp.h> |
36 | 37 | ||
37 | #include <klocale.h> | 38 | #include <klocale.h> |
@@ -47,6 +48,7 @@ | |||
47 | #include <libkcal/recurrence.h> | 48 | #include <libkcal/recurrence.h> |
48 | #include <libkcal/filestorage.h> | 49 | #include <libkcal/filestorage.h> |
49 | #include <libkdepim/categoryselectdialog.h> | 50 | #include <libkdepim/categoryselectdialog.h> |
51 | #include <libkcal/kincidenceformatter.h> | ||
50 | #ifndef DESKTOP_VERSION | 52 | #ifndef DESKTOP_VERSION |
51 | #include <qpe/qpeapplication.h> | 53 | #include <qpe/qpeapplication.h> |
52 | #else | 54 | #else |
@@ -62,6 +64,23 @@ | |||
62 | 64 | ||
63 | #include "kolistview.h" | 65 | #include "kolistview.h" |
64 | 66 | ||
67 | |||
68 | class KOListViewWhatsThis :public QWhatsThis | ||
69 | { | ||
70 | public: | ||
71 | KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; | ||
72 | |||
73 | protected: | ||
74 | virtual QString text( const QPoint& p) | ||
75 | { | ||
76 | return _view->getWhatsThisText(p) ; | ||
77 | } | ||
78 | private: | ||
79 | QWidget* _wid; | ||
80 | KOListView * _view; | ||
81 | }; | ||
82 | |||
83 | |||
65 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) | 84 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) |
66 | { | 85 | { |
67 | mItem = item; | 86 | mItem = item; |
@@ -224,6 +243,7 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, | |||
224 | mListView->setColumnAlignment(9,AlignLeft); | 243 | mListView->setColumnAlignment(9,AlignLeft); |
225 | mListView->setColumnAlignment(10,AlignLeft); | 244 | mListView->setColumnAlignment(10,AlignLeft); |
226 | mListView->setColumnWidthMode(10, QListView::Manual); | 245 | mListView->setColumnWidthMode(10, QListView::Manual); |
246 | new KOListViewWhatsThis(mListView->viewport(),this); | ||
227 | 247 | ||
228 | int iii = 0; | 248 | int iii = 0; |
229 | for ( iii = 0; iii< 10 ; ++iii ) | 249 | for ( iii = 0; iii< 10 ; ++iii ) |
@@ -295,6 +315,14 @@ KOListView::~KOListView() | |||
295 | { | 315 | { |
296 | delete mPopupMenu; | 316 | delete mPopupMenu; |
297 | } | 317 | } |
318 | QString KOListView::getWhatsThisText(QPoint p) | ||
319 | { | ||
320 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); | ||
321 | if ( item ) | ||
322 | return KIncidenceFormatter::instance()->getFormattedText( item->data() ); | ||
323 | return i18n("That is the list view" ); | ||
324 | |||
325 | } | ||
298 | 326 | ||
299 | void KOListView::updateList() | 327 | void KOListView::updateList() |
300 | { | 328 | { |