summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.h
authorzautrix <zautrix>2005-03-25 13:47:53 (UTC)
committer zautrix <zautrix>2005-03-25 13:47:53 (UTC)
commit5a0130ffdbf03fa5b881f856b41d081e91e1958b (patch) (unidiff)
treec71ac939789927dd9c77f2c6e88b910008db7f9b /korganizer/komonthview.h
parente3b935f4e24086117213662e670ab26cb2ad8822 (diff)
downloadkdepimpi-5a0130ffdbf03fa5b881f856b41d081e91e1958b.zip
kdepimpi-5a0130ffdbf03fa5b881f856b41d081e91e1958b.tar.gz
kdepimpi-5a0130ffdbf03fa5b881f856b41d081e91e1958b.tar.bz2
layout fixes
Diffstat (limited to 'korganizer/komonthview.h') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index b997c1a..a58f6b8 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -66,192 +66,193 @@ private slots :
66}; 66};
67 67
68class KNoScrollListBox: public QListBox 68class KNoScrollListBox: public QListBox
69{ 69{
70 Q_OBJECT 70 Q_OBJECT
71 public: 71 public:
72 KNoScrollListBox(QWidget *parent=0, const char *name=0); 72 KNoScrollListBox(QWidget *parent=0, const char *name=0);
73 ~KNoScrollListBox(); 73 ~KNoScrollListBox();
74 QString getWhatsThisText(QPoint p) ; 74 QString getWhatsThisText(QPoint p) ;
75 75
76 signals: 76 signals:
77 void shiftDown(); 77 void shiftDown();
78 void shiftUp(); 78 void shiftUp();
79 void rightClick(); 79 void rightClick();
80 80
81 protected slots: 81 protected slots:
82 void oneDown(); 82 void oneDown();
83 void keyPressEvent(QKeyEvent *); 83 void keyPressEvent(QKeyEvent *);
84 void keyReleaseEvent(QKeyEvent *); 84 void keyReleaseEvent(QKeyEvent *);
85 void mousePressEvent(QMouseEvent *); 85 void mousePressEvent(QMouseEvent *);
86 86
87 private: 87 private:
88 KNOWhatsThis * mWT; 88 KNOWhatsThis * mWT;
89}; 89};
90 90
91 91
92class MonthViewItem: public QListBoxItem 92class MonthViewItem: public QListBoxItem
93{ 93{
94 public: 94 public:
95 MonthViewItem( Incidence *, QDate qd, const QString & title ); 95 MonthViewItem( Incidence *, QDate qd, const QString & title );
96 void recycle( Incidence *incidence, QDate qd, const QString & s); 96 void recycle( Incidence *incidence, QDate qd, const QString & s);
97 void setRecur(bool on) { mRecur = on; } 97 void setRecur(bool on) { mRecur = on; }
98 void setAlarm(bool on) { mAlarm = on; } 98 void setAlarm(bool on) { mAlarm = on; }
99 void setReply(bool on) { mReply = on; } 99 void setReply(bool on) { mReply = on; }
100 void setMoreInfo(bool on) { mInfo = on; } 100 void setMoreInfo(bool on) { mInfo = on; }
101 void setMultiDay(int type) { mMultiday = type; } 101 void setMultiDay(int type) { mMultiday = type; }
102 void setBlockRepaint(bool on) { mblockRepaint = on; } 102 void setBlockRepaint(bool on) { mblockRepaint = on; }
103 103
104 104
105 void setPalette(const QPalette &p) { mPalette = p; } 105 void setPalette(const QPalette &p) { mPalette = p; }
106 QPalette palette() const { return mPalette; } 106 QPalette palette() const { return mPalette; }
107 107
108 Incidence *incidence() const { return mIncidence; } 108 Incidence *incidence() const { return mIncidence; }
109 QDate incidenceDate() { return mDate; } 109 QDate incidenceDate() { return mDate; }
110 110
111 protected: 111 protected:
112 virtual void paint(QPainter *); 112 virtual void paint(QPainter *);
113 virtual int height(const QListBox *) const; 113 virtual int height(const QListBox *) const;
114 virtual int width(const QListBox *) const; 114 virtual int width(const QListBox *) const;
115 115
116 private: 116 private:
117 bool mblockRepaint; 117 bool mblockRepaint;
118 int mMultiday; 118 int mMultiday;
119 bool mRecur; 119 bool mRecur;
120 bool mAlarm; 120 bool mAlarm;
121 bool mReply; 121 bool mReply;
122 bool mInfo; 122 bool mInfo;
123 123
124 QPalette mPalette; 124 QPalette mPalette;
125 QDate mDate; 125 QDate mDate;
126 126
127 Incidence *mIncidence; 127 Incidence *mIncidence;
128}; 128};
129 129
130 130
131class KOMonthView; 131class KOMonthView;
132 132
133class MonthViewCell : public KNoScrollListBox 133class MonthViewCell : public KNoScrollListBox
134{ 134{
135 Q_OBJECT 135 Q_OBJECT
136 public: 136 public:
137 MonthViewCell(KOMonthView *,QWidget* ); 137 MonthViewCell(KOMonthView *,QWidget* );
138 ~MonthViewCell() {mAvailItemList.setAutoDelete( true );} 138 ~MonthViewCell() {mAvailItemList.setAutoDelete( true );}
139 139
140 void setDate( const QDate & ); 140 void setDate( const QDate & );
141 QDate date() const; 141 QDate date() const;
142 142
143 void setPrimary( bool ); 143 void setPrimary( bool );
144 bool isPrimary() const; 144 bool isPrimary() const;
145 145
146 void setHoliday( bool ); 146 void setHoliday( bool );
147 void setHoliday( const QString & ); 147 void setHoliday( const QString & );
148 148
149 void updateCell(); 149 void updateCell();
150 void startUpdateCell(); 150 void startUpdateCell();
151 void finishUpdateCell(); 151 void finishUpdateCell();
152 void repaintfinishUpdateCell(); 152 void repaintfinishUpdateCell();
153 void insertEvent(Event *); 153 void insertEvent(Event *);
154 void insertTodo(Todo *); 154 void insertTodo(Todo *);
155 155
156 void updateConfig( bool bigFont = false ); 156 void updateConfig( bool bigFont = false );
157 157
158 void enableScrollBars( bool ); 158 void enableScrollBars( bool );
159 159
160 Incidence *selectedIncidence(); 160 Incidence *selectedIncidence();
161 QDate selectedIncidenceDate(); 161 QDate selectedIncidenceDate();
162 QPushButton * dateLabel() { return mLabel; }
162 163
163 void deselect(); 164 void deselect();
164 void select(); 165 void select();
165 166
166#ifdef DESKTOP_VERSION 167#ifdef DESKTOP_VERSION
167 static QToolTipGroup *toolTipGroup(); 168 static QToolTipGroup *toolTipGroup();
168#endif 169#endif
169 signals: 170 signals:
170 void defaultAction( Incidence * ); 171 void defaultAction( Incidence * );
171 void newEventSignal( QDateTime ); 172 void newEventSignal( QDateTime );
172 void showDaySignal( QDate ); 173 void showDaySignal( QDate );
173 174
174 protected: 175 protected:
175 QStringList mToolTip; 176 QStringList mToolTip;
176 void resizeEvent( QResizeEvent * ); 177 void resizeEvent( QResizeEvent * );
177 178
178 179
179public slots: 180public slots:
180 void showDay(); 181 void showDay();
181 182
182 protected slots: 183 protected slots:
183 void defaultAction( QListBoxItem * ); 184 void defaultAction( QListBoxItem * );
184 void contextMenu( QListBoxItem * ); 185 void contextMenu( QListBoxItem * );
185 void selection( QListBoxItem * ); 186 void selection( QListBoxItem * );
186 void cellClicked( QListBoxItem * ); 187 void cellClicked( QListBoxItem * );
187 void newEvent(); 188 void newEvent();
188 189
189 private: 190 private:
190 MonthViewItem* mCurrentAvailItem; 191 MonthViewItem* mCurrentAvailItem;
191 QPtrList <MonthViewItem> mAvailItemList; 192 QPtrList <MonthViewItem> mAvailItemList;
192 KOMonthView *mMonthView; 193 KOMonthView *mMonthView;
193 int currentPalette; 194 int currentPalette;
194 195
195 QDate mDate; 196 QDate mDate;
196 bool mPrimary; 197 bool mPrimary;
197 bool mHoliday; 198 bool mHoliday;
198 QString mHolidayString; 199 QString mHolidayString;
199 200
200 //QLabel *mLabel; 201 //QLabel *mLabel;
201 QPushButton *mLabel; 202 QPushButton *mLabel;
202 //QListBox *mItemList; 203 //QListBox *mItemList;
203#ifdef DESKTOP_VERSION 204#ifdef DESKTOP_VERSION
204 static QToolTipGroup *mToolTipGroup; 205 static QToolTipGroup *mToolTipGroup;
205#endif 206#endif
206 QSize mLabelSize; 207 QSize mLabelSize;
207 QSize mLabelBigSize; 208 QSize mLabelBigSize;
208 QPalette mHolidayPalette; 209 QPalette mHolidayPalette;
209 QPalette mStandardPalette; 210 QPalette mStandardPalette;
210 QPalette mPrimaryPalette; 211 QPalette mPrimaryPalette;
211 QPalette mNonPrimaryPalette; 212 QPalette mNonPrimaryPalette;
212 void setMyPalette(); 213 void setMyPalette();
213 QPalette getPalette (); 214 QPalette getPalette ();
214 215
215}; 216};
216 217
217 218
218class KOMonthView: public KOEventView 219class KOMonthView: public KOEventView
219{ 220{
220 Q_OBJECT 221 Q_OBJECT
221 public: 222 public:
222 KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 ); 223 KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 );
223 ~KOMonthView(); 224 ~KOMonthView();
224 225
225 /** Returns maximum number of days supported by the komonthview */ 226 /** Returns maximum number of days supported by the komonthview */
226 virtual int maxDatesHint(); 227 virtual int maxDatesHint();
227 228
228 /** Returns number of currently shown dates. */ 229 /** Returns number of currently shown dates. */
229 virtual int currentDateCount(); 230 virtual int currentDateCount();
230 231
231 /** returns the currently selected events */ 232 /** returns the currently selected events */
232 virtual QPtrList<Incidence> selectedIncidences(); 233 virtual QPtrList<Incidence> selectedIncidences();
233 234
234 /** returns dates of the currently selected events */ 235 /** returns dates of the currently selected events */
235 virtual DateList selectedDates(); 236 virtual DateList selectedDates();
236 237
237 virtual void printPreview(CalPrinter *calPrinter, 238 virtual void printPreview(CalPrinter *calPrinter,
238 const QDate &, const QDate &); 239 const QDate &, const QDate &);
239 bool isMonthView() { return !mShowWeekView; } 240 bool isMonthView() { return !mShowWeekView; }
240 bool isUpdatePossible() { return updatePossible; } 241 bool isUpdatePossible() { return updatePossible; }
241 242
242 MonthViewCell * selectedCell(); 243 MonthViewCell * selectedCell();
243 bool skipResize; 244 bool skipResize;
244 NavigatorBar* navigatorBar() { return mNavigatorBar ;} 245 NavigatorBar* navigatorBar() { return mNavigatorBar ;}
245 public slots: 246 public slots:
246 virtual void updateView(); 247 virtual void updateView();
247 virtual void updateConfig(); 248 virtual void updateConfig();
248 virtual void showDates(const QDate &start, const QDate &end); 249 virtual void showDates(const QDate &start, const QDate &end);
249 virtual void showEvents(QPtrList<Event> eventList); 250 virtual void showEvents(QPtrList<Event> eventList);
250 251
251 void changeEventDisplay(Event *, int); 252 void changeEventDisplay(Event *, int);
252 253
253 void clearSelection(); 254 void clearSelection();
254 255
255 void showContextMenu( Incidence * ); 256 void showContextMenu( Incidence * );
256 257
257 void setSelectedCell( MonthViewCell * ); 258 void setSelectedCell( MonthViewCell * );