author | zautrix <zautrix> | 2005-02-02 10:58:10 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-02 10:58:10 (UTC) |
commit | d2f6c50fb3b236e37aaa46ade819ab163f19868a (patch) (side-by-side diff) | |
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 @@ #include <qdialog.h> #include <qtextstream.h> #include <qdir.h> +#include <qwhatsthis.h> #include <qregexp.h> #include <klocale.h> @@ -47,6 +48,7 @@ #include <libkcal/recurrence.h> #include <libkcal/filestorage.h> #include <libkdepim/categoryselectdialog.h> +#include <libkcal/kincidenceformatter.h> #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #else @@ -62,6 +64,23 @@ #include "kolistview.h" + +class KOListViewWhatsThis :public QWhatsThis +{ +public: + KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; + +protected: + virtual QString text( const QPoint& p) + { + return _view->getWhatsThisText(p) ; + } +private: + QWidget* _wid; + KOListView * _view; +}; + + ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) { mItem = item; @@ -224,6 +243,7 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, mListView->setColumnAlignment(9,AlignLeft); mListView->setColumnAlignment(10,AlignLeft); mListView->setColumnWidthMode(10, QListView::Manual); + new KOListViewWhatsThis(mListView->viewport(),this); int iii = 0; for ( iii = 0; iii< 10 ; ++iii ) @@ -295,6 +315,14 @@ KOListView::~KOListView() { delete mPopupMenu; } +QString KOListView::getWhatsThisText(QPoint p) +{ + KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); + if ( item ) + return KIncidenceFormatter::instance()->getFormattedText( item->data() ); + return i18n("That is the list view" ); + +} void KOListView::updateList() { |