summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.h
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/komonthview.h
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'korganizer/komonthview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.h57
1 files changed, 32 insertions, 25 deletions
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 1a9d16d..bca76e5 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -12,35 +12,42 @@
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.
*/
#ifndef _KOMONTHVIEW_H
#define _KOMONTHVIEW_H
#include <qlabel.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qdatetime.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
#include <qpoint.h>
-#include <qwidgetstack.h>
+#include <q3widgetstack.h>
#include <qlayout.h>
#include <qtimer.h>
-#include <qintdict.h>
+#include <q3intdict.h>
#include <qpushbutton.h>
-#include <qvaluelist.h>
-#include <qptrvector.h>
+#include <q3valuelist.h>
+#include <q3ptrvector.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <QMouseEvent>
+#include <Q3PtrList>
+#include <Q3PopupMenu>
+#include <QKeyEvent>
#include <libkcal/calendar.h>
#include <libkcal/event.h>
#include "koeventview.h"
#include "navigatorbar.h"
#ifdef DESKTOP_VERSION
class QToolTipGroup;
#endif
class KNOWhatsThis;
@@ -63,25 +70,25 @@ class KOWeekButton : public QPushButton
private:
void focusInEvent ( QFocusEvent * ){;}
int mNumber;
void keyPressEvent ( QKeyEvent * e )
{
e->ignore();
}
private slots :
void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); }
};
-class KNoScrollListBox: public QListBox
+class KNoScrollListBox: public Q3ListBox
{
Q_OBJECT
public:
KNoScrollListBox(QWidget *parent=0, const char *name=0);
~KNoScrollListBox();
QString getWhatsThisText(QPoint p) ;
signals:
void shiftDown();
void shiftUp();
void rightClick();
void nextCell();
@@ -94,49 +101,49 @@ class KNoScrollListBox: public QListBox
void keyPressEvent(QKeyEvent *);
void keyReleaseEvent(QKeyEvent *);
void mousePressEvent(QMouseEvent *);
void focusInEvent ( QFocusEvent * );
void focusOutEvent ( QFocusEvent * );
private:
bool resetOnFocusIn;
KNOWhatsThis * mWT;
};
-class MonthViewItem: public QListBoxItem
+class MonthViewItem: public Q3ListBoxItem
{
public:
MonthViewItem( Incidence *,const QString & title );
void recycle( Incidence *incidence, const QString & s);
void setRecur(bool on) { mRecur = on; }
void setAlarm(bool on) { mAlarm = on; }
void setReply(bool on) { mReply = on; }
void setMoreInfo(bool on) { mInfo = on; }
void setMultiDay(int type) { mMultiday = type; }
int multiDay() { return mMultiday; }
void setMultiDayPos(int type) { mdayPos = type; }
int gettMultiDayPos() { return mdayPos; }
void setBlockRepaint(bool on) { mblockRepaint = on; }
bool setHighlighted( Incidence * );
void setPalette(const QPalette &p) { mPalette = p; }
QPalette palette() const { return mPalette; }
bool setHighlightedFalse();
Incidence *incidence() const { return mIncidence; }
protected:
virtual void paint(QPainter *);
- virtual int height(const QListBox *) const;
- virtual int width(const QListBox *) const;
+ virtual int height(const Q3ListBox *) const;
+ virtual int width(const Q3ListBox *) const;
private:
int mdayPos;
bool isWeekItem;
bool mblockRepaint;
int mMultiday;
bool mRecur;
bool mAlarm;
bool mReply;
bool mInfo;
bool mDisplayHighlighted;
@@ -189,33 +196,33 @@ class MonthViewCell : public KNoScrollListBox
void newEventSignal( QDateTime );
void showDaySignal( QDate );
protected:
QStringList mToolTip;
void resizeEvent( QResizeEvent * );
public slots:
void showDay();
void deHighLight();
void repaintfinishUpdateCell();
protected slots:
- void defaultAction( QListBoxItem * );
- void contextMenu( QListBoxItem * );
- void selection( QListBoxItem * );
- void cellClicked( QListBoxItem * );
+ void defaultAction( Q3ListBoxItem * );
+ void contextMenu( Q3ListBoxItem * );
+ void selection( Q3ListBoxItem * );
+ void cellClicked( Q3ListBoxItem * );
void newEvent();
private:
int mdayCount;
- QPtrList <MonthViewItem> mAvailItemList;
+ Q3PtrList <MonthViewItem> mAvailItemList;
KOMonthView *mMonthView;
int currentPalette;
QDate mDate;
bool mPrimary;
bool mHoliday;
QString mHolidayString;
//QLabel *mLabel;
QPushButton *mLabel;
//QListBox *mItemList;
#ifdef DESKTOP_VERSION
@@ -238,47 +245,47 @@ class KOMonthView: public KOEventView
Q_OBJECT
public:
KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 );
~KOMonthView();
/** Returns maximum number of days supported by the komonthview */
virtual int maxDatesHint();
/** Returns number of currently shown dates. */
virtual int currentDateCount();
/** returns the currently selected events */
- virtual QPtrList<Incidence> selectedIncidences();
+ virtual Q3PtrList<Incidence> selectedIncidences();
/** returns dates of the currently selected events */
virtual DateList selectedDates();
#if 0
virtual void printPreview(CalPrinter *calPrinter,
const QDate &, const QDate &);
#endif
bool isMonthView() { return !mShowWeekView; }
bool isUpdatePossible() { return updatePossible; }
MonthViewCell * selectedCell();
bool skipResize;
NavigatorBar* navigatorBar() { return mNavigatorBar ;}
void clearList();
public slots:
void incidenceHighlighted( Incidence *, MonthViewCell*, int );
void nextCell();
void prevCell();
virtual void updateView();
virtual void updateConfig();
virtual void showDates(const QDate &start, const QDate &end);
- virtual void showEvents(QPtrList<Event> eventList);
+ virtual void showEvents(Q3PtrList<Event> eventList);
void changeEventDisplay(Event *, int);
void clearSelection();
void showContextMenu( Incidence * );
void setSelectedCell( MonthViewCell * );
void setPopupCell( MonthViewCell * );
void switchView();
void setKeyBFocus();
@@ -302,50 +309,50 @@ class KOMonthView: public KOEventView
protected:
void resizeEvent(QResizeEvent *);
void viewChanged();
void updateDayLabels();
int mapWeekLayout( int, bool );
private:
int mKBFcounter;
QTimer* mComputeLayoutTimer;
NavigatorBar* mNavigatorBar;
int currentWeek();
bool clPending;
- QWidgetStack * mWidStack;
+ Q3WidgetStack * mWidStack;
QWidget* mMonthView;
QWidget* mWeekView;
bool mShowWeekView;
bool updatePossible;
int mDaysPerWeek;
int mNumWeeks;
int mNumCells;
//bool mWeekStartsMonday;
bool mShowSatSunComp;
void computeLayout();
void computeLayoutWeek();
void doComputeLayoutWeek();
- QPtrVector<MonthViewCell> mCells;
- QPtrVector<QLabel> mDayLabels;
- QPtrVector<KOWeekButton> mWeekLabels;
- QPtrVector<MonthViewCell> mCellsW;
- QPtrVector<QLabel> mDayLabelsW;
- QPtrVector<KOWeekButton> mWeekLabelsW;
+ Q3PtrVector<MonthViewCell> mCells;
+ Q3PtrVector<QLabel> mDayLabels;
+ Q3PtrVector<KOWeekButton> mWeekLabels;
+ Q3PtrVector<MonthViewCell> mCellsW;
+ Q3PtrVector<QLabel> mDayLabelsW;
+ Q3PtrVector<KOWeekButton> mWeekLabelsW;
bool mShortDayLabelsM;
bool mShortDayLabelsW;
int mWidthLongDayLabel;
QDate mStartDate;
MonthViewCell *mSelectedCell;
MonthViewCell *mPopupCell;
bool mFlagKeyPressed;
KOEventPopupMenu *mContextMenu;
- QPopupMenu *mNewItemMenu;
+ Q3PopupMenu *mNewItemMenu;
void keyPressEvent ( QKeyEvent * ) ;
void keyReleaseEvent ( QKeyEvent * ) ;
};
#endif