summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-02-02 10:58:10 (UTC)
committer zautrix <zautrix>2005-02-02 10:58:10 (UTC)
commitd2f6c50fb3b236e37aaa46ade819ab163f19868a (patch) (side-by-side diff)
tree02b2c7bbcd6d78140def0650fa4b440199e04ef7 /korganizer
parent5bc675bc7e9d5d6fa2d2bc48675a7cfa985ab2c7 (diff)
downloadkdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.zip
kdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.tar.gz
kdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.tar.bz2
qwt added
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp23
-rw-r--r--korganizer/koagendaitem.h1
-rw-r--r--korganizer/kolistview.cpp28
-rw-r--r--korganizer/kolistview.h1
-rw-r--r--korganizer/kotodoview.cpp28
-rw-r--r--korganizer/kotodoview.h1
6 files changed, 80 insertions, 2 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 5f9ed92..df7d612 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -58,2 +58,16 @@ QToolTipGroup *KOAgendaItem::mToolTipGroup = 0;
+class KOAgendaItemWhatsThis :public QWhatsThis
+{
+public:
+ KOAgendaItemWhatsThis( KOAgendaItem* view ) : QWhatsThis( view ),_view (view) { };
+
+protected:
+ virtual QString text( const QPoint& )
+ {
+ return _view->getWhatsThisText() ;
+ }
+private:
+ KOAgendaItem * _view;
+};
+
KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday,
@@ -65,2 +79,3 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool
#endif
+ new KOAgendaItemWhatsThis(this);
int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase
@@ -74,3 +89,8 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool
}
-
+QString KOAgendaItem::getWhatsThisText()
+{
+ if ( mIncidence )
+ return KIncidenceFormatter::instance()->getFormattedText( mIncidence );
+ return "KOAgendaItem::getWhatsThisText()::internal error";
+}
void KOAgendaItem::init ( Incidence *incidence, QDate qd )
@@ -506,3 +526,2 @@ void KOAgendaItem::computeText()
QString tipText = mIncidence->summary();
- QWhatsThis::add(this,KIncidenceFormatter::instance()->getFormattedText( mIncidence ));
if ( !mIncidence->doesFloat() ) {
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index 7321af2..5b8f420 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -48,2 +48,3 @@ class KOAgendaItem : public QWidget
~KOAgendaItem();
+ QString getWhatsThisText();
void init ( Incidence *incidence, QDate qd );
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index b21b419..732fc46 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -34,2 +34,3 @@
#include <qdir.h>
+#include <qwhatsthis.h>
#include <qregexp.h>
@@ -49,2 +50,3 @@
#include <libkdepim/categoryselectdialog.h>
+#include <libkcal/kincidenceformatter.h>
#ifndef DESKTOP_VERSION
@@ -64,2 +66,19 @@
+
+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 )
@@ -226,2 +245,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
mListView->setColumnWidthMode(10, QListView::Manual);
+ new KOListViewWhatsThis(mListView->viewport(),this);
@@ -297,2 +317,10 @@ KOListView::~KOListView()
}
+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" );
+
+}
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index 23afdb1..be9b09c 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -121,2 +121,3 @@ class KOListView : public KOEventView
int count();
+ QString getWhatsThisText(QPoint p);
signals:
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index da8b4bc..c5b9a21 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -26,2 +26,3 @@
#include <qcursor.h>
+#include <qwhatsthis.h>
@@ -42,2 +43,3 @@
#include <kresources/resourceselectdialog.h>
+#include <libkcal/kincidenceformatter.h>
#ifndef DESKTOP_VERSION
@@ -55,2 +57,18 @@ using namespace KOrg;
+
+class KOTodoViewWhatsThis :public QWhatsThis
+{
+public:
+ KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
+
+protected:
+ virtual QString text( const QPoint& p)
+ {
+ return _view->getWhatsThisText(p) ;
+ }
+private:
+ QWidget* _wid;
+ KOTodoView * _view;
+};
+
KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent,
@@ -397,2 +415,4 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
+ new KOTodoViewWhatsThis(mTodoListView->viewport(),this);
+
mPriorityPopupMenu = new QPopupMenu(this);
@@ -534,2 +554,10 @@ KOTodoView::~KOTodoView()
}
+QString KOTodoView::getWhatsThisText(QPoint p)
+{
+ KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p );
+ if ( item )
+ return KIncidenceFormatter::instance()->getFormattedText( item->todo() );
+ return i18n("That is the todo view" );
+
+}
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 2a9e737..1642132 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -136,2 +136,3 @@ class KOTodoView : public KOrg::BaseView
void setNavigator( DateNavigator* nav ) {mNavigator = nav;}
+ QString getWhatsThisText(QPoint p);