From 4ae0c208b66e0f7954e194384464fe2d0a2c56dd Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:51:49 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kbabel/kbabel/mymultilineedit.h | 92 ++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'kbabel/kbabel/mymultilineedit.h') diff --git a/kbabel/kbabel/mymultilineedit.h b/kbabel/kbabel/mymultilineedit.h index 30771610..4f076af5 100644 --- a/kbabel/kbabel/mymultilineedit.h +++ b/kbabel/kbabel/mymultilineedit.h @@ -36,7 +36,7 @@ #define MYMULTILINEEDIT_H #include -#include +#include namespace KBabel { @@ -51,7 +51,7 @@ class MyMultiLineEdit : public KTextEdit { Q_OBJECT public: - MyMultiLineEdit(int ID,QWidget* parent,const char* name=0); + MyMultiLineEdit(int ID,TQWidget* parent,const char* name=0); /** applies cmd to the displayed text, but does not emit @@ -79,7 +79,7 @@ public: */ int endOfLastMarkedText(); - virtual void insertAt ( const QString & s, int line, int col, bool mark = false ); + virtual void insertAt ( const TQString & s, int line, int col, bool mark = false ); virtual void removeLine ( int line ); int pos2Offset(uint paragraph, uint index); @@ -98,7 +98,7 @@ public: /** * need to override deleting of popup menus :-( */ - void contentsContextMenuEvent( QContextMenuEvent *e ); + void contentsContextMenuEvent( TQContextMenuEvent *e ); /** * need to reimplement overwrite mode :-( @@ -110,27 +110,27 @@ public slots: virtual void clear(); virtual void paste(); virtual void setReadOnly(bool on); - virtual void setContextMenu( QPopupMenu *menu ); - virtual void setText(const QString& s); + virtual void setContextMenu( TQPopupMenu *menu ); + virtual void setText(const TQString& s); virtual void doKeyboardAction( KeyboardAction action ); virtual void removeSelectedText(int selNum = 0); virtual void onSelectionChanged(); /** - reimplemented overwrite mode, since QTextEdit handles this internally and does + reimplemented overwrite mode, since TQTextEdit handles this internally and does not use any accessible virtual methods :-((. */ virtual void setOverwriteMode(bool b); protected: - virtual void focusInEvent(QFocusEvent*); - virtual QPopupMenu *createPopupMenu(); - virtual QPopupMenu *createPopupMenu(const QPoint &pos); + virtual void focusInEvent(TQFocusEvent*); + virtual TQPopupMenu *createPopupMenu(); + virtual TQPopupMenu *createPopupMenu(const TQPoint &pos); /* the parent handles this */ - virtual void wheelEvent(QWheelEvent*); + virtual void wheelEvent(TQWheelEvent*); bool emitUndo; @@ -154,7 +154,7 @@ protected: bool _dontUpdate; protected slots: - virtual void insert ( const QString & text, bool indent = FALSE, bool checkNewLine = TRUE, bool removeSelected = TRUE ); + virtual void insert ( const TQString & text, bool indent = FALSE, bool checkNewLine = TRUE, bool removeSelected = TRUE ); virtual void emitCursorPosition(); signals: @@ -165,7 +165,7 @@ protected: int _myID; private: - QPopupMenu *_menu; + TQPopupMenu *_menu; bool _overwrite; }; @@ -176,7 +176,7 @@ class MsgMultiLineEdit : public MyMultiLineEdit public: enum TextColor { NormalColor, ErrorColor }; - MsgMultiLineEdit(int ID, KSpell* spell=0, QWidget* parent=0,const char* name=0); + MsgMultiLineEdit(int ID, KSpell* spell=0, TQWidget* parent=0,const char* name=0); virtual ~MsgMultiLineEdit(); /** is displaying surrounding quotes enabled? */ @@ -192,8 +192,8 @@ public: bool highlightBg() const { return _highlightBg; } /** enable or disable highlighting background*/ void setHighlightBg(bool on); - QColor bgColor() const { return _bgColor; } - void setBgColor(const QColor& color); + TQColor bgColor() const { return _bgColor; } + void setBgColor(const TQColor& color); bool spacePoints() const { return _spacePoints; } void setSpacePoints(bool on); @@ -201,17 +201,17 @@ public: bool highlightSyntax() const { return _hlSyntax; } void highlight(); void setHighlightSyntax(bool on); - void setHighlightColors(const QColor& quoteColor, const QColor& unquoteColor - , const QColor& cformatColor, const QColor& accelColor, const QColor& tagColor); + void setHighlightColors(const TQColor& quoteColor, const TQColor& unquoteColor + , const TQColor& cformatColor, const TQColor& accelColor, const TQColor& tagColor); - void setFont(const QFont& font); + void setFont(const TQFont& font); void setDiffMode(bool on); void setDiffDisplayMode(bool underlineAdded, bool strikeOutDeleted); - void setDiffColors(const QColor& addColor, const QColor& delColor); + void setDiffColors(const TQColor& addColor, const TQColor& delColor); - void setTextColor(const QColor &color); - void setErrorColor(const QColor &color); + void setTextColor(const TQColor &color); + void setErrorColor(const TQColor &color); void setCurrentColor(const TextColor color); @@ -220,9 +220,9 @@ public: void selectTag(int start, int length); public slots: - virtual void setText(const QString& s); + virtual void setText(const TQString& s); void paintSpacePoints(); - void paintSpacePoints( int para, int pos ); // overloaded for signal QTextEdit::cursorPositionChanged + void paintSpacePoints( int para, int pos ); // overloaded for signal TQTextEdit::cursorPositionChanged /** * reimplemented to call highlight() @@ -237,49 +237,49 @@ public slots: void ensureCursorVisible(); protected: - virtual void paintEvent (QPaintEvent * event ); - virtual void drawContents( QPainter *painter, int clipx, int clipy, int clipw, int cliph ); + virtual void paintEvent (TQPaintEvent * event ); + virtual void drawContents( TQPainter *painter, int clipx, int clipy, int clipw, int cliph ); - virtual void keyPressEvent(QKeyEvent*); - virtual void keyReleaseEvent(QKeyEvent*); + virtual void keyPressEvent(TQKeyEvent*); + virtual void keyReleaseEvent(TQKeyEvent*); private: /** * Computes the pixel position in line which corresponds to * character position xIndex */ - QRect mapToView( int para, int index ); + TQRect mapToView( int para, int index ); /** * tests if the character in string str at position col is masked with * '\' by counting the number of '\' backwards */ - static bool isMasked(QString *str,uint col); + static bool isMasked(TQString *str,uint col); private: bool _quotes; bool _cleverEditing; bool _highlightBg; bool _spacePoints; - QColor _bgColor; - QColor _textColor; - QColor _errorColor; - QColor _currentColor; + TQColor _bgColor; + TQColor _textColor; + TQColor _errorColor; + TQColor _currentColor; - QPixmap* _whitespace; - QPixmap* _whitespaceNB; - QPixmap* _errorWhitespace; - QPixmap* _errorWhitespaceNB; + TQPixmap* _whitespace; + TQPixmap* _whitespaceNB; + TQPixmap* _errorWhitespace; + TQPixmap* _errorWhitespaceNB; int _wsOffsetX; int _wsOffsetY; bool _hlSyntax; - QColor _quoteColor; - QColor _unquoteColor; - QColor _cformatColor; - QColor _accelColor; - QColor _tagColor; + TQColor _quoteColor; + TQColor _unquoteColor; + TQColor _cformatColor; + TQColor _accelColor; + TQColor _tagColor; struct DiffInfo { @@ -288,12 +288,12 @@ private: int end; }; - QPtrVector< QValueList > diffPos; + TQPtrVector< TQValueList > diffPos; bool _showDiff; bool _diffUnderlineAdd; bool _diffStrikeOutDel; - QColor _diffAddColor; - QColor _diffDelColor; + TQColor _diffAddColor; + TQColor _diffDelColor; // for Alt+123 feature int _currentUnicodeNumber; -- cgit v1.2.1