korganizer
timelabels.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef TIMELABELS_H
00026 #define TIMELABELS_H
00027
00028 #include <qscrollview.h>
00029 #include <qlabel.h>
00030
00031 class QHBox;
00032 class QPushButton;
00033 class QBoxLayout;
00034
00035 class KOAgenda;
00036 class KOAgendaItem;
00037 class KConfig;
00038
00039 class TimeLabels : public QScrollView
00040 {
00041 Q_OBJECT
00042 public:
00043 TimeLabels( int rows, QWidget *parent = 0, const char *name = 0,
00044 WFlags f = 0 );
00045
00047 virtual int minimumWidth() const;
00048
00050 void updateConfig();
00051
00053 void setAgenda( KOAgenda *agenda );
00054
00056 virtual void paintEvent( QPaintEvent *e );
00057
00058 public slots:
00060 void positionChanged();
00061 void positionChanged( int pos );
00062
00063 protected:
00064 void drawContents( QPainter *p, int cx, int cy, int cw, int ch );
00065
00066 private slots:
00068 void mousePosChanged(const QPoint &pos);
00069
00070 void showMousePos();
00071 void hideMousePos();
00072
00073 void setCellHeight( double height );
00074
00075 private:
00076 int mRows;
00077 double mCellHeight;
00078 int mMiniWidth;
00079 KOAgenda* mAgenda;
00080
00081 QFrame *mMousePos;
00082 };
00083
00084 #endif
|