summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.h
Side-by-side diff
Diffstat (limited to 'korganizer/komonthview.h') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 65b5e77..159af16 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -23,197 +23,201 @@
#include <qlabel.h>
#include <qframe.h>
#include <qdatetime.h>
#include <qlistbox.h>
#include <qpoint.h>
#include <qwidgetstack.h>
#include <qlayout.h>
#include <qtimer.h>
#include <qintdict.h>
#include <qpushbutton.h>
#include <qvaluelist.h>
#include <qptrvector.h>
#include <libkcal/calendar.h>
#include <libkcal/event.h>
#include "koeventview.h"
#include "navigatorbar.h"
#ifdef DESKTOP_VERSION
class QToolTipGroup;
#endif
class KNOWhatsThis;
+class MonthViewCell;
class KOWeekButton : public QPushButton
{
Q_OBJECT
public:
KOWeekButton( QWidget *parent=0, const char *name=0 ) :
QPushButton( parent, name)
{
connect( this, SIGNAL( clicked() ),
SLOT( bottonClicked() ));
mNumber = -1;
}
void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));}
int getWeekNum() { return mNumber;}
signals:
void selectWeekNum ( int );
private:
void focusInEvent ( QFocusEvent * ){;}
int mNumber;
void keyPressEvent ( QKeyEvent * e )
{
e->ignore();
}
private slots :
void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); }
};
class KNoScrollListBox: public QListBox
{
Q_OBJECT
public:
KNoScrollListBox(QWidget *parent=0, const char *name=0);
~KNoScrollListBox();
QString getWhatsThisText(QPoint p) ;
signals:
void shiftDown();
void shiftUp();
void rightClick();
void nextCell();
void prevCell();
+ void highligtIncidence( Incidence * , MonthViewCell*, int );
protected slots:
void oneDown();
void keyPressEvent(QKeyEvent *);
void keyReleaseEvent(QKeyEvent *);
void mousePressEvent(QMouseEvent *);
void focusInEvent ( QFocusEvent * );
void focusOutEvent ( QFocusEvent * );
private:
bool resetOnFocusIn;
KNOWhatsThis * mWT;
};
class MonthViewItem: public QListBoxItem
{
public:
MonthViewItem( Incidence *, QDate qd, const QString & title );
void recycle( Incidence *incidence, QDate qd, const QString & s);
void setRecur(bool on) { mRecur = on; }
void setAlarm(bool on) { mAlarm = on; }
void setReply(bool on) { mReply = on; }
void setMoreInfo(bool on) { mInfo = on; }
void setMultiDay(int type) { mMultiday = type; }
+ int multiDay() { return mMultiday; }
void setMultiDayPos(int type) { mdayPos = type; }
int gettMultiDayPos() { return mdayPos; }
void setBlockRepaint(bool on) { mblockRepaint = on; }
-
+ bool setHighlighted( Incidence * );
void setPalette(const QPalette &p) { mPalette = p; }
QPalette palette() const { return mPalette; }
-
+ bool setHighlightedFalse();
Incidence *incidence() const { return mIncidence; }
QDate incidenceDate() { return mDate; }
protected:
virtual void paint(QPainter *);
virtual int height(const QListBox *) const;
virtual int width(const QListBox *) const;
private:
int mdayPos;
bool isWeekItem;
bool mblockRepaint;
int mMultiday;
bool mRecur;
bool mAlarm;
bool mReply;
bool mInfo;
+ bool mDisplayHightlighted;
QPalette mPalette;
QDate mDate;
Incidence *mIncidence;
};
class KOMonthView;
class MonthViewCell : public KNoScrollListBox
{
Q_OBJECT
public:
MonthViewCell(KOMonthView *,QWidget* );
~MonthViewCell() {mAvailItemList.setAutoDelete( true );}
void setDate( const QDate & );
QDate date() const;
void setPrimary( bool );
bool isPrimary() const;
void setHoliday( bool );
void setHoliday( const QString & );
void updateCell();
void startUpdateCell();
void finishUpdateCell();
void repaintfinishUpdateCell();
int insertEvent(Event *);
void insertTodo(Todo *);
void updateConfig( bool bigFont = false );
void enableScrollBars( bool );
Incidence *selectedIncidence();
QDate selectedIncidenceDate();
QPushButton * dateLabel() { return mLabel; }
-
+ void deHightLight();
+ bool doHightLight( Incidence *);
void deselect();
void select();
#ifdef DESKTOP_VERSION
static QToolTipGroup *toolTipGroup();
#endif
signals:
void defaultAction( Incidence * );
void newEventSignal( QDateTime );
void showDaySignal( QDate );
protected:
QStringList mToolTip;
void resizeEvent( QResizeEvent * );
public slots:
void showDay();
-
protected slots:
void defaultAction( QListBoxItem * );
void contextMenu( QListBoxItem * );
void selection( QListBoxItem * );
void cellClicked( QListBoxItem * );
void newEvent();
private:
int mdayCount;
QPtrList <MonthViewItem> mAvailItemList;
KOMonthView *mMonthView;
int currentPalette;
QDate mDate;
bool mPrimary;
bool mHoliday;
QString mHolidayString;
//QLabel *mLabel;
QPushButton *mLabel;
//QListBox *mItemList;
#ifdef DESKTOP_VERSION
static QToolTipGroup *mToolTipGroup;
#endif
@@ -237,48 +241,49 @@ class KOMonthView: public KOEventView
~KOMonthView();
/** Returns maximum number of days supported by the komonthview */
virtual int maxDatesHint();
/** Returns number of currently shown dates. */
virtual int currentDateCount();
/** returns the currently selected events */
virtual QPtrList<Incidence> selectedIncidences();
/** returns dates of the currently selected events */
virtual DateList selectedDates();
virtual void printPreview(CalPrinter *calPrinter,
const QDate &, const QDate &);
bool isMonthView() { return !mShowWeekView; }
bool isUpdatePossible() { return updatePossible; }
MonthViewCell * selectedCell();
bool skipResize;
NavigatorBar* navigatorBar() { return mNavigatorBar ;}
void clearList();
public slots:
+ void incidenceHighlighted( Incidence *, MonthViewCell*, int );
void nextCell();
void prevCell();
virtual void updateView();
virtual void updateConfig();
virtual void showDates(const QDate &start, const QDate &end);
virtual void showEvents(QPtrList<Event> eventList);
void changeEventDisplay(Event *, int);
void clearSelection();
void showContextMenu( Incidence * );
void setSelectedCell( MonthViewCell * );
void setPopupCell( MonthViewCell * );
void switchView();
void setKeyBoardFocus();
void setKeyBFocus();
protected slots:
void slotNewTodo();
void slotNewEvent();
void slotEditJournal();
void slotComputeLayout();