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_cell.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_cell.h')
-rw-r--r-- | kspread/kspread_cell.h | 252 |
1 files changed, 126 insertions, 126 deletions
diff --git a/kspread/kspread_cell.h b/kspread/kspread_cell.h index 1de6a20b..e7d4e2bb 100644 --- a/kspread/kspread_cell.h +++ b/kspread/kspread_cell.h @@ -35,15 +35,15 @@ #ifndef KSPREAD_CELL #define KSPREAD_CELL -#include <qpainter.h> -#include <qptrlist.h> -#include <qdatetime.h> +#include <tqpainter.h> +#include <tqptrlist.h> +#include <tqdatetime.h> #include "kspread_condition.h" class KLocale; -class QDomElement; -class QDomDocument; +class TQDomElement; +class TQDomDocument; class KoXmlWriter; class KoGenStyles; class KoGenStyle; @@ -103,23 +103,23 @@ struct Validity } inline bool operator!=( const Validity& other ) const { return !operator==( other ); } - QString message; - QString title; - QString titleInfo; - QString messageInfo; + TQString message; + TQString title; + TQString titleInfo; + TQString messageInfo; double valMin; double valMax; Conditional::Type m_cond; Action::Type m_action; Restriction::Type m_restriction; - QTime timeMin; - QTime timeMax; - QDate dateMin; - QDate dateMax; + TQTime timeMin; + TQTime timeMax; + TQDate dateMin; + TQDate dateMax; bool displayMessage; bool allowEmptyCell; bool displayValidationInformation; - QStringList listValidity; + TQStringList listValidity; }; class Formula; @@ -177,36 +177,36 @@ public: * Returns the name of the cell. For example, the cell in first column and * first row is "A1". */ - QString name() const; + TQString name() const; /** * Returns the full name of the cell, i.e. including the worksheet name. * Example: "Sheet1!A1" */ - QString fullName() const; + TQString fullName() const; /** * Returns the column name of the cell. */ - QString columnName() const; + TQString columnName() const; /** * Given the cell position, this static function returns the name of the cell. * Example: name(5,4) will return "E4". */ - static QString name( int col, int row ); + static TQString name( int col, int row ); /** * Given the sheet and cell position, this static function returns the full name * of the cell, i.e. with the name of the sheet. */ - static QString fullName( const Sheet *s, int col, int row ); + static TQString fullName( const Sheet *s, int col, int row ); /** * Given the column number, this static function returns the corresponding * column name, i.e. the first column is "A", the second is "B", and so on. */ - static QString columnName( uint column ); + static TQString columnName( uint column ); /** * Returns the locale setting of this cell. @@ -221,9 +221,9 @@ public: * Return the text the user entered. This could be a value (e.g. "14.03") * or a formula (e.g. "=SUM(A1:A10)") */ - QString text() const; + TQString text() const; - QString strOutText() const; + TQString strOutText() const; Formula *formula () const; @@ -256,7 +256,7 @@ public: * \note Calls setValue() after setting the formatting and input text. */ void setCellValue (const Value& value, FormatType fmtType = No_format, - const QString& inputText = QString::null); + const TQString& inputText = TQString()); Cell* previousCell() const; Cell* nextCell() const; @@ -265,12 +265,12 @@ public: /** * Moves around the cell. It cares about obscured and obscuring cells and - * forces, relayout, calculation and redrawing of the cell. + * forces, retqlayout, calculation and redrawing of the cell. */ void move( int column, int row ); /** - * This method notifies the cell that the parent sheet is being deleted. + * This method notifies the cell that the tqparent sheet is being deleted. */ // Note: This used to remove any links from this cell to other cells. However, this caused a problem // in other parts of the code which relied upon walking from one cell to the next using @@ -292,7 +292,7 @@ public: * back to relative references during decoding) - is used for cutting to clipboard * Usually this is false, to only store the properties explicitely set. */ - QDomElement save( QDomDocument& doc, int _x_offset = 0, int _y_offset = 0, bool force = false, bool copy = false, bool era = false ); + TQDomElement save( TQDomDocument& doc, int _x_offset = 0, int _y_offset = 0, bool force = false, bool copy = false, bool era = false ); bool saveOasis( KoXmlWriter& xmlwriter, KoGenStyles& mainStyles, int row, int column, int &repeated, @@ -303,9 +303,9 @@ public: /** * @return the OASIS style's name */ - QString saveOasisCellStyle( KoGenStyle ¤tCellStyle,KoGenStyles &mainStyles ); + TQString saveOasisCellStyle( KoGenStyle ¤tCellStyle,KoGenStyles &mainStyles ); - bool load( const QDomElement& cell, int _xshift, int _yshift, Paste::Mode pm = Paste::Normal, + bool load( const TQDomElement& cell, int _xshift, int _yshift, Paste::Mode pm = Paste::Normal, Paste::Operation op = Paste::OverWrite, bool paste = false ); /** @@ -313,10 +313,10 @@ public: * @param element An OASIS XML element * @param oasisContext The loading context assoiated with the XML element */ - bool loadOasis( const QDomElement & element, KoOasisLoadingContext &oasisContext , Style* style); + bool loadOasis( const TQDomElement & element, KoOasisLoadingContext &oasisContext , Style* style); - QTime toTime(const QDomElement &element); - QDate toDate(const QDomElement &element); + TQTime toTime(const TQDomElement &element); + TQDate toDate(const TQDomElement &element); /** * Copyies the format from the cell at the position (_column|_row). @@ -370,15 +370,15 @@ public: * @param mergedCellsPainted list of merged cells being painted * @param drawCursor whether to draw the cursor and selection or not */ - void paintCell( const KoRect & rect, QPainter & painter, + void paintCell( const KoRect & rect, TQPainter & painter, View * view, const KoPoint & coordinate, - const QPoint & cellRef, + const TQPoint & cellRef, int paintBorder, - QPen & rightPen, - QPen & bottomPen, - QPen & leftPen, - QPen & topPen, - QValueList<QPoint> &mergedCellsPainted, + TQPen & rightPen, + TQPen & bottomPen, + TQPen & leftPen, + TQPen & topPen, + TQValueList<TQPoint> &mergedCellsPainted, bool drawCursor = true ); @@ -417,9 +417,9 @@ public: double dblHeight( int _row = -1, const Canvas *_canvas = 0L ) const; /** - * @return a QRect for this cell (i.e., a 1x1 rect). @see zoomedCellRect + * @return a TQRect for this cell (i.e., a 1x1 rect). @see zoomedCellRect */ - QRect cellRect(); + TQRect cellRect(); /** * @return true if the cell should be printed in a print out. @@ -451,14 +451,14 @@ public: * The high-level method for setting text, when the user inputs it. * It will revert back to the old text if testValidity() returns action==stop. */ - void setCellText( const QString& _text, bool asString = false ); + void setCellText( const TQString& _text, bool asString = false ); /** * Sets the text in the cell when the user inputs it. * Will determine the type of contents automatically. * Called by setCellText. */ - void setDisplayText( const QString& _text ); + void setDisplayText( const TQString& _text ); /** * Sets a link for this cell. For example, setLink( "mailto:joe@somewhere.com" ) @@ -466,13 +466,13 @@ public: * Possible choices for link are URL (web, ftp), e-mail address, local file, * or another cell. */ - void setLink( const QString& link ); + void setLink( const TQString& link ); /** * Returns the link associated with cell. It is empty if this cell * contains no link. */ - QString link() const; + TQString link() const; //////////////////////////////// // @@ -483,39 +483,39 @@ public: /** * @return effective pen for the left border * If this cell is merged by another cell, the other cell's - * left border pen. If this cell's conditional formatting contains + * left border pen. If this cell's conditional formatting tqcontains * a left border pen and the condition is matched, the conditional * formatting's pen. Otherwise, its own left border pen. */ - const QPen & effLeftBorderPen( int col, int row ) const; + const TQPen & effLeftBorderPen( int col, int row ) const; /** * @return effective pen for the top border * @see effLeftBorderPen */ - const QPen & effTopBorderPen( int col, int row ) const; + const TQPen & effTopBorderPen( int col, int row ) const; /** * @return effective pen for the right border * @see effLeftBorderPen */ - const QPen & effRightBorderPen( int col, int row ) const; + const TQPen & effRightBorderPen( int col, int row ) const; /** * @return effective pen for the bottom border * @see effLeftBorderPen */ - const QPen & effBottomBorderPen( int col, int row ) const; + const TQPen & effBottomBorderPen( int col, int row ) const; /** * @return effective pen for the go up diagonal border * If this cell's conditional formatting contains a go up diagonal pen and * the condition is matched, the conditional formatting's pen. Otherwise, * its own go up diagonal pen. */ - const QPen & effGoUpDiagonalPen( int col, int row ) const; + const TQPen & effGoUpDiagonalPen( int col, int row ) const; /** * @return effective pen for the go up diagonal border * @see effGoUpDiagonalPen */ - const QPen & effFallDiagonalPen( int col, int row ) const; - const QColor & effTextColor( int col, int row ) const; + const TQPen & effFallDiagonalPen( int col, int row ) const; + const TQColor & effTextColor( int col, int row ) const; /** * @return "worth" of the effective bottom border pen @@ -545,32 +545,32 @@ public: /** * @see Format::leftBorderPen */ - const QPen& leftBorderPen( int col, int row ) const; + const TQPen& leftBorderPen( int col, int row ) const; /** * @see Format::topBorderPen */ - const QPen& topBorderPen( int col, int row ) const; + const TQPen& topBorderPen( int col, int row ) const; /** * @see Format::rightBorderPen */ - const QPen& rightBorderPen( int col, int row ) const; + const TQPen& rightBorderPen( int col, int row ) const; /** * @see Format::bottomBorderPen */ - const QPen& bottomBorderPen( int col, int row ) const; + const TQPen& bottomBorderPen( int col, int row ) const; /** * @see Format::bgColor */ - const QColor& bgColor( int col, int row ) const; + const TQColor& bgColor( int col, int row ) const; /** * @see Format::backGroundBrush */ - const QBrush& backGroundBrush( int col, int row ) const; + const TQBrush& backGroundBrush( int col, int row ) const; //////////////////////////////// // @@ -581,22 +581,22 @@ public: /** * @see Format::setLeftBorderPen */ - void setLeftBorderPen( const QPen& p ); + void setLeftBorderPen( const TQPen& p ); /** * @see Format::setTopBorderPen */ - void setTopBorderPen( const QPen& p ); + void setTopBorderPen( const TQPen& p ); /** * @see Format::setRightBorderPen */ - void setRightBorderPen( const QPen& p ); + void setRightBorderPen( const TQPen& p ); /** * @see Format::setBottomBorderPen */ - void setBottomBorderPen( const QPen& p ); + void setBottomBorderPen( const TQPen& p ); ////////////////////// // @@ -647,7 +647,7 @@ public: */ bool updateChart(bool refresh=true); - QString testAnchor( int _x, int _y ) const; + TQString testAnchor( int _x, int _y ) const; /** * Starts calculating. @@ -681,7 +681,7 @@ public: * some cell specific format value like font or text change. */ void setLayoutDirtyFlag( bool format = false ); - bool layoutDirtyFlag() const; + bool tqlayoutDirtyFlag() const; void clearDisplayDirtyFlag(); void setDisplayDirtyFlag(); @@ -724,7 +724,7 @@ public: /** * @return the obscuring cell list (might be empty) */ - QValueList<Cell*> obscuringCells() const; + TQValueList<Cell*> obscuringCells() const; void clearObscuringCells(); @@ -781,8 +781,8 @@ public: * @param _col row the formula is in * @param _row column the formula is in */ - QString encodeFormula( bool _era = false, int _col = -1, int _row = -1 ) const; - QString decodeFormula( const QString &_text, int _col = -1, int _row = -1 ) const; + TQString encodeFormula( bool _era = false, int _col = -1, int _row = -1 ) const; + TQString decodeFormula( const TQString &_text, int _col = -1, int _row = -1 ) const; /** * Merges the @p new_text with @p old_text during a paste operation. @@ -793,7 +793,7 @@ public: * * @return the merged text. */ - QString pasteOperation( const QString &new_text, const QString &old_text, Paste::Operation op ); + TQString pasteOperation( const TQString &new_text, const TQString &old_text, Paste::Operation op ); /** * @return true if the cell contains a formula that could not @@ -807,10 +807,10 @@ public: void clearAllErrors(); /** - * Calculates the layout of the cell, i,e, determines what should be shown + * Calculates the tqlayout of the cell, i,e, determines what should be shown * for this cell, m_strOutText. */ - void makeLayout( QPainter &_painter, int _col, int _row ); + void makeLayout( TQPainter &_painter, int _col, int _row ); /** * Parses the formula. @@ -825,12 +825,12 @@ public: /** * Gets a copy of the list of current conditions */ - QValueList<Conditional> conditionList() const; + TQValueList<Conditional> conditionList() const; /** * Replace the old set of conditions with a new one */ - void setConditionList(const QValueList<Conditional> &newList); + void setConditionList(const TQValueList<Conditional> &newList); Validity * getValidity( int newStruct = -1 ); @@ -846,7 +846,7 @@ public: * Calculates the text parameters stored in cell * Applies font to use to @p painter */ - void calculateTextParameters( QPainter &painter, int _col, int _row ); + void calculateTextParameters( TQPainter &painter, int _col, int _row ); /** * return align X when align is undefined @@ -900,9 +900,9 @@ public: * In that case the cell usually displays "#####" * * LayoutDirty - * Flag showing whether the current layout is OK. + * Flag showing whether the current tqlayout is OK. * If you change for example the fonts point size, set this flag. When the - * cell must draw itself on the screen it will first recalculate its layout. + * cell must draw itself on the screen it will first recalculate its tqlayout. * * CalcDirty * Shows whether recalculation is necessary. @@ -925,7 +925,7 @@ public: * If this flag is set, then it is known that this cell has to be updated * on the display. This means that somewhere in the calling stack there is a * function which will call @ref Sheet::updateCell once it retains - * the control. If a function changes the contents/layout of this cell and this + * the control. If a function changes the contents/tqlayout of this cell and this * flag is not set, then the function must set it at once. After the changes * are done the function must call <tt>m_pSheet->updateCell(...). * The flag is cleared by the function format()->sheet()->updateCell. @@ -951,19 +951,19 @@ protected: /** * Applies the font to use to @p painter */ - void applyZoomedFont( QPainter &painter, int _col, int _row ); + void applyZoomedFont( TQPainter &painter, int _col, int _row ); /** * Called from makeFormat() to determine the space * needed for the text. */ - void textSize( QPainter &_paint ); + void textSize( TQPainter &_paint ); /** * Called from @ref #paintCell to determine the text * wich can be displaying. */ - QString textDisplaying( QPainter &painter); + TQString textDisplaying( TQPainter &painter); /** * Cleans up formula stuff. @@ -990,15 +990,15 @@ protected: /** * Load the text paragraphs from an OASIS XML cell description. - * @param parent The DOM element representing the cell. + * @param tqparent The DOM element representing the cell. */ - void loadOasisCellText( const QDomElement& parent ); - void loadOasisObjects( const QDomElement& e, KoOasisLoadingContext& oasisContext ); - void loadOasisValidation( const QString& validationName ); + void loadOasisCellText( const TQDomElement& tqparent ); + void loadOasisObjects( const TQDomElement& e, KoOasisLoadingContext& oasisContext ); + void loadOasisValidation( const TQString& validationName ); - void loadOasisValidationCondition( QString &valExpression ); + void loadOasisValidationCondition( TQString &valExpression ); void saveOasisAnnotation( KoXmlWriter &xmlwriter ); - void loadOasisConditional( QDomElement * style ); + void loadOasisConditional( TQDomElement * style ); @@ -1010,60 +1010,60 @@ private: // static const char* s_dataTypeToString[]; /* helper functions to the paintCell(...) function */ - /* void paintCellHighlight(QPainter& painter, + /* void paintCellHighlight(TQPainter& painter, const KoRect& cellRect, - const QPoint& cellRef, + const TQPoint& cellRef, const int highlightBorder, - const QPen& rightPen, - const QPen& bottomPen, - const QPen& leftPen, - const QPen& topPen + const TQPen& rightPen, + const TQPen& bottomPen, + const TQPen& leftPen, + const TQPen& topPen );*/ - void paintCellBorders( QPainter& painter, const KoRect &rect, + void paintCellBorders( TQPainter& painter, const KoRect &rect, const KoRect &cellRect, - const QPoint &cellRef, + const TQPoint &cellRef, bool paintBorderRight, bool paintBorderBottom, bool paintBorderLeft, bool paintBorderTop, - QPen & rightPen, QPen & bottomPen, - QPen & leftPen, QPen & topPen ); - void paintPageBorders( QPainter& painter, const KoRect &cellRect, - const QPoint &cellRef, + TQPen & rightPen, TQPen & bottomPen, + TQPen & leftPen, TQPen & topPen ); + void paintPageBorders( TQPainter& painter, const KoRect &cellRect, + const TQPoint &cellRef, bool paintBorderRight, bool paintBorderBottom ); - void paintText( QPainter& painter, const KoRect &cellRect, - const QPoint &cellRef ); - void paintMoreTextIndicator( QPainter& painter, const KoRect &cellRect, - QColor &backgroundColor ); - void paintCommentIndicator( QPainter& painter, const KoRect &cellRect, - const QPoint &cellRef, QColor &backgroundColor ); - void paintFormulaIndicator( QPainter& painter, const KoRect &cellRect, - QColor &backgroundColor ); - void paintDefaultBorders( QPainter& painter, const KoRect &rect, - const KoRect &cellRect, const QPoint &cellRef, + void paintText( TQPainter& painter, const KoRect &cellRect, + const TQPoint &cellRef ); + void paintMoreTextIndicator( TQPainter& painter, const KoRect &cellRect, + TQColor &backgroundColor ); + void paintCommentIndicator( TQPainter& painter, const KoRect &cellRect, + const TQPoint &cellRef, TQColor &backgroundColor ); + void paintFormulaIndicator( TQPainter& painter, const KoRect &cellRect, + TQColor &backgroundColor ); + void paintDefaultBorders( TQPainter& painter, const KoRect &rect, + const KoRect &cellRect, const TQPoint &cellRef, bool paintBorderRight, bool paintBorderBottom, bool paintBorderLeft, bool paintBorderTop, - QPen const & rightPen, QPen const & bottomPen, - QPen const & leftPen, QPen const & topPen ); - void paintBackground( QPainter& painter, const KoRect &cellRect, - const QPoint &cellRef, bool selected, - QColor &backgroundColor ); - void paintObscuredCells( const KoRect& rect, QPainter& painter, + TQPen const & rightPen, TQPen const & bottomPen, + TQPen const & leftPen, TQPen const & topPen ); + void paintBackground( TQPainter& painter, const KoRect &cellRect, + const TQPoint &cellRef, bool selected, + TQColor &backgroundColor ); + void paintObscuredCells( const KoRect& rect, TQPainter& painter, View* view, const KoRect &cellRect, - const QPoint &cellRef, + const TQPoint &cellRef, bool paintBorderRight, bool paintBorderBottom, bool paintBorderLeft, bool paintBorderTop, - QPen & rightPen, QPen & bottomPen, - QPen & leftPen, QPen & topPen, - QValueList<QPoint> &mergedCellsPainted ); - void paintCellDiagonalLines( QPainter& painter, const KoRect &cellRect, - const QPoint &cellRef ); + TQPen & rightPen, TQPen & bottomPen, + TQPen & leftPen, TQPen & topPen, + TQValueList<TQPoint> &mergedCellsPainted ); + void paintCellDiagonalLines( TQPainter& painter, const KoRect &cellRect, + const TQPoint &cellRef ); /** handle the fact that a cell has been updated - calls cellUpdated() - in the parent Sheet object */ + in the tqparent Sheet object */ void valueChanged (); /* helper functions to the makeLayout(...) function */ @@ -1072,9 +1072,9 @@ private: /* helper functions to the load/save routines */ - bool loadCellData(const QDomElement &text, Paste::Operation op); - bool saveCellResult( QDomDocument& doc, QDomElement& result, - QString str ); + bool loadCellData(const TQDomElement &text, Paste::Operation op); + bool saveCellResult( TQDomDocument& doc, TQDomElement& result, + TQString str ); void update(); int effAlignX(); @@ -1085,7 +1085,7 @@ private: */ void offsetAlign( int _col, int _row ); - void checkForNamedAreas( QString & formula ) const; + void checkForNamedAreas( TQString & formula ) const; /** * replacements: * 1. "==" -> "=" @@ -1093,8 +1093,8 @@ private: * "A1" -> "[.A1]" * 3. "," -> "." */ - QString convertFormulaToOasisFormat( const QString & formula ) const; - void loadOasisValidationValue( const QStringList &listVal ); + TQString convertFormulaToOasisFormat( const TQString & formula ) const; + void loadOasisValidationValue( const TQStringList &listVal ); }; |