summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrTextObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'kpresenter/KPrTextObject.h')
-rw-r--r--kpresenter/KPrTextObject.h122
1 files changed, 62 insertions, 60 deletions
diff --git a/kpresenter/KPrTextObject.h b/kpresenter/KPrTextObject.h
index b30754c7..a85b2e8a 100644
--- a/kpresenter/KPrTextObject.h
+++ b/kpresenter/KPrTextObject.h
@@ -28,12 +28,12 @@
#include <KoStyleCollection.h> // for KoStyleChangeDefMap
#include <KoStyleStack.h>
-class QDragObject;
+class TQDragObject;
class KoSavingContext;
class KPrView;
class KPrDocument;
-class QDomElement;
+class TQDomElement;
class TextCmd;
class KPrGradient;
@@ -49,9 +49,10 @@ class DCOPObject;
class KPrPage;
class KoParagStyle;
-class KPrTextObject : public QObject, public KPr2DObject, public KoTextFlow
+class KPrTextObject : public TQObject, public KPr2DObject, public KoTextFlow
{
Q_OBJECT
+ TQ_OBJECT
public:
KPrTextObject( KPrDocument *doc );
virtual ~KPrTextObject();
@@ -67,7 +68,7 @@ public:
virtual ObjType getType() const
{ return OT_TEXT; }
- virtual QString getTypeString() const
+ virtual TQString getTypeString() const
{ return i18n("Text"); }
virtual bool getDrawEditRect() const
@@ -76,32 +77,32 @@ public:
{ return drawEmpty; }
virtual int getSubPresSteps() const;
- virtual QBrush getBrush() const;
+ virtual TQBrush getBrush() const;
- virtual void setShadowParameter(int _distance,ShadowDirection _direction,const QColor &_color);
+ virtual void setShadowParameter(int _distance,ShadowDirection _direction,const TQColor &_color);
- virtual QDomDocumentFragment save( QDomDocument& doc, double offset );
- virtual double load(const QDomElement &element);
- virtual void loadOasis(const QDomElement &element, KoOasisContext& context, KPrLoadingInfo *info);
+ virtual TQDomDocumentFragment save( TQDomDocument& doc, double offset );
+ virtual double load(const TQDomElement &element);
+ virtual void loadOasis(const TQDomElement &element, KoOasisContext& context, KPrLoadingInfo *info);
virtual void saveOasisMarginElement( KoGenStyle &styleobjectauto ) const;
- virtual void paint( QPainter *_painter, KoTextZoomHandler*_zoomHandler,
+ virtual void paint( TQPainter *_painter, KoTextZoomHandler*_zoomHandler,
int pageNum, bool drawingShadow, bool drawContour );
- void paint( QPainter *_painter, KoTextZoomHandler*_zoomHandler, bool onlyChanged, KoTextCursor* cursor,
+ void paint( TQPainter *_painter, KoTextZoomHandler*_zoomHandler, bool onlyChanged, KoTextCursor* cursor,
bool resetChanged, bool drawContour );
- void paintEdited( QPainter *_painter, KoTextZoomHandler*_zoomHandler,
+ void paintEdited( TQPainter *_painter, KoTextZoomHandler*_zoomHandler,
bool onlyChanged, KoTextCursor* cursor, bool resetChanged );
- void drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorVisible, KPrCanvas* /*canvas*/ );
+ void drawCursor( TQPainter *p, KoTextCursor *cursor, bool cursorVisible, KPrCanvas* /*canvas*/ );
void recalcPageNum( KPrPage *page );
/// Return the current text cursor position
- QPoint cursorPos(KPrCanvas*, KoTextCursor *) const;
+ TQPoint cursorPos(KPrCanvas*, KoTextCursor *) const;
/** Return the contained text object */
KoTextObject * textObject() const { return m_textobj; }
- virtual void addTextObjects( QPtrList<KoTextObject> &lst ) const {
+ virtual void addTextObjects( TQPtrList<KoTextObject> &lst ) const {
if ( !isProtectContent() )
lst.append( m_textobj );
}
@@ -114,19 +115,19 @@ public:
void applyStyleChange( KoStyleChangeDefMap changed );
void removeHighlight();
- void highlightPortion( KoTextParag * parag, int index, int length, KPrCanvas *canvas, bool repaint, KDialogBase* dialog = 0 );
+ void highlightPortion( KoTextParag * parag, int index, int length, KPrCanvas *canvas, bool tqrepaint, KDialogBase* dialog = 0 );
- KCommand * pasteOasis( KoTextCursor * cursor, const QByteArray & data, bool removeSelected );
+ KCommand * pasteOasis( KoTextCursor * cursor, const TQByteArray & data, bool removeSelected );
- void saveParagraph( QDomDocument& doc,
+ void saveParagraph( TQDomDocument& doc,
KoTextParag * parag,
- QDomElement &parentElem,
+ TQDomElement &tqparentElem,
int from /* default 0 */,
int to /* default length()-2 */ );
- KoParagLayout loadParagLayout( QDomElement & parentElem, KPrDocument *doc, bool useRefStyle);
+ KoParagLayout loadParagLayout( TQDomElement & tqparentElem, KPrDocument *doc, bool useRefStyle);
- static KoTextFormat loadFormat( QDomElement &n, KoTextFormat * refFormat, const QFont & defaultFont,
- const QString & defaultLanguage, bool hyphen );
+ static KoTextFormat loadFormat( TQDomElement &n, KoTextFormat * refFormat, const TQFont & defaultFont,
+ const TQString & defaultLanguage, bool hyphen );
void setEditingTextObj( bool _edit ) { editingTextObj = _edit; }
@@ -134,9 +135,9 @@ public:
KCommand *textObjectToContents();
void setProtectContent ( bool _protect ) { textObject()->setProtectContent(_protect);}
bool isProtectContent() const { return textObject()->protectContent();}
- void loadVariable( QValueList<QDomElement> & listVariable,KoTextParag *lastParag, int offset=0 );
+ void loadVariable( TQValueList<TQDomElement> & listVariable,KoTextParag *lastParag, int offset=0 );
- void layout();
+ void tqlayout();
/** Reimplemented from KoTextFlow */
int availableHeight() const;
@@ -168,14 +169,14 @@ public:
VerticalAlignmentType verticalAlignment() const { return m_textVertAlign; }
void setVerticalAligment( VerticalAlignmentType _type) ;
- double alignmentValue() const { return alignVertical; }
+ double tqalignmentValue() const { return alignVertical; }
virtual KPrTextObject *nextTextObject() { return this;}
- static void saveFormat( QDomElement & element, KoTextFormat*lastFormat );
+ static void saveFormat( TQDomElement & element, KoTextFormat*lastFormat );
- QPoint viewToInternal( const QPoint & pos, KPrCanvas* canvas ) const;
+ TQPoint viewToInternal( const TQPoint & pos, KPrCanvas* canvas ) const;
signals:
- void repaintChanged( KPrTextObject* );
+ void tqrepaintChanged( KPrTextObject* );
protected slots:
void slotFormatChanged(const KoTextFormat &);
@@ -185,16 +186,16 @@ protected:
virtual const char * getOasisElementName() const;
virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const;
- virtual QDomElement saveKTextObject( QDomDocument& doc );
- QDomElement saveHelper(const QString &tmpText,KoTextFormat*lastFormat ,QDomDocument &doc);
+ virtual TQDomElement saveKTextObject( TQDomDocument& doc );
+ TQDomElement saveHelper(const TQString &tmpText,KoTextFormat*lastFormat ,TQDomDocument &doc);
virtual void fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainStyles ) const;
- virtual void loadKTextObject( const QDomElement &e );
- void drawText( QPainter* _painter, KoTextZoomHandler* zoomHandler, bool onlyChanged, KoTextCursor* cursor, bool resetChanged );
- void drawParags( QPainter *p, KoTextZoomHandler* zoomHandler, const QColorGroup& cg, int from, int to );
- void saveParagLayout( const KoParagLayout& layout, QDomElement & parentElem );
- void invalidate();
+ virtual void loadKTextObject( const TQDomElement &e );
+ void drawText( TQPainter* _painter, KoTextZoomHandler* zoomHandler, bool onlyChanged, KoTextCursor* cursor, bool resetChanged );
+ void drawParags( TQPainter *p, KoTextZoomHandler* zoomHandler, const TQColorGroup& cg, int from, int to );
+ void saveParagLayout( const KoParagLayout& tqlayout, TQDomElement & tqparentElem );
+ void tqinvalidate();
void recalcVerticalAlignment();
virtual KoPen defaultPen() const;
protected slots:
@@ -204,7 +205,7 @@ protected slots:
private:
KPrTextObject &operator=( const KPrTextObject & );
void shadowCompatibility();
- static const QString &tagTEXTOBJ, &attrLineSpacing, &attrParagSpacing,
+ static const TQString &tagTEXTOBJ, &attrLineSpacing, &attrParagSpacing,
&attrMargin, &attrBulletType1, &attrBulletType2,
&attrBulletType3, &attrBulletType4, &attrBulletColor1,
&attrBulletColor2, &attrBulletColor3, &attrBulletColor4,
@@ -229,6 +230,7 @@ private:
class KPrTextView : public KoTextView
{
Q_OBJECT
+ TQ_OBJECT
public:
KPrTextView( KPrTextObject * txtObj, KPrCanvas *_canvas, bool temp=false );
virtual ~KPrTextView();
@@ -238,41 +240,41 @@ public:
KoTextView * textView() { return this; }
KPrTextObject * kpTextObject() const { return m_kptextobj; }
- void keyPressEvent( QKeyEvent * );
- void keyReleaseEvent( QKeyEvent * );
- void imStartEvent( QIMEvent * );
- void imComposeEvent( QIMEvent * );
- void imEndEvent( QIMEvent * );
- void mousePressEvent( QMouseEvent *, const QPoint &);
- void mouseMoveEvent( QMouseEvent *, const QPoint & );
- void mouseReleaseEvent( QMouseEvent *, const QPoint & );
- void mouseDoubleClickEvent( QMouseEvent *, const QPoint &);
- void dragEnterEvent( QDragEnterEvent * );
- void dragMoveEvent( QDragMoveEvent *, const QPoint & );
- void dropEvent( QDropEvent * );
+ void keyPressEvent( TQKeyEvent * );
+ void keyReleaseEvent( TQKeyEvent * );
+ void imStartEvent( TQIMEvent * );
+ void imComposeEvent( TQIMEvent * );
+ void imEndEvent( TQIMEvent * );
+ void mousePressEvent( TQMouseEvent *, const TQPoint &);
+ void mouseMoveEvent( TQMouseEvent *, const TQPoint & );
+ void mouseReleaseEvent( TQMouseEvent *, const TQPoint & );
+ void mouseDoubleClickEvent( TQMouseEvent *, const TQPoint &);
+ void dragEnterEvent( TQDragEnterEvent * );
+ void dragMoveEvent( TQDragMoveEvent *, const TQPoint & );
+ void dropEvent( TQDropEvent * );
void clearSelection();
void selectAll(bool select = true);
virtual void drawCursor( bool b );
const KoParagLayout & currentParagLayout() const { return m_paragLayout; }
- void showPopup( KPrView *view, const QPoint &point, QPtrList<KAction> &actionList );
+ void showPopup( KPrView *view, const TQPoint &point, TQPtrList<KAction> &actionList );
void insertVariable( int type, int subtype = 0 );
- void insertCustomVariable( const QString &name);
- void insertLink(const QString &_linkName, const QString & hrefName);
+ void insertCustomVariable( const TQString &name);
+ void insertLink(const TQString &_linkName, const TQString & hrefName);
void insertVariable( KoVariable *var, KoTextFormat *format =0,
bool refreshCustomMenu =false /*don't refresh variable custom menu all the time */);
void terminate(bool removeSelection=true);
- void insertComment(const QString &_note);
+ void insertComment(const TQString &_note);
/** return true if some text is selected */
bool hasSelection() const;
virtual void removeToolTipCompletion();
- bool isLinkVariable(const QPoint &);
+ bool isLinkVariable(const TQPoint &);
void openLink();
- QPoint viewToInternal( const QPoint & pos ) const;
+ TQPoint viewToInternal( const TQPoint & pos ) const;
public slots:
void cut();
@@ -287,14 +289,14 @@ protected slots:
virtual void startDrag();
protected:
- bool canDecode( QMimeSource *e );
- QDragObject * newDrag( QWidget * parent );
+ bool canDecode( TQMimeSource *e );
+ TQDragObject * newDrag( TQWidget * tqparent );
// Reimplemented from KoTextView
- virtual void doAutoFormat( KoTextCursor* cursor, KoTextParag *parag, int index, QChar ch );
- virtual bool doIgnoreDoubleSpace(KoTextParag * parag, int index,QChar ch );
+ virtual void doAutoFormat( KoTextCursor* cursor, KoTextParag *parag, int index, TQChar ch );
+ virtual bool doIgnoreDoubleSpace(KoTextParag * parag, int index,TQChar ch );
virtual bool doCompletion( KoTextCursor* cursor, KoTextParag *parag, int index );
virtual bool doToolTipCompletion( KoTextCursor* , KoTextParag *, int, int );
- virtual void showToolTipBox(KoTextParag *parag, int index, QWidget *widget, const QPoint &pos);
+ virtual void showToolTipBox(KoTextParag *parag, int index, TQWidget *widget, const TQPoint &pos);
virtual void textIncreaseIndent();
virtual bool textDecreaseIndent();
virtual void showFormat( KoTextFormat *format ) ;
@@ -305,7 +307,7 @@ protected:
KPrTextObject *m_kptextobj;
KPrCanvas *m_canvas;
KoParagLayout m_paragLayout;
- QPtrList<KAction> m_actionList; // for the kodatatools
+ TQPtrList<KAction> m_actionList; // for the kodatatools
};