-rw-r--r-- | core/pim/todo/tableview.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/pim/todo/tableview.h b/core/pim/todo/tableview.h index 689c496..528ddc9 100644 --- a/core/pim/todo/tableview.h +++ b/core/pim/todo/tableview.h | |||
@@ -41,24 +41,26 @@ namespace Todo { | |||
41 | class CheckItem; | 41 | class CheckItem; |
42 | class DueTextItem; | 42 | class DueTextItem; |
43 | class TableView : public QTable, public TodoView { | 43 | class TableView : public QTable, public TodoView { |
44 | Q_OBJECT | 44 | Q_OBJECT |
45 | public: | 45 | public: |
46 | TableView( MainWindow*, QWidget* parent ); | 46 | TableView( MainWindow*, QWidget* parent ); |
47 | ~TableView(); | 47 | ~TableView(); |
48 | 48 | ||
49 | 49 | ||
50 | QString type()const; | 50 | QString type()const; |
51 | int current(); | 51 | int current(); |
52 | QString currentRepresentation(); | 52 | QString currentRepresentation(); |
53 | int next(); | ||
54 | int prev(); | ||
53 | 55 | ||
54 | void clear(); | 56 | void clear(); |
55 | void showOverDue( bool ); | 57 | void showOverDue( bool ); |
56 | void updateView(); | 58 | void updateView(); |
57 | void setTodo( int uid, const OTodo& ); | 59 | void setTodo( int uid, const OTodo& ); |
58 | void addEvent( const OTodo& event ); | 60 | void addEvent( const OTodo& event ); |
59 | void replaceEvent( const OTodo& ); | 61 | void replaceEvent( const OTodo& ); |
60 | void removeEvent( int uid ); | 62 | void removeEvent( int uid ); |
61 | void setShowCompleted( bool ); | 63 | void setShowCompleted( bool ); |
62 | void setShowDeadline( bool ); | 64 | void setShowDeadline( bool ); |
63 | 65 | ||
64 | void setShowCategory(const QString& =QString::null ); | 66 | void setShowCategory(const QString& =QString::null ); |
@@ -82,24 +84,40 @@ namespace Todo { | |||
82 | bool m_first : 1; | 84 | bool m_first : 1; |
83 | 85 | ||
84 | QPixmap m_pic_completed; | 86 | QPixmap m_pic_completed; |
85 | QPixmap m_pic_priority[ 5 ]; | 87 | QPixmap m_pic_priority[ 5 ]; |
86 | 88 | ||
87 | protected: | 89 | protected: |
88 | void keyPressEvent( QKeyEvent* ); | 90 | void keyPressEvent( QKeyEvent* ); |
89 | void contentsMouseReleaseEvent( QMouseEvent* ); | 91 | void contentsMouseReleaseEvent( QMouseEvent* ); |
90 | void contentsMouseMoveEvent( QMouseEvent* ); | 92 | void contentsMouseMoveEvent( QMouseEvent* ); |
91 | void timerEvent( QTimerEvent* e ); | 93 | void timerEvent( QTimerEvent* e ); |
92 | QWidget* createEditor(int row, int col, bool initFromCell )const; | 94 | QWidget* createEditor(int row, int col, bool initFromCell )const; |
93 | void setCellContentFromEditor( int row, int col ); | 95 | void setCellContentFromEditor( int row, int col ); |
96 | /** | ||
97 | * for inline editing on single click and to work around some | ||
98 | * bug in qt2.3.5 | ||
99 | */ | ||
100 | struct EditorWidget { | ||
101 | EditorWidget(); | ||
102 | void setCellWidget(QWidget*, int row, int col ); | ||
103 | void releaseCellWidget(); | ||
104 | QWidget* cellWidget()const; | ||
105 | int cellRow()const; | ||
106 | int cellCol()const; | ||
107 | private: | ||
108 | QWidget* m_wid; | ||
109 | int m_row, m_col; | ||
110 | }; | ||
111 | EditorWidget m_editorWidget; | ||
94 | 112 | ||
95 | private slots: | 113 | private slots: |
96 | void slotShowMenu(); | 114 | void slotShowMenu(); |
97 | void slotClicked(int, int, int, | 115 | void slotClicked(int, int, int, |
98 | const QPoint& ); | 116 | const QPoint& ); |
99 | void slotPressed(int, int, int, | 117 | void slotPressed(int, int, int, |
100 | const QPoint& ); | 118 | const QPoint& ); |
101 | void slotValueChanged(int, int); | 119 | void slotValueChanged(int, int); |
102 | void slotCurrentChanged(int, int ); | 120 | void slotCurrentChanged(int, int ); |
103 | void slotPriority(); | 121 | void slotPriority(); |
104 | private: | 122 | private: |
105 | void initConfig(); | 123 | void initConfig(); |