summaryrefslogtreecommitdiffstats
path: root/lib/kofficecore/KoView.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kofficecore/KoView.h
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-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 'lib/kofficecore/KoView.h')
-rw-r--r--lib/kofficecore/KoView.h72
1 files changed, 37 insertions, 35 deletions
diff --git a/lib/kofficecore/KoView.h b/lib/kofficecore/KoView.h
index c2be52ec..dcab6745 100644
--- a/lib/kofficecore/KoView.h
+++ b/lib/kofficecore/KoView.h
@@ -19,8 +19,8 @@
#ifndef __koView_h__
#define __koView_h__
-#include <qwidget.h>
-#include <qguardedptr.h>
+#include <tqwidget.h>
+#include <tqguardedptr.h>
#include <kparts/part.h>
@@ -29,7 +29,7 @@
class KAction;
class KActionCollection;
-class QCustomEvent;
+class TQCustomEvent;
class KoDocument;
class KoMainWindow;
class KMainWindow;
@@ -54,9 +54,10 @@ namespace KParts
*
* Multiple views can be attached to one document at a time.
*/
-class KOFFICECORE_EXPORT KoView : public QWidget, public KParts::PartBase
+class KOFFICECORE_EXPORT KoView : public TQWidget, public KParts::PartBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Creates a new view for the document. Usually you don't create views yourself
@@ -67,12 +68,12 @@ public:
*
* @param document is the document which should be displayed in this view. This pointer
* must not be zero.
- * @param parent parent widget for this view.
+ * @param tqparent tqparent widget for this view.
* @param name Name of the view. The name is used in DCOP, so the name should
* match the pattern [A-Za-z_][A-Za-z_0-9]*.
*
*/
- KoView( KoDocument *document, QWidget *parent = 0, const char *name = 0 );
+ KoView( KoDocument *document, TQWidget *tqparent = 0, const char *name = 0 );
/**
* Destroys the view and unregisters at the document.
*/
@@ -108,7 +109,7 @@ public:
* @see KXMLGUIClient::actionCollection
* @see KoDocument::action
*/
- virtual KAction *action( const QDomElement &element ) const;
+ virtual KAction *action( const TQDomElement &element ) const;
/**
* Retrieves the document that is hit. This can be an embedded document.
@@ -120,7 +121,7 @@ public:
* may not succeed for a child that is not on the visible page. In those
* cases you need to reimplement this method.
*/
- virtual KoDocument *hitTest( const QPoint &pos );
+ virtual KoDocument *hitTest( const TQPoint &pos );
/**
* Retrieves the left border width that is displayed around the content if
@@ -159,7 +160,7 @@ public:
* data structures. You can use this mechanism to implement a zoom
* for example.
*
- * The method calls QWidget::update so that the scaled content
+ * The method calls TQWidget::update so that the scaled content
* is automatically displayed.
*
* The default scaling is 1.0 in both orientations.
@@ -178,7 +179,7 @@ public:
*
* By default this function returns a pointer to the view.
*/
- virtual QWidget *canvas() const;
+ virtual TQWidget *canvas() const;
/**
* Overload this function if the content will be displayed
@@ -201,8 +202,8 @@ public:
/**
* Overload this function if you need to perform some actions
* after KoView (the part widget) is inserted into canvas.
- * You should call for example addChild(QWidget*) method
- * of QScrollView here, if canvas is a viewport of QScrollView.
+ * You should call for example addChild(TQWidget*) method
+ * of TQScrollView here, if canvas is a viewport of TQScrollView.
*
* By default this function does nothing.
*/
@@ -233,7 +234,7 @@ public:
/**
* calls KoDocument::paintEverything()
*/
- virtual void paintEverything( QPainter &painter, const QRect &rect, bool transparent = false );
+ virtual void paintEverything( TQPainter &painter, const TQRect &rect, bool transparent = false );
/**
* @return TRUE if the document @p doc is represented in this view by
@@ -251,7 +252,7 @@ public:
*
* @deprecated, use applyViewTransformations / reverseViewTransformations instead.
*/
- virtual QWMatrix matrix() const KDE_DEPRECATED;
+ virtual TQWMatrix matrix() const KDE_DEPRECATED;
/**
* Apply the transformations that the view makes to its contents.
@@ -259,7 +260,7 @@ public:
* By default this simply applies the zoom().
* Reimplement to add some translation if needed (e.g. to center the page)
*/
- virtual QPoint applyViewTransformations( const QPoint& ) const;
+ virtual TQPoint applyViewTransformations( const TQPoint& ) const;
/**
* Reverse the transformations that the view makes to its contents,
@@ -268,17 +269,17 @@ public:
* By default this simply unzooms the point.
* Reimplement to add some translation if needed (e.g. to center the page)
*/
- virtual QPoint reverseViewTransformations( const QPoint& ) const;
+ virtual TQPoint reverseViewTransformations( const TQPoint& ) const;
/**
- * Overload for QRect, usually it's not needed to reimplement this one.
+ * Overload for TQRect, usually it's not needed to reimplement this one.
*/
- virtual QRect applyViewTransformations( const QRect& ) const;
+ virtual TQRect applyViewTransformations( const TQRect& ) const;
/**
- * Overload for QRect, usually it's not needed to reimplement this one.
+ * Overload for TQRect, usually it's not needed to reimplement this one.
*/
- virtual QRect reverseViewTransformations( const QRect& ) const;
+ virtual TQRect reverseViewTransformations( const TQRect& ) const;
/**
* @return the KoViewChild which is responsible for the @p view or 0.
@@ -337,18 +338,18 @@ public:
* If you use this method instead of using statusBar() directly,
* KoView will take care of removing the items when the view GUI is deactivated
* and readding them when it is reactivated.
- * The parameters are the same as QStatusBar::addWidget().
+ * The parameters are the same as TQStatusBar::addWidget().
*
* Note that you can't use KStatusBar methods (inserting text items by id).
* But you can create a KStatusBarLabel with a dummy id instead, and use
* it directly, to get the same look and feel.
*/
- void addStatusBarItem( QWidget * widget, int stretch = 0, bool permanent = false );
+ void addStatusBarItem( TQWidget * widget, int stretch = 0, bool permanent = false );
/**
* Remove a widget from the statusbar for this view.
*/
- void removeStatusBarItem( QWidget * widget );
+ void removeStatusBarItem( TQWidget * widget );
/**
* Show or hide all statusbar items. Used by KoMainWindow during saving.
@@ -391,13 +392,13 @@ public slots:
virtual void endOperation();
/**
- * Display a message in the status bar (calls QStatusBar::message())
+ * Display a message in the status bar (calls TQStatusBar::message())
* @todo rename to something more generic
*/
- void slotActionStatusText( const QString &text );
+ void slotActionStatusText( const TQString &text );
/**
- * End of the message in the status bar (calls QStatusBar::clear())
+ * End of the message in the status bar (calls TQStatusBar::clear())
* @todo rename to something more generic
*/
void slotClearStatusText();
@@ -408,7 +409,7 @@ protected:
* and KParts::GUIActivateEvent.
* The respective handlers are called if such an event is found.
*/
- virtual void customEvent( QCustomEvent *ev );
+ virtual void customEvent( TQCustomEvent *ev );
/**
* Handles the event KParts::PartActivateEvent.
@@ -427,7 +428,7 @@ signals:
void activated( bool active );
void selected( bool select );
- void autoScroll(const QPoint &scrollDistance);
+ void autoScroll(const TQPoint &scrollDistance);
void childSelected( KoDocumentChild *child );
void childUnselected( KoDocumentChild *child );
@@ -435,9 +436,9 @@ signals:
void childActivated( KoDocumentChild *child );
void childDeactivated( KoDocumentChild *child );
- void regionInvalidated( const QRegion &region, bool erase );
+ void regionInvalidated( const TQRegion &region, bool erase );
- void invalidated();
+ void tqinvalidated();
// KDE invents public signals :)
#undef signals
@@ -449,7 +450,7 @@ signals:
* the embedding of an image into the current
* document. Used e.g. by the scan-plugin
*/
- void embeddImage(const QString &filename);
+ void embeddImage(const TQString &filename);
#undef signals
#define signals protected
@@ -472,12 +473,13 @@ private:
class KoViewChild : public KoChild
{
Q_OBJECT
+ TQ_OBJECT
public:
KoViewChild( KoDocumentChild *child, KoView *_parentView );
virtual ~KoViewChild();
KoDocumentChild *documentChild() const { return m_child; }
- KoView *parentView() const { return m_parentView; }
+ KoView *tqparentView() const { return m_parentView; }
KoFrame *frame() const { return m_frame; }
void setInitialFrameGeometry();
@@ -492,9 +494,9 @@ private slots:
void slotDocGeometryChanged();
private:
- QGuardedPtr<KoDocumentChild> m_child;
- QGuardedPtr<KoFrame> m_frame;
- QGuardedPtr<KoView> m_parentView;
+ TQGuardedPtr<KoDocumentChild> m_child;
+ TQGuardedPtr<KoFrame> m_frame;
+ TQGuardedPtr<KoView> m_parentView;
class KoViewChildPrivate;
KoViewChildPrivate *d;
};