From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kspread/selection.h | 67 +++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 33 deletions(-) (limited to 'kspread/selection.h') diff --git a/kspread/selection.h b/kspread/selection.h index 54e661b2..02989009 100644 --- a/kspread/selection.h +++ b/kspread/selection.h @@ -21,7 +21,7 @@ #ifndef KSPREAD_SELECTION #define KSPREAD_SELECTION -#include +#include #include @@ -31,9 +31,10 @@ namespace KSpread { class View; -class Selection : public QObject, public Region +class Selection : public TQObject, public Region { Q_OBJECT + TQ_OBJECT public: Selection(View*); Selection(const Selection&); @@ -42,11 +43,11 @@ public: /** * Sets the selection to the given point */ - void initialize(const QPoint&, Sheet* sheet = 0); + void initialize(const TQPoint&, Sheet* sheet = 0); /** * Sets the selection to the given range */ - void initialize(const QRect&, Sheet* sheet = 0); + void initialize(const TQRect&, Sheet* sheet = 0); /** * Sets the selection to the given region */ @@ -59,16 +60,16 @@ public: /** * Uses the anchor as starting point */ - void update(const QPoint&); + void update(const TQPoint&); /** * Extends the current selection with an additional point */ - void extend(const QPoint&, Sheet* sheet = 0); + void extend(const TQPoint&, Sheet* sheet = 0); /** * Extends the current selection with an additional range */ - void extend(const QRect&, Sheet* sheet = 0); + void extend(const TQRect&, Sheet* sheet = 0); /** * Extends the current selection with an additional region */ @@ -78,20 +79,20 @@ public: * @param point the point's location * @param sheet the sheet the point belongs to */ - virtual Element* eor(const QPoint& point, Sheet* sheet = 0); + virtual Element* eor(const TQPoint& point, Sheet* sheet = 0); /** * The anchor is the starting point of a range. For points marker and anchor are the same */ - const QPoint& anchor() const; + const TQPoint& anchor() const; /** * The cursor represents the cursor position. This needed for obscured cells */ - const QPoint& cursor() const; + const TQPoint& cursor() const; /** * The marker is the end point of a range. For points marker and anchor are the same */ - const QPoint& marker() const; + const TQPoint& marker() const; /** * Checks wether the region consists only of one point @@ -100,12 +101,12 @@ public: /** * @return the area that the 'handle' of the selection is located in painting coordinates */ - QRect selectionHandleArea() const; + TQRect selectionHandleArea() const; /** * @return the name of the region (e.g. "A1:A2") */ - QString name(Sheet* originSheet = 0) const; + TQString name(Sheet* originSheet = 0) const; /** * Sets the selection's origin sheet. @@ -120,7 +121,7 @@ public: /** * Sets the element, which has @p point as anchor, as active */ - void setActiveElement(const QPoint& point); + void setActiveElement(const TQPoint& point); /** * Sets the @p number 'th element as active */ @@ -137,7 +138,7 @@ public: /** * */ - QString activeSubRegionName() const; + TQString activeSubRegionName() const; /** * Clears the elements of the subregion */ @@ -157,13 +158,13 @@ public: */ void setMultipleSelection(bool state); - QRect lastRange(bool extend = true) const; - QRect extendToMergedAreas(QRect area) const; + TQRect lastRange(bool extend = true) const; + TQRect extendToMergedAreas(TQRect area) const; - const QValueList& colors() const; + const TQValueList& colors() const; // TODO Stefan #2: replace this - QRect selection(bool extend = true) const; + TQRect selection(bool extend = true) const; signals: void changed(const Region&); @@ -172,11 +173,11 @@ protected: class Point; class Range; - virtual Region::Point* createPoint(const QPoint&) const; - virtual Region::Point* createPoint(const QString&) const; + virtual Region::Point* createPoint(const TQPoint&) const; + virtual Region::Point* createPoint(const TQString&) const; virtual Region::Point* createPoint(const Point&) const; - virtual Region::Range* createRange(const QRect&) const; - virtual Region::Range* createRange(const QString&) const; + virtual Region::Range* createRange(const TQRect&) const; + virtual Region::Range* createRange(const TQString&) const; virtual Region::Range* createRange(const Range&) const; private: @@ -191,11 +192,11 @@ private: class Selection::Point : public Region::Point { public: - Point(const QPoint& point); - Point(const QString& string); + Point(const TQPoint& point); + Point(const TQString& string); - void setColor(const QColor& color) { m_color = color; } - virtual const QColor& color() const { return m_color; } + void setColor(const TQColor& color) { m_color = color; } + virtual const TQColor& color() const { return m_color; } bool columnFixed() const { return m_columnFixed; } bool rowFixed() const { return m_rowFixed; } @@ -203,7 +204,7 @@ public: protected: private: - QColor m_color; + TQColor m_color; bool m_columnFixed : 1; bool m_rowFixed : 1; }; @@ -215,18 +216,18 @@ private: class Selection::Range : public Region::Range { public: - Range(const QRect& rect); - Range(const QString& string); + Range(const TQRect& rect); + Range(const TQString& string); virtual bool isColorizable() const { return true; } - void setColor(const QColor& color) { m_color = color; } - const QColor& color() const { return m_color; } + void setColor(const TQColor& color) { m_color = color; } + const TQColor& color() const { return m_color; } protected: private: - QColor m_color; + TQColor m_color; bool m_leftFixed : 1; bool m_rightFixed : 1; bool m_topFixed : 1; -- cgit v1.2.1