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_doc.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_doc.h')
-rw-r--r-- | kspread/kspread_doc.h | 167 |
1 files changed, 84 insertions, 83 deletions
diff --git a/kspread/kspread_doc.h b/kspread/kspread_doc.h index e1bd50e4..f4cca795 100644 --- a/kspread/kspread_doc.h +++ b/kspread/kspread_doc.h @@ -28,12 +28,12 @@ #ifndef KSPREAD_DOC #define KSPREAD_DOC -#include <qmap.h> -#include <qobject.h> -#include <qpainter.h> -#include <qrect.h> -#include <qstring.h> -#include <qvaluelist.h> +#include <tqmap.h> +#include <tqobject.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqvaluelist.h> #include <kcompletion.h> @@ -54,7 +54,7 @@ class KoStore; class KoXmlWriter; class DCOPObject; -class QDomDocument; +class TQDomDocument; class KSpellConfig; #define MIME_TYPE "application/x-kspread" @@ -78,9 +78,9 @@ class EmbeddedObject; struct Reference { - QString sheet_name; - QString ref_name; - QRect rect; + TQString sheet_name; + TQString ref_name; + TQRect rect; }; class Plugin @@ -88,7 +88,7 @@ class Plugin public: Plugin() {} virtual ~Plugin() {} - virtual QDomElement saveXML( QDomDocument & doc ) const = 0; + virtual TQDomElement saveXML( TQDomDocument & doc ) const = 0; }; /** @@ -97,29 +97,30 @@ class Plugin class KSPREAD_EXPORT Doc : public KoDocument, public KoZoomHandler { Q_OBJECT - Q_PROPERTY( bool getShowRowHeader READ getShowRowHeader ) - Q_PROPERTY( bool getShowColHeader READ getShowColHeader ) - Q_PROPERTY( double getIndentValue READ getIndentValue WRITE setIndentValue ) - Q_PROPERTY( bool getShowMessageError READ getShowMessageError WRITE setShowMessageError) - Q_PROPERTY( bool dontCheckUpperWord READ dontCheckUpperWord WRITE setDontCheckUpperWord) - Q_PROPERTY( bool dontCheckTitleCase READ dontCheckTitleCase WRITE setDontCheckTitleCase) - - Q_PROPERTY( int syntaxVersion READ syntaxVersion ) - Q_PROPERTY( bool showVerticalScrollBar READ showVerticalScrollBar WRITE setShowVerticalScrollBar ) - Q_PROPERTY( bool showHorizontalScrollBar READ showHorizontalScrollBar WRITE setShowHorizontalScrollBar ) - Q_PROPERTY( bool showColumnHeader READ showColumnHeader WRITE setShowColumnHeader ) - Q_PROPERTY( bool showRowHeader READ showRowHeader WRITE setShowRowHeader ) - Q_PROPERTY( bool showStatusBar READ showStatusBar WRITE setShowStatusBar ) - Q_PROPERTY( bool showFormulaBar READ showFormulaBar WRITE setShowFormulaBar ) - Q_PROPERTY( bool showTabBar READ showTabBar WRITE setShowTabBar ) - Q_PROPERTY( int undoRedoLimit READ undoRedoLimit WRITE setUndoRedoLimit ) + TQ_OBJECT + TQ_PROPERTY( bool getShowRowHeader READ getShowRowHeader ) + TQ_PROPERTY( bool getShowColHeader READ getShowColHeader ) + TQ_PROPERTY( double getIndentValue READ getIndentValue WRITE setIndentValue ) + TQ_PROPERTY( bool getShowMessageError READ getShowMessageError WRITE setShowMessageError) + TQ_PROPERTY( bool dontCheckUpperWord READ dontCheckUpperWord WRITE setDontCheckUpperWord) + TQ_PROPERTY( bool dontCheckTitleCase READ dontCheckTitleCase WRITE setDontCheckTitleCase) + + TQ_PROPERTY( int syntaxVersion READ syntaxVersion ) + TQ_PROPERTY( bool showVerticalScrollBar READ showVerticalScrollBar WRITE setShowVerticalScrollBar ) + TQ_PROPERTY( bool showHorizontalScrollBar READ showHorizontalScrollBar WRITE setShowHorizontalScrollBar ) + TQ_PROPERTY( bool showColumnHeader READ showColumnHeader WRITE setShowColumnHeader ) + TQ_PROPERTY( bool showRowHeader READ showRowHeader WRITE setShowRowHeader ) + TQ_PROPERTY( bool showStatusBar READ showStatusBar WRITE setShowStatusBar ) + TQ_PROPERTY( bool showFormulaBar READ showFormulaBar WRITE setShowFormulaBar ) + TQ_PROPERTY( bool showTabBar READ showTabBar WRITE setShowTabBar ) + TQ_PROPERTY( int undoRedoLimit READ undoRedoLimit WRITE setUndoRedoLimit ) public: /** * Creates a new document. */ - Doc( QWidget *parentWidget = 0, const char *widgetName = 0, QObject* parent = 0, + Doc( TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject* tqparent = 0, const char* name = 0, bool singleViewMode = false ); /** @@ -143,12 +144,12 @@ public: /** * Returns list of all documents. */ - static QValueList<Doc*> documents(); + static TQValueList<Doc*> documents(); /** * Returns the MIME type of KSpread document. */ - virtual QCString mimeType() const { return MIME_TYPE; } + virtual TQCString mimeType() const { return MIME_TYPE; } KLocale *locale () const; Map *map () const; @@ -208,7 +209,7 @@ public: * For example, if unit() returns KoUnit::U_MM, then * this functions return "mm". */ - QString unitName() const; + TQString unitName() const; /** * Returns the syntax version of the currently opened file @@ -287,12 +288,12 @@ public: /** * Sets the color of the grid. */ - void setGridColor( const QColor& color ); + void setGridColor( const TQColor& color ); /** * Returns the color of the grid. */ - QColor gridColor() const; + TQColor gridColor() const; /** * Sets the indentation value. @@ -401,12 +402,12 @@ public: bool dontCheckTitleCase() const; void setDontCheckTitleCase(bool _b); - QColor pageBorderColor() const; - void changePageBorderColor( const QColor & _color); + TQColor pageBorderColor() const; + void changePageBorderColor( const TQColor & _color); virtual bool completeSaving( KoStore* _store ); - virtual QDomDocument saveXML(); + virtual TQDomDocument saveXML(); enum SaveFlag { SaveAll, SaveSelected }; // kpresenter and kword have have SavePage too @@ -426,25 +427,25 @@ public: * It returns the selected picture, when exactly one picture was selected. */ bool saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag saveFlag, - QString* plainText = 0, KoPicture* picture = 0 ); + TQString* plainText = 0, KoPicture* picture = 0 ); virtual bool saveOasis( KoStore* store, KoXmlWriter* manifestWriter ); void saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles ) const; virtual int supportedSpecialFormats() const; - virtual bool loadXML( QIODevice *, const QDomDocument& doc ); - virtual bool loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const QDomDocument& settings, KoStore* ); + virtual bool loadXML( TQIODevice *, const TQDomDocument& doc ); + virtual bool loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles, const TQDomDocument& settings, KoStore* ); virtual bool loadChildren( KoStore* _store ); - QDomElement saveAreaName( QDomDocument& doc ) ; + TQDomElement saveAreaName( TQDomDocument& doc ) ; void saveOasisAreaName( KoXmlWriter & xmlWriter ); - void loadAreaName( const QDomElement& element ); - void loadOasisAreaName( const QDomElement& element ); - void loadOasisCellValidation( const QDomElement&body ); + void loadAreaName( const TQDomElement& element ); + void loadOasisAreaName( const TQDomElement& element ); + void loadOasisCellValidation( const TQDomElement&body ); virtual void addView( KoView *_view ); - virtual bool initDoc(InitDocFlags flags, QWidget* parentWidget=0); + virtual bool initDoc(InitDocFlags flags, TQWidget* tqparentWidget=0); /** * Change the zoom factor to @p z (e.g. 150 for 150%) @@ -460,7 +461,7 @@ public: */ void newZoomAndResolution( bool updateViews, bool forPrint ); - // virtual void printMap( QPainter & _painter ); + // virtual void printMap( TQPainter & _painter ); void enableUndo( bool _b ); void enableRedo( bool _b ); @@ -476,12 +477,12 @@ public: */ void doNotPaint(bool status); - virtual void paintContent( QPainter & painter, const QRect & rect, bool transparent = false, + virtual void paintContent( TQPainter & painter, const TQRect & rect, bool transparent = false, double zoomX = 1.0, double zoomY = 1.0 ); - void paintContent( QPainter & painter, const QRect & rect, bool transparent, + void paintContent( TQPainter & painter, const TQRect & rect, bool transparent, Sheet * sheet, bool drawCursor = true ); - bool docData( QString const & xmlTag, QDomElement & data ); + bool docData( TQString const & xmlTag, TQDomElement & data ); void deregisterPlugin( Plugin * plugin ); void registerPlugin( Plugin * plugin ); @@ -506,23 +507,23 @@ public: * @param drawCursor whether or not to draw the selection rectangle and the choose * marker */ - void paintCellRegions(QPainter& painter, const QRect &viewRect, + void paintCellRegions(TQPainter& painter, const TQRect &viewRect, View* view, - QValueList<QRect> cellRegions, + TQValueList<TQRect> cellRegions, const Sheet* sheet, bool drawCursor); virtual DCOPObject* dcopObject(); - void addAreaName(const QRect &_rect,const QString & name,const QString & sheetName); - const QValueList<Reference> & listArea(); - void removeArea( const QString &name); + void addAreaName(const TQRect &_rect,const TQString & name,const TQString & sheetName); + const TQValueList<Reference> & listArea(); + void removeArea( const TQString &name); KCompletion & completion(); - void addStringCompletion(const QString & stringCompletion); + void addStringCompletion(const TQString & stringCompletion); - void changeAreaSheetName(const QString & oldName,const QString &sheetName); + void changeAreaSheetName(const TQString & oldName,const TQString &sheetName); - QRect getRectArea(const QString & _sheetName); + TQRect getRectArea(const TQString & _sheetName); /** * Inserts an object to the object list. @@ -531,7 +532,7 @@ public: /** * @return the list of all embedded objects (charts, pictures and koffice objects) Use insertObject to add an object to the list. */ - QPtrList<EmbeddedObject>& embeddedObjects(); + TQPtrList<EmbeddedObject>& embeddedObjects(); KoPictureCollection *pictureCollection(); void initConfig(); @@ -546,7 +547,7 @@ public: * - No cell calculation will be done (maybe there are exceptions, such * as the goalseek operation needs to calculate values) * During an operation, calls to Sheet::setRegionPaintDirty mark - * regions as needing repainted. Once the emitEndOperation function is + * regions as needing tqrepainted. Once the emitEndOperation function is * called, those regions will be painted all at once, values being calculated * as necessary. * Calls to begin/endOperation may be nested. Calcualation/painting will @@ -564,7 +565,7 @@ public: virtual void emitBeginOperation(); /** - * Mark the end of an operation and triggers a repaint of any cells or regions of cells which + * Mark the end of an operation and triggers a tqrepaint of any cells or regions of cells which * have been marked as 'dirty' via calls to Sheet::setRegionPaintDirty * See above comment to emitBeginOperation(bool). */ @@ -589,33 +590,33 @@ public: // The user-chosen global unit - static QString getAttribute(const QDomElement &element, const char *attributeName, const QString &defaultValue) + static TQString getAttribute(const TQDomElement &element, const char *attributeName, const TQString &defaultValue) { return element.attribute( attributeName, defaultValue ); } - static int getAttribute(const QDomElement &element, const char *attributeName, int defaultValue) + static int getAttribute(const TQDomElement &element, const char *attributeName, int defaultValue) { - QString value; - if ( ( value = element.attribute( attributeName ) ) != QString::null ) + TQString value; + if ( ( value = element.attribute( attributeName ) ) != TQString() ) return value.toInt(); else return defaultValue; } - static double getAttribute(const QDomElement &element, const char *attributeName, double defaultValue) + static double getAttribute(const TQDomElement &element, const char *attributeName, double defaultValue) { - QString value; - if ( ( value = element.attribute( attributeName ) ) != QString::null ) + TQString value; + if ( ( value = element.attribute( attributeName ) ) != TQString() ) return value.toDouble(); else return defaultValue; } - void addIgnoreWordAll( const QString & word); + void addIgnoreWordAll( const TQString & word); void clearIgnoreWordAll( ); - void addIgnoreWordAllList( const QStringList & _lst); - QStringList spellListIgnoreAll() const ; + void addIgnoreWordAllList( const TQStringList & _lst); + TQStringList spellListIgnoreAll() const ; void setDisplaySheet(Sheet *_Sheet ); Sheet * displaySheet() const; @@ -639,10 +640,10 @@ public: void loadConfigFromFile(); bool configLoadFromFile() const; - // repaint (update) all views - void repaint( const QRect& ); - void repaint( EmbeddedObject* ); - void repaint( const KoRect& ); + // tqrepaint (update) all views + void tqrepaint( const TQRect& ); + void tqrepaint( EmbeddedObject* ); + void tqrepaint( const KoRect& ); virtual void addShell( KoMainWindow *shell ); @@ -672,20 +673,20 @@ signals: */ void sig_refreshLocale(); - void sig_addAreaName( const QString & ); - void sig_removeAreaName( const QString & ); + void sig_addAreaName( const TQString & ); + void sig_removeAreaName( const TQString & ); - void damagesFlushed( const QValueList<Damage*>& damages ); + void damagesFlushed( const TQValueList<Damage*>& damages ); protected slots: void commandExecuted(); void documentRestored(); - virtual void openTemplate( const QString& file ); + virtual void openTemplate( const TQString& file ); virtual void initEmpty(); protected: - KoView* createViewInstance( QWidget* parent, const char* name ); + KoView* createViewInstance( TQWidget* tqparent, const char* name ); void makeUsedPixmapList(); void insertPixmapKey( KoPictureKey key ); @@ -700,7 +701,7 @@ protected: */ virtual bool saveChildren( KoStore* _store ); - class SavedDocParts : public QMap<QString, QDomElement> {}; + class SavedDocParts : public TQMap<TQString, TQDomElement> {}; SavedDocParts m_savedDocParts; private: @@ -719,14 +720,14 @@ private: */ void paintUpdates(); - void PaintRegion(QPainter& painter, const KoRect &viewRegion, - View* view, const QRect &paintRegion, + void PaintRegion(TQPainter& painter, const KoRect &viewRegion, + View* view, const TQRect &paintRegion, const Sheet* sheet); - void loadPaper( QDomElement const & paper ); + void loadPaper( TQDomElement const & paper ); void saveOasisSettings( KoXmlWriter &settingsWriter ); - void loadOasisSettings( const QDomDocument&settingsDoc ); + void loadOasisSettings( const TQDomDocument&settingsDoc ); void loadOasisIgnoreList( const KoOasisSettings& settings ); KSPLoadingInfo *m_loadingInfo; }; |