summaryrefslogtreecommitdiffabout
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
parent5bc675bc7e9d5d6fa2d2bc48675a7cfa985ab2c7 (diff)
downloadkdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.zip
kdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.tar.gz
kdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.tar.bz2
qwt added
Diffstat (more/less context) (show 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
@@ -57,4 +57,18 @@ 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,
const char *name,WFlags) :
@@ -64,4 +78,5 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool
QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold );
#endif
+ new KOAgendaItemWhatsThis(this);
int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase
setWFlags ( wflags);
@@ -73,5 +88,10 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool
yPaintCoord = -1;
}
-
+QString KOAgendaItem::getWhatsThisText()
+{
+ if ( mIncidence )
+ return KIncidenceFormatter::instance()->getFormattedText( mIncidence );
+ return "KOAgendaItem::getWhatsThisText()::internal error";
+}
void KOAgendaItem::init ( Incidence *incidence, QDate qd )
{
@@ -505,5 +525,4 @@ void KOAgendaItem::computeText()
QString tipText = mIncidence->summary();
- QWhatsThis::add(this,KIncidenceFormatter::instance()->getFormattedText( mIncidence ));
if ( !mIncidence->doesFloat() ) {
if ( mIncidence->type() == "Event" ) {
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index 7321af2..5b8f420 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -47,4 +47,5 @@ class KOAgendaItem : public QWidget
WFlags f=0 );
~KOAgendaItem();
+ QString getWhatsThisText();
void init ( Incidence *incidence, QDate qd );
int cellX() { return mCellX; }
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index b21b419..732fc46 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -33,4 +33,5 @@
#include <qtextstream.h>
#include <qdir.h>
+#include <qwhatsthis.h>
#include <qregexp.h>
@@ -48,4 +49,5 @@
#include <libkcal/filestorage.h>
#include <libkdepim/categoryselectdialog.h>
+#include <libkcal/kincidenceformatter.h>
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
@@ -63,4 +65,21 @@
#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 )
{
@@ -225,4 +244,5 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
mListView->setColumnAlignment(10,AlignLeft);
mListView->setColumnWidthMode(10, QListView::Manual);
+ new KOListViewWhatsThis(mListView->viewport(),this);
int iii = 0;
@@ -296,4 +316,12 @@ 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()
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index 23afdb1..be9b09c 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -120,4 +120,5 @@ class KOListView : public KOEventView
void setStartDate(const QDate &start);
int count();
+ QString getWhatsThisText(QPoint p);
signals:
void signalNewEvent();
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index da8b4bc..c5b9a21 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -25,4 +25,5 @@
#include <qheader.h>
#include <qcursor.h>
+#include <qwhatsthis.h>
#include <qvbox.h>
@@ -41,4 +42,5 @@
#include <libkcal/resourcecalendar.h>
#include <kresources/resourceselectdialog.h>
+#include <libkcal/kincidenceformatter.h>
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
@@ -54,4 +56,20 @@
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,
const char *name) :
@@ -396,4 +414,6 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
+ new KOTodoViewWhatsThis(mTodoListView->viewport(),this);
+
mPriorityPopupMenu = new QPopupMenu(this);
for (int i = 1; i <= 5; i++) {
@@ -533,4 +553,12 @@ KOTodoView::~KOTodoView()
delete mDocPrefs;
}
+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" );
+
+}
void KOTodoView::jumpToDate ()
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 2a9e737..1642132 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -135,4 +135,5 @@ class KOTodoView : public KOrg::BaseView
QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem);
void setNavigator( DateNavigator* nav ) {mNavigator = nav;}
+ QString getWhatsThisText(QPoint p);
public slots: