author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/kodaymatrix.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | korganizer/kodaymatrix.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h index b96e08f..6edf7cd 100644 --- a/korganizer/kodaymatrix.h +++ b/korganizer/kodaymatrix.h @@ -5,74 +5,82 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef _KODAYMAT_H #define _KODAYMAT_H #include <libkcal/calendar.h> #include <qstring.h> -#include <qframe.h> +#include <q3frame.h> #include <qcolor.h> #include <qpen.h> #include <qdatetime.h> #include <qtooltip.h> #include <qpixmap.h> #include <qbitarray.h> #include <qmap.h> +//Added by qt3to4: +#include <QDragMoveEvent> +#include <QDropEvent> +#include <QDragLeaveEvent> +#include <QPaintEvent> +#include <QResizeEvent> +#include <QMouseEvent> +#include <QDragEnterEvent> class QDragEnterEvent; class QDragMoveEvent; class QDragLeaveEvent; class QDropEvent; class KODayMatrix; class KODaymatrixWhatsThis; using namespace KCal; /** * small helper class to dynamically show tooltips inside the day matrix. * This class asks the day matrix object for a appropriate label which * is in our special case the name of the holiday or null if this day is no holiday. */ -class DynamicTip : public QToolTip +class DynamicTip /* TODO:hacker: : public QToolTip */ { public: /** * Constructor that expects a KODayMatrix object as parent. * * @param parent the parent KODayMatrix control. */ DynamicTip(QWidget* parent ); protected: /** * Qt's callback to ask the object to provide an approrpiate text for the * tooltip to be shown. * * @param pos coordinates of the mouse. */ void maybeTip( const QPoint & pos); private: /** the parent control this tooltip is designed for. */ KODayMatrix* matrix; @@ -82,49 +90,49 @@ private: * replacement for kdpdatebuton.cpp that used 42 widgets for the day matrix to be displayed. * Cornelius thought this was a waste of memory and a lot of overhead. * In addition the selection was not very intuitive so I decided to rewrite it using a QFrame * that draws the labels and allows for dragging selection while maintaining nearly full * compatibility in behaviour with its predecessor. * * The following functionality has been changed: * * o when shifting events in the agenda view from one day to another the day matrix is updated now * o TODO ET dragging an event to the matrix will MOVE not COPY the event to the new date. * o no support for Ctrl+click to create groups of dates * (This has not really been supported in the predecessor. It was not very intuitive nor was it * user friendly.) * This feature has been replaced with dragging a selection on the matrix. The matrix will * automatically choose the appropriate selection (e.g. you are not any longer able to select * two distinct groups of date selections as in the old class) * o now that you can select more then a week it can happen that not all selected days are * displayed in the matrix. However this is preferred to the alternative which would mean to * adjust the selection and leave some days undisplayed while scrolling through the months * * @short day matrix widget of the KDateNavigator * * @author Eitzenberger Thomas */ -class KODayMatrix: public QFrame { +class KODayMatrix: public Q3Frame { Q_OBJECT public: /** constructor to create a day matrix widget. * * @param parent widget that is the parent of the day matrix. Normally this should * be a KDateNavigator * @param calendar instance of a calendar on which all calculations are based * @param date start date of the matrix (is expected to be already fixed). It is * assumed that this date is the first week day to be shown in the matrix. * @param name name of the widget */ KODayMatrix( QWidget *parent, const char *name ); //KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const char *name ); /** destructor that deallocates all dynamically allocated private members. */ ~KODayMatrix(); /** updates the day matrix to start with the given date. Does all the necessary * checks for holidays or events on a day and stores them for display later on. * Does NOT update the view visually. Call repaint() for this. |