-rw-r--r-- | korganizer/koagendaview.h | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index 5e68146..3b871d9 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h @@ -20,27 +20,37 @@ with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef KOAGENDAVIEW_H #define KOAGENDAVIEW_H -#include <qscrollview.h> +#include <q3scrollview.h> #include <qdatetime.h> #include <qpushbutton.h> #include <qlayout.h> +#include <Q3BoxLayout> #ifndef DESKTOP_VERSION #include <qksplitter.h> #else #include <qsplitter.h> #endif -#include <qmemarray.h> +#include <q3memarray.h> +//Added by qt3to4: +#include <QPaintEvent> +#include <QResizeEvent> +#include <Q3Frame> +#include <QPixmap> +#include <QLabel> +#include <QMouseEvent> +#include <Q3PtrList> +#include <QKeyEvent> #include "koeventview.h" -class QHBox; -class QFrame; +class Q3HBox; +class Q3Frame; class QLabel; class QPushButton; class CalendarView; class KOAgenda; class KOAgendaItem; class KConfig; @@ -52,13 +62,13 @@ class KOAgendaButton : public QPushButton public: KOAgendaButton( QWidget *parent=0, const char *name=0 ) : QPushButton( parent, name ) { mNum = -3; setFlat( true ); - setFocusPolicy(NoFocus); + setFocusPolicy(Qt::NoFocus); setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding )); connect( this, SIGNAL( clicked() ), this, SLOT ( bClicked() ) ); }; QSize sizeHint () const { return QSize( 5,5) ;} void setNum( int n) { mNum = n; } @@ -67,16 +77,16 @@ private slots: signals: void numClicked( int ); private: int mNum; }; -class TimeLabels : public QScrollView { +class TimeLabels : public Q3ScrollView { Q_OBJECT public: - TimeLabels(int rows,QWidget *parent=0,const char *name=0,WFlags f=0); + TimeLabels(int rows,QWidget *parent=0,const char *name=0,Qt::WFlags f=0); void setCellHeight(int height); /** Calculates the minimum width */ virtual int minimumWidth() const; @@ -110,13 +120,13 @@ class TimeLabels : public QScrollView { int mCellHeight; /** */ KOAgenda* mAgenda; }; -class EventIndicator : public QFrame { +class EventIndicator : public Q3Frame { Q_OBJECT public: enum Location { Top, Bottom }; EventIndicator(Location loc=Top,QWidget *parent=0,const char *name=0); virtual ~EventIndicator(); @@ -129,17 +139,17 @@ class EventIndicator : public QFrame { void drawContents(QPainter *); private: int mXOffset; KDGanttMinimizeSplitter* mPaintWidget; int mColumns; - QHBox *mTopBox; - QBoxLayout *mTopLayout; + Q3HBox *mTopBox; + Q3BoxLayout *mTopLayout; Location mLocation; QPixmap mPixmap; - QMemArray<bool> mEnabled; + Q3MemArray<bool> mEnabled; }; /** KOAgendaView is the agenda-like view used to display events in an one or multi-day view. */ @@ -156,13 +166,13 @@ class KOAgendaView : public KOEventView { virtual int maxDatesHint(); /** Returns number of currently shown dates. */ virtual int currentDateCount(); /** returns the currently selected events */ - virtual QPtrList<Incidence> selectedIncidences(); + virtual Q3PtrList<Incidence> selectedIncidences(); /** returns the currently selected events */ virtual DateList selectedDates(); /** Remove all events from view */ void clearView(); @@ -182,13 +192,13 @@ class KOAgendaView : public KOEventView { void repaintAgenda(); public slots: void setInitStartHour(); virtual void updateView(); virtual void updateConfig(); virtual void showDates(const QDate &start, const QDate &end); - virtual void showEvents(QPtrList<Event> eventList); + virtual void showEvents(Q3PtrList<Event> eventList); void updateTodo( Todo *, int ); void changeEventDisplay(Event *, int); void clearSelection(); @@ -257,16 +267,16 @@ class KOAgendaView : public KOEventView { private: bool flag_blockfillAgenda; QTimer* mIdleTimer; QDateTime mIdleStart; // view widgets - QFrame *mDayLabels; - QHBox *mDayLabelsFrame; - QBoxLayout *mLayoutDayLabels; - QFrame *mAllDayFrame; + Q3Frame *mDayLabels; + Q3HBox *mDayLabelsFrame; + Q3BoxLayout *mLayoutDayLabels; + Q3Frame *mAllDayFrame; KOAgenda *mAllDayAgenda; KOAgenda *mAgenda; TimeLabels *mTimeLabels; QWidget *mDummyAllDayLeft; KDGanttMinimizeSplitter* mSplitterAgenda; @@ -281,18 +291,18 @@ class KOAgendaView : public KOEventView { KOEventPopupMenu *mAllAgendaPopup; //KOEventPopupMenu *mAllDayAgendaPopup; EventIndicator *mEventIndicatorTop; EventIndicator *mEventIndicatorBottom; - QMemArray<int> mMinY; - QMemArray<int> mMaxY; + Q3MemArray<int> mMinY; + Q3MemArray<int> mMaxY; - QMemArray<bool> mHolidayMask; + Q3MemArray<bool> mHolidayMask; - QPtrList<KOAgendaButton> mDayLabelsList; + Q3PtrList<KOAgendaButton> mDayLabelsList; QDateTime mTimeSpanBegin; QDateTime mTimeSpanEnd; bool mTimeSpanInAllDay; void keyPressEvent ( QKeyEvent * e ); }; |