koagendaitem.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KOAGENDAITEM_H
00020 #define KOAGENDAITEM_H
00021
00022 #include <qframe.h>
00023 #include <qlabel.h>
00024 #include <qdatetime.h>
00025
00026 #include <libkcal/event.h>
00027
00028 class QToolTipGroup;
00029 class QDragEnterEvent;
00030 class QDropEvent;
00031
00032 using namespace KCal;
00033
00034
00035
00036
00037
00038
00039
00040 class KOAgendaItem : public QFrame
00041 {
00042 Q_OBJECT
00043 public:
00044 KOAgendaItem(Event *event, QDate qd, QWidget *parent, const char *name=0,
00045 WFlags f=0 );
00046
00047 int cellX() { return mCellX; }
00048 int cellXWidth() { return mCellXWidth; }
00049 int cellYTop() { return mCellYTop; }
00050 int cellYBottom() { return mCellYBottom; }
00051 int cellHeight();
00052 int cellWidth();
00053 int subCell() { return mSubCell; }
00054 int subCells() { return mSubCells; }
00055
00056 void setCellXY(int X, int YTop, int YBottom);
00057 void setCellY(int YTop, int YBottom);
00058 void setCellX(int XLeft, int XRight);
00059 void setCellXWidth(int xwidth);
00060 void setSubCell(int subCell);
00061 void setSubCells(int subCells);
00062
00064 void startMove();
00066 void resetMove();
00067
00068 void moveRelative(int dx,int dy);
00069 void expandTop(int dy);
00070 void expandBottom(int dy);
00071 void expandLeft(int dx);
00072 void expandRight(int dx);
00073
00074 void setMultiItem(KOAgendaItem *first,KOAgendaItem *next,
00075 KOAgendaItem *last);
00076 KOAgendaItem *firstMultiItem() { return mFirstMultiItem; }
00077 KOAgendaItem *nextMultiItem() { return mNextMultiItem; }
00078 KOAgendaItem *lastMultiItem() { return mLastMultiItem; }
00079
00080 Event *itemEvent() { return mEvent; }
00081 QDate itemDate() { return mDate; }
00082
00084 void setItemDate(QDate qd);
00085
00086 void setText ( const QString & text ) { mItemLabel->setText(text); }
00087 QString text () { return mItemLabel->text(); }
00088
00089 virtual bool eventFilter ( QObject *, QEvent * );
00090
00091 static QToolTipGroup *toolTipGroup();
00092
00093 QPtrList<KOAgendaItem> conflictItems();
00094 void setConflictItems(QPtrList<KOAgendaItem>);
00095 void addConflictItem(KOAgendaItem *ci);
00096
00097 public slots:
00098 void updateIcons();
00099 void select(bool=true);
00100
00101 protected:
00102 void dragEnterEvent(QDragEnterEvent *e);
00103 void dropEvent(QDropEvent *e);
00104
00105 private:
00106 int mCellX;
00107 int mCellXWidth;
00108 int mCellYTop,mCellYBottom;
00109 int mSubCell;
00110 int mSubCells;
00111
00112
00113 int mStartCellX;
00114 int mStartCellXWidth;
00115 int mStartCellYTop,mStartCellYBottom;
00116
00117
00118 KOAgendaItem *mFirstMultiItem;
00119 KOAgendaItem *mNextMultiItem;
00120 KOAgendaItem *mLastMultiItem;
00121
00122 Event *mEvent;
00123 QDate mDate;
00124
00125 QLabel *mItemLabel;
00126 QLabel *mIconAlarm,*mIconRecur,*mIconReadonly;
00127 QLabel *mIconReply,*mIconGroup,*mIconOrganizer;
00128
00129 static QToolTipGroup *mToolTipGroup;
00130
00131 bool mSelected;
00132 QPtrList<KOAgendaItem> mConflictItems;
00133 };
00134
00135 #endif // KOAGENDAITEM_H
This file is part of the documentation for kdelibs Version 3.1.4.