summaryrefslogtreecommitdiffabout
path: root/korganizer/timeline.h
authorzautrix <zautrix>2004-06-26 19:01:18 (UTC)
committer zautrix <zautrix>2004-06-26 19:01:18 (UTC)
commitb9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (side-by-side diff)
tree2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /korganizer/timeline.h
downloadkdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2
Initial revision
Diffstat (limited to 'korganizer/timeline.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/timeline.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/korganizer/timeline.h b/korganizer/timeline.h
new file mode 100644
index 0000000..ab3e5d3
--- a/dev/null
+++ b/korganizer/timeline.h
@@ -0,0 +1,33 @@
+#ifndef TIMELINE_H
+#define TIMELINE_H
+
+#include <qscrollview.h>
+#include <qdatetime.h>
+
+class TimeLine : public QScrollView
+{
+ Q_OBJECT
+ public:
+ TimeLine( QWidget *parent = 0, const char *name = 0 );
+ virtual ~TimeLine();
+
+ void setDateRange( const QDateTime &start, const QDateTime &end );
+
+ public slots:
+ void setContentsPos( int pos );
+
+ protected:
+ void drawContents(QPainter* p, int cx, int cy, int cw, int ch);
+
+ private:
+ QDateTime mStartDate;
+ QDateTime mEndDate;
+
+ int mPixelWidth;
+ int mDaySpacing;
+ int mDayOffset;
+ int mSecsPerPixel;
+};
+
+#endif
+