diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kspread/kspread_util.h | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
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
Diffstat (limited to 'kspread/kspread_util.h')
-rw-r--r-- | kspread/kspread_util.h | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/kspread/kspread_util.h b/kspread/kspread_util.h index ff07f061..5418f118 100644 --- a/kspread/kspread_util.h +++ b/kspread/kspread_util.h @@ -21,24 +21,24 @@ #ifndef __kspread_util_h__ #define __kspread_util_h__ -#include <qstring.h> -#include <qrect.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqrect.h> +#include <tqdatetime.h> #include <koffice_export.h> #include "kspread_global.h" #include "kspread_value.h" -class QFont; -class QPen; -class QDomElement; -class QDomDocument; +class TQFont; +class TQPen; +class TQDomElement; +class TQDomDocument; class KLocale; -bool util_isPointValid(QPoint point); -bool util_isRectValid(QRect rect); +bool util_isPointValid(TQPoint point); +bool util_isRectValid(TQRect rect); namespace KSpread { @@ -55,8 +55,8 @@ class KSPREAD_EXPORT Point { public: Point() { _pos.setX( -1 ); _sheet = 0; _columnFixed = false; _rowFixed = false; } - Point( const QString& ); - Point( const QString&, Map*, Sheet* default_sheet = 0 ); + Point( const TQString& ); + Point( const TQString&, Map*, Sheet* default_sheet = 0 ); Point( const Point& c ) { _pos = c._pos; _sheet = c._sheet; @@ -87,14 +87,14 @@ public: /** * Sets the name of the sheet which this point lies on. */ - void setSheetName(QString name); - QString sheetName() const; + void setSheetName(TQString name); + TQString sheetName() const; /** * Sets the position of this point (in rows and columns) */ - void setPos(QPoint pos); - QPoint pos() const; + void setPos(TQPoint pos); + TQPoint pos() const; /** * Sets whether or not the column (x coordinate) of this point is fixed (ie. it represents an absolute @@ -112,13 +112,13 @@ public: private: Sheet* _sheet; - QString _sheetName; - QPoint _pos; + TQString _sheetName; + TQPoint _pos; bool _columnFixed; bool _rowFixed; private: - void init( const QString& ); + void init( const TQString& ); }; /** @@ -132,8 +132,8 @@ class KSPREAD_EXPORT Range public: Range(); - Range( const QString& ); - Range( const QString&, Map*, Sheet* default_sheet = 0 ); + Range( const TQString& ); + Range( const TQString&, Map*, Sheet* default_sheet = 0 ); Range( const Range& r ); Range( const Point& ul, const Point& lr ); @@ -164,16 +164,16 @@ public: * Changes the area on the spreadsheet represented by this range * @param newRange The new area for this range. */ - virtual void setRange(const QRect& newRange) {_range=newRange;} + virtual void setRange(const TQRect& newRange) {_range=newRange;} void setRange(int newStartCol, int newStartRow, int newEndCol, int newEndRow) - { _range=QRect(newStartCol,newStartRow,newEndCol-newStartCol,newEndRow-newStartRow); } + { _range=TQRect(newStartCol,newStartRow,newEndCol-newStartCol,newEndRow-newStartRow); } /** Returns the area on the spreadsheet occupied by this range. */ - QRect range() const; + TQRect range() const; /** Returns true if this range includes the specified cell */ - bool contains (const Point &cell) const; + bool tqcontains (const Point &cell) const; /** * Returns true if this range intersects Range @p r (ie. there is at least one cell * which is common to both Ranges ) @@ -185,7 +185,7 @@ public: * ie. In the format " SheetName! [StartCell] : [EndCell] " * The string representation uses $ characters to mark fixed parts of the range, eg. Sheet1!$A1:$A20 */ - QString toString() const; + TQString toString() const; /** Sets whether or not the left column is fixed . */ void setLeftFixed(bool fixed); @@ -208,14 +208,14 @@ public: Sheet* sheet() const; /** Sets the name of the sheet associated with this range. */ - void setSheetName(QString sheetName); - QString sheetName() const; + void setSheetName(TQString sheetName); + TQString sheetName() const; /** * Returns the named area represented by this range or an empty string otherwise. - * This is the name of the area which was passed as a QString to the Range constructor + * This is the name of the area which was passed as a TQString to the Range constructor */ - QString namedArea() const; + TQString namedArea() const; /** * Returns true if the other range occupies the same area on the same sheet as this range. @@ -225,9 +225,9 @@ public: private: Sheet* _sheet; - QString _sheetName; - QString _namedArea; - QRect _range; + TQString _sheetName; + TQString _namedArea; + TQRect _range; bool _leftFixed; bool _rightFixed; bool _topFixed; @@ -242,8 +242,8 @@ TODO: use this as selection TODO: anything I forgot ;) */ struct RangeList { - QValueList<Point> cells; - QValueList<Range> ranges; + TQValueList<Point> cells; + TQValueList<Range> ranges; }; @@ -260,7 +260,7 @@ public: * Contstruct the iterator with the rectangular cell area and which * sheet the area is on */ - RangeIterator(QRect _range, Sheet* _sheet); + RangeIterator(TQRect _range, Sheet* _sheet); ~RangeIterator(); /** @@ -275,9 +275,9 @@ public: Cell* next(); private: - QRect range; + TQRect range; Sheet* sheet; - QPoint current; + TQPoint current; }; //helper functions for the formatting @@ -287,47 +287,47 @@ bool formatIsFraction (FormatType fmt); -KSPREAD_EXPORT QString util_rangeName( const QRect &_area ); -KSPREAD_EXPORT QString util_rangeName( Sheet *_sheet, const QRect &_area ); -QString util_rangeColumnName( const QRect &_area); -QString util_rangeRowName( const QRect &_area); +KSPREAD_EXPORT TQString util_rangeName( const TQRect &_area ); +KSPREAD_EXPORT TQString util_rangeName( Sheet *_sheet, const TQRect &_area ); +TQString util_rangeColumnName( const TQRect &_area); +TQString util_rangeRowName( const TQRect &_area); /** * Call this function to decode the text of a column label to an integer * i.e. AA->27 */ -KSPREAD_EXPORT int util_decodeColumnLabelText( const QString &_col ); +KSPREAD_EXPORT int util_decodeColumnLabelText( const TQString &_col ); /** * Call this function to encode an integer to the text of the column label * i.e. 27->AA */ -KSPREAD_EXPORT QString util_encodeColumnLabelText( int column ); +KSPREAD_EXPORT TQString util_encodeColumnLabelText( int column ); -bool util_isAllSelected(const QRect &selection); -bool util_isColumnSelected(const QRect &selection); -bool util_isRowSelected(const QRect &selection); -bool util_isRowOrColumnSelected( const QRect &selection ); +bool util_isAllSelected(const TQRect &selection); +bool util_isColumnSelected(const TQRect &selection); +bool util_isRowSelected(const TQRect &selection); +bool util_isRowOrColumnSelected( const TQRect &selection ); -bool util_validateSheetName(const QString &name); +bool util_validateSheetName(const TQString &name); -QDomElement util_createElement( const QString & tagName, const QFont & font, QDomDocument & doc ); -QDomElement util_createElement( const QString & tagname, const QPen & pen, QDomDocument & doc ); -QFont util_toFont( QDomElement & element ); -QPen util_toPen( QDomElement & element ); -int util_penCompare( QPen const & pen1, QPen const & pen2 ); +TQDomElement util_createElement( const TQString & tagName, const TQFont & font, TQDomDocument & doc ); +TQDomElement util_createElement( const TQString & tagname, const TQPen & pen, TQDomDocument & doc ); +TQFont util_toFont( TQDomElement & element ); +TQPen util_toPen( TQDomElement & element ); +int util_penCompare( TQPen const & pen1, TQPen const & pen2 ); -QString convertRefToRange( const QString & sheet, const QRect & rect ); -QString convertRefToBase( const QString & sheet, const QRect & rect ); -QString convertRangeToRef( const QString & sheetName, const QRect & _area ); +TQString convertRefToRange( const TQString & sheet, const TQRect & rect ); +TQString convertRefToBase( const TQString & sheet, const TQRect & rect ); +TQString convertRangeToRef( const TQString & sheetName, const TQRect & _area ); -void insertBracket( QString & s ); -QString convertOasisPenToString( const QPen & pen ); -QPen convertOasisStringToPen( const QString &str ); +void insertBracket( TQString & s ); +TQString convertOasisPenToString( const TQPen & pen ); +TQPen convertOasisStringToPen( const TQString &str ); //Return true when it's a reference to cell from sheet. -KSPREAD_EXPORT bool localReferenceAnchor( const QString &_ref ); +KSPREAD_EXPORT bool localReferenceAnchor( const TQString &_ref ); @@ -340,14 +340,14 @@ namespace Oasis * @param locale The locale to which the expression should be converted. */ // TODO check visibility - KSPREAD_EXPORT QString decodeFormula(const QString& expr, const KLocale* locale = 0); + KSPREAD_EXPORT TQString decodeFormula(const TQString& expr, const KLocale* locale = 0); /** * Converts a localized formula/cell reference to an OpenDocument * representation of a formula/cell reference. * @param expr The expression to convert to OpenDocument format. * @param locale The locale from which the expression should be converted. */ - KSPREAD_EXPORT QString encodeFormula(const QString& expr, const KLocale* locale = 0); + KSPREAD_EXPORT TQString encodeFormula(const TQString& expr, const KLocale* locale = 0); } } // namespace KSpread |