summaryrefslogtreecommitdiffstats
path: root/ksirc/kstextview.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /ksirc/kstextview.h
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/kstextview.h')
-rw-r--r--ksirc/kstextview.h39
1 files changed, 20 insertions, 19 deletions
diff --git a/ksirc/kstextview.h b/ksirc/kstextview.h
index 6e852b08..f8bf755f 100644
--- a/ksirc/kstextview.h
+++ b/ksirc/kstextview.h
@@ -40,13 +40,13 @@ struct StringPtr
StringPtr( const TQChar *_ptr, uint _len )
: ptr( _ptr ), len( _len ) {}
explicit StringPtr( const TQString &s ) // use with care!
- : ptr( s.unicode() ), len( s.length() ) {}
+ : ptr( s.tqunicode() ), len( s.length() ) {}
inline bool isNull() const { return ptr == 0; }
// makes deep copy
- inline TQString toQString() const
- { return ( ptr && len > 0 ) ? TQString( ptr, len ) : TQString::null; }
+ inline TQString toTQString() const
+ { return ( ptr && len > 0 ) ? TQString( ptr, len ) : TQString(); }
const TQChar *ptr;
uint len;
@@ -81,12 +81,12 @@ public:
ConstIterator findAttribute( const char *key ) const
{
TQString qkey( key );
- return find( StringPtr( qkey ) );
+ return tqfind( StringPtr( qkey ) );
}
Iterator findAttribute( const char *key )
{
TQString qkey( key );
- return find( StringPtr( qkey ) );
+ return tqfind( StringPtr( qkey ) );
}
StringPtr operator[]( const char *key ) const
@@ -142,8 +142,8 @@ class SelectionPoint;
class Item
{
public:
- enum LayoutResetStatus { DeleteItem, KeepItem };
- enum SelectionStatus { SelectionStart = 0, InSelection, SelectionEnd, SelectionBoth,
+ enum LayoutResettqStatus { DeleteItem, KeepItem };
+ enum SelectiontqStatus { SelectionStart = 0, InSelection, SelectionEnd, SelectionBoth,
NoSelection };
enum SelectionAccuracy { SelectExact, SelectFuzzy };
@@ -163,13 +163,13 @@ public:
virtual Item *breakLine( int width );
- virtual LayoutResetStatus resetLayout() = 0;
+ virtual LayoutResettqStatus resetLayout() = 0;
virtual int calcSelectionOffset( int x );
- void setSelectionStatus( SelectionStatus status ) { m_selection = status; }
+ void setSelectiontqStatus( SelectiontqStatus status ) { m_selection = status; }
- SelectionStatus selectionStatus() const { return m_selection; }
+ SelectiontqStatus selectiontqStatus() const { return m_selection; }
void selectionOffsets( int &startOffset, int &endOffset );
@@ -194,7 +194,7 @@ protected:
virtual void calcExtends() const = 0;
- SelectionStatus m_selection;
+ SelectiontqStatus m_selection;
TextLine *m_line;
TextParag *m_parag;
ItemProperties m_props;
@@ -211,7 +211,7 @@ public:
virtual Item *breakLine( int width );
- virtual LayoutResetStatus resetLayout();
+ virtual LayoutResettqStatus resetLayout();
virtual int calcSelectionOffset( int x );
@@ -247,7 +247,7 @@ public:
virtual void paint( TQPainter &painter );
- virtual LayoutResetStatus resetLayout();
+ virtual LayoutResettqStatus resetLayout();
protected:
virtual void calcExtends() const;
@@ -323,7 +323,7 @@ public:
void clearSelection();
// transfers ownership
- void appendItem( Item *i, int layoutUpdatePolicy = NoUpdate );
+ void appendItem( Item *i, int tqlayoutUpdatePolicy = NoUpdate );
bool isEmpty() const { return m_items.isEmpty(); }
@@ -354,7 +354,7 @@ public:
~TextParag();
- void layout( int width );
+ void tqlayout( int width );
void paint( TQPainter &p, int y, int maxY );
@@ -464,15 +464,16 @@ private:
int m_overshoot;
};
-class TextView : public QScrollView
+class TextView : public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
friend class Item;
friend class TextChunk;
friend class TextParag;
friend class TextParagIterator;
public:
- TextView( TQWidget *parent, const char *name = 0 );
+ TextView( TQWidget *tqparent, const char *name = 0 );
virtual ~TextView();
virtual void clear();
@@ -481,7 +482,7 @@ public:
bool removeParag( const TextParagIterator &parag );
- void clearSelection( bool repaint = false ); // ### re-consider the repaint arg...
+ void clearSelection( bool tqrepaint = false ); // ### re-consider the tqrepaint arg...
TQString selectedText() const { return m_selectedText; }
@@ -536,7 +537,7 @@ private:
SelectionPoint *selectionStart();
SelectionPoint *selectionEnd();
- void layout( bool force = true );
+ void tqlayout( bool force = true );
Item *itemAt( const TQPoint &pos, SelectionPoint *selectionInfo = 0,
Item::SelectionAccuracy accuracy = Item::SelectExact );