summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.h
Side-by-side diff
Diffstat (limited to 'korganizer/koagendaview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.h52
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
@@ -14,75 +14,85 @@
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 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;
class KDGanttMinimizeSplitter;
class KOAgendaButton : public QPushButton
{
Q_OBJECT
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; }
private slots:
void bClicked() {emit numClicked( mNum);}
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;
/** updates widget's internal state */
void updateConfig();
/** */
void setAgenda(KOAgenda* agenda);
@@ -104,71 +114,71 @@ class TimeLabels : public QScrollView {
QPixmap myPix;
bool mRedrawNeeded;
int mMiniWidth;
int mMouseDownY;
QString mOrgCap;
int mRows;
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();
void changeColumns(int columns);
void setPaintWidget( KDGanttMinimizeSplitter* );
void setXOffset( int );
void enableColumn(int column, bool enable);
protected:
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.
*/
class KOAgendaView : public KOEventView {
Q_OBJECT
public:
KOAgendaView(Calendar *cal,QWidget *parent = 0,const char *name = 0 );
virtual ~KOAgendaView();
void setStartHour( int );
void toggleAllDay();
/** Returns maximum number of days supported by the koagendaview */
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();
void clearList();
KOAgenda *agenda() { return mAgenda;}
virtual void printPreview(CalPrinter *calPrinter,
const QDate &, const QDate &);
/** start-datetime of selection */
@@ -176,25 +186,25 @@ class KOAgendaView : public KOEventView {
/** end-datetime of selection */
QDateTime selectionEnd() {return mTimeSpanEnd;}
/** returns true if selection is for whole day */
bool selectedIsAllDay() {return mTimeSpanInAllDay;}
/** make selected start/end invalid */
void deleteSelectedDateTime();
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();
void newTodo(int gx,int gy);
void newEvent(int gx,int gy);
void newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd);
void newEventAllDay(int gx, int gy);
void newTodoAllDay(int gx, int gy);
@@ -251,49 +261,49 @@ class KOAgendaView : public KOEventView {
void updateEventIndicatorBottom(int newY);
/** Updates data for selected timespan */
void newTimeSpanSelected(int gxStart, int gyStart, int gxEnd, int gyEnd);
/** Updates data for selected timespan for all day event*/
void newTimeSpanSelectedAllDay(int gxStart, int gyStart, int gxEnd, int gyEnd);
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;
QPushButton *mExpandButton;
DateList mSelectedDates; // List of dates to be displayed
int mViewType;
bool mWeekStartsMonday;
int mStartHour;
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 );
};
#endif // KOAGENDAVIEW_H