parley
kvttableview.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KVTTABLEVIEW_H
00023 #define KVTTABLEVIEW_H
00024
00025 #include <QTableView>
00026 #include <QtGui/QPrinter>
00027
00028 #include <kvtsortfiltermodel.h>
00029 #include <kvttabledelegate.h>
00030
00034 class KVTTableView : public QTableView
00035 {
00036 Q_OBJECT
00037 public:
00038 KVTTableView(QWidget *parent = 0);
00039
00040 void setModel(KVTSortFilterModel * model);
00041 void print(QPrinter *pPrinter);
00042 void adjustContent();
00043
00044 public slots:
00045 void slotModelReset();
00046
00047 signals:
00048 void appendEntry();
00049
00050 private slots:
00051 void verticalHeaderResized(int, int, int);
00052 void horizontalHeaderResized(int, int, int);
00053 void slotCurrentColumnChanged(const QModelIndex & current, const QModelIndex & previous);
00057 void slotShowLessonColumn(bool show);
00058 void slotShowActiveColumn(bool show);
00059
00060 protected:
00062 void resizeEvent(QResizeEvent *);
00063 void showEvent(QShowEvent *);
00064 void keyPressEvent(QKeyEvent*);
00065
00066 private:
00067 void newPage(QPainter &, int, int, int);
00068 void endOfPage(QPainter &, int, int);
00069
00070 KVTTableDelegate * m_delegate;
00071 };
00072
00073 #endif