summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.h
authorzautrix <zautrix>2005-01-26 23:05:26 (UTC)
committer zautrix <zautrix>2005-01-26 23:05:26 (UTC)
commit15351333eff09beadb6e691e9f0aab2aaf0a95a0 (patch) (side-by-side diff)
tree443fba1e36ef3a2549b531fe600567d9e1232d7c /korganizer/koagendaview.h
parent96fc3903cf690957d0242d7aa2894bd64800edcc (diff)
downloadkdepimpi-15351333eff09beadb6e691e9f0aab2aaf0a95a0.zip
kdepimpi-15351333eff09beadb6e691e9f0aab2aaf0a95a0.tar.gz
kdepimpi-15351333eff09beadb6e691e9f0aab2aaf0a95a0.tar.bz2
fixes
Diffstat (limited to 'korganizer/koagendaview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index 0079253..221b0ea 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -2,137 +2,142 @@
This file is part of KOrganizer.
Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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 <qdatetime.h>
#include <qlayout.h>
#ifndef DESKTOP_VERSION
#include <qksplitter.h>
#else
#include <qsplitter.h>
#endif
#include <qmemarray.h>
#include "koeventview.h"
class QHBox;
class QFrame;
class QLabel;
class QPushButton;
class CalendarView;
class KOAgenda;
class KOAgendaItem;
class KConfig;
class KDGanttMinimizeSplitter;
class TimeLabels : public QScrollView {
Q_OBJECT
public:
TimeLabels(int rows,QWidget *parent=0,const char *name=0,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);
/** */
virtual void paintEvent(QPaintEvent* e);
+ void contentsMousePressEvent ( QMouseEvent * ) ;
+ void contentsMouseReleaseEvent ( QMouseEvent * );
+ void contentsMouseMoveEvent ( QMouseEvent * );
public slots:
/** update time label positions */
void positionChanged();
-
+ signals:
+ void scaleChanged();
protected:
void drawContents(QPainter *p,int cx, int cy, int cw, int ch);
private:
+ int mMouseDownY;
int mRows;
int mCellHeight;
/** */
KOAgenda* mAgenda;
};
class EventIndicator : public QFrame {
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;
Location mLocation;
QPixmap mPixmap;
QMemArray<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();
/** returns the currently selected events */
virtual DateList selectedDates();
/** Remove all events from view */
void clearView();
KOAgenda *agenda() { return mAgenda;}
virtual void printPreview(CalPrinter *calPrinter,
const QDate &, const QDate &);