summaryrefslogtreecommitdiffstats
path: root/khexedit/lib
diff options
context:
space:
mode:
Diffstat (limited to 'khexedit/lib')
-rw-r--r--khexedit/lib/controller/kchareditor.cpp2
-rw-r--r--khexedit/lib/controller/kchareditor.h2
-rw-r--r--khexedit/lib/controller/keditor.cpp2
-rw-r--r--khexedit/lib/controller/keditor.h6
-rw-r--r--khexedit/lib/controller/knavigator.cpp4
-rw-r--r--khexedit/lib/controller/kvalueeditor.cpp2
-rw-r--r--khexedit/lib/controller/kvalueeditor.h2
-rw-r--r--khexedit/lib/kbuffercoltextexport.cpp14
-rw-r--r--khexedit/lib/kbuffercoltextexport.h8
-rw-r--r--khexedit/lib/kbuffercolumn.cpp86
-rw-r--r--khexedit/lib/kbuffercolumn.h38
-rw-r--r--khexedit/lib/kbuffercoord.h122
-rw-r--r--khexedit/lib/kbuffercursor.cpp64
-rw-r--r--khexedit/lib/kbuffercursor.h38
-rw-r--r--khexedit/lib/kbufferdrag.cpp14
-rw-r--r--khexedit/lib/kbufferdrag.h6
-rw-r--r--khexedit/lib/kbufferlayout.cpp66
-rw-r--r--khexedit/lib/kbufferlayout.h56
-rw-r--r--khexedit/lib/kbufferranges.cpp46
-rw-r--r--khexedit/lib/kbufferranges.h38
-rw-r--r--khexedit/lib/kcharcoltextexport.cpp2
-rw-r--r--khexedit/lib/kcharcoltextexport.h2
-rw-r--r--khexedit/lib/kcharcolumn.cpp4
-rw-r--r--khexedit/lib/kcharcolumn.h6
-rw-r--r--khexedit/lib/kcoordrange.h12
-rw-r--r--khexedit/lib/kcoordrangelist.cpp2
-rw-r--r--khexedit/lib/khexedit.cpp64
-rw-r--r--khexedit/lib/khexedit.h48
-rw-r--r--khexedit/lib/kvaluecoltextexport.cpp2
-rw-r--r--khexedit/lib/kvaluecoltextexport.h2
-rw-r--r--khexedit/lib/kvaluecolumn.cpp4
-rw-r--r--khexedit/lib/kvaluecolumn.h8
32 files changed, 386 insertions, 386 deletions
diff --git a/khexedit/lib/controller/kchareditor.cpp b/khexedit/lib/controller/kchareditor.cpp
index 9f58245..a401651 100644
--- a/khexedit/lib/controller/kchareditor.cpp
+++ b/khexedit/lib/controller/kchareditor.cpp
@@ -27,7 +27,7 @@
using namespace KHE;
-KCharEditor::KCharEditor( KCharColumn *CC, KBufferCursor *BC, KHexEdit *HE, KController *P )
+KCharEditor::KCharEditor( KCharColumn *CC, TDEBufferCursor *BC, KHexEdit *HE, KController *P )
: KEditor( BC, HE, P ),
CharColumn( CC )
{
diff --git a/khexedit/lib/controller/kchareditor.h b/khexedit/lib/controller/kchareditor.h
index fba1f66..e15d616 100644
--- a/khexedit/lib/controller/kchareditor.h
+++ b/khexedit/lib/controller/kchareditor.h
@@ -29,7 +29,7 @@ class KCharColumn;
class KCharEditor : public KEditor
{
public:
- KCharEditor( KCharColumn *CC, KBufferCursor *BC, KHexEdit *HE, KController *P );
+ KCharEditor( KCharColumn *CC, TDEBufferCursor *BC, KHexEdit *HE, KController *P );
public: // KEditor API
virtual bool handleKeyPress( TQKeyEvent *KeyEvent );
diff --git a/khexedit/lib/controller/keditor.cpp b/khexedit/lib/controller/keditor.cpp
index 513f41d..b99f099 100644
--- a/khexedit/lib/controller/keditor.cpp
+++ b/khexedit/lib/controller/keditor.cpp
@@ -28,7 +28,7 @@
using namespace KHE;
-KEditor::KEditor( KBufferCursor *BC, KHexEdit* HE, KController *P )
+KEditor::KEditor( TDEBufferCursor *BC, KHexEdit* HE, KController *P )
: KController( HE, P ),
BufferCursor( BC )
{
diff --git a/khexedit/lib/controller/keditor.h b/khexedit/lib/controller/keditor.h
index e4fa06c..6621cb4 100644
--- a/khexedit/lib/controller/keditor.h
+++ b/khexedit/lib/controller/keditor.h
@@ -26,7 +26,7 @@
namespace KHE
{
-class KBufferCursor;
+class TDEBufferCursor;
class KEditor : public KController
{
@@ -34,7 +34,7 @@ class KEditor : public KController
enum KEditAction { CharDelete, WordDelete, CharBackspace, WordBackspace };
protected:
- KEditor( KBufferCursor *BC, KHexEdit *HE, KController *P );
+ KEditor( TDEBufferCursor *BC, KHexEdit *HE, KController *P );
public: // API
virtual bool handleKeyPress( TQKeyEvent *KeyEvent );
@@ -44,7 +44,7 @@ class KEditor : public KController
void doEditAction( KEditAction Action );
protected:
- KBufferCursor *BufferCursor;
+ TDEBufferCursor *BufferCursor;
};
}
diff --git a/khexedit/lib/controller/knavigator.cpp b/khexedit/lib/controller/knavigator.cpp
index 156068e..9ae06c9 100644
--- a/khexedit/lib/controller/knavigator.cpp
+++ b/khexedit/lib/controller/knavigator.cpp
@@ -86,8 +86,8 @@ void KNavigator::moveCursor( KMoveAction Action, bool Select )
{
HexEdit->pauseCursor( true );
- KBufferCursor *BufferCursor = HexEdit->BufferCursor;
- KBufferRanges *BufferRanges = HexEdit->BufferRanges;
+ TDEBufferCursor *BufferCursor = HexEdit->BufferCursor;
+ TDEBufferRanges *BufferRanges = HexEdit->BufferRanges;
if( Select )
{
diff --git a/khexedit/lib/controller/kvalueeditor.cpp b/khexedit/lib/controller/kvalueeditor.cpp
index 70b9c41..822ccaa 100644
--- a/khexedit/lib/controller/kvalueeditor.cpp
+++ b/khexedit/lib/controller/kvalueeditor.cpp
@@ -27,7 +27,7 @@
using namespace KHE;
-KValueEditor::KValueEditor( KValueColumn *VC, KBufferCursor *BC, KHexEdit* HE, KController *P )
+KValueEditor::KValueEditor( KValueColumn *VC, TDEBufferCursor *BC, KHexEdit* HE, KController *P )
: KEditor( BC, HE, P ),
ValueColumn( VC ),
InEditMode( false ),
diff --git a/khexedit/lib/controller/kvalueeditor.h b/khexedit/lib/controller/kvalueeditor.h
index 4656c36..7fb1292 100644
--- a/khexedit/lib/controller/kvalueeditor.h
+++ b/khexedit/lib/controller/kvalueeditor.h
@@ -35,7 +35,7 @@ class KValueEditor: public KEditor
{ EnterValue, IncValue, DecValue, ValueAppend, ValueEdit, LeaveValue, CancelValue, ValueBackspace };
public:
- KValueEditor( KValueColumn *VC, KBufferCursor *BC, KHexEdit *HE, KController *P );
+ KValueEditor( KValueColumn *VC, TDEBufferCursor *BC, KHexEdit *HE, KController *P );
virtual ~KValueEditor();
public: // KEditor API
diff --git a/khexedit/lib/kbuffercoltextexport.cpp b/khexedit/lib/kbuffercoltextexport.cpp
index 142504c..09ed8a3 100644
--- a/khexedit/lib/kbuffercoltextexport.cpp
+++ b/khexedit/lib/kbuffercoltextexport.cpp
@@ -28,12 +28,12 @@ using namespace KHE;
static const int DefaultTEByteSpacingWidth = 1;
static const int TEGroupSpacingWidth = 3;
-TQString KBufferColTextExport::whiteSpace( uint s )
+TQString TDEBufferColTextExport::whiteSpace( uint s )
{
return TQString().fill( ' ', s );
}
-KBufferColTextExport::KBufferColTextExport( const KBufferColumn* BufferColumn, const char *D,
+TDEBufferColTextExport::TDEBufferColTextExport( const TDEBufferColumn* BufferColumn, const char *D,
KCoordRange CR, int ByteWidth )
: Data( D ),
CoordRange( CR )
@@ -74,19 +74,19 @@ KBufferColTextExport::KBufferColTextExport( const KBufferColumn* BufferColumn, c
}
-KBufferColTextExport::~KBufferColTextExport()
+TDEBufferColTextExport::~TDEBufferColTextExport()
{
delete [] Pos;
}
-int KBufferColTextExport::charsPerLine() const
+int TDEBufferColTextExport::charsPerLine() const
{
return NoOfCharsPerLine;
}
-void KBufferColTextExport::printFirstLine( TQString &T, int Line ) const
+void TDEBufferColTextExport::printFirstLine( TQString &T, int Line ) const
{
PrintLine = Line;
PrintData = Data;
@@ -94,13 +94,13 @@ void KBufferColTextExport::printFirstLine( TQString &T, int Line ) const
}
-void KBufferColTextExport::printNextLine( TQString &T ) const
+void TDEBufferColTextExport::printNextLine( TQString &T ) const
{
print( T );
}
-void KBufferColTextExport::print( TQString &T ) const
+void TDEBufferColTextExport::print( TQString &T ) const
{
T.append( whiteSpace(NoOfCharsPerLine) );
++PrintLine;
diff --git a/khexedit/lib/kbuffercoltextexport.h b/khexedit/lib/kbuffercoltextexport.h
index d26b21c..a2e186b 100644
--- a/khexedit/lib/kbuffercoltextexport.h
+++ b/khexedit/lib/kbuffercoltextexport.h
@@ -28,14 +28,14 @@
namespace KHE
{
-class KBufferColumn;
+class TDEBufferColumn;
-class KBufferColTextExport : public KColTextExport
+class TDEBufferColTextExport : public KColTextExport
{
public:
- KBufferColTextExport( const KBufferColumn* BF, const char *D, KCoordRange CR, int BytesWidth );
- virtual ~KBufferColTextExport();
+ TDEBufferColTextExport( const TDEBufferColumn* BF, const char *D, KCoordRange CR, int BytesWidth );
+ virtual ~TDEBufferColTextExport();
public: // API
void printFirstLine( TQString &T, int Line ) const;
diff --git a/khexedit/lib/kbuffercolumn.cpp b/khexedit/lib/kbuffercolumn.cpp
index fb2cfb9..34116e0 100644
--- a/khexedit/lib/kbuffercolumn.cpp
+++ b/khexedit/lib/kbuffercolumn.cpp
@@ -39,7 +39,7 @@ static const KPixelX DefaultByteSpacingWidth = 3;
static const KPixelX DefaultGroupSpacingWidth = 9;
static const int DefaultNoOfGroupedBytes = 4;
-KBufferColumn::KBufferColumn( KColumnsView *CV, KDataBuffer *B, KBufferLayout *L, KBufferRanges *R )
+TDEBufferColumn::TDEBufferColumn( KColumnsView *CV, KDataBuffer *B, TDEBufferLayout *L, TDEBufferRanges *R )
: KColumn( CV ),
Buffer( B ),
Layout( L ),
@@ -58,7 +58,7 @@ KBufferColumn::KBufferColumn( KColumnsView *CV, KDataBuffer *B, KBufferLayout *L
}
-KBufferColumn::~KBufferColumn()
+TDEBufferColumn::~TDEBufferColumn()
{
delete [] PosX;
delete [] PosRightX;
@@ -66,13 +66,13 @@ KBufferColumn::~KBufferColumn()
-void KBufferColumn::set( KDataBuffer *B )
+void TDEBufferColumn::set( KDataBuffer *B )
{
Buffer= B;
}
-void KBufferColumn::resetXBuffer()
+void TDEBufferColumn::resetXBuffer()
{
delete [] PosX;
delete [] PosRightX;
@@ -86,14 +86,14 @@ void KBufferColumn::resetXBuffer()
}
-void KBufferColumn::setMetrics( KPixelX DW, KPixelY DBL )
+void TDEBufferColumn::setMetrics( KPixelX DW, KPixelY DBL )
{
DigitBaseLine = DBL;
setDigitWidth( DW );
}
-bool KBufferColumn::setDigitWidth( KPixelX DW )
+bool TDEBufferColumn::setDigitWidth( KPixelX DW )
{
// no changes?
if( DigitWidth == DW )
@@ -109,7 +109,7 @@ bool KBufferColumn::setDigitWidth( KPixelX DW )
}
-bool KBufferColumn::setSpacing( KPixelX BSW, int NoGB, KPixelX GSW )
+bool TDEBufferColumn::setSpacing( KPixelX BSW, int NoGB, KPixelX GSW )
{
// no changes?
if( ByteSpacingWidth == BSW && NoOfGroupedBytes == NoGB && GroupSpacingWidth == GSW )
@@ -128,7 +128,7 @@ bool KBufferColumn::setSpacing( KPixelX BSW, int NoGB, KPixelX GSW )
}
-bool KBufferColumn::setByteSpacingWidth( KPixelX BSW )
+bool TDEBufferColumn::setByteSpacingWidth( KPixelX BSW )
{
// no changes?
if( ByteSpacingWidth == BSW )
@@ -145,7 +145,7 @@ bool KBufferColumn::setByteSpacingWidth( KPixelX BSW )
}
-bool KBufferColumn::setNoOfGroupedBytes( int NoGB )
+bool TDEBufferColumn::setNoOfGroupedBytes( int NoGB )
{
// no changes?
if( NoOfGroupedBytes == NoGB )
@@ -159,7 +159,7 @@ bool KBufferColumn::setNoOfGroupedBytes( int NoGB )
}
-bool KBufferColumn::setGroupSpacingWidth( KPixelX GSW )
+bool TDEBufferColumn::setGroupSpacingWidth( KPixelX GSW )
{
// no changes?
if( GroupSpacingWidth == GSW )
@@ -176,20 +176,20 @@ bool KBufferColumn::setGroupSpacingWidth( KPixelX GSW )
}
-void KBufferColumn::recalcByteWidth()
+void TDEBufferColumn::recalcByteWidth()
{
ByteWidth = DigitWidth;
recalcVerticalGridX();
}
-void KBufferColumn::recalcVerticalGridX()
+void TDEBufferColumn::recalcVerticalGridX()
{
VerticalGridX = ByteWidth-1 + GroupSpacingWidth/2;
}
-void KBufferColumn::recalcX()
+void TDEBufferColumn::recalcX()
{
SpacingTrigger = noOfGroupedBytes() > 0 ? noOfGroupedBytes()-1 : LastPos+1; // last ensures to never trigger the spacing
@@ -219,7 +219,7 @@ void KBufferColumn::recalcX()
// TODO: why are inlined functions not available as symbols when defined before their use
//TODO: works not precisly for the byte rects but includes spacing and left and right
-/*inline*/ int KBufferColumn::posOfX( KPixelX PX ) const
+/*inline*/ int TDEBufferColumn::posOfX( KPixelX PX ) const
{
if( !PosX )
return NoByteFound;
@@ -235,7 +235,7 @@ void KBufferColumn::recalcX()
}
-int KBufferColumn::magPosOfX( KPixelX PX ) const
+int TDEBufferColumn::magPosOfX( KPixelX PX ) const
{
if( !PosX )
return NoByteFound;
@@ -256,7 +256,7 @@ int KBufferColumn::magPosOfX( KPixelX PX ) const
}
-KSection KBufferColumn::posOfX( KPixelX PX, KPixelX PW ) const
+KSection TDEBufferColumn::posOfX( KPixelX PX, KPixelX PW ) const
{
if( !PosX )
return KSection();
@@ -284,11 +284,11 @@ KSection KBufferColumn::posOfX( KPixelX PX, KPixelX PW ) const
}
-KPixelX KBufferColumn::xOfPos( int Pos ) const { return x() + (PosX?PosX[Pos]:0); }
-KPixelX KBufferColumn::rightXOfPos( int Pos ) const { return x() + (PosRightX?PosRightX[Pos]:0); }
+KPixelX TDEBufferColumn::xOfPos( int Pos ) const { return x() + (PosX?PosX[Pos]:0); }
+KPixelX TDEBufferColumn::rightXOfPos( int Pos ) const { return x() + (PosRightX?PosRightX[Pos]:0); }
-int KBufferColumn::posOfRelX( KPixelX PX ) const
+int TDEBufferColumn::posOfRelX( KPixelX PX ) const
{
if( !PosX )
return NoByteFound;
@@ -302,7 +302,7 @@ int KBufferColumn::posOfRelX( KPixelX PX ) const
}
-KSection KBufferColumn::posOfRelX( KPixelX PX, KPixelX PW ) const
+KSection TDEBufferColumn::posOfRelX( KPixelX PX, KPixelX PW ) const
{
if( !PosX )
return KSection();
@@ -328,25 +328,25 @@ KSection KBufferColumn::posOfRelX( KPixelX PX, KPixelX PW ) const
}
-KPixelX KBufferColumn::relXOfPos( int Pos ) const { return PosX ? PosX[Pos] : 0; }
-KPixelX KBufferColumn::relRightXOfPos( int Pos ) const { return PosRightX ? PosRightX[Pos] : 0; }
+KPixelX TDEBufferColumn::relXOfPos( int Pos ) const { return PosX ? PosX[Pos] : 0; }
+KPixelX TDEBufferColumn::relRightXOfPos( int Pos ) const { return PosRightX ? PosRightX[Pos] : 0; }
-KPixelXs KBufferColumn::wideXPixelsOfPos( KSection Positions ) const
+KPixelXs TDEBufferColumn::wideXPixelsOfPos( KSection Positions ) const
{
return KPixelXs( Positions.start()>0?rightXOfPos(Positions.start()-1)+1:xOfPos(Positions.start()),
Positions.end()<LastPos?xOfPos(Positions.end()+1)-1:rightXOfPos(Positions.end()) );
}
-KPixelXs KBufferColumn::relWideXPixelsOfPos( KSection Positions ) const
+KPixelXs TDEBufferColumn::relWideXPixelsOfPos( KSection Positions ) const
{
return KPixelXs( Positions.start()>0?relRightXOfPos(Positions.start()-1)+1:relXOfPos(Positions.start()),
Positions.end()<LastPos?relXOfPos(Positions.end()+1)-1:relRightXOfPos(Positions.end()) );
}
-void KBufferColumn::preparePainting( KPixelXs Xs )
+void TDEBufferColumn::preparePainting( KPixelXs Xs )
{
Xs.restrictTo( XSpan );
// translate
@@ -362,7 +362,7 @@ void KBufferColumn::preparePainting( KPixelXs Xs )
}
-void KBufferColumn::paintFirstLine( TQPainter *P, KPixelXs Xs, int FirstLine )
+void TDEBufferColumn::paintFirstLine( TQPainter *P, KPixelXs Xs, int FirstLine )
{
preparePainting( Xs );
@@ -375,14 +375,14 @@ void KBufferColumn::paintFirstLine( TQPainter *P, KPixelXs Xs, int FirstLine )
}
-void KBufferColumn::paintNextLine( TQPainter *P )
+void TDEBufferColumn::paintNextLine( TQPainter *P )
{
// paintPositions( P, PaintLine++, PaintPositions );
paintLine( P, PaintLine++ );
}
-void KBufferColumn::paintLine( TQPainter *P, int Line ) // TODO: could be removed???
+void TDEBufferColumn::paintLine( TQPainter *P, int Line ) // TODO: could be removed???
{
// kdDebug(1501) << "paintLine line: "<<Line<<" Start: "<<PaintPositions.start()<<" End: "<<PaintPositions.end() << "\n";
// no bytes to paint?
@@ -393,7 +393,7 @@ void KBufferColumn::paintLine( TQPainter *P, int Line ) // TODO: could be remove
}
-void KBufferColumn::paintPositions( TQPainter *P, int Line, KSection Pos )
+void TDEBufferColumn::paintPositions( TQPainter *P, int Line, KSection Pos )
{
const TQColorGroup &CG = View->colorGroup();
@@ -403,15 +403,15 @@ void KBufferColumn::paintPositions( TQPainter *P, int Line, KSection Pos )
// Go through the lines TODO: handle first and last line more effeciently
// check for leading and trailing spaces
- KSection Positions( Layout->firstPos(KBufferCoord( Pos.start(), Line )),
- Layout->lastPos( KBufferCoord( Pos.end(), Line )) );
+ KSection Positions( Layout->firstPos(TDEBufferCoord( Pos.start(), Line )),
+ Layout->lastPos( TDEBufferCoord( Pos.end(), Line )) );
// no bytes to paint?
if( !Layout->hasContent(Line) )
return;
// check for leading and trailing spaces
- KSection Indizes( Layout->indexAtCoord(KBufferCoord( Positions.start(), Line )), Positions.width(), false );
+ KSection Indizes( Layout->indexAtCoord(TDEBufferCoord( Positions.start(), Line )), Positions.width(), false );
unsigned int SelectionFlag;
unsigned int MarkingFlag;
@@ -481,7 +481,7 @@ void KBufferColumn::paintPositions( TQPainter *P, int Line, KSection Pos )
}
-void KBufferColumn::paintPlain( TQPainter *P, KSection Positions, int Index )
+void TDEBufferColumn::paintPlain( TQPainter *P, KSection Positions, int Index )
{
// paint all the bytes affected
for( int p=Positions.start(); p<=Positions.end(); ++p,++Index )
@@ -499,7 +499,7 @@ void KBufferColumn::paintPlain( TQPainter *P, KSection Positions, int Index )
}
-void KBufferColumn::paintSelection( TQPainter *P, KSection Positions, int Index, int Flag )
+void TDEBufferColumn::paintSelection( TQPainter *P, KSection Positions, int Index, int Flag )
{
const TQColorGroup &CG = View->colorGroup();
@@ -522,7 +522,7 @@ void KBufferColumn::paintSelection( TQPainter *P, KSection Positions, int Index,
}
-void KBufferColumn::paintMarking( TQPainter *P, KSection Positions, int Index, int Flag )
+void TDEBufferColumn::paintMarking( TQPainter *P, KSection Positions, int Index, int Flag )
{
const TQColorGroup &CG = View->colorGroup();
@@ -546,7 +546,7 @@ void KBufferColumn::paintMarking( TQPainter *P, KSection Positions, int Index, i
// TODO: smarter calculation
-void KBufferColumn::paintGrid( TQPainter *P, KSection Range )
+void TDEBufferColumn::paintGrid( TQPainter *P, KSection Range )
{
int st = 0; // counter for spacing triggering
P->setPen( TQt::black );
@@ -567,7 +567,7 @@ void KBufferColumn::paintGrid( TQPainter *P, KSection Range )
}
-void KBufferColumn::paintRange( TQPainter *P, const TQColor &Color, KSection Positions, int Flag )
+void TDEBufferColumn::paintRange( TQPainter *P, const TQColor &Color, KSection Positions, int Flag )
{
KPixelX RangeX = Flag & StartsBefore ? relRightXOfPos( Positions.start()-1 ) + 1 : relXOfPos( Positions.start() );
KPixelX RangeW = (Flag & EndsLater ? relXOfPos( Positions.end()+1 ): relRightXOfPos( Positions.end() ) + 1) - RangeX;
@@ -576,7 +576,7 @@ void KBufferColumn::paintRange( TQPainter *P, const TQColor &Color, KSection Pos
}
-void KBufferColumn::paintByte( TQPainter *P, int Index )
+void TDEBufferColumn::paintByte( TQPainter *P, int Index )
{
char Byte = ( Index > -1 ) ? Buffer->datum( Index ) : EmptyByte;
KHEChar B = Codec->decode( Byte );
@@ -611,7 +611,7 @@ void KBufferColumn::paintByte( TQPainter *P, int Index )
}
-void KBufferColumn::paintFramedByte( TQPainter *P, int Index, KFrameStyle FrameStyle )
+void TDEBufferColumn::paintFramedByte( TQPainter *P, int Index, KFrameStyle FrameStyle )
{
paintByte( P, Index );
char Byte = ( Index > -1 ) ? Buffer->datum( Index ) : EmptyByte;
@@ -627,7 +627,7 @@ void KBufferColumn::paintFramedByte( TQPainter *P, int Index, KFrameStyle FrameS
}
-void KBufferColumn::paintCursor( TQPainter *P, int Index )
+void TDEBufferColumn::paintCursor( TQPainter *P, int Index )
{
char Byte = ( Index > -1 ) ? Buffer->datum( Index ) : EmptyByte;
KHEChar B = Codec->decode( Byte );
@@ -635,14 +635,14 @@ void KBufferColumn::paintCursor( TQPainter *P, int Index )
}
-void KBufferColumn::drawByte( TQPainter *P, char /*Byte*/, KHEChar B, const TQColor &Color ) const
+void TDEBufferColumn::drawByte( TQPainter *P, char /*Byte*/, KHEChar B, const TQColor &Color ) const
{
P->setPen( Color );
P->drawText( 0, DigitBaseLine, TQString(B) );
}
-bool KBufferColumn::isSelected( KSection Range, KSection *Selection, unsigned int *Flag ) const
+bool TDEBufferColumn::isSelected( KSection Range, KSection *Selection, unsigned int *Flag ) const
{
KSection S;
unsigned int F = 0;
@@ -671,7 +671,7 @@ bool KBufferColumn::isSelected( KSection Range, KSection *Selection, unsigned in
}
-bool KBufferColumn::isMarked( KSection Range, KSection *Marking, unsigned int *Flag ) const
+bool TDEBufferColumn::isMarked( KSection Range, KSection *Marking, unsigned int *Flag ) const
{
KSection M;
unsigned int F = 0;
diff --git a/khexedit/lib/kbuffercolumn.h b/khexedit/lib/kbuffercolumn.h
index 10e930d..88fee3e 100644
--- a/khexedit/lib/kbuffercolumn.h
+++ b/khexedit/lib/kbuffercolumn.h
@@ -33,7 +33,7 @@ namespace KHE
{
// class KHexEdit;
-class KBufferRanges;
+class TDEBufferRanges;
class KCharCodec;
const int NoByteFound = -1;
@@ -43,15 +43,15 @@ const int NoByteFound = -1;
* knows how to paint the data and the editing things (focus, cursor, selection)
* but does not offer
*
- *@author Friedrich W. H. Kossebauint KBufferColumn::posOfX( KPixelX PX, bool *ToTheRightFlag ) const
+ *@author Friedrich W. H. Kossebauint TDEBufferColumn::posOfX( KPixelX PX, bool *ToTheRightFlag ) const
*/
-class KBufferColumn : public KColumn
+class TDEBufferColumn : public KColumn
{
public:
enum KFrameStyle { Frame, Left, Right };
public:
- KBufferColumn( KColumnsView/*KHexEdit*/ *HE, KDataBuffer *B, KBufferLayout *L, KBufferRanges *R );
- virtual ~KBufferColumn();
+ TDEBufferColumn( KColumnsView/*KHexEdit*/ *HE, KDataBuffer *B, TDEBufferLayout *L, TDEBufferRanges *R );
+ virtual ~TDEBufferColumn();
public: // KColumn-API
@@ -154,7 +154,7 @@ class KBufferColumn : public KColumn
int firstPos() const;
int lastPos() const;
KSection visiblePositions() const;
- const KBufferLayout *layout() const;
+ const TDEBufferLayout *layout() const;
KCharCodec* codec() const;
protected:
@@ -185,9 +185,9 @@ class KBufferColumn : public KColumn
/** pointer to the buffer */
KDataBuffer *Buffer;
/** pointer to the layout */
- const KBufferLayout *Layout;
+ const TDEBufferLayout *Layout;
/** pointer to the ranges */
- KBufferRanges *Ranges;
+ TDEBufferRanges *Ranges;
/** */
KCharCodec *Codec;
@@ -231,22 +231,22 @@ class KBufferColumn : public KColumn
};
-inline KPixelX KBufferColumn::byteWidth() const { return ByteWidth; }
-inline KPixelX KBufferColumn::digitWidth() const { return DigitWidth; }
-inline KPixelX KBufferColumn::byteSpacingWidth() const { return ByteSpacingWidth; }
-inline KPixelX KBufferColumn::groupSpacingWidth() const { return GroupSpacingWidth; }
+inline KPixelX TDEBufferColumn::byteWidth() const { return ByteWidth; }
+inline KPixelX TDEBufferColumn::digitWidth() const { return DigitWidth; }
+inline KPixelX TDEBufferColumn::byteSpacingWidth() const { return ByteSpacingWidth; }
+inline KPixelX TDEBufferColumn::groupSpacingWidth() const { return GroupSpacingWidth; }
-inline int KBufferColumn::noOfGroupedBytes() const { return NoOfGroupedBytes; }
+inline int TDEBufferColumn::noOfGroupedBytes() const { return NoOfGroupedBytes; }
-inline int KBufferColumn::firstPos() const { return PaintPositions.start(); }
-inline int KBufferColumn::lastPos() const { return PaintPositions.end(); }
-inline KSection KBufferColumn::visiblePositions() const { return PaintPositions; }
+inline int TDEBufferColumn::firstPos() const { return PaintPositions.start(); }
+inline int TDEBufferColumn::lastPos() const { return PaintPositions.end(); }
+inline KSection TDEBufferColumn::visiblePositions() const { return PaintPositions; }
-inline const KBufferLayout *KBufferColumn::layout() const { return Layout; }
+inline const TDEBufferLayout *TDEBufferColumn::layout() const { return Layout; }
-inline void KBufferColumn::setCodec( KCharCodec *C ) { Codec = C; }
-inline KCharCodec* KBufferColumn::codec() const { return Codec; }
+inline void TDEBufferColumn::setCodec( KCharCodec *C ) { Codec = C; }
+inline KCharCodec* TDEBufferColumn::codec() const { return Codec; }
}
diff --git a/khexedit/lib/kbuffercoord.h b/khexedit/lib/kbuffercoord.h
index 997551a..74b3fdf 100644
--- a/khexedit/lib/kbuffercoord.h
+++ b/khexedit/lib/kbuffercoord.h
@@ -32,36 +32,36 @@ namespace KHE
*
* @author Friedrich W. H. Kossebau
*/
-class KBufferCoord
+class TDEBufferCoord
{
public:
/** creates a coord with 0,0 */
- KBufferCoord();
- KBufferCoord( int P, int L );
- KBufferCoord( int Index, int LineWidth, bool /*dummy*/ );
- KBufferCoord( const KBufferCoord &C );
- KBufferCoord &operator=( const KBufferCoord &c );
- ~KBufferCoord();
+ TDEBufferCoord();
+ TDEBufferCoord( int P, int L );
+ TDEBufferCoord( int Index, int LineWidth, bool /*dummy*/ );
+ TDEBufferCoord( const TDEBufferCoord &C );
+ TDEBufferCoord &operator=( const TDEBufferCoord &c );
+ ~TDEBufferCoord();
public: // logic
- bool operator==( const KBufferCoord &c ) const;
- bool operator!=( const KBufferCoord &c ) const;
- bool operator<( const KBufferCoord &c ) const;
- bool operator<=( const KBufferCoord &c ) const;
- bool operator>( const KBufferCoord &c ) const;
- bool operator>=( const KBufferCoord &c ) const;
+ bool operator==( const TDEBufferCoord &c ) const;
+ bool operator!=( const TDEBufferCoord &c ) const;
+ bool operator<( const TDEBufferCoord &c ) const;
+ bool operator<=( const TDEBufferCoord &c ) const;
+ bool operator>( const TDEBufferCoord &c ) const;
+ bool operator>=( const TDEBufferCoord &c ) const;
/** tests if the coord is prior in the same line than the given coord.
* If at least one of both is invalid the result is undefined.
* @return true if the pos is left to the pos of C and both are in the same line, otherwise false.
*/
- bool isPriorInLineThan( const KBufferCoord &C ) const;
+ bool isPriorInLineThan( const TDEBufferCoord &C ) const;
/** tests if the coord is later in the same line than the given coord.
* If at least one of both is invalid the result is undefined.
* @return true if the pos is right to the pos of C and both are in the same line, otherwise false
*/
- bool isLaterInLineThan( const KBufferCoord &C ) const;
+ bool isLaterInLineThan( const TDEBufferCoord &C ) const;
/** @return true if the line is below L, otherwise false */
bool isBelow( int L ) const;
/** @return true if the line is above L, otherwise false */
@@ -129,14 +129,14 @@ class KBufferCoord
* If one or more of the coords is invalid the behaviour is undefined.
* @param C a possible line start coord
*/
- void goLineStart( const KBufferCoord &C );
+ void goLineStart( const TDEBufferCoord &C );
/** sets the position to the given pos or
* if the line is the same as that of the given coord to the position of that.
* If one or more of the coords is invalid the behaviour is undefined.
* @param L last position in normal line
* @param C a possible line end coord
*/
- void goLineEnd( int L, const KBufferCoord &C );
+ void goLineEnd( int L, const TDEBufferCoord &C );
/** moves the coord 1 lines upwards. There is no check whether the first line is overstepped. */
void goUp();
/** moves the coord L lines downwards. */
@@ -166,56 +166,56 @@ class KBufferCoord
};
-inline KBufferCoord::KBufferCoord() : Pos( 0 ), Line( 0 ) {}
-inline KBufferCoord::KBufferCoord( int P, int L ) : Pos( P ), Line( L ) {}
-inline KBufferCoord::KBufferCoord( int Index, int LineWidth, bool )
+inline TDEBufferCoord::TDEBufferCoord() : Pos( 0 ), Line( 0 ) {}
+inline TDEBufferCoord::TDEBufferCoord( int P, int L ) : Pos( P ), Line( L ) {}
+inline TDEBufferCoord::TDEBufferCoord( int Index, int LineWidth, bool )
{
Line = Index / LineWidth;
Pos = Index - Line*LineWidth;
}
-inline KBufferCoord::KBufferCoord( const KBufferCoord &C ) : Pos( C.Pos ), Line( C.Line ) {}
-inline KBufferCoord &KBufferCoord::operator=( const KBufferCoord &C ) { Pos = C.Pos; Line = C.Line; return *this; }
-inline KBufferCoord::~KBufferCoord() {}
+inline TDEBufferCoord::TDEBufferCoord( const TDEBufferCoord &C ) : Pos( C.Pos ), Line( C.Line ) {}
+inline TDEBufferCoord &TDEBufferCoord::operator=( const TDEBufferCoord &C ) { Pos = C.Pos; Line = C.Line; return *this; }
+inline TDEBufferCoord::~TDEBufferCoord() {}
-inline bool KBufferCoord::operator==( const KBufferCoord &C ) const { return Pos == C.Pos && Line == C.Line; }
-inline bool KBufferCoord::operator!=( const KBufferCoord &C ) const { return !(*this == C); }
+inline bool TDEBufferCoord::operator==( const TDEBufferCoord &C ) const { return Pos == C.Pos && Line == C.Line; }
+inline bool TDEBufferCoord::operator!=( const TDEBufferCoord &C ) const { return !(*this == C); }
-inline bool KBufferCoord::operator<( const KBufferCoord &C ) const
+inline bool TDEBufferCoord::operator<( const TDEBufferCoord &C ) const
{ return Line < C.Line || (Line == C.Line && Pos<C.Pos); }
-inline bool KBufferCoord::operator<=( const KBufferCoord &C ) const
+inline bool TDEBufferCoord::operator<=( const TDEBufferCoord &C ) const
{ return Line < C.Line || (Line == C.Line && Pos<=C.Pos); }
-inline bool KBufferCoord::operator>( const KBufferCoord &C ) const
+inline bool TDEBufferCoord::operator>( const TDEBufferCoord &C ) const
{ return Line > C.Line || (Line == C.Line && Pos>C.Pos); }
-inline bool KBufferCoord::operator>=( const KBufferCoord &C ) const
+inline bool TDEBufferCoord::operator>=( const TDEBufferCoord &C ) const
{ return Line > C.Line || (Line == C.Line && Pos>=C.Pos); }
-inline int KBufferCoord::pos() const { return Pos; }
-inline int KBufferCoord::line() const { return Line; }
-inline bool KBufferCoord::isValid() const { return Line >= 0 && Pos >= 0; }
+inline int TDEBufferCoord::pos() const { return Pos; }
+inline int TDEBufferCoord::line() const { return Line; }
+inline bool TDEBufferCoord::isValid() const { return Line >= 0 && Pos >= 0; }
-inline void KBufferCoord::setByIndexNWidth( int Index, int LineWidth )
+inline void TDEBufferCoord::setByIndexNWidth( int Index, int LineWidth )
{
Line = Index / LineWidth;
Pos = Index - Line*LineWidth;
}
-inline void KBufferCoord::set( int P, int L )
+inline void TDEBufferCoord::set( int P, int L )
{
Pos = P;
Line = L;
}
-inline void KBufferCoord::setPos( int P ) { Pos = P; }
-inline void KBufferCoord::setLine( int L ) { Line = L; }
+inline void TDEBufferCoord::setPos( int P ) { Pos = P; }
+inline void TDEBufferCoord::setLine( int L ) { Line = L; }
-inline void KBufferCoord::goCRight( int MaxPos )
+inline void TDEBufferCoord::goCRight( int MaxPos )
{
if( isBeforeLineEnd(MaxPos) )
goRight();
else
gotoStartOfNextLine();
}
-inline void KBufferCoord::goCLeft( int MaxPos )
+inline void TDEBufferCoord::goCLeft( int MaxPos )
{
if( isBehindLineStart() )
goLeft();
@@ -223,69 +223,69 @@ inline void KBufferCoord::goCLeft( int MaxPos )
gotoEndOfPreviousLine( MaxPos );
}
-inline void KBufferCoord::goRight() { ++Pos; }
-inline void KBufferCoord::goLeft() { --Pos; }
-inline void KBufferCoord::goRight( unsigned int P ) { Pos += P; }
-inline void KBufferCoord::goLeft( unsigned int P ) { Pos -= P; }
+inline void TDEBufferCoord::goRight() { ++Pos; }
+inline void TDEBufferCoord::goLeft() { --Pos; }
+inline void TDEBufferCoord::goRight( unsigned int P ) { Pos += P; }
+inline void TDEBufferCoord::goLeft( unsigned int P ) { Pos -= P; }
-inline void KBufferCoord::gotoStart() { Pos = Line = 0; }
+inline void TDEBufferCoord::gotoStart() { Pos = Line = 0; }
-inline void KBufferCoord::gotoEndOfPreviousLine( int LastPos )
+inline void TDEBufferCoord::gotoEndOfPreviousLine( int LastPos )
{
--Line;
Pos = LastPos;
}
-inline void KBufferCoord::gotoStartOfNextLine()
+inline void TDEBufferCoord::gotoStartOfNextLine()
{
++Line;
Pos = 0;
}
-inline void KBufferCoord::goLineStart( const KBufferCoord &C )
+inline void TDEBufferCoord::goLineStart( const TDEBufferCoord &C )
{
Pos = ( Line == C.Line ) ? C.Pos : 0;
}
-inline void KBufferCoord::goLineEnd( int L, const KBufferCoord &C )
+inline void TDEBufferCoord::goLineEnd( int L, const TDEBufferCoord &C )
{
Pos = ( Line == C.Line ) ? C.Pos : L;
}
-inline void KBufferCoord::goUp() { --Line; }
-inline void KBufferCoord::goDown() { ++Line; }
-inline void KBufferCoord::goUp( unsigned int L ) { Line -= L; }
-inline void KBufferCoord::goDown( unsigned int L ) { Line += L; }
+inline void TDEBufferCoord::goUp() { --Line; }
+inline void TDEBufferCoord::goDown() { ++Line; }
+inline void TDEBufferCoord::goUp( unsigned int L ) { Line -= L; }
+inline void TDEBufferCoord::goDown( unsigned int L ) { Line += L; }
-inline int KBufferCoord::indexByLineWidth( int LineWidth ) const
+inline int TDEBufferCoord::indexByLineWidth( int LineWidth ) const
{
return Line * LineWidth + Pos;
}
-inline bool KBufferCoord::isPriorInLineThan( const KBufferCoord &C ) const
+inline bool TDEBufferCoord::isPriorInLineThan( const TDEBufferCoord &C ) const
{
return Line == C.Line && Pos < C.Pos;
}
-inline bool KBufferCoord::isLaterInLineThan( const KBufferCoord &C ) const
+inline bool TDEBufferCoord::isLaterInLineThan( const TDEBufferCoord &C ) const
{
return Line == C.Line && Pos > C.Pos;
}
-inline bool KBufferCoord::isBelow( int L ) const { return Line > L; }
-inline bool KBufferCoord::isAbove( int L ) const { return Line < L; }
+inline bool TDEBufferCoord::isBelow( int L ) const { return Line > L; }
+inline bool TDEBufferCoord::isAbove( int L ) const { return Line < L; }
-inline bool KBufferCoord::isBehindLineStart() const { return Pos > 0; }
-inline bool KBufferCoord::isBeforeLineEnd( int MaxPos ) const { return Pos < MaxPos; }
+inline bool TDEBufferCoord::isBehindLineStart() const { return Pos > 0; }
+inline bool TDEBufferCoord::isBeforeLineEnd( int MaxPos ) const { return Pos < MaxPos; }
-inline bool KBufferCoord::isAtStart() const { return Pos == 0 && Line == 0; }
+inline bool TDEBufferCoord::isAtStart() const { return Pos == 0 && Line == 0; }
-inline KBufferCoord operator+( const KBufferCoord &C, int p )
+inline TDEBufferCoord operator+( const TDEBufferCoord &C, int p )
{
- return KBufferCoord( C.pos()+p, C.line() );
+ return TDEBufferCoord( C.pos()+p, C.line() );
}
}
diff --git a/khexedit/lib/kbuffercursor.cpp b/khexedit/lib/kbuffercursor.cpp
index 0255d2d..b6a5268 100644
--- a/khexedit/lib/kbuffercursor.cpp
+++ b/khexedit/lib/kbuffercursor.cpp
@@ -23,7 +23,7 @@
using namespace KHE;
-KBufferCursor::KBufferCursor( const KBufferLayout *L )
+TDEBufferCursor::TDEBufferCursor( const TDEBufferLayout *L )
: Layout( L ),
Index( 0 ),
Coord( 0, 0 ),
@@ -32,18 +32,18 @@ KBufferCursor::KBufferCursor( const KBufferLayout *L )
{
}
-KBufferCursor::~KBufferCursor()
+TDEBufferCursor::~TDEBufferCursor()
{
}
-bool KBufferCursor::operator==( const KBufferCursor &C ) const
+bool TDEBufferCursor::operator==( const TDEBufferCursor &C ) const
{
return Index == C.Index && Behind == C.Behind ;
}
-void KBufferCursor::setAppendPosEnabled( bool APE )
+void TDEBufferCursor::setAppendPosEnabled( bool APE )
{
if( AppendPosEnabled == APE )
return;
@@ -70,7 +70,7 @@ void KBufferCursor::setAppendPosEnabled( bool APE )
}
-void KBufferCursor::gotoPreviousByte()
+void TDEBufferCursor::gotoPreviousByte()
{
if( Behind )
Behind = false;
@@ -82,7 +82,7 @@ void KBufferCursor::gotoPreviousByte()
}
-void KBufferCursor::gotoPreviousByte( int D )
+void TDEBufferCursor::gotoPreviousByte( int D )
{
if( Behind )
{
@@ -99,7 +99,7 @@ void KBufferCursor::gotoPreviousByte( int D )
}
-void KBufferCursor::gotoNextByte()
+void TDEBufferCursor::gotoNextByte()
{
int Length = Layout->length();
@@ -117,7 +117,7 @@ void KBufferCursor::gotoNextByte()
}
-void KBufferCursor::gotoNextByte( int D ) // TODO: think about consistency with gotoNextByte!!!
+void TDEBufferCursor::gotoNextByte( int D ) // TODO: think about consistency with gotoNextByte!!!
{
if( Behind )
{
@@ -132,7 +132,7 @@ void KBufferCursor::gotoNextByte( int D ) // TODO: think about consistency with
}
-void KBufferCursor::gotoNextByteInLine()
+void TDEBufferCursor::gotoNextByteInLine()
{
int Length = Layout->length();
@@ -153,7 +153,7 @@ void KBufferCursor::gotoNextByteInLine()
}
-void KBufferCursor::gotoUp()
+void TDEBufferCursor::gotoUp()
{
// can we even go up?
if( Coord.isBelow(Layout->startLine()) )
@@ -179,7 +179,7 @@ void KBufferCursor::gotoUp()
}
-void KBufferCursor::gotoDown()
+void TDEBufferCursor::gotoDown()
{
if( Coord.isAbove(Layout->finalLine()) )
{
@@ -193,7 +193,7 @@ void KBufferCursor::gotoDown()
}
-void KBufferCursor::gotoLineStart()
+void TDEBufferCursor::gotoLineStart()
{
int OldIndex = Index;
Index = Layout->indexAtLineStart( Coord.line() );
@@ -202,7 +202,7 @@ void KBufferCursor::gotoLineStart()
}
-void KBufferCursor::gotoLineEnd()
+void TDEBufferCursor::gotoLineEnd()
{
if( Index < Layout->length() )
{
@@ -215,7 +215,7 @@ void KBufferCursor::gotoLineEnd()
}
-void KBufferCursor::gotoStart()
+void TDEBufferCursor::gotoStart()
{
Index = 0;
Coord = Layout->start();
@@ -223,7 +223,7 @@ void KBufferCursor::gotoStart()
}
-void KBufferCursor::gotoEnd()
+void TDEBufferCursor::gotoEnd()
{
int Length = Layout->length();
if( Length > 0 )
@@ -238,7 +238,7 @@ void KBufferCursor::gotoEnd()
}
-void KBufferCursor::gotoCIndex( int i )
+void TDEBufferCursor::gotoCIndex( int i )
{
if( Layout->length() > 0 )
{
@@ -254,7 +254,7 @@ void KBufferCursor::gotoCIndex( int i )
}
-void KBufferCursor::gotoCCoord( const KBufferCoord &C )
+void TDEBufferCursor::gotoCCoord( const TDEBufferCoord &C )
{
if( Layout->length() > 0 )
{
@@ -270,7 +270,7 @@ void KBufferCursor::gotoCCoord( const KBufferCoord &C )
}
-void KBufferCursor::stepToEnd()
+void TDEBufferCursor::stepToEnd()
{
if( AppendPosEnabled && (Coord.pos() < Layout->noOfBytesPerLine()-1) )
{
@@ -283,7 +283,7 @@ void KBufferCursor::stepToEnd()
}
-void KBufferCursor::gotoIndex( int i )
+void TDEBufferCursor::gotoIndex( int i )
{
Index = i;
Coord = Layout->coordOfIndex( Index );
@@ -291,7 +291,7 @@ void KBufferCursor::gotoIndex( int i )
}
-void KBufferCursor::gotoRealIndex()
+void TDEBufferCursor::gotoRealIndex()
{
if( Behind )
{
@@ -302,7 +302,7 @@ void KBufferCursor::gotoRealIndex()
}
-void KBufferCursor::gotoCoord( const KBufferCoord &C )
+void TDEBufferCursor::gotoCoord( const TDEBufferCoord &C )
{
Index = Layout->indexAtCoord( C );
Coord = C;
@@ -310,14 +310,14 @@ void KBufferCursor::gotoCoord( const KBufferCoord &C )
}
-void KBufferCursor::updateCoord()
+void TDEBufferCursor::updateCoord()
{
Coord = Layout->coordOfIndex( Index );
}
// page down should be: one page minus one line
// -> if in the very first line page down will put the cursor on the same page into the last line
-void KBufferCursor::gotoPageUp()
+void TDEBufferCursor::gotoPageUp()
{
int NoOfLinesPerPage = Layout->noOfLinesPerPage();
int NewIndex = Index - NoOfLinesPerPage * Layout->noOfBytesPerLine();
@@ -337,7 +337,7 @@ void KBufferCursor::gotoPageUp()
}
-void KBufferCursor::gotoPageDown()
+void TDEBufferCursor::gotoPageDown()
{
int NoOfLinesPerPage = Layout->noOfLinesPerPage();
int NewIndex = Index + NoOfLinesPerPage * Layout->noOfBytesPerLine();
@@ -351,15 +351,15 @@ void KBufferCursor::gotoPageDown()
}
-int KBufferCursor::validIndex() const { return Index < Layout->length() ? Index : -1; }
-int KBufferCursor::indexAtLineStart() const { return Layout->indexAtLineStart( Coord.line() ); }
-int KBufferCursor::indexAtLineEnd() const { return Layout->indexAtLineEnd( Coord.line() ); }
+int TDEBufferCursor::validIndex() const { return Index < Layout->length() ? Index : -1; }
+int TDEBufferCursor::indexAtLineStart() const { return Layout->indexAtLineStart( Coord.line() ); }
+int TDEBufferCursor::indexAtLineEnd() const { return Layout->indexAtLineEnd( Coord.line() ); }
-bool KBufferCursor::atStart() const { return Index == 0; }
-bool KBufferCursor::atEnd() const { return Index == Layout->length() - 1; }
-bool KBufferCursor::atAppendPos() const { return realIndex() >= Layout->length(); }
+bool TDEBufferCursor::atStart() const { return Index == 0; }
+bool TDEBufferCursor::atEnd() const { return Index == Layout->length() - 1; }
+bool TDEBufferCursor::atAppendPos() const { return realIndex() >= Layout->length(); }
-bool KBufferCursor::atLineStart() const { return Layout->atLineStart( Coord ); }
-bool KBufferCursor::atLineEnd() const { return Layout->atLineEnd( Coord ); }
+bool TDEBufferCursor::atLineStart() const { return Layout->atLineStart( Coord ); }
+bool TDEBufferCursor::atLineEnd() const { return Layout->atLineEnd( Coord ); }
diff --git a/khexedit/lib/kbuffercursor.h b/khexedit/lib/kbuffercursor.h
index 855b3e8..44917ed 100644
--- a/khexedit/lib/kbuffercursor.h
+++ b/khexedit/lib/kbuffercursor.h
@@ -24,7 +24,7 @@
namespace KHE
{
-class KBufferLayout;
+class TDEBufferLayout;
/**@short navigates through the buffer in an abstract way, based on the layout
@@ -51,16 +51,16 @@ class KBufferLayout;
*
*@author Friedrich W. H. Kossebau
*/
-class KBufferCursor
+class TDEBufferCursor
{
public:
- KBufferCursor( const KBufferLayout *L );
- ~KBufferCursor();
+ TDEBufferCursor( const TDEBufferLayout *L );
+ ~TDEBufferCursor();
public:
- bool operator==( const KBufferCursor &c ) const;
- bool operator!=( const KBufferCursor &c ) const { return !(*this == c); }
+ bool operator==( const TDEBufferCursor &c ) const;
+ bool operator!=( const TDEBufferCursor &c ) const { return !(*this == c); }
public: // modificator
void setAppendPosEnabled( bool APE=true );
@@ -73,7 +73,7 @@ class KBufferCursor
/** the line of the actual coord */
int line() const;
/** the actual coord */
- KBufferCoord coord() const;
+ TDEBufferCoord coord() const;
/** true if the cursor is located to the right of the actual coord but still shown at the coord */
bool isBehind() const;
/** returns the real index. That is if the cursor is tagged as "behind" the current index
@@ -97,9 +97,9 @@ class KBufferCursor
public: // navigation commands
void gotoIndex( int I );
- void gotoCoord( const KBufferCoord &C );
+ void gotoCoord( const TDEBufferCoord &C );
void gotoCIndex( int I );
- void gotoCCoord( const KBufferCoord &C );
+ void gotoCCoord( const TDEBufferCoord &C );
void gotoRealIndex();
void gotoPreviousByte();
@@ -139,12 +139,12 @@ class KBufferCursor
private:
/** layout, tells how the column is organized */
- const KBufferLayout *Layout;
+ const TDEBufferLayout *Layout;
/** Position in buffer */
int Index;
/** Position and Line */
- KBufferCoord Coord;
+ TDEBufferCoord Coord;
/** tells whether the cursor is actually behind the actual position.
* This is used for selection to the end of a line or of the whole buffer.
@@ -156,16 +156,16 @@ class KBufferCursor
};
-inline int KBufferCursor::index() const { return Index; }
-inline int KBufferCursor::pos() const { return Coord.pos(); }
-inline int KBufferCursor::line() const { return Coord.line(); }
-inline KBufferCoord KBufferCursor::coord() const { return Coord; }
-inline bool KBufferCursor::isBehind() const { return Behind; }
-inline int KBufferCursor::realIndex() const { return Behind ? Index + 1 : Index; }
+inline int TDEBufferCursor::index() const { return Index; }
+inline int TDEBufferCursor::pos() const { return Coord.pos(); }
+inline int TDEBufferCursor::line() const { return Coord.line(); }
+inline TDEBufferCoord TDEBufferCursor::coord() const { return Coord; }
+inline bool TDEBufferCursor::isBehind() const { return Behind; }
+inline int TDEBufferCursor::realIndex() const { return Behind ? Index + 1 : Index; }
-inline void KBufferCursor::stepBehind() { Behind = true; }
+inline void TDEBufferCursor::stepBehind() { Behind = true; }
-//inline bool KBufferCursor::isValid() const { return Index != -1; }
+//inline bool TDEBufferCursor::isValid() const { return Index != -1; }
}
diff --git a/khexedit/lib/kbufferdrag.cpp b/khexedit/lib/kbufferdrag.cpp
index 54b776e..83d2afc 100644
--- a/khexedit/lib/kbufferdrag.cpp
+++ b/khexedit/lib/kbufferdrag.cpp
@@ -79,7 +79,7 @@ static TQTextCodec* codecForCharset( const TQCString& Desc )
-KBufferDrag::KBufferDrag( const TQByteArray &D, KCoordRange Range,
+TDEBufferDrag::TDEBufferDrag( const TQByteArray &D, KCoordRange Range,
const KOffsetColumn *OC, const KValueColumn *HC, const KCharColumn *TC,
TQChar SC, TQChar UC, const TQString &CN,
TQWidget *Source, const char *Name )
@@ -111,7 +111,7 @@ KBufferDrag::KBufferDrag( const TQByteArray &D, KCoordRange Range,
}
-KBufferDrag::~KBufferDrag()
+TDEBufferDrag::~TDEBufferDrag()
{
for( uint i=0; i<NoOfCol; ++i )
delete Columns[i];
@@ -119,13 +119,13 @@ KBufferDrag::~KBufferDrag()
-void KBufferDrag::setData( const TQByteArray &D )
+void TDEBufferDrag::setData( const TQByteArray &D )
{
Data = D;
}
-const char *KBufferDrag::format( int i ) const
+const char *TDEBufferDrag::format( int i ) const
{
return( i == 0 ? OctetStream :
i == 1 ? TextPlainUTF8 :
@@ -135,7 +135,7 @@ const char *KBufferDrag::format( int i ) const
}
-TQByteArray KBufferDrag::encodedData( const char *Format ) const
+TQByteArray TDEBufferDrag::encodedData( const char *Format ) const
{
if( Format != 0 )
{
@@ -214,7 +214,7 @@ TQByteArray KBufferDrag::encodedData( const char *Format ) const
-bool KBufferDrag::canDecode( const TQMimeSource* Source )
+bool TDEBufferDrag::canDecode( const TQMimeSource* Source )
{
bool c =( Source->provides(OctetStream) /*|| Source->provides(TextPlain)*/ );
return c;
@@ -222,7 +222,7 @@ bool KBufferDrag::canDecode( const TQMimeSource* Source )
}
-bool KBufferDrag::decode( const TQMimeSource* Source, TQByteArray &Dest )
+bool TDEBufferDrag::decode( const TQMimeSource* Source, TQByteArray &Dest )
{
// Dest = Source->encodedData( MediaString );
// return Dest.size() != 0;
diff --git a/khexedit/lib/kbufferdrag.h b/khexedit/lib/kbufferdrag.h
index 79a87d9..e20fb43 100644
--- a/khexedit/lib/kbufferdrag.h
+++ b/khexedit/lib/kbufferdrag.h
@@ -37,18 +37,18 @@ typedef KColTextExport* KColTextExportPtr;
/**
*@author Friedrich W. H. Kossebau
*/
-class KBufferDrag : public TQDragObject
+class TDEBufferDrag : public TQDragObject
{
Q_OBJECT
public:
// TODO: make this call somewhat more generic
- KBufferDrag( const TQByteArray &, KCoordRange Range,
+ TDEBufferDrag( const TQByteArray &, KCoordRange Range,
const KOffsetColumn *OC, const KValueColumn *HC, const KCharColumn *TC,
TQChar SC, TQChar UC, const TQString &CN,
TQWidget *Source = 0, const char *Name = 0 );
- ~KBufferDrag();
+ ~TDEBufferDrag();
public: // TQDragObject API
virtual const char *format( int i ) const;
diff --git a/khexedit/lib/kbufferlayout.cpp b/khexedit/lib/kbufferlayout.cpp
index a2ea9a0..def2f97 100644
--- a/khexedit/lib/kbufferlayout.cpp
+++ b/khexedit/lib/kbufferlayout.cpp
@@ -21,7 +21,7 @@ using namespace KHE;
-KBufferLayout::KBufferLayout( int NoBpL, int SO, int L )
+TDEBufferLayout::TDEBufferLayout( int NoBpL, int SO, int L )
: NoOfBytesPerLine( NoBpL ),
StartOffset( SO ),
Length( L )
@@ -31,12 +31,12 @@ KBufferLayout::KBufferLayout( int NoBpL, int SO, int L )
}
-KBufferLayout::~KBufferLayout()
+TDEBufferLayout::~TDEBufferLayout()
{
}
-bool KBufferLayout::setStartOffset( int SO )
+bool TDEBufferLayout::setStartOffset( int SO )
{
// rejecting <0
if( SO < 0 )
@@ -53,7 +53,7 @@ bool KBufferLayout::setStartOffset( int SO )
}
-bool KBufferLayout::setNoOfBytesPerLine( int N )
+bool TDEBufferLayout::setNoOfBytesPerLine( int N )
{
// rejecting <1
if( N < 1 )
@@ -71,7 +71,7 @@ bool KBufferLayout::setNoOfBytesPerLine( int N )
}
-bool KBufferLayout::setLength( int L )
+bool TDEBufferLayout::setLength( int L )
{
// rejecting < 0
if( L < 0 )
@@ -88,26 +88,26 @@ bool KBufferLayout::setLength( int L )
}
-void KBufferLayout::setNoOfLinesPerPage( int N )
+void TDEBufferLayout::setNoOfLinesPerPage( int N )
{
NoOfLinesPerPage = N;
}
-void KBufferLayout::calcStart()
+void TDEBufferLayout::calcStart()
{
- ContentCoords.setStart( KBufferCoord(StartOffset,NoOfBytesPerLine,false) );
+ ContentCoords.setStart( TDEBufferCoord(StartOffset,NoOfBytesPerLine,false) );
}
-void KBufferLayout::calcEnd()
+void TDEBufferLayout::calcEnd()
{
- ContentCoords.setEnd( (Length>0)?KBufferCoord(Length-1+StartOffset,NoOfBytesPerLine,false):
- KBufferCoord(-1,ContentCoords.start().line()) );
+ ContentCoords.setEnd( (Length>0)?TDEBufferCoord(Length-1+StartOffset,NoOfBytesPerLine,false):
+ TDEBufferCoord(-1,ContentCoords.start().line()) );
}
-int KBufferLayout::indexAtCLineStart( int L ) const
+int TDEBufferLayout::indexAtCLineStart( int L ) const
{
return ( L <= ContentCoords.start().line() ) ? 0:
( L > ContentCoords.end().line() ) ? Length-1:
@@ -115,7 +115,7 @@ int KBufferLayout::indexAtCLineStart( int L ) const
}
-int KBufferLayout::indexAtCLineEnd( int L ) const
+int TDEBufferLayout::indexAtCLineEnd( int L ) const
{
return ( L < ContentCoords.start().line() ) ? 0:
( L >= ContentCoords.end().line() ) ? Length-1:
@@ -123,7 +123,7 @@ int KBufferLayout::indexAtCLineEnd( int L ) const
}
-int KBufferLayout::indexAtCCoord( const KBufferCoord &C ) const
+int TDEBufferLayout::indexAtCCoord( const TDEBufferCoord &C ) const
{
int Index = indexAtCoord( C );
@@ -133,7 +133,7 @@ int KBufferLayout::indexAtCCoord( const KBufferCoord &C ) const
}
-int KBufferLayout::lineAtCIndex( int Index ) const
+int TDEBufferLayout::lineAtCIndex( int Index ) const
{
return ( Index <= 0 ) ? ContentCoords.start().line():
( Index >= Length ) ? ContentCoords.end().line():
@@ -141,7 +141,7 @@ int KBufferLayout::lineAtCIndex( int Index ) const
}
-KBufferCoord KBufferLayout::coordOfCIndex( int Index ) const
+TDEBufferCoord TDEBufferLayout::coordOfCIndex( int Index ) const
{
return ( Index <= 0 ) ? ContentCoords.start():
( Index >= Length ) ? ContentCoords.end():
@@ -149,36 +149,36 @@ KBufferCoord KBufferLayout::coordOfCIndex( int Index ) const
}
-int KBufferLayout::indexAtLineStart( int L ) const
+int TDEBufferLayout::indexAtLineStart( int L ) const
{
return ( L == ContentCoords.start().line() ) ? 0 : L*NoOfBytesPerLine-StartOffset;
}
-int KBufferLayout::indexAtLineEnd( int L ) const
+int TDEBufferLayout::indexAtLineEnd( int L ) const
{
return ( L == ContentCoords.end().line() ) ? Length-1 : (L+1)*NoOfBytesPerLine-StartOffset-1;
}
-int KBufferLayout::indexAtCoord( const KBufferCoord &C ) const
+int TDEBufferLayout::indexAtCoord( const TDEBufferCoord &C ) const
{
return C.indexByLineWidth( NoOfBytesPerLine ) - StartOffset;
}
-int KBufferLayout::lineAtIndex( int Index ) const
+int TDEBufferLayout::lineAtIndex( int Index ) const
{
return (Index+StartOffset)/NoOfBytesPerLine;
}
-KBufferCoord KBufferLayout::coordOfIndex( int Index ) const
+TDEBufferCoord TDEBufferLayout::coordOfIndex( int Index ) const
{
- return KBufferCoord( Index+StartOffset, NoOfBytesPerLine, false );
+ return TDEBufferCoord( Index+StartOffset, NoOfBytesPerLine, false );
}
-int KBufferLayout::correctIndex( int I ) const
+int TDEBufferLayout::correctIndex( int I ) const
{
return ( I <= 0 ) ? 0:
( I >= Length ) ? Length-1:
@@ -186,55 +186,55 @@ int KBufferLayout::correctIndex( int I ) const
}
-KBufferCoord KBufferLayout::correctCoord( const KBufferCoord &C ) const
+TDEBufferCoord TDEBufferLayout::correctCoord( const TDEBufferCoord &C ) const
{
return ( C <= ContentCoords.start() ) ? ContentCoords.start():
( C >= ContentCoords.end() ) ? ContentCoords.end():
- ( C.pos() >= NoOfBytesPerLine ) ? KBufferCoord( NoOfBytesPerLine-1, C.line() ):
+ ( C.pos() >= NoOfBytesPerLine ) ? TDEBufferCoord( NoOfBytesPerLine-1, C.line() ):
C;
}
-bool KBufferLayout::atLineStart( const KBufferCoord &C ) const
+bool TDEBufferLayout::atLineStart( const TDEBufferCoord &C ) const
{
return ( C.line() == ContentCoords.start().line() ) ? C.pos() == ContentCoords.start().pos():
C.pos() == 0;
}
-bool KBufferLayout::atLineEnd( const KBufferCoord &C ) const
+bool TDEBufferLayout::atLineEnd( const TDEBufferCoord &C ) const
{
return ( C.line() == ContentCoords.end().line() ) ? C.pos() == ContentCoords.end().pos():
C.pos() == NoOfBytesPerLine-1;
}
-KSection KBufferLayout::positions( int Line ) const
+KSection TDEBufferLayout::positions( int Line ) const
{
return KSection( firstPos(Line), lastPos(Line) );
}
-int KBufferLayout::firstPos( const KBufferCoord &C ) const
+int TDEBufferLayout::firstPos( const TDEBufferCoord &C ) const
{
return ( ContentCoords.start().isLaterInLineThan(C) ) ? ContentCoords.start().pos() : C.pos();
}
-int KBufferLayout::lastPos( const KBufferCoord &C ) const
+int TDEBufferLayout::lastPos( const TDEBufferCoord &C ) const
{
return ( ContentCoords.end().isPriorInLineThan(C) ) ? ContentCoords.end().pos() : C.pos();
}
-int KBufferLayout::firstPos( int Line ) const
+int TDEBufferLayout::firstPos( int Line ) const
{
return Line == ContentCoords.start().line() ? ContentCoords.start().pos() : 0;
}
-int KBufferLayout::lastPos( int Line ) const
+int TDEBufferLayout::lastPos( int Line ) const
{
return ( Line == ContentCoords.end().line() ) ? ContentCoords.end().pos() : NoOfBytesPerLine-1;
}
-bool KBufferLayout::hasContent( int Line ) const
+bool TDEBufferLayout::hasContent( int Line ) const
{
return ContentCoords.includesLine( Line );
}
diff --git a/khexedit/lib/kbufferlayout.h b/khexedit/lib/kbufferlayout.h
index c243225..b2866e1 100644
--- a/khexedit/lib/kbufferlayout.h
+++ b/khexedit/lib/kbufferlayout.h
@@ -46,12 +46,12 @@ namespace KHE {
*
*@author Friedrich W. H. Kossebau
*/
-class KBufferLayout
+class TDEBufferLayout
{
public:
- KBufferLayout( int NoBpL, int SO, int L );
- //KBufferLayout();
- ~KBufferLayout();
+ TDEBufferLayout( int NoBpL, int SO, int L );
+ //TDEBufferLayout();
+ ~TDEBufferLayout();
public: // given values
@@ -68,12 +68,12 @@ class KBufferLayout
int startLine() const;
int startPos() const;
/** returns the coord of the start */
- KBufferCoord start() const;
+ TDEBufferCoord start() const;
int finalLine() const;
int finalPos() const;
/** returns the coord of the end */
- KBufferCoord final() const;
+ TDEBufferCoord final() const;
/** tells how much lines this layout needs (incl. blank leading lines due to StartOffset) */
int noOfLines() const;
@@ -84,7 +84,7 @@ class KBufferLayout
* If the coord is before the first coord the first index is returned,
* if the coord is behind the last coord the last index is returned
*/
- int indexAtCCoord( const KBufferCoord &C ) const;
+ int indexAtCCoord( const TDEBufferCoord &C ) const;
/** calculates the index of the first pos in line.
* If the line is below the first line the first index is returned,
* if the line is above the last line the last index is returned
@@ -104,10 +104,10 @@ class KBufferLayout
* If the index is below the first index the first coord is returned,
* if the index is above the last index the last coord is returned
*/
- KBufferCoord coordOfCIndex( int Index ) const;
+ TDEBufferCoord coordOfCIndex( int Index ) const;
/** calculates the index of coord. if coord is invalid the behaviour is undefinded */
- int indexAtCoord( const KBufferCoord &C ) const;
+ int indexAtCoord( const TDEBufferCoord &C ) const;
/** calculates the index of the first pos in line. if line is invalid the behaviour is undefinded */
int indexAtLineStart( int L ) const;
/** calculates the index of last pos in line. if line is invalid the behaviour is undefinded */
@@ -115,7 +115,7 @@ class KBufferLayout
/** calculates the line in which index is found. if index is invalid the behaviour is undefinded */
int lineAtIndex( int Index ) const;
/** calculates the coord in which index is found. if index is invalid the behaviour is undefinded */
- KBufferCoord coordOfIndex( int Index ) const;
+ TDEBufferCoord coordOfIndex( int Index ) const;
/** returns the used positions in line */
KSection positions( int Line ) const;
@@ -124,20 +124,20 @@ class KBufferLayout
/** returns the last Pos in line. if line is invalid the behaviour is undefinded */
int lastPos( int Line ) const;
/** returns the valid Pos or the first Pos in line. if coord is invalid the behaviour is undefinded */
- int firstPos( const KBufferCoord &C ) const;
+ int firstPos( const TDEBufferCoord &C ) const;
/** returns the valid Pos or the last Pos in line. if coord is invalid the behaviour is undefinded */
- int lastPos( const KBufferCoord &C ) const;
+ int lastPos( const TDEBufferCoord &C ) const;
/** returns true if the line has content */
bool hasContent( int Line ) const;
/** returns true if the coord is the first in it's line. if coord is invalid the behaviour is undefinded */
- bool atLineStart( const KBufferCoord &C ) const;
+ bool atLineStart( const TDEBufferCoord &C ) const;
/** returns true if the coord is the last in it's line. if coord is invalid the behaviour is undefinded */
- bool atLineEnd( const KBufferCoord &C ) const;
+ bool atLineEnd( const TDEBufferCoord &C ) const;
/** returns the index if valid or the nearest valid index */
int correctIndex( int I ) const;
/** returns the coord if valid or the nearest valid coord */
- KBufferCoord correctCoord( const KBufferCoord &C ) const;
+ TDEBufferCoord correctCoord( const TDEBufferCoord &C ) const;
public: // modification access; return true if changes
@@ -170,26 +170,26 @@ class KBufferLayout
protected: // calculated values, buffered
/** coord in which the start offset is (starting with 0) */
-// KBufferCoord Start;
+// TDEBufferCoord Start;
/** coord in which the last byte is (starting with 0) */
-// KBufferCoord Final;
+// TDEBufferCoord Final;
/** */
KCoordRange ContentCoords;
};
-inline int KBufferLayout::startOffset() const { return StartOffset; }
-inline int KBufferLayout::noOfBytesPerLine() const { return NoOfBytesPerLine; }
-inline int KBufferLayout::length() const { return Length; }
+inline int TDEBufferLayout::startOffset() const { return StartOffset; }
+inline int TDEBufferLayout::noOfBytesPerLine() const { return NoOfBytesPerLine; }
+inline int TDEBufferLayout::length() const { return Length; }
-inline KBufferCoord KBufferLayout::final() const { return ContentCoords.end(); }
-inline KBufferCoord KBufferLayout::start() const { return ContentCoords.start(); }
-inline int KBufferLayout::startPos() const { return start().pos(); }
-inline int KBufferLayout::finalPos() const { return final().pos(); }
-inline int KBufferLayout::startLine() const { return start().line(); }
-inline int KBufferLayout::finalLine() const { return final().line(); }
-inline int KBufferLayout::noOfLinesPerPage() const { return NoOfLinesPerPage; }
-inline int KBufferLayout::noOfLines() const { return Length==0?0:final().line()+1; }
+inline TDEBufferCoord TDEBufferLayout::final() const { return ContentCoords.end(); }
+inline TDEBufferCoord TDEBufferLayout::start() const { return ContentCoords.start(); }
+inline int TDEBufferLayout::startPos() const { return start().pos(); }
+inline int TDEBufferLayout::finalPos() const { return final().pos(); }
+inline int TDEBufferLayout::startLine() const { return start().line(); }
+inline int TDEBufferLayout::finalLine() const { return final().line(); }
+inline int TDEBufferLayout::noOfLinesPerPage() const { return NoOfLinesPerPage; }
+inline int TDEBufferLayout::noOfLines() const { return Length==0?0:final().line()+1; }
}
diff --git a/khexedit/lib/kbufferranges.cpp b/khexedit/lib/kbufferranges.cpp
index 57fb9c4..d1871d5 100644
--- a/khexedit/lib/kbufferranges.cpp
+++ b/khexedit/lib/kbufferranges.cpp
@@ -23,19 +23,19 @@
using namespace KHE;
-KBufferRanges::KBufferRanges( KBufferLayout *L )
+TDEBufferRanges::TDEBufferRanges( TDEBufferLayout *L )
: Modified( false ),
Layout( L )
{
}
-KBufferRanges::~KBufferRanges()
+TDEBufferRanges::~TDEBufferRanges()
{
}
-void KBufferRanges::reset()
+void TDEBufferRanges::reset()
{
Selection.cancel();
FirstWordSelection.unset();
@@ -44,7 +44,7 @@ void KBufferRanges::reset()
}
-void KBufferRanges::setMarking( KSection M )
+void TDEBufferRanges::setMarking( KSection M )
{
if( Marking == M )
return;
@@ -54,14 +54,14 @@ void KBufferRanges::setMarking( KSection M )
}
-void KBufferRanges::removeFurtherSelections()
+void TDEBufferRanges::removeFurtherSelections()
{
for( int i = 1; i < noOfSelections(); ++i )
removeSelection( i );
}
-void KBufferRanges::setSelection( KSection S )
+void TDEBufferRanges::setSelection( KSection S )
{
bool Changed = Selection.isValid();
if( Changed )
@@ -70,7 +70,7 @@ void KBufferRanges::setSelection( KSection S )
addChangedRange( Selection );
}
-void KBufferRanges::setSelectionStart( int StartIndex )
+void TDEBufferRanges::setSelectionStart( int StartIndex )
{
bool Changed = Selection.isValid();
if( Changed )
@@ -80,7 +80,7 @@ void KBufferRanges::setSelectionStart( int StartIndex )
}
-void KBufferRanges::setSelectionEnd( int EndIndex )
+void TDEBufferRanges::setSelectionEnd( int EndIndex )
{
KSection OldSelection = Selection;
Selection.setEnd( EndIndex );
@@ -143,7 +143,7 @@ void KBufferRanges::setSelectionEnd( int EndIndex )
}
-void KBufferRanges::removeSelection( int id )
+void TDEBufferRanges::removeSelection( int id )
{
if( id > 0 )
return;
@@ -157,7 +157,7 @@ void KBufferRanges::removeSelection( int id )
}
-bool KBufferRanges::overlapsSelection( int FirstIndex, int LastIndex, int *SI, int *EI ) const
+bool TDEBufferRanges::overlapsSelection( int FirstIndex, int LastIndex, int *SI, int *EI ) const
{
if( Selection.overlaps(KSection(FirstIndex,LastIndex)) )
{
@@ -169,7 +169,7 @@ bool KBufferRanges::overlapsSelection( int FirstIndex, int LastIndex, int *SI, i
}
-bool KBufferRanges::overlapsMarking( int FirstIndex, int LastIndex, int *SI, int *EI ) const
+bool TDEBufferRanges::overlapsMarking( int FirstIndex, int LastIndex, int *SI, int *EI ) const
{
if( Marking.overlaps(KSection(FirstIndex,LastIndex)) )
{
@@ -181,7 +181,7 @@ bool KBufferRanges::overlapsMarking( int FirstIndex, int LastIndex, int *SI, int
}
-const KSection *KBufferRanges::firstOverlappingSelection( KSection Range ) const
+const KSection *TDEBufferRanges::firstOverlappingSelection( KSection Range ) const
{
if( Selection.overlaps(Range) )
return &Selection;
@@ -190,7 +190,7 @@ const KSection *KBufferRanges::firstOverlappingSelection( KSection Range ) const
}
-const KSection *KBufferRanges::overlappingMarking( KSection Range ) const
+const KSection *TDEBufferRanges::overlappingMarking( KSection Range ) const
{
if( Marking.overlaps(Range) )
return &Marking;
@@ -199,7 +199,7 @@ const KSection *KBufferRanges::overlappingMarking( KSection Range ) const
}
/*
-bool KBufferRanges::overlapsChanges( int FirstIndex, int LastIndex, int *SI, int *EI ) const
+bool TDEBufferRanges::overlapsChanges( int FirstIndex, int LastIndex, int *SI, int *EI ) const
{
for( KCoordRangeList::const_iterator S=ChangedRanges.begin(); S!=ChangedRanges.end(); ++S )
{
@@ -214,7 +214,7 @@ bool KBufferRanges::overlapsChanges( int FirstIndex, int LastIndex, int *SI, int
return false;
}
-bool KBufferRanges::overlapsChanges( KSection Indizes, KSection *ChangedRange ) const
+bool TDEBufferRanges::overlapsChanges( KSection Indizes, KSection *ChangedRange ) const
{
for( KSectionList::const_iterator S=ChangedRanges.begin(); S!=ChangedRanges.end(); ++S )
{
@@ -228,7 +228,7 @@ bool KBufferRanges::overlapsChanges( KSection Indizes, KSection *ChangedRange )
return false;
}
*/
-bool KBufferRanges::overlapsChanges( const KCoordRange &Range, KCoordRange *ChangedRange ) const
+bool TDEBufferRanges::overlapsChanges( const KCoordRange &Range, KCoordRange *ChangedRange ) const
{
// TODO: add a lastusedrange pointer for quicker access
for( KCoordRangeList::const_iterator R=ChangedRanges.begin(); R!=ChangedRanges.end(); ++R )
@@ -244,19 +244,19 @@ bool KBufferRanges::overlapsChanges( const KCoordRange &Range, KCoordRange *Chan
}
-void KBufferRanges::addChangedRange( int SI, int EI )
+void TDEBufferRanges::addChangedRange( int SI, int EI )
{
addChangedRange( KSection(SI,EI) );
}
-void KBufferRanges::addChangedRange( KSection S )
+void TDEBufferRanges::addChangedRange( KSection S )
{
addChangedRange( KCoordRange(Layout->coordOfIndex(S.start()),Layout->coordOfIndex(S.end())) );
}
-void KBufferRanges::addChangedRange( const KCoordRange &NewRange )
+void TDEBufferRanges::addChangedRange( const KCoordRange &NewRange )
{
ChangedRanges.addCoordRange( NewRange );
@@ -264,7 +264,7 @@ void KBufferRanges::addChangedRange( const KCoordRange &NewRange )
}
-void KBufferRanges::removeMarking()
+void TDEBufferRanges::removeMarking()
{
bool Changed = Marking.isValid();
if( Changed )
@@ -274,20 +274,20 @@ void KBufferRanges::removeMarking()
}
-void KBufferRanges::resetChangedRanges()
+void TDEBufferRanges::resetChangedRanges()
{
ChangedRanges.clear();
Modified = false;
}
-void KBufferRanges::setFirstWordSelection( KSection Section )
+void TDEBufferRanges::setFirstWordSelection( KSection Section )
{
FirstWordSelection = Section;
setSelection( FirstWordSelection );
}
- void KBufferRanges::ensureWordSelectionForward( bool Forward )
+ void TDEBufferRanges::ensureWordSelectionForward( bool Forward )
{
// in the anchor not on the right side?
if( Selection.isForward() != Forward )
diff --git a/khexedit/lib/kbufferranges.h b/khexedit/lib/kbufferranges.h
index ed2cbce..8a215ed 100644
--- a/khexedit/lib/kbufferranges.h
+++ b/khexedit/lib/kbufferranges.h
@@ -32,11 +32,11 @@ namespace KHE
*
* @author Friedrich W. H. Kossebau
*/
-class KBufferRanges
+class TDEBufferRanges
{
public:
- KBufferRanges( KBufferLayout *L );
- ~KBufferRanges();
+ TDEBufferRanges( TDEBufferLayout *L );
+ ~TDEBufferRanges();
public: // modifcation access
void setMarking( KSection M );
@@ -102,28 +102,28 @@ class KBufferRanges
KCoordRangeList ChangedRanges;
- KBufferLayout *Layout;
+ TDEBufferLayout *Layout;
};
-inline int KBufferRanges::noOfSelections() const { return 1; }
+inline int TDEBufferRanges::noOfSelections() const { return 1; }
-inline int KBufferRanges::selectionStart() const { return Selection.start(); }
-inline int KBufferRanges::selectionEnd() const { return Selection.end(); }
-inline KSection KBufferRanges::selection() const { return Selection; }
-inline KSection KBufferRanges::firstWordSelection() const { return FirstWordSelection; }
-inline int KBufferRanges::selectionLength() const { return Selection.width(); }
-inline bool KBufferRanges::isModified() const { return Modified; }
+inline int TDEBufferRanges::selectionStart() const { return Selection.start(); }
+inline int TDEBufferRanges::selectionEnd() const { return Selection.end(); }
+inline KSection TDEBufferRanges::selection() const { return Selection; }
+inline KSection TDEBufferRanges::firstWordSelection() const { return FirstWordSelection; }
+inline int TDEBufferRanges::selectionLength() const { return Selection.width(); }
+inline bool TDEBufferRanges::isModified() const { return Modified; }
-inline bool KBufferRanges::hasSelection() const { return Selection.isValid(); }
-inline bool KBufferRanges::selectionStarted() const { return Selection.started(); }
-inline bool KBufferRanges::selectionJustStarted() const { return Selection.justStarted(); }
-inline bool KBufferRanges::hasFirstWordSelection() const { return FirstWordSelection.isValid(); }
-inline bool KBufferRanges::hasMarking() const { return Marking.isValid(); }
-inline bool KBufferRanges::selectionIncludes( int Index ) const { return Selection.includes( Index ); }
-inline bool KBufferRanges::markingIncludes( int Index ) const { return Marking.includes( Index ); }
+inline bool TDEBufferRanges::hasSelection() const { return Selection.isValid(); }
+inline bool TDEBufferRanges::selectionStarted() const { return Selection.started(); }
+inline bool TDEBufferRanges::selectionJustStarted() const { return Selection.justStarted(); }
+inline bool TDEBufferRanges::hasFirstWordSelection() const { return FirstWordSelection.isValid(); }
+inline bool TDEBufferRanges::hasMarking() const { return Marking.isValid(); }
+inline bool TDEBufferRanges::selectionIncludes( int Index ) const { return Selection.includes( Index ); }
+inline bool TDEBufferRanges::markingIncludes( int Index ) const { return Marking.includes( Index ); }
-inline void KBufferRanges::setModified( bool M ) { Modified = M; }
+inline void TDEBufferRanges::setModified( bool M ) { Modified = M; }
}
diff --git a/khexedit/lib/kcharcoltextexport.cpp b/khexedit/lib/kcharcoltextexport.cpp
index d53d187..c540cc6 100644
--- a/khexedit/lib/kcharcoltextexport.cpp
+++ b/khexedit/lib/kcharcoltextexport.cpp
@@ -25,7 +25,7 @@ using namespace KHE;
KCharColTextExport::KCharColTextExport( const KCharColumn* TC, const char *D, KCoordRange CR, const TQString &CodecName )
- : KBufferColTextExport( TC, D, CR, 1 ),
+ : TDEBufferColTextExport( TC, D, CR, 1 ),
CharCodec( KCharCodec::createCodec(CodecName) ),
SubstituteChar( TC->substituteChar() ),
UndefinedChar( TC->undefinedChar() )
diff --git a/khexedit/lib/kcharcoltextexport.h b/khexedit/lib/kcharcoltextexport.h
index 7d9da2f..5940aa2 100644
--- a/khexedit/lib/kcharcoltextexport.h
+++ b/khexedit/lib/kcharcoltextexport.h
@@ -30,7 +30,7 @@ class KCharColumn;
class KCharCodec;
-class KCharColTextExport : public KBufferColTextExport
+class KCharColTextExport : public TDEBufferColTextExport
{
public:
KCharColTextExport( const KCharColumn* BF, const char *D, KCoordRange CR, const TQString &CodecName );
diff --git a/khexedit/lib/kcharcolumn.cpp b/khexedit/lib/kcharcolumn.cpp
index 10105a0..a075d05 100644
--- a/khexedit/lib/kcharcolumn.cpp
+++ b/khexedit/lib/kcharcolumn.cpp
@@ -37,8 +37,8 @@ static const TQChar DefaultSubstituteChar = (char)'.';
static const TQChar DefaultUndefinedChar = (char)'?';
-KCharColumn::KCharColumn( KColumnsView *CV, KDataBuffer *B, KBufferLayout *L, KBufferRanges *R )
- : KBufferColumn( CV, B, L, R ),
+KCharColumn::KCharColumn( KColumnsView *CV, KDataBuffer *B, TDEBufferLayout *L, TDEBufferRanges *R )
+ : TDEBufferColumn( CV, B, L, R ),
ShowUnprintable( DefaultShowUnprintable ),
SubstituteChar( DefaultSubstituteChar ),
UndefinedChar( DefaultUndefinedChar )
diff --git a/khexedit/lib/kcharcolumn.h b/khexedit/lib/kcharcolumn.h
index 59429f1..23427f5 100644
--- a/khexedit/lib/kcharcolumn.h
+++ b/khexedit/lib/kcharcolumn.h
@@ -35,10 +35,10 @@ namespace KHE
*
*@author Friedrich W. H. Kossebau
*/
-class KCharColumn : public KBufferColumn
+class KCharColumn : public TDEBufferColumn
{
public:
- KCharColumn( KColumnsView *CV, KDataBuffer *B, KBufferLayout *L, KBufferRanges *R );
+ KCharColumn( KColumnsView *CV, KDataBuffer *B, TDEBufferLayout *L, TDEBufferRanges *R );
virtual ~KCharColumn();
@@ -70,7 +70,7 @@ class KCharColumn : public KBufferColumn
TQChar undefinedChar() const;
- protected: // KBufferColumn API
+ protected: // TDEBufferColumn API
virtual void drawByte( TQPainter *P, char Byte, KHEChar B, const TQColor &Color ) const;
protected:
diff --git a/khexedit/lib/kcoordrange.h b/khexedit/lib/kcoordrange.h
index 0d5b186..7f134b3 100644
--- a/khexedit/lib/kcoordrange.h
+++ b/khexedit/lib/kcoordrange.h
@@ -27,21 +27,21 @@ namespace KHE
{
template<>
-inline const KBufferCoord KRange<KBufferCoord>::null() const { return KBufferCoord(-1,-1);}
+inline const TDEBufferCoord KRange<TDEBufferCoord>::null() const { return TDEBufferCoord(-1,-1);}
-typedef KRange<KBufferCoord> KBasicCoordRange;
+typedef KRange<TDEBufferCoord> KBasicCoordRange;
/** describes a range in the buffercoord
*@author Friedrich W. H. Kossebau
*/
-class KCoordRange : public KRange<KBufferCoord>
+class KCoordRange : public KRange<TDEBufferCoord>
{
public:
/**
* @param SC start coord
* @param EC end coord
*/
- KCoordRange( KBufferCoord SC, KBufferCoord EC );
+ KCoordRange( TDEBufferCoord SC, TDEBufferCoord EC );
/**
* @param Pos start and end pos
* @param Lines start and end line
@@ -77,9 +77,9 @@ class KCoordRange : public KRange<KBufferCoord>
};
-inline KCoordRange::KCoordRange( KBufferCoord SC, KBufferCoord EC ) : KBasicCoordRange(SC,EC) {}
+inline KCoordRange::KCoordRange( TDEBufferCoord SC, TDEBufferCoord EC ) : KBasicCoordRange(SC,EC) {}
inline KCoordRange::KCoordRange( KSection Pos, KSection Lines )
- : KBasicCoordRange( KBufferCoord(Pos.start(),Lines.start()), KBufferCoord(Pos.end(),Lines.end()) ) {}
+ : KBasicCoordRange( TDEBufferCoord(Pos.start(),Lines.start()), TDEBufferCoord(Pos.end(),Lines.end()) ) {}
inline KCoordRange::KCoordRange() {}
inline KCoordRange::~KCoordRange() {}
diff --git a/khexedit/lib/kcoordrangelist.cpp b/khexedit/lib/kcoordrangelist.cpp
index 3028c7d..ac6130b 100644
--- a/khexedit/lib/kcoordrangelist.cpp
+++ b/khexedit/lib/kcoordrangelist.cpp
@@ -53,7 +53,7 @@ void KCoordRangeList::addCoordRange( KCoordRange NewCoordRange )
// Start of the combined sections is the smaller one
NewCoordRange.extendStartTo( (*S).start() );
// next we search all the overlapping sections and keep the highest end index
- KBufferCoord End((*S).end());
+ TDEBufferCoord End((*S).end());
iterator LS = S;
for( ++LS; LS!=end(); ++LS )
{
diff --git a/khexedit/lib/khexedit.cpp b/khexedit/lib/khexedit.cpp
index 6a7c433..edba5d7 100644
--- a/khexedit/lib/khexedit.cpp
+++ b/khexedit/lib/khexedit.cpp
@@ -69,9 +69,9 @@ static const int InsertCursorWidth = 2;
KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFlags Flags )
: KColumnsView( Parent, Name, Flags ),
DataBuffer( Buffer ),
- BufferLayout( new KBufferLayout(DefaultNoOfBytesPerLine,DefaultStartOffset,0) ),
- BufferCursor( new KBufferCursor(BufferLayout) ),
- BufferRanges( new KBufferRanges(BufferLayout) ),
+ BufferLayout( new TDEBufferLayout(DefaultNoOfBytesPerLine,DefaultStartOffset,0) ),
+ BufferCursor( new TDEBufferCursor(BufferLayout) ),
+ BufferRanges( new TDEBufferRanges(BufferLayout) ),
CursorBlinkTimer( new TQTimer(this) ),
ScrollTimer( new TQTimer(this) ),
DragStartTimer( new TQTimer(this) ),
@@ -178,7 +178,7 @@ const TQString &KHexEdit::encodingName() const { return Codec->name(); }
KSection KHexEdit::selection() const { return BufferRanges->selection(); }
int KHexEdit::cursorPosition() const { return BufferCursor->index(); }
bool KHexEdit::isCursorBehind() const { return BufferCursor->isBehind(); }
-KHexEdit::KBufferColumnId KHexEdit::cursorColumn() const
+KHexEdit::TDEBufferColumnId KHexEdit::cursorColumn() const
{ return static_cast<KHE::KValueColumn *>( ActiveColumn ) == &valueColumn()? ValueColumnId : CharColumnId; }
void KHexEdit::setOverwriteOnly( bool OO ) { OverWriteOnly = OO; if( OverWriteOnly ) setOverwriteMode( true ); }
@@ -810,7 +810,7 @@ TQByteArray KHexEdit::selectedData() const
}
-KBufferDrag *KHexEdit::dragObject( TQWidget *Parent ) const
+TDEBufferDrag *KHexEdit::dragObject( TQWidget *Parent ) const
{
if( !BufferRanges->hasSelection() )
return 0;
@@ -835,7 +835,7 @@ KBufferDrag *KHexEdit::dragObject( TQWidget *Parent ) const
Range.set( BufferLayout->coordOfIndex(S.start()),BufferLayout->coordOfIndex(S.end()) );
}
- return new KBufferDrag( selectedData(), Range, OC, HC, TC,
+ return new TDEBufferDrag( selectedData(), Range, OC, HC, TC,
charColumn().substituteChar(), charColumn().undefinedChar(),
Codec->name(), Parent );
}
@@ -846,7 +846,7 @@ void KHexEdit::cut()
if( isReadOnly() || OverWrite )
return;
- KBufferDrag *Drag = dragObject();
+ TDEBufferDrag *Drag = dragObject();
if( !Drag )
return;
@@ -858,7 +858,7 @@ void KHexEdit::cut()
void KHexEdit::copy()
{
- KBufferDrag *Drag = dragObject();
+ TDEBufferDrag *Drag = dragObject();
if( !Drag )
return;
@@ -878,11 +878,11 @@ void KHexEdit::paste()
void KHexEdit::pasteFromSource( TQMimeSource *Source )
{
- if( !Source || !KBufferDrag::canDecode(Source) )
+ if( !Source || !TDEBufferDrag::canDecode(Source) )
return;
TQByteArray Data;
- if( !KBufferDrag::decode(Source,Data) )
+ if( !TDEBufferDrag::decode(Source,Data) )
return;
if( !Data.isEmpty() )
@@ -1091,7 +1091,7 @@ void KHexEdit::showBufferColumns( int CCs )
// active column not visible anymore?
if( !activeColumn().isVisible() )
{
- KBufferColumn *H = ActiveColumn;
+ TDEBufferColumn *H = ActiveColumn;
ActiveColumn = InactiveColumn;
InactiveColumn = H;
Controller = ReadOnly ? (KController*)Navigator :
@@ -1102,7 +1102,7 @@ void KHexEdit::showBufferColumns( int CCs )
}
-void KHexEdit::setCursorColumn( KBufferColumnId CC )
+void KHexEdit::setCursorColumn( TDEBufferColumnId CC )
{
// no changes or not visible?
if( CC == cursorColumn()
@@ -1149,7 +1149,7 @@ void KHexEdit::placeCursor( const TQPoint &Point )
cursorColumn() == CharColumnId ? (KController*)CharEditor : (KController*)ValueEditor;
// get coord of click and whether this click was closer to the end of the pos
- KBufferCoord C( activeColumn().magPosOfX(Point.x()), lineAt(Point.y()) );
+ TDEBufferCoord C( activeColumn().magPosOfX(Point.x()), lineAt(Point.y()) );
BufferCursor->gotoCCoord( C );
}
@@ -1157,13 +1157,13 @@ void KHexEdit::placeCursor( const TQPoint &Point )
int KHexEdit::indexByPoint( const TQPoint &Point ) const
{
- const KBufferColumn *C;
+ const TDEBufferColumn *C;
if( charColumn().isVisible() && Point.x() >= charColumn().x() )
C = &charColumn();
else
C = &valueColumn();
- KBufferCoord Coord( C->posOfX(Point.x()), lineAt(Point.y()) );
+ TDEBufferCoord Coord( C->posOfX(Point.x()), lineAt(Point.y()) );
return BufferLayout->indexAtCCoord( Coord );
}
@@ -1300,7 +1300,7 @@ void KHexEdit::createCursorPixmaps()
}
-void KHexEdit::pointPainterToCursor( TQPainter &Painter, const KBufferColumn &Column ) const
+void KHexEdit::pointPainterToCursor( TQPainter &Painter, const TDEBufferColumn &Column ) const
{
int x = Column.xOfPos( BufferCursor->pos() ) - contentsX();
int y = LineHeight * BufferCursor->line() - contentsY();
@@ -1357,10 +1357,10 @@ void KHexEdit::paintInactiveCursor( bool CursorOn )
pointPainterToCursor( Painter, inactiveColumn() );
if( CursorOn )
{
- KBufferColumn::KFrameStyle Style =
- BufferCursor->isBehind() ? KBufferColumn::Right :
- (OverWrite||ValueEditor->isInEditMode()) ? KBufferColumn::Frame :
- KBufferColumn::Left;
+ TDEBufferColumn::KFrameStyle Style =
+ BufferCursor->isBehind() ? TDEBufferColumn::Right :
+ (OverWrite||ValueEditor->isInEditMode()) ? TDEBufferColumn::Frame :
+ TDEBufferColumn::Left;
inactiveColumn().paintFramedByte( &Painter, Index, Style );
}
else
@@ -1408,9 +1408,9 @@ void KHexEdit::repaintChanged()
KPixelXs Xs( contentsX(), visibleWidth(), true );
// collect affected buffer columns
- TQPtrList<KBufferColumn> RepaintColumns;
+ TQPtrList<TDEBufferColumn> RepaintColumns;
- KBufferColumn *C = ValueColumn;
+ TDEBufferColumn *C = ValueColumn;
while( true )
{
if( C->isVisible() && C->overlaps(Xs) )
@@ -1441,24 +1441,24 @@ void KHexEdit::repaintChanged()
// only one line?
if( ChangedRange.start().line() == ChangedRange.end().line() )
- for( KBufferColumn *C=RepaintColumns.first(); C; C=RepaintColumns.next() )
+ for( TDEBufferColumn *C=RepaintColumns.first(); C; C=RepaintColumns.next() )
paintLine( C, ChangedRange.start().line(),
KSection(ChangedRange.start().pos(),ChangedRange.end().pos()) );
//
else
{
// first line
- for( KBufferColumn *C=RepaintColumns.first(); C; C=RepaintColumns.next() )
+ for( TDEBufferColumn *C=RepaintColumns.first(); C; C=RepaintColumns.next() )
paintLine( C, ChangedRange.start().line(),
KSection(ChangedRange.start().pos(),FullPositions.end()) );
// at least one full line?
for( int l = ChangedRange.start().line()+1; l < ChangedRange.end().line(); ++l )
- for( KBufferColumn *C=RepaintColumns.first(); C; C=RepaintColumns.next() )
+ for( TDEBufferColumn *C=RepaintColumns.first(); C; C=RepaintColumns.next() )
paintLine( C, l, FullPositions );
// last line
- for( KBufferColumn *C=RepaintColumns.first(); C; C=RepaintColumns.next() )
+ for( TDEBufferColumn *C=RepaintColumns.first(); C; C=RepaintColumns.next() )
paintLine( C, ChangedRange.end().line(),
KSection(FullPositions.start(),ChangedRange.end().pos()) );
}
@@ -1482,7 +1482,7 @@ void KHexEdit::repaintChanged()
}
-void KHexEdit::paintLine( KBufferColumn *C, int Line, KSection Positions )
+void KHexEdit::paintLine( TDEBufferColumn *C, int Line, KSection Positions )
{
Positions.restrictTo( C->visiblePositions() );
@@ -1648,7 +1648,7 @@ void KHexEdit::contentsMouseReleaseEvent( TQMouseEvent *e )
{
int Line = lineAt( e->pos().y() );
int Pos = activeColumn().posOfX( e->pos().x() ); // TODO: can we be sure here about the active column?
- int Index = BufferLayout->indexAtCCoord( KBufferCoord(Pos,Line) ); // TODO: can this be another index than the one of the cursor???
+ int Index = BufferLayout->indexAtCCoord( TDEBufferCoord(Pos,Line) ); // TODO: can this be another index than the one of the cursor???
emit clicked( Index );
}
@@ -1835,7 +1835,7 @@ void KHexEdit::startDrag()
void KHexEdit::contentsDragEnterEvent( TQDragEnterEvent *e )
{
// interesting for this widget?
- if( isReadOnly() || !KBufferDrag::canDecode(e) )
+ if( isReadOnly() || !TDEBufferDrag::canDecode(e) )
{
e->ignore();
return;
@@ -1849,7 +1849,7 @@ void KHexEdit::contentsDragEnterEvent( TQDragEnterEvent *e )
void KHexEdit::contentsDragMoveEvent( TQDragMoveEvent *e )
{
// is this content still interesting for us?
- if( isReadOnly() || !KBufferDrag::canDecode(e) )
+ if( isReadOnly() || !TDEBufferDrag::canDecode(e) )
{
e->ignore();
return;
@@ -1882,7 +1882,7 @@ void KHexEdit::contentsDropEvent( TQDropEvent *e )
InDnD = false;
e->acceptAction();
- if( !KBufferDrag::canDecode(e) ) //TODO: why do we acept the action still?
+ if( !TDEBufferDrag::canDecode(e) ) //TODO: why do we acept the action still?
return;
// is this an internal dnd?
@@ -1923,7 +1923,7 @@ void KHexEdit::handleInternalDrag( TQDropEvent *e )
{
// get data
TQByteArray Data;
- if( KBufferDrag::decode(e,Data) && !Data.isEmpty() )
+ if( TDEBufferDrag::decode(e,Data) && !Data.isEmpty() )
{
if( OverWrite )
{
diff --git a/khexedit/lib/khexedit.h b/khexedit/lib/khexedit.h
index 05007d7..c44fb89 100644
--- a/khexedit/lib/khexedit.h
+++ b/khexedit/lib/khexedit.h
@@ -36,13 +36,13 @@ class KDataBuffer;
class KCharColumn;
class KValueColumn;
-class KBufferColumn;
+class TDEBufferColumn;
class KOffsetColumn;
class KBorderColumn;
-class KBufferCursor;
-class KBufferLayout;
-class KBufferRanges;
+class TDEBufferCursor;
+class TDEBufferLayout;
+class TDEBufferRanges;
class KController;
class KTabController;
@@ -50,7 +50,7 @@ class KNavigator;
class KValueEditor;
class KCharEditor;
-class KBufferDrag;
+class TDEBufferDrag;
class KCursor;
class KCharCodec;
@@ -114,7 +114,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
enum KEncoding { LocalEncoding=0, ISO8859_1Encoding=1, EBCDIC1047Encoding=2,
StartOfOwnEncoding=0x8000, MaxEncodingId=0xFFFF };
- enum KBufferColumnId { ValueColumnId=1, CharColumnId=2 };
+ enum TDEBufferColumnId { ValueColumnId=1, CharColumnId=2 };
public:
@@ -139,7 +139,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
int cursorPosition() const;
/***/
bool isCursorBehind() const;
- KBufferColumnId cursorColumn() const;
+ TDEBufferColumnId cursorColumn() const;
bool isOverwriteMode() const;
bool isOverwriteOnly() const;
@@ -215,7 +215,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
/** puts the cursor in the column at the pos of Point (in absolute coord), does not handle the drawing */
void placeCursor( const TQPoint &Point );
/***/
- void setCursorColumn( KBufferColumnId );
+ void setCursorColumn( TDEBufferColumnId );
// void repaintByte( int row, int column, bool Erase = true );
// void updateByte( int row, int column );
// void ensureByteVisible( int row, int column );
@@ -386,12 +386,12 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
protected: // element accessor functions
KValueColumn& valueColumn();
KCharColumn& charColumn();
- KBufferColumn& activeColumn();
- KBufferColumn& inactiveColumn();
+ TDEBufferColumn& activeColumn();
+ TDEBufferColumn& inactiveColumn();
const KValueColumn& valueColumn() const;
const KCharColumn& charColumn() const;
- const KBufferColumn& activeColumn() const;
- const KBufferColumn& inactiveColumn() const;
+ const TDEBufferColumn& activeColumn() const;
+ const TDEBufferColumn& inactiveColumn() const;
protected: // atomic ui operations
/** handles screen update in case of a change to any of the width sizes
@@ -404,15 +404,15 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
/** recreates the cursor pixmaps and paints active and inactive cursors if doable */
void updateCursor();
void createCursorPixmaps();
- void pointPainterToCursor( TQPainter &Painter, const KBufferColumn &Column ) const;
+ void pointPainterToCursor( TQPainter &Painter, const TDEBufferColumn &Column ) const;
/** draws the blinking cursor or removes it */
void paintActiveCursor( bool CursorOn );
void paintInactiveCursor( bool CursorOn );
- void paintLine( KBufferColumn *C, int Line, KSection Positions );
+ void paintLine( TDEBufferColumn *C, int Line, KSection Positions );
protected: // partial operations
void handleMouseMove( const TQPoint& Point );
- KBufferDrag *dragObject( TQWidget *Parent = 0 ) const;
+ TDEBufferDrag *dragObject( TQWidget *Parent = 0 ) const;
void pasteFromSource( TQMimeSource *Source );
/** removes the section from the databuffer and updates all affected values */
KSection removeData( KSection Indizes );
@@ -453,11 +453,11 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
KDataBuffer *DataBuffer;
/** holds the logical layout */
- KBufferLayout *BufferLayout;
+ TDEBufferLayout *BufferLayout;
/** */
- KBufferCursor *BufferCursor;
+ TDEBufferCursor *BufferCursor;
/** */
- KBufferRanges *BufferRanges;
+ TDEBufferRanges *BufferRanges;
protected:
@@ -468,9 +468,9 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
KCharColumn *CharColumn;
/** points to the column with keyboard focus */
- KBufferColumn *ActiveColumn;
+ TDEBufferColumn *ActiveColumn;
/** points to the column without keyboard focus (if there is) */
- KBufferColumn *InactiveColumn;
+ TDEBufferColumn *InactiveColumn;
/** the actual input controller */
KController *Controller;
@@ -550,13 +550,13 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
inline const KValueColumn& KHexEdit::valueColumn() const { return *ValueColumn; }
inline const KCharColumn& KHexEdit::charColumn() const { return *CharColumn; }
-inline const KBufferColumn& KHexEdit::activeColumn() const { return *ActiveColumn; }
-inline const KBufferColumn& KHexEdit::inactiveColumn() const { return *InactiveColumn; }
+inline const TDEBufferColumn& KHexEdit::activeColumn() const { return *ActiveColumn; }
+inline const TDEBufferColumn& KHexEdit::inactiveColumn() const { return *InactiveColumn; }
inline KValueColumn& KHexEdit::valueColumn() { return *ValueColumn; }
inline KCharColumn& KHexEdit::charColumn() { return *CharColumn; }
-inline KBufferColumn& KHexEdit::activeColumn() { return *ActiveColumn; }
-inline KBufferColumn& KHexEdit::inactiveColumn() { return *InactiveColumn; }
+inline TDEBufferColumn& KHexEdit::activeColumn() { return *ActiveColumn; }
+inline TDEBufferColumn& KHexEdit::inactiveColumn() { return *InactiveColumn; }
}
diff --git a/khexedit/lib/kvaluecoltextexport.cpp b/khexedit/lib/kvaluecoltextexport.cpp
index 190018f..232aa28 100644
--- a/khexedit/lib/kvaluecoltextexport.cpp
+++ b/khexedit/lib/kvaluecoltextexport.cpp
@@ -25,7 +25,7 @@
using namespace KHE;
KValueColTextExport::KValueColTextExport( const KValueColumn* HC, const char *D, KCoordRange CR )
- : KBufferColTextExport( HC, D, CR, HC->byteCodec()->encodingWidth() ),
+ : TDEBufferColTextExport( HC, D, CR, HC->byteCodec()->encodingWidth() ),
ByteCodec( KByteCodec::createCodec(HC->coding()) )
{
}
diff --git a/khexedit/lib/kvaluecoltextexport.h b/khexedit/lib/kvaluecoltextexport.h
index c1987de..899ece4 100644
--- a/khexedit/lib/kvaluecoltextexport.h
+++ b/khexedit/lib/kvaluecoltextexport.h
@@ -28,7 +28,7 @@ namespace KHE
class KValueColumn;
-class KValueColTextExport : public KBufferColTextExport
+class KValueColTextExport : public TDEBufferColTextExport
{
public:
KValueColTextExport( const KValueColumn* BF, const char *D, KCoordRange CR );
diff --git a/khexedit/lib/kvaluecolumn.cpp b/khexedit/lib/kvaluecolumn.cpp
index 645dc89..58833c9 100644
--- a/khexedit/lib/kvaluecolumn.cpp
+++ b/khexedit/lib/kvaluecolumn.cpp
@@ -33,8 +33,8 @@ static const KCoding NotDefaultCoding = DecimalCoding;
static const int DefaultBinaryGapWidth = 1;
-KValueColumn::KValueColumn( KColumnsView *CV, KDataBuffer *B, KBufferLayout *L, KBufferRanges *R )
- : KBufferColumn( CV, B, L, R ),
+KValueColumn::KValueColumn( KColumnsView *CV, KDataBuffer *B, TDEBufferLayout *L, TDEBufferRanges *R )
+ : TDEBufferColumn( CV, B, L, R ),
Coding( NotDefaultCoding ),
ByteCodec( 0 ),
BinaryGapWidth( DefaultBinaryGapWidth )
diff --git a/khexedit/lib/kvaluecolumn.h b/khexedit/lib/kvaluecolumn.h
index 7aa287e..e0a515d 100644
--- a/khexedit/lib/kvaluecolumn.h
+++ b/khexedit/lib/kvaluecolumn.h
@@ -26,17 +26,17 @@
namespace KHE
{
-class KBufferRanges;
+class TDEBufferRanges;
/** buffer column which displays the numerical values of the bytes
*
*@author Friedrich W. H. Kossebau
*/
-class KValueColumn : public KBufferColumn
+class KValueColumn : public TDEBufferColumn
{
public:
- KValueColumn( KColumnsView *CV, KDataBuffer *B, KBufferLayout *L, KBufferRanges *R );
+ KValueColumn( KColumnsView *CV, KDataBuffer *B, TDEBufferLayout *L, TDEBufferRanges *R );
virtual ~KValueColumn();
public:
@@ -60,7 +60,7 @@ class KValueColumn : public KBufferColumn
const KByteCodec *byteCodec() const;
- protected: // KBufferColumn API
+ protected: // TDEBufferColumn API
virtual void drawByte( TQPainter *P, char Byte, KHEChar B, const TQColor &Color ) const;
virtual void recalcByteWidth();