summaryrefslogtreecommitdiffstats
path: root/kword
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kword
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kword')
-rw-r--r--kword/DESIGN12
-rw-r--r--kword/HACKING8
-rw-r--r--kword/KWAnchor.cpp56
-rw-r--r--kword/KWAnchor.h8
-rw-r--r--kword/KWBgSpellCheck.cpp2
-rw-r--r--kword/KWBgSpellCheck.h2
-rw-r--r--kword/KWCanvas.cpp592
-rw-r--r--kword/KWCanvas.h123
-rw-r--r--kword/KWCollectFramesetsVisitor.h6
-rw-r--r--kword/KWCommand.cpp310
-rw-r--r--kword/KWCommand.h162
-rw-r--r--kword/KWConfig.cpp360
-rw-r--r--kword/KWConfig.h91
-rw-r--r--kword/KWConfigFootNoteDia.cpp90
-rw-r--r--kword/KWConfigFootNoteDia.h17
-rw-r--r--kword/KWCreateBookmarkDia.cpp60
-rw-r--r--kword/KWCreateBookmarkDia.h32
-rw-r--r--kword/KWCreateBookmarkDiaBase.ui14
-rw-r--r--kword/KWDeleteDia.cpp32
-rw-r--r--kword/KWDeleteDia.h7
-rw-r--r--kword/KWDocStruct.cpp232
-rw-r--r--kword/KWDocStruct.h78
-rw-r--r--kword/KWDocument.cpp1198
-rw-r--r--kword/KWDocument.h313
-rw-r--r--kword/KWEditPersonnalExpression.cpp192
-rw-r--r--kword/KWEditPersonnalExpression.h37
-rw-r--r--kword/KWFactory.cpp8
-rw-r--r--kword/KWFactory.h5
-rw-r--r--kword/KWFindReplace.cpp8
-rw-r--r--kword/KWFindReplace.h13
-rw-r--r--kword/KWFootNoteDia.cpp50
-rw-r--r--kword/KWFootNoteDia.h27
-rw-r--r--kword/KWFormulaFrameSet.cpp118
-rw-r--r--kword/KWFormulaFrameSet.h46
-rw-r--r--kword/KWFrame.cpp74
-rw-r--r--kword/KWFrame.h40
-rw-r--r--kword/KWFrameDia.cpp562
-rw-r--r--kword/KWFrameDia.h121
-rw-r--r--kword/KWFrameLayout.cpp54
-rw-r--r--kword/KWFrameLayout.h28
-rw-r--r--kword/KWFrameList.cpp40
-rw-r--r--kword/KWFrameList.h14
-rw-r--r--kword/KWFrameSet.cpp272
-rw-r--r--kword/KWFrameSet.h121
-rw-r--r--kword/KWFrameSetEdit.cpp4
-rw-r--r--kword/KWFrameSetEdit.h54
-rw-r--r--kword/KWFrameStyle.cpp94
-rw-r--r--kword/KWFrameStyle.h28
-rw-r--r--kword/KWFrameStyleManager.cpp152
-rw-r--r--kword/KWFrameStyleManager.h93
-rw-r--r--kword/KWFrameView.cpp84
-rw-r--r--kword/KWFrameView.h50
-rw-r--r--kword/KWFrameViewManager.cpp137
-rw-r--r--kword/KWFrameViewManager.h49
-rw-r--r--kword/KWImportStyleDia.cpp112
-rw-r--r--kword/KWImportStyleDia.h28
-rw-r--r--kword/KWInsertDia.cpp34
-rw-r--r--kword/KWInsertDia.h11
-rw-r--r--kword/KWInsertPageDia.cpp26
-rw-r--r--kword/KWInsertPageDia.h9
-rw-r--r--kword/KWInsertPicDia.cpp64
-rw-r--r--kword/KWInsertPicDia.h11
-rw-r--r--kword/KWInsertTOCCommand.cpp36
-rw-r--r--kword/KWLoadingInfo.h30
-rw-r--r--kword/KWMailMergeDataBase.cpp240
-rw-r--r--kword/KWMailMergeDataBase.h68
-rw-r--r--kword/KWMailMergeDataSource.cpp6
-rw-r--r--kword/KWMailMergeDataSource.h27
-rw-r--r--kword/KWMailMergeLabelAction.cpp50
-rw-r--r--kword/KWMailMergeLabelAction.h15
-rw-r--r--kword/KWOasisLoader.cpp76
-rw-r--r--kword/KWOasisLoader.h20
-rw-r--r--kword/KWOasisSaver.cpp18
-rw-r--r--kword/KWOasisSaver.h10
-rw-r--r--kword/KWPage.cpp10
-rw-r--r--kword/KWPage.h8
-rw-r--r--kword/KWPageManager.cpp30
-rw-r--r--kword/KWPageManager.h8
-rw-r--r--kword/KWPartFrameSet.cpp60
-rw-r--r--kword/KWPartFrameSet.h34
-rw-r--r--kword/KWPictureFrameSet.cpp56
-rw-r--r--kword/KWPictureFrameSet.h18
-rw-r--r--kword/KWResizeTableDia.cpp26
-rw-r--r--kword/KWResizeTableDia.h11
-rw-r--r--kword/KWSelectBookmarkDiaBase.ui14
-rw-r--r--kword/KWSortDia.cpp24
-rw-r--r--kword/KWSortDia.h9
-rw-r--r--kword/KWSplitCellDia.cpp28
-rw-r--r--kword/KWSplitCellDia.h15
-rw-r--r--kword/KWStartupWidget.cpp34
-rw-r--r--kword/KWStartupWidget.h7
-rw-r--r--kword/KWStartupWidgetBase.ui18
-rw-r--r--kword/KWStatisticsDialog.cpp132
-rw-r--r--kword/KWStatisticsDialog.h25
-rw-r--r--kword/KWStyleManager.cpp6
-rw-r--r--kword/KWStyleManager.h7
-rw-r--r--kword/KWTableDia.cpp66
-rw-r--r--kword/KWTableDia.h56
-rw-r--r--kword/KWTableFrameSet.cpp286
-rw-r--r--kword/KWTableFrameSet.h111
-rw-r--r--kword/KWTableStyle.cpp68
-rw-r--r--kword/KWTableStyle.h24
-rw-r--r--kword/KWTableStyleManager.cpp170
-rw-r--r--kword/KWTableStyleManager.h62
-rw-r--r--kword/KWTableTemplate.cpp56
-rw-r--r--kword/KWTableTemplate.h32
-rw-r--r--kword/KWTableTemplateSelector.cpp112
-rw-r--r--kword/KWTableTemplateSelector.h58
-rw-r--r--kword/KWTextDocument.cpp70
-rw-r--r--kword/KWTextDocument.h15
-rw-r--r--kword/KWTextFrameSet.cpp714
-rw-r--r--kword/KWTextFrameSet.h170
-rw-r--r--kword/KWTextImage.cpp48
-rw-r--r--kword/KWTextImage.h10
-rw-r--r--kword/KWTextParag.cpp194
-rw-r--r--kword/KWTextParag.h30
-rw-r--r--kword/KWVariable.cpp144
-rw-r--r--kword/KWVariable.h44
-rw-r--r--kword/KWView.cpp1868
-rw-r--r--kword/KWView.h125
-rw-r--r--kword/KWViewMode.cpp226
-rw-r--r--kword/KWViewMode.h102
-rw-r--r--kword/KWordDocIface.cpp46
-rw-r--r--kword/KWordDocIface.h28
-rw-r--r--kword/KWordFootNoteFrameSetIface.cpp6
-rw-r--r--kword/KWordFootNoteFrameSetIface.h10
-rw-r--r--kword/KWordFormulaFrameSetEditIface.cpp4
-rw-r--r--kword/KWordFormulaFrameSetEditIface.h8
-rw-r--r--kword/KWordFormulaFrameSetIface.cpp2
-rw-r--r--kword/KWordFormulaFrameSetIface.h4
-rw-r--r--kword/KWordFrameSetIface.cpp118
-rw-r--r--kword/KWordFrameSetIface.h38
-rw-r--r--kword/KWordMailMergeDatabaseIface.h8
-rw-r--r--kword/KWordPartFrameSetIface.h4
-rw-r--r--kword/KWordPictureFrameSetIface.cpp2
-rw-r--r--kword/KWordPictureFrameSetIface.h6
-rw-r--r--kword/KWordTableFrameSetIface.h4
-rw-r--r--kword/KWordTextFrameSetEditIface.cpp18
-rw-r--r--kword/KWordTextFrameSetEditIface.h18
-rw-r--r--kword/KWordTextFrameSetIface.cpp34
-rw-r--r--kword/KWordTextFrameSetIface.h36
-rw-r--r--kword/KWordViewIface.cpp22
-rw-r--r--kword/KWordViewIface.h18
-rw-r--r--kword/OASIS4
-rw-r--r--kword/defs.h6
-rw-r--r--kword/demos/framestest.kwd2
-rw-r--r--kword/demos/mars.kwdbin222700 -> 222699 bytes
-rw-r--r--kword/kwordmailmergedatabaseiface.cpp2
-rw-r--r--kword/mailmerge/KWClassicSerialDataSource.cpp244
-rw-r--r--kword/mailmerge/KWClassicSerialDataSource.h85
-rw-r--r--kword/mailmerge/kabc/KWMailMergeKABC.cpp92
-rw-r--r--kword/mailmerge/kabc/KWMailMergeKABC.h39
-rw-r--r--kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp190
-rw-r--r--kword/mailmerge/kabc/KWMailMergeKABCConfig.h33
-rw-r--r--kword/mailmerge/kabc/addresspicker.ui32
-rw-r--r--kword/mailmerge/kspread/kwmailmerge_kspread.cpp40
-rw-r--r--kword/mailmerge/kspread/kwmailmerge_kspread.h19
-rw-r--r--kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp40
-rw-r--r--kword/mailmerge/kspread/kwmailmerge_kspread_config.h5
-rw-r--r--kword/mailmerge/sql/KWMySqlCursor.h48
-rw-r--r--kword/mailmerge/sql/KWQtSqlEasyFilter.cpp50
-rw-r--r--kword/mailmerge/sql/KWQtSqlEasyFilter.h23
-rw-r--r--kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp56
-rw-r--r--kword/mailmerge/sql/KWQtSqlMailMergeOpen.h27
-rw-r--r--kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp164
-rw-r--r--kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h54
-rw-r--r--kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp126
-rw-r--r--kword/mailmerge/sql/KWQtSqlSerialDataSource.h53
-rw-r--r--kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp54
-rw-r--r--kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h39
-rw-r--r--kword/mailmerge/sql/kwqtsqlpower.ui26
-rw-r--r--kword/mailmerge/sql/qtsqldatasourceeditor.ui24
-rw-r--r--kword/mailmerge/sql/qtsqldatasourceeditor.ui.h4
-rw-r--r--kword/mailmerge/sql/qtsqlopenwidget.ui28
-rw-r--r--kword/tests/FrameTester.cpp4
-rw-r--r--kword/tests/FrameTester.h6
-rw-r--r--kword/tests/FrameViewTester.cpp8
-rw-r--r--kword/tests/KWPageManagerTester.cpp28
178 files changed, 7435 insertions, 7366 deletions
diff --git a/kword/DESIGN b/kword/DESIGN
index 6a01ae28..d0a4e64d 100644
--- a/kword/DESIGN
+++ b/kword/DESIGN
@@ -16,7 +16,7 @@ text, and the frames define where on the pages this text is displayed.
* About text framesets: they hold a text document (KWTextDocument, which is
a QTextDocument from the KoText classes - more on KoText later).
-* About Tables; one table is a KWTableFrameset. This tableframeset contains
+* About Tables; one table is a KWTableFrameset. This tableframeset tqcontains
all the cells as its frames. But because the cells have a different text per
cell, we contain the cells in their own KWTextFrameset.
@@ -38,7 +38,7 @@ cell, we contain the cells in their own KWTextFrameset.
is defined by m_zOrder in KWFrame. This number is relative to the other
frames *on the same page*.
-Frame layout and pages
+Frame tqlayout and pages
======================
Generally, the user is free to position frames where he/she wants to.
@@ -63,10 +63,10 @@ In WP mode, removing pages is automatically done by KWDocument::tryRemovingPages
In DTP mode pages are user-controlled (insert and delete page actions),
but overflowing text can still create a new page as well.
-The difficulty with frame layout is that in most cases the frame size and
-number depends on the text inside, and the text layout depends on the frames
-(frame width, frames on top, etc.). This is why text layout (formatMore())
-and frame layout (e.g. KWFrameLayout) often call each other, resulting in
+The difficulty with frame tqlayout is that in most cases the frame size and
+number depends on the text inside, and the text tqlayout depends on the frames
+(frame width, frames on top, etc.). This is why text tqlayout (formatMore())
+and frame tqlayout (e.g. KWFrameLayout) often call each other, resulting in
infinite loops when some code goes wrong.
Editing
diff --git a/kword/HACKING b/kword/HACKING
index 3e8a0f68..0cf5be76 100644
--- a/kword/HACKING
+++ b/kword/HACKING
@@ -59,7 +59,7 @@ DIRECTORIES:
various QTSQL interface implementation files
to handle table selection and mailmerge data
templates:
- various page layout templates
+ various page tqlayout templates
make_template.pl - Perl script to create XML templates
- from KWord-saved XML files
subdirectories
@@ -89,7 +89,7 @@ FILES:
main.cc - the main
kwaboutdata.h - the appname, authors...
- shared between main.cc and kwfactory.cc
- kword.rc - xml-gui layout
+ kword.rc - xml-gui tqlayout
kword.desktop - application .desktop file
main document data structures:
@@ -154,7 +154,7 @@ FILES:
framedia.h/cc - frame dialog
kwframe.h/cc - frame, framesets (picture/formula/...),
- framesetedit objects for editing framesets
- kwframelayout.h/cc - the frame layout engine for headers/main
+ kwframetqlayout.h/cc - the frame tqlayout engine for headers/main
frames/footers/footnotes.
(this is a helper for KWDoc::recalcFrames)
kwtextframeset.h/cc - text frameset
@@ -184,7 +184,7 @@ FILES:
contents:
contents.h/cc - table of contents
search:
- searchdia.h/cc - text find and replace
+ searchdia.h/cc - text find and tqreplace
other features:
bookmarks:
diff --git a/kword/KWAnchor.cpp b/kword/KWAnchor.cpp
index 33242554..f9641cf4 100644
--- a/kword/KWAnchor.cpp
+++ b/kword/KWAnchor.cpp
@@ -55,7 +55,7 @@ void KWAnchor::finalize()
KWTextFrameSet * fs = static_cast<KWTextDocument *>(textDocument())->textFrameSet();
KoPoint dPoint;
- if ( fs->internalToDocument( QPoint( x()+paragx, y()+paragy ), dPoint ) )
+ if ( fs->internalToDocument( TQPoint( x()+paragx, y()+paragy ), dPoint ) )
{
//kdDebug(32001) << "KWAnchor::finalize moving frame to " << dPoint.x() << "," << dPoint.y() << endl;
// Move the frame to position dPoint.
@@ -67,10 +67,10 @@ void KWAnchor::finalize()
}
}
-void KWAnchor::draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected )
+void KWAnchor::draw( TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected )
{
// (x,y) is the position of the inline item (in Layout Units)
- // (cx,cy,cw,ch) is the rectangle to be painted, in layout units too
+ // (cx,cy,cw,ch) is the rectangle to be painted, in tqlayout units too
if ( m_deleted )
return;
@@ -86,13 +86,13 @@ void KWAnchor::draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch,
int paragx = paragraph()->rect().x();
int paragy = paragraph()->rect().y();
- QRect inlineFrameLU( paragx+xpos, paragy+ypos, width, height );
+ TQRect inlineFrameLU( paragx+xpos, paragy+ypos, width, height );
#ifdef DEBUG_DRAWING
kdDebug(32001) << "KWAnchor::draw x:" << x << ", y:" << y << " paragx=" << paragx << " paragy=" << paragy << endl;
kdDebug(32001) << " inline frame in LU coordinates: " << inlineFrameLU << endl;
#endif
- QRect crectLU = QRect( (cx > 0 ? cx : 0)+paragx, cy+paragy, cw, ch );
+ TQRect crectLU = TQRect( (cx > 0 ? cx : 0)+paragx, cy+paragy, cw, ch );
#ifdef DEBUG_DRAWING
kdDebug(32001) << " crect in LU coordinates: " << DEBUGRECT( crectLU ) << endl;
#endif
@@ -105,13 +105,13 @@ void KWAnchor::draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch,
#endif
// Convert crect to document coordinates, first topleft then bottomright
- QPoint topLeftLU = crectLU.topLeft();
- QPoint bottomRightLU = crectLU.bottomRight();
+ TQPoint topLeftLU = crectLU.topLeft();
+ TQPoint bottomRightLU = crectLU.bottomRight();
KWFrame* containingFrame = fs->currentDrawnFrame(); // always set, except in the textviewmode
if(containingFrame)
containingFrame = KWFrameSet::settingsFrame(containingFrame);
else { // if its not set (in textviewmode) try to get it from the FS
- QPoint paragPos = inlineFrameLU.topLeft();
+ TQPoint paragPos = inlineFrameLU.topLeft();
KoPoint dummy(0, 0);
containingFrame = fs->internalToDocument(paragPos, dummy);
}
@@ -122,7 +122,7 @@ void KWAnchor::draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch,
KoRect crectPt( topLeftPt, bottomRightPt );
// Convert crect to view coords
- QRect crect = fs->currentViewMode()->normalToView( zh->zoomRect( crectPt ) );
+ TQRect crect = fs->currentViewMode()->normalToView( zh->zoomRect( crectPt ) );
// and add 1 to right and bottom, to avoid rounding errors (and due to qrect semantics)
crect.rBottom() += 2; // HACK: 1 doesn't do it, it leaves a white line along window borders
crect.rRight() += 1;
@@ -137,7 +137,7 @@ void KWAnchor::draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch,
if ( containingFrame && containingFrame->isCopy() )
{
// Find last real frame, in case we are in a copied frame
- QPtrListIterator<KWFrame> frameIt( fs->frameIterator() );
+ TQPtrListIterator<KWFrame> frameIt( fs->frameIterator() );
frameIt.toLast(); // from the end to avoid a 2*N in the worst case
while ( !frameIt.atFirst() && frameIt.current() != containingFrame ) // look for 'containingFrame'
--frameIt;
@@ -154,12 +154,12 @@ void KWAnchor::draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch,
if ( containingFrame ) // 0 in the textviewmode
topLeftParagPt = containingFrame->innerRect().topLeft();
- topLeftParagPt.rx() += zh->layoutUnitPtToPt( zh->pixelYToPt( paragx ) );
- topLeftParagPt.ry() += zh->layoutUnitPtToPt( zh->pixelYToPt( paragy ) );
+ topLeftParagPt.rx() += zh->tqlayoutUnitPtToPt( zh->pixelYToPt( paragx ) );
+ topLeftParagPt.ry() += zh->tqlayoutUnitPtToPt( zh->pixelYToPt( paragy ) );
if ( containingFrame ) // 0 in the textviewmode
topLeftParagPt.ry() -= containingFrame->internalY();
- QPoint topLeftParag = fs->currentViewMode()->normalToView( zh->zoomPoint( topLeftParagPt ) );
+ TQPoint topLeftParag = fs->currentViewMode()->normalToView( zh->zoomPoint( topLeftParagPt ) );
// Finally, make the painter go back to view coord system
// (this is exactly the opposite of the code in KWFrameSet::drawContents)
@@ -170,26 +170,26 @@ void KWAnchor::draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch,
kdDebug() << " translating by " << -topLeftParag.x() << "," << -topLeftParag.y() << endl;
#endif
- QColorGroup cg2( cg );
+ TQColorGroup cg2( cg );
KWFrameViewManager *fvm = 0;
if(m_frameset->kWordDocument()) {
- QValueList<KWView *> views = m_frameset->kWordDocument()->getAllViews();
+ TQValueList<KWView *> views = m_frameset->kWordDocument()->getAllViews();
// Note that "views" is empty when the KWDocument is an (inactive) embedded document
if ( !views.isEmpty() )
fvm = views.first()->frameViewManager();
}
m_frameset->drawContents( p, crect, cg2, false, true, 0L, fs->currentViewMode(), fvm);
- if( selected && placement() == PlaceInline && p->device()->devType() != QInternal::Printer )
+ if( selected && placement() == PlaceInline && p->device()->devType() != TQInternal::Printer )
{
// The above rects are about the containing frame.
// To draw the inline frame as selected, we need to look at the inline frame's own size.
- QRect frameRect = crect;
+ TQRect frameRect = crect;
#ifdef DEBUG_DRAWING
kdDebug() << "KWAnchor::draw selected frame. frameRect=" << frameRect << endl;
#endif
- p->fillRect( frameRect, QBrush( cg.highlight(), QBrush::Dense4Pattern) );
+ p->fillRect( frameRect, TQBrush( cg.highlight(), TQBrush::Dense4Pattern) );
}
p->restore();
@@ -198,17 +198,17 @@ void KWAnchor::draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch,
#endif
}
-QSize KWAnchor::size() const
+TQSize KWAnchor::size() const
{
KoSize kosz = m_frameset->floatingFrameSize( m_frameNum );
//kdDebug() << "KWAnchor::size in pt: " << kosz.width() << "x" << kosz.height() << endl;
KoTextZoomHandler * zh = textDocument()->formattingZoomHandler();
- QSize sz( zh->ptToLayoutUnitPixX( kosz.width() ), zh->ptToLayoutUnitPixY( kosz.height() ) );
+ TQSize sz( zh->ptToLayoutUnitPixX( kosz.width() ), zh->ptToLayoutUnitPixY( kosz.height() ) );
//kdDebug() << "KWAnchor::size in LU: " << sz.width() << "x" << sz.height() << endl;
- //kdDebug() << " size in pixels: " << zh->layoutUnitToPixelX( sz.width() ) << "x"
- // << zh->layoutUnitToPixelY( sz.height() ) << endl;
+ //kdDebug() << " size in pixels: " << zh->tqlayoutUnitToPixelX( sz.width() ) << "x"
+ // << zh->tqlayoutUnitToPixelY( sz.height() ) << endl;
if ( sz.isNull() ) // for some reason, we don't know the size yet
- sz = QSize( width, height ); // LU
+ sz = TQSize( width, height ); // LU
return sz;
}
@@ -224,7 +224,7 @@ void KWAnchor::resize()
{
if ( m_deleted )
return;
- QSize s = size();
+ TQSize s = size();
if ( width != s.width() || height != s.height() )
{
width = s.width();
@@ -234,7 +234,7 @@ void KWAnchor::resize()
if ( parag )
{
kdDebug(32001) << "KWAnchor::resize invalidating parag " << parag->paragId() << endl;
- parag->invalidate( 0 );
+ parag->tqinvalidate( 0 );
}
}
}
@@ -263,10 +263,10 @@ void KWAnchor::setDeleted( bool b )
m_frameset->setAnchored( static_cast<KWTextDocument *>(textDocument())->textFrameSet() );
}
-void KWAnchor::save( QDomElement &parentElem )
+void KWAnchor::save( TQDomElement &tqparentElem )
{
- QDomElement anchorElem = parentElem.ownerDocument().createElement( "ANCHOR" );
- parentElem.appendChild( anchorElem );
+ TQDomElement anchorElem = tqparentElem.ownerDocument().createElement( "ANCHOR" );
+ tqparentElem.appendChild( anchorElem );
anchorElem.setAttribute( "type", "frameset" ); // the only possible value currently
//KWDocument * doc = textDocument()->textFrameSet()->kWordDocument();
// ## TODO save the frame number as well ? Only the first frame ? to be determined
diff --git a/kword/KWAnchor.h b/kword/KWAnchor.h
index d03fd111..1f5b5f65 100644
--- a/kword/KWAnchor.h
+++ b/kword/KWAnchor.h
@@ -52,7 +52,7 @@ public:
int frameNum() const { return m_frameNum; }
/** Return the size of the item, i.e. the size of the frame (zoomed) */
- QSize size() const;
+ TQSize size() const;
/* overloaded methods, see lib/kotext/kotextcustomitem.h for docu*/
virtual void resize();
@@ -64,14 +64,14 @@ public:
virtual int minimumWidth() const { return size().width(); }
virtual int ascent() const;
- virtual void draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected );
+ virtual void draw( TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected );
/** Never called since we reimplement draw */
- virtual void drawCustomItem(QPainter*, int, int, int, int, int, int, int, int, int, const QColorGroup&, bool, int, bool) { }
+ virtual void drawCustomItem(TQPainter*, int, int, int, int, int, int, int, int, int, const TQColorGroup&, bool, int, bool) { }
virtual KCommand * createCommand();
virtual KCommand * deleteCommand();
virtual void setDeleted( bool b );
- virtual void save( QDomElement &formatElem );
+ virtual void save( TQDomElement &formatElem );
virtual void saveOasis( KoXmlWriter& writer, KoSavingContext& context ) const;
virtual int typeId() const { return 6; }
diff --git a/kword/KWBgSpellCheck.cpp b/kword/KWBgSpellCheck.cpp
index 1d0f173f..e1f0cf8e 100644
--- a/kword/KWBgSpellCheck.cpp
+++ b/kword/KWBgSpellCheck.cpp
@@ -49,7 +49,7 @@ KWBgSpellCheck::~KWBgSpellCheck()
KoTextIterator *KWBgSpellCheck::createWholeDocIterator() const
{
- QValueList<KoTextObject *> objects = m_doc->visibleTextObjects( 0 );
+ TQValueList<KoTextObject *> objects = m_doc->visibleTextObjects( 0 );
kdDebug()<<"Number of visible text objects = "<< objects.count() << endl;
diff --git a/kword/KWBgSpellCheck.h b/kword/KWBgSpellCheck.h
index 3c3c73af..2e4a6c39 100644
--- a/kword/KWBgSpellCheck.h
+++ b/kword/KWBgSpellCheck.h
@@ -27,7 +27,7 @@ class KWTextFrameSet;
#include "KoBgSpellCheck.h"
-#include <qobject.h>
+#include <tqobject.h>
class KWBgSpellCheck : public KoBgSpellCheck
{
public:
diff --git a/kword/KWCanvas.cpp b/kword/KWCanvas.cpp
index 37fd0ff5..2e147e6c 100644
--- a/kword/KWCanvas.cpp
+++ b/kword/KWCanvas.cpp
@@ -38,13 +38,13 @@
#include "KWFrameView.h"
#include "KWFrameViewManager.h"
-#include <qbuffer.h>
-#include <qtimer.h>
-#include <qclipboard.h>
-#include <qprogressdialog.h>
-#include <qobjectlist.h>
-#include <qapplication.h>
-#include <qwhatsthis.h>
+#include <tqbuffer.h>
+#include <tqtimer.h>
+#include <tqclipboard.h>
+#include <tqprogressdialog.h>
+#include <tqobjectlist.h>
+#include <tqapplication.h>
+#include <tqwhatsthis.h>
#include <KoStore.h>
#include <KoStoreDrag.h>
@@ -63,8 +63,8 @@
#include <assert.h>
-KWCanvas::KWCanvas(const QString& viewMode, QWidget *parent, KWDocument *d, KWGUI *lGui)
- : QScrollView( parent, "canvas", /*WNorthWestGravity*/ WStaticContents| WResizeNoErase | WRepaintNoErase ), m_doc( d )
+KWCanvas::KWCanvas(const TQString& viewMode, TQWidget *tqparent, KWDocument *d, KWGUI *lGui)
+ : TQScrollView( tqparent, "canvas", /*WNorthWestGravity*/ WStaticContents| WResizeNoErase | WRepaintNoErase ), m_doc( d )
{
m_frameViewManager = new KWFrameViewManager(d);
m_gui = lGui;
@@ -91,7 +91,7 @@ KWCanvas::KWCanvas(const QString& viewMode, QWidget *parent, KWDocument *d, KWGU
m_table.width = KWTableFrameSet::TblAuto;
m_table.height = KWTableFrameSet::TblAuto;
m_table.floating = true;
- m_table.tableTemplateName=QString::null;
+ m_table.tableTemplateName=TQString();
m_table.format=31;
m_footEndNote.noteType = FootNote;
@@ -110,29 +110,29 @@ KWCanvas::KWCanvas(const QString& viewMode, QWidget *parent, KWDocument *d, KWGU
setKeyCompression( TRUE );
viewport()->setMouseTracking( TRUE );
- m_scrollTimer = new QTimer( this );
- connect( m_scrollTimer, SIGNAL( timeout() ),
- this, SLOT( doAutoScroll() ) );
+ m_scrollTimer = new TQTimer( this );
+ connect( m_scrollTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( doAutoScroll() ) );
viewport()->setFocusProxy( this );
- viewport()->setFocusPolicy( WheelFocus );
+ viewport()->setFocusPolicy( TQ_WheelFocus );
setInputMethodEnabled( true );
setFocus();
viewport()->installEventFilter( this );
installEventFilter( this );
KCursor::setAutoHideCursor( this, true, true );
- connect( this, SIGNAL(contentsMoving( int, int )),
- this, SLOT(slotContentsMoving( int, int )) );
+ connect( this, TQT_SIGNAL(contentsMoving( int, int )),
+ this, TQT_SLOT(slotContentsMoving( int, int )) );
- connect( m_doc, SIGNAL( newContentsSize() ),
- this, SLOT( slotNewContentsSize() ) );
+ connect( m_doc, TQT_SIGNAL( newContentsSize() ),
+ this, TQT_SLOT( slotNewContentsSize() ) );
- connect( m_doc, SIGNAL( mainTextHeightChanged() ),
- this, SLOT( slotMainTextHeightChanged() ) );
+ connect( m_doc, TQT_SIGNAL( mainTextHeightChanged() ),
+ this, TQT_SLOT( slotMainTextHeightChanged() ) );
- connect( m_doc, SIGNAL( sig_terminateEditing( KWFrameSet * ) ),
- this, SLOT( terminateEditing( KWFrameSet * ) ) );
+ connect( m_doc, TQT_SIGNAL( sig_terminateEditing( KWFrameSet * ) ),
+ this, TQT_SLOT( terminateEditing( KWFrameSet * ) ) );
slotNewContentsSize();
@@ -141,7 +141,7 @@ KWCanvas::KWCanvas(const QString& viewMode, QWidget *parent, KWDocument *d, KWGU
// Create the current frameset-edit last, to have everything ready for it
KWFrameSet * fs = 0L;
- QString fsName = m_doc->initialFrameSet();
+ TQString fsName = m_doc->initialFrameSet();
if ( !fsName.isEmpty() )
fs = m_doc->frameSetByName( fsName );
if ( !fs )
@@ -162,10 +162,10 @@ KWCanvas::KWCanvas(const QString& viewMode, QWidget *parent, KWDocument *d, KWGU
}
m_doc->deleteInitialEditingInfo();
- connect(frameViewManager(), SIGNAL(sigFrameResized(const QValueList<KWFrame*>&)),
- m_doc, SLOT(framesChanged(const QValueList<KWFrame*>&)));
- connect(frameViewManager(), SIGNAL(sigFrameMoved(const QValueList<KWFrame*>&)),
- m_doc, SLOT(framesChanged(const QValueList<KWFrame*>&)));
+ connect(frameViewManager(), TQT_SIGNAL(sigFrameResized(const TQValueList<KWFrame*>&)),
+ m_doc, TQT_SLOT(framesChanged(const TQValueList<KWFrame*>&)));
+ connect(frameViewManager(), TQT_SIGNAL(sigFrameMoved(const TQValueList<KWFrame*>&)),
+ m_doc, TQT_SLOT(framesChanged(const TQValueList<KWFrame*>&)));
}
KWCanvas::~KWCanvas()
@@ -175,41 +175,41 @@ KWCanvas::~KWCanvas()
m_currentFrameSetEdit = 0;
delete m_viewMode;
m_viewMode = 0;
- disconnect(frameViewManager(), SIGNAL(sigFrameResized(const QValueList<KWFrame*>&)),
- m_doc, SLOT(framesChanged(const QValueList<KWFrame*>&)));
- disconnect(frameViewManager(), SIGNAL(sigFrameMoved(const QValueList<KWFrame*>&)),
- m_doc, SLOT(framesChanged(const QValueList<KWFrame*>&)));
+ disconnect(frameViewManager(), TQT_SIGNAL(sigFrameResized(const TQValueList<KWFrame*>&)),
+ m_doc, TQT_SLOT(framesChanged(const TQValueList<KWFrame*>&)));
+ disconnect(frameViewManager(), TQT_SIGNAL(sigFrameMoved(const TQValueList<KWFrame*>&)),
+ m_doc, TQT_SLOT(framesChanged(const TQValueList<KWFrame*>&)));
delete m_frameViewManager;
m_frameViewManager = 0;
}
-void KWCanvas::repaintChanged( KWFrameSet * fs, bool resetChanged )
+void KWCanvas::tqrepaintChanged( KWFrameSet * fs, bool resetChanged )
{
assert(fs); // the new code can't support fs being 0L here. Mail me if it happens (DF)
- //kdDebug(32002) << "KWCanvas::repaintChanged this=" << this << " fs=" << fs << endl;
- QPainter p( viewport() );
+ //kdDebug(32002) << "KWCanvas::tqrepaintChanged this=" << this << " fs=" << fs << endl;
+ TQPainter p( viewport() );
p.translate( -contentsX(), -contentsY() );
p.setBrushOrigin( -contentsX(), -contentsY() );
- QRect crect( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
+ TQRect crect( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
drawFrameSet( fs, &p, crect, true, resetChanged, m_viewMode );
- // ###### This repaints the whole grid every time. Ouch.
- // We should return a QRegion from drawFrameSet.... Tricky.
+ // ###### This tqrepaints the whole grid every time. Ouch.
+ // We should return a TQRegion from drawFrameSet.... Tricky.
if ( m_doc->showGrid() )
drawGrid( p, crect );
}
-void KWCanvas::repaintAll( bool erase /* = false */ )
+void KWCanvas::tqrepaintAll( bool erase /* = false */ )
{
- //kdDebug(32002) << "KWCanvas::repaintAll erase=" << erase << endl;
- viewport()->repaint( erase );
+ //kdDebug(32002) << "KWCanvas::tqrepaintAll erase=" << erase << endl;
+ viewport()->tqrepaint( erase );
}
-void KWCanvas::viewportResizeEvent( QResizeEvent * )
+void KWCanvas::viewportResizeEvent( TQResizeEvent * )
{
viewport()->update();
}
-void KWCanvas::print( QPainter *painter, KPrinter *printer )
+void KWCanvas::print( TQPainter *painter, KPrinter *printer )
{
// Prevent cursor drawing and editing
if ( m_currentFrameSetEdit )
@@ -217,16 +217,16 @@ void KWCanvas::print( QPainter *painter, KPrinter *printer )
m_printing = true;
KWViewMode *viewMode = new KWViewModePrint( m_doc, this );
// Use page list specified in kdeprint dialogbox
- QValueList<int> pageList = printer->pageList();
- QProgressDialog progress( i18n( "Printing..." ), i18n( "Cancel" ),
+ TQValueList<int> pageList = printer->pageList();
+ TQProgressDialog progress( i18n( "Printing..." ), i18n( "Cancel" ),
pageList.count() + 1, this );
int j = 0;
progress.setProgress( 0 );
- QValueList<int>::Iterator it = pageList.begin();
+ TQValueList<int>::Iterator it = pageList.begin();
for ( ; it != pageList.end(); ++it )
{
progress.setProgress( ++j );
- qApp->processEvents();
+ tqApp->processEvents();
if ( progress.wasCancelled() )
break;
@@ -238,13 +238,13 @@ void KWCanvas::print( QPainter *painter, KPrinter *printer )
int pgNum = (*it);
int yOffset = m_doc->zoomItY( m_doc->pageManager()->topOfPage( pgNum ) );
kdDebug(32001) << "printing page " << pgNum << " yOffset=" << yOffset << endl;
- QRect pageRect = m_doc->pageManager()->page(pgNum)->zoomedRect(m_doc);
+ TQRect pageRect = m_doc->pageManager()->page(pgNum)->zoomedRect(m_doc);
painter->fillRect( pageRect, white );
painter->translate( 0, -yOffset );
painter->setBrushOrigin( 0, -yOffset );
drawDocument( painter, pageRect, viewMode );
- qApp->processEvents();
+ tqApp->processEvents();
painter->restore();
}
if ( m_currentFrameSetEdit )
@@ -253,36 +253,36 @@ void KWCanvas::print( QPainter *painter, KPrinter *printer )
delete viewMode;
}
-void KWCanvas::drawContents( QPainter *painter, int cx, int cy, int cw, int ch )
+void KWCanvas::drawContents( TQPainter *painter, int cx, int cy, int cw, int ch )
{
if ( isUpdatesEnabled() )
{
// Note: in drawContents, the painter is already translated to the contents coordinates
painter->setBrushOrigin( -contentsX(), -contentsY() );
- drawDocument( painter, QRect( cx, cy, cw, ch ), m_viewMode );
+ drawDocument( painter, TQRect( cx, cy, cw, ch ), m_viewMode );
if ( m_doc->showGrid() )
- drawGrid( *painter, QRect( cx, cy, cw, ch ) );
+ drawGrid( *painter, TQRect( cx, cy, cw, ch ) );
else if ( m_doc->snapToGrid() && ( m_interactionPolicy && m_interactionPolicy->gotDragEvents()
|| m_mouseMode != MM_EDIT ) )
- drawGrid( *painter, QRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()) );
+ drawGrid( *painter, TQRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()) );
}
}
-void KWCanvas::drawDocument( QPainter *painter, const QRect &crect, KWViewMode* viewMode )
+void KWCanvas::drawDocument( TQPainter *painter, const TQRect &crect, KWViewMode* viewMode )
{
//kdDebug(32002) << "KWCanvas::drawDocument crect: " << crect << endl;
// Draw the outside of the pages (shadow, gray area)
// and the empty area first (in case of transparent frames)
- if ( painter->device()->devType() != QInternal::Printer ) // except when printing
+ if ( painter->device()->devType() != TQInternal::Printer ) // except when printing
{
- QRegion emptySpaceRegion( crect );
+ TQRegion emptySpaceRegion( crect );
m_doc->createEmptyRegion( crect, emptySpaceRegion, viewMode );
viewMode->drawPageBorders( painter, crect, emptySpaceRegion );
}
// Draw all framesets contents
- QPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet * frameset = fit.current();
@@ -293,8 +293,8 @@ void KWCanvas::drawDocument( QPainter *painter, const QRect &crect, KWViewMode*
m_doc->maybeDeleteDoubleBufferPixmap();
}
-void KWCanvas::drawFrameSet( KWFrameSet * frameset, QPainter * painter,
- const QRect & crect, bool onlyChanged, bool resetChanged, KWViewMode* viewMode )
+void KWCanvas::drawFrameSet( KWFrameSet * frameset, TQPainter * painter,
+ const TQRect & crect, bool onlyChanged, bool resetChanged, KWViewMode* viewMode )
{
if ( !frameset->isVisible( viewMode ) )
return;
@@ -302,10 +302,10 @@ void KWCanvas::drawFrameSet( KWFrameSet * frameset, QPainter * painter,
return;
bool focus = hasFocus() || viewport()->hasFocus();
- if ( painter->device()->devType() == QInternal::Printer )
+ if ( painter->device()->devType() == TQInternal::Printer )
focus = false;
- QColorGroup gb = QApplication::palette().active();
+ TQColorGroup gb = TQApplication::tqpalette().active();
if ( focus && m_currentFrameSetEdit && frameset == m_currentFrameSetEdit->frameSet() )
// Currently edited frameset
m_currentFrameSetEdit->drawContents( painter, crect, gb, onlyChanged, resetChanged, viewMode, m_frameViewManager );
@@ -313,32 +313,32 @@ void KWCanvas::drawFrameSet( KWFrameSet * frameset, QPainter * painter,
frameset->drawContents( painter, crect, gb, onlyChanged, resetChanged, 0L, viewMode, m_frameViewManager );
}
-void KWCanvas::keyPressEvent( QKeyEvent *e )
+void KWCanvas::keyPressEvent( TQKeyEvent *e )
{
if( !m_doc->isReadWrite()) {
switch( e->key() ) {
- case Qt::Key_Down:
+ case TQt::Key_Down:
setContentsPos( contentsX(), contentsY() + 10 );
break;
- case Qt::Key_Up:
+ case TQt::Key_Up:
setContentsPos( contentsX(), contentsY() - 10 );
break;
- case Qt::Key_Left:
+ case TQt::Key_Left:
setContentsPos( contentsX() - 10, contentsY() );
break;
- case Qt::Key_Right:
+ case TQt::Key_Right:
setContentsPos( contentsX() + 10, contentsY() );
break;
- case Qt::Key_PageUp:
+ case TQt::Key_PageUp:
setContentsPos( contentsX(), contentsY() - visibleHeight() );
break;
- case Qt::Key_PageDown:
+ case TQt::Key_PageDown:
setContentsPos( contentsX(), contentsY() + visibleHeight() );
break;
- case Qt::Key_Home:
+ case TQt::Key_Home:
setContentsPos( contentsX(), 0 );
break;
- case Qt::Key_End:
+ case TQt::Key_End:
setContentsPos( contentsX(), contentsHeight() - visibleHeight() );
break;
default:
@@ -349,13 +349,13 @@ void KWCanvas::keyPressEvent( QKeyEvent *e )
// we don't get <Tab> key presses.
}
-void KWCanvas::switchViewMode( const QString& newViewMode )
+void KWCanvas::switchViewMode( const TQString& newViewMode )
{
delete m_viewMode;
m_viewMode = KWViewMode::create( newViewMode, m_doc, this );
}
-void KWCanvas::mpCreate( const QPoint& normalPoint, bool noGrid )
+void KWCanvas::mpCreate( const TQPoint& normalPoint, bool noGrid )
{
KoPoint docPoint = m_doc->unzoomPoint( normalPoint );
if ( m_doc->snapToGrid() && !noGrid )
@@ -364,7 +364,7 @@ void KWCanvas::mpCreate( const QPoint& normalPoint, bool noGrid )
m_deleteMovingRect = false;
}
-void KWCanvas::mpCreatePixmap( const QPoint& normalPoint, bool noGrid )
+void KWCanvas::mpCreatePixmap( const TQPoint& normalPoint, bool noGrid )
{
if ( !m_kopicture.isNull() )
{
@@ -379,8 +379,8 @@ void KWCanvas::mpCreatePixmap( const QPoint& normalPoint, bool noGrid )
if ( !m_pixmapSize.isEmpty() )
{
// This ensures 1-1 at 100% on screen, but allows zooming and printing with correct DPI values
- uint width = qRound( (double)m_pixmapSize.width() * m_doc->zoomedResolutionX() / POINT_TO_INCH( KoGlobal::dpiX() ) );
- uint height = qRound( (double)m_pixmapSize.height() * m_doc->zoomedResolutionY() / POINT_TO_INCH( KoGlobal::dpiY() ) );
+ uint width = tqRound( (double)m_pixmapSize.width() * m_doc->zoomedResolutionX() / POINT_TO_INCH( KoGlobal::dpiX() ) );
+ uint height = tqRound( (double)m_pixmapSize.height() * m_doc->zoomedResolutionY() / POINT_TO_INCH( KoGlobal::dpiY() ) );
m_insRect.setWidth( m_doc->unzoomItX( width ) );
m_insRect.setHeight( m_doc->unzoomItY( height ) );
// Apply reasonable limits
@@ -393,33 +393,33 @@ void KWCanvas::mpCreatePixmap( const QPoint& normalPoint, bool noGrid )
applyAspectRatio( ratio, m_insRect );
}
- QPoint nPoint( normalPoint.x() + m_doc->zoomItX( m_insRect.width() ),
+ TQPoint nPoint( normalPoint.x() + m_doc->zoomItX( m_insRect.width() ),
normalPoint.y() + m_doc->zoomItY( m_insRect.height() ) );
- QPoint vPoint = m_viewMode->normalToView( nPoint );
+ TQPoint vPoint = m_viewMode->normalToView( nPoint );
vPoint = contentsToViewport( vPoint );
- QRect viewportRect( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
- if ( viewportRect.contains( vPoint ) ) // Don't move the mouse out of the viewport
- QCursor::setPos( viewport()->mapToGlobal( vPoint ) );
+ TQRect viewportRect( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
+ if ( viewportRect.tqcontains( vPoint ) ) // Don't move the mouse out of the viewport
+ TQCursor::setPos( viewport()->mapToGlobal( vPoint ) );
}
emit docStructChanged(Pictures);
if ( !m_doc->showGrid() && m_doc->snapToGrid() )
- repaintContents( FALSE ); //draw the grid over the whole canvas
+ tqrepaintContents( FALSE ); //draw the grid over the whole canvas
}
}
-void KWCanvas::contentsMousePressEvent( QMouseEvent *e )
+void KWCanvas::contentsMousePressEvent( TQMouseEvent *e )
{
- QPoint normalPoint = m_viewMode->viewToNormal( e->pos() );
+ TQPoint normalPoint = m_viewMode->viewToNormal( e->pos() );
KoPoint docPoint = m_doc->unzoomPoint( normalPoint );
- if ( e->button() == LeftButton )
+ if ( e->button() == Qt::LeftButton )
{
m_mousePressed = true;
}
// Only edit-mode (and only LMB) allowed on read-only documents (to select text)
- if ( !m_doc->isReadWrite() && ( m_mouseMode != MM_EDIT || e->button() != LeftButton ) )
+ if ( !m_doc->isReadWrite() && ( m_mouseMode != MM_EDIT || e->button() != Qt::LeftButton ) )
return;
if ( m_printing )
return;
@@ -430,7 +430,7 @@ void KWCanvas::contentsMousePressEvent( QMouseEvent *e )
{
if(! viewMode()->hasFrames() ) { // for the text mode we just forward the click to the text
// first, make clicks left of text be on the border;
- docPoint = KoPoint(QMAX(0, docPoint.x()), QMAX(0, docPoint.y()));
+ docPoint = KoPoint(TQMAX(0, docPoint.x()), TQMAX(0, docPoint.y()));
if ( m_currentFrameSetEdit )
m_currentFrameSetEdit->mousePressEvent( e, normalPoint, docPoint );
break;
@@ -450,7 +450,7 @@ void KWCanvas::contentsMousePressEvent( QMouseEvent *e )
// RMB inside a frame unselects too, except when
// right-clicking on a selected frame
KWFrameView *view = m_frameViewManager->view( docPoint, KWFrameViewManager::frameOnTop );
- if ( ! ( e->button() == RightButton && view && view->selected() ) )
+ if ( ! ( e->button() == Qt::RightButton && view && view->selected() ) )
selectAllFrames( false );
KWFrame * frame = view ? view->frame() : 0L;
@@ -529,26 +529,26 @@ void KWCanvas::contentsMousePressEvent( QMouseEvent *e )
break;
case MM_CREATE_TEXT: case MM_CREATE_PART: case MM_CREATE_TABLE:
case MM_CREATE_FORMULA:
- if ( e->button() == LeftButton )
- mpCreate( normalPoint, e->state() & Qt::ShiftButton);
+ if ( e->button() == Qt::LeftButton )
+ mpCreate( normalPoint, e->state() & TQt::ShiftButton);
break;
case MM_CREATE_PIX:
- if ( e->button() == LeftButton )
- mpCreatePixmap( normalPoint, e->state() & Qt::ShiftButton );
+ if ( e->button() == Qt::LeftButton )
+ mpCreatePixmap( normalPoint, e->state() & TQt::ShiftButton );
break;
default: break;
}
m_scrollTimer->start( 50 );
- if ( e->button() == MidButton ) {
+ if ( e->button() == Qt::MidButton ) {
if ( m_doc->isReadWrite() && m_currentFrameSetEdit && m_mouseMode == MM_EDIT )
{
- QApplication::clipboard()->setSelectionMode( true );
+ TQApplication::tqclipboard()->setSelectionMode( true );
m_currentFrameSetEdit->paste();
- QApplication::clipboard()->setSelectionMode( false );
+ TQApplication::tqclipboard()->setSelectionMode( false );
}
}
- else if ( e->button() == RightButton ) {
+ else if ( e->button() == Qt::RightButton ) {
if(!m_doc->isReadWrite()) // The popups are not available in readonly mode, since the GUI isn't built...
return;
if ( m_deleteMovingRect )
@@ -559,10 +559,10 @@ void KWCanvas::contentsMousePressEvent( QMouseEvent *e )
case MM_EDIT:
if ( !viewMode()->hasFrames() ) { // text view mode
KWFrameView *view = m_frameViewManager->view(m_doc->frameSet( 0 )->frame(0));
- view->showPopup(docPoint, m_gui->getView(), QCursor::pos());
+ view->showPopup(docPoint, m_gui->getView(), TQCursor::pos());
}
else
- m_frameViewManager->showPopup(docPoint, m_gui->getView(), e->state(), QCursor::pos());
+ m_frameViewManager->showPopup(docPoint, m_gui->getView(), e->state(), TQCursor::pos());
break;
case MM_CREATE_TEXT:
case MM_CREATE_PART:
@@ -590,7 +590,7 @@ void KWCanvas::createTable( unsigned int rows, unsigned int cols,
m_table.floating = isFloating;
m_table.format = format;
- m_table.tableTemplateName = tt ? tt->displayName():QString::null;
+ m_table.tableTemplateName = tt ? tt->displayName():TQString();
m_table.tt = tt;
if ( isFloating )
@@ -657,13 +657,13 @@ void KWCanvas::applyGrid( KoPoint &p )
//FIXME It doesn't work in preview mode - apply viewmode
}
-void KWCanvas::drawGrid( QPainter &p, const QRect& rect )
+void KWCanvas::drawGrid( TQPainter &p, const TQRect& rect )
{
// Grid-positioning makes no sense in text view mode
if ( !m_viewMode->hasFrames() )
return;
- QPen pen = QPen( Qt::black, 6, Qt::DotLine );
- QPen oldPen = p.pen();
+ TQPen pen = TQPen( TQt::black, 6, TQt::DotLine );
+ TQPen oldPen = p.pen();
p.setPen( pen );
const double offsetX = m_doc->gridX();
@@ -672,15 +672,15 @@ void KWCanvas::drawGrid( QPainter &p, const QRect& rect )
// per page, this is needed to paint correctly on preview mode as well as making sure
// we start the grid from the topleft of each page.
for ( int pgNum = m_doc->startPage() ; pgNum <= m_doc->lastPage() ; ++pgNum) {
- const QRect pageRect = m_viewMode->viewPageRect( pgNum );
- const QRect crect = pageRect & rect;
+ const TQRect pageRect = m_viewMode->viewPageRect( pgNum );
+ const TQRect crect = pageRect & rect;
if ( crect.isEmpty() )
continue;
// To convert back to view coordinates later we can calculate the offset for each
// point again, or we can do it one time for the page and re-use the answer.
KoPoint pageTopLeft (0, m_doc->pageManager()->topOfPage(pgNum) + 2); // +2 to get around rounding problems..
- QPoint pageTopLeftView = m_viewMode->normalToView( m_doc->zoomPoint(pageTopLeft) );
+ TQPoint pageTopLeftView = m_viewMode->normalToView( m_doc->zoomPoint(pageTopLeft) );
// docRect is the part of the document that needs to be painted.. Coordinates in pt
const KoRect docRect = m_doc->unzoomRect( m_viewMode->viewToNormal( crect ) );
@@ -715,9 +715,9 @@ void KWCanvas::applyAspectRatio( double ratio, KoRect& insRect )
//kdDebug() << "KWCanvas::applyAspectRatio: width=" << width << " height=" << height << " insRect=" << DEBUGRECT(insRect) << endl;
}
-void KWCanvas::mmCreate( const QPoint& normalPoint, bool noGrid ) // Mouse move when creating a frame
+void KWCanvas::mmCreate( const TQPoint& normalPoint, bool noGrid ) // Mouse move when creating a frame
{
- QPainter p;
+ TQPainter p;
p.begin( viewport() );
p.translate( -contentsX(), -contentsY() );
p.setRasterOp( NotROP );
@@ -743,12 +743,12 @@ void KWCanvas::mmCreate( const QPoint& normalPoint, bool noGrid ) // Mouse move
// But not out of the page
KoRect r = m_insRect.normalize();
- if ( !m_doc->pageManager()->page(page)->rect().contains(r) )
+ if ( !m_doc->pageManager()->page(page)->rect().tqcontains(r) )
{
// Even better would be to go to the limit of the page boundary, so that the result,
// when moving the mouse of the page, doesn't depend on how fast we're moving it...
m_insRect = oldRect;
- // #### QCursor::setPos( viewport()->mapToGlobal( zoomPoint( m_insRect.bottomRight() ) ) );
+ // #### TQCursor::setPos( viewport()->mapToGlobal( zoomPoint( m_insRect.bottomRight() ) ) );
}
// Apply keep-aspect-ratio feature
@@ -763,7 +763,7 @@ void KWCanvas::mmCreate( const QPoint& normalPoint, bool noGrid ) // Mouse move
m_deleteMovingRect = true;
}
-void KWCanvas::drawMovingRect( QPainter & p )
+void KWCanvas::drawMovingRect( TQPainter & p )
{
p.setPen( black );
p.drawRect( m_viewMode->normalToView( m_doc->zoomRect( m_insRect ) ) );
@@ -772,7 +772,7 @@ void KWCanvas::drawMovingRect( QPainter & p )
void KWCanvas::deleteMovingRect()
{
Q_ASSERT( m_deleteMovingRect );
- QPainter p;
+ TQPainter p;
p.begin( viewport() );
p.translate( -contentsX(), -contentsY() );
p.setRasterOp( NotROP );
@@ -783,11 +783,11 @@ void KWCanvas::deleteMovingRect()
p.end();
}
-void KWCanvas::contentsMouseMoveEvent( QMouseEvent *e )
+void KWCanvas::contentsMouseMoveEvent( TQMouseEvent *e )
{
if ( m_printing )
return;
- QPoint normalPoint = m_viewMode->viewToNormal( e->pos() );
+ TQPoint normalPoint = m_viewMode->viewToNormal( e->pos() );
if(normalPoint.x() == -1) // e->pos() is an exceptional state...
return;
KoPoint docPoint = m_doc->unzoomPoint( normalPoint );
@@ -805,14 +805,14 @@ void KWCanvas::contentsMouseMoveEvent( QMouseEvent *e )
if ( m_mouseMeaning == MEANING_RESIZE_COLUMN || m_mouseMeaning == MEANING_RESIZE_ROW )
{
// TODO undo/redo support (esp. in mouse-release)
- QRect oldRect( m_viewMode->normalToView( m_doc->zoomRect( m_currentTable->boundingRect() ) ) );
+ TQRect oldRect( m_viewMode->normalToView( m_doc->zoomRect( m_currentTable->boundingRect() ) ) );
if ( m_mouseMeaning == MEANING_RESIZE_ROW )
m_currentTable->resizeRow( m_rowColResized, docPoint.y() );
else
m_currentTable->resizeColumn( m_rowColResized, docPoint.x() );
// Repaint only the changed rects (oldRect U newRect)
- QRect newRect( m_viewMode->normalToView( m_doc->zoomRect( m_currentTable->boundingRect() ) ) );
- repaintContents( QRegion(oldRect).unite(newRect).boundingRect(), FALSE );
+ TQRect newRect( m_viewMode->normalToView( m_doc->zoomRect( m_currentTable->boundingRect() ) ) );
+ tqrepaintContents( TQRegion(oldRect).unite(newRect).boundingRect(), FALSE );
}
else if (m_interactionPolicy) {
m_interactionPolicy->handleMouseMove(e->state(),
@@ -863,9 +863,9 @@ void KWCanvas::contentsMouseMoveEvent( QMouseEvent *e )
{
KWTextFrameSet *frameset = static_cast<KWTextFrameSet *>(fs);
//show the link target in the status bar
- QString link = frameset->linkVariableUnderMouse(docPoint)->url();
+ TQString link = frameset->linkVariableUnderMouse(docPoint)->url();
if ( link.startsWith("bkm://") )
- link.replace( 0, 6, i18n("Bookmark target: ") );
+ link.tqreplace( 0, 6, i18n("Bookmark target: ") );
gui()->getView()->setTemporaryStatusBarText( link );
m_temporaryStatusBarTextShown = true;
}
@@ -878,7 +878,7 @@ void KWCanvas::contentsMouseMoveEvent( QMouseEvent *e )
if(viewMode()->hasFrames())
viewport()->setCursor( m_frameViewManager->mouseCursor( docPoint, e->state() ) );
else
- viewport()->setCursor( Qt::ibeamCursor );
+ viewport()->setCursor( TQt::ibeamCursor );
}
}
}
@@ -893,7 +893,7 @@ void KWCanvas::mrEditFrame() {
delete(m_interactionPolicy);
m_interactionPolicy = 0;
if ( !m_doc->showGrid() && m_doc->snapToGrid() )
- repaintContents();
+ tqrepaintContents();
}
m_mousePressed = false;
}
@@ -905,7 +905,7 @@ KCommand *KWCanvas::createTextBox( const KoRect & rect )
frame->setNewFrameBehavior(KWFrame::Reconnect);
frame->setZOrder( m_doc->maxZOrder( frame->pageNumber(m_doc) ) + 1 ); // make sure it's on top
- QString name = m_doc->generateFramesetName( i18n( "Text Frameset %1" ) );
+ TQString name = m_doc->generateFramesetName( i18n( "Text Frameset %1" ) );
KWTextFrameSet *_frameSet = new KWTextFrameSet(m_doc, name );
_frameSet->addFrame( frame );
m_doc->addFrameSet( _frameSet );
@@ -932,7 +932,7 @@ void KWCanvas::mrCreateText()
emit currentFrameSetEditChanged();
}
setMouseMode( MM_EDIT );
- m_doc->repaintAllViews();
+ m_doc->tqrepaintAllViews();
emit docStructChanged(TextFrames);
emit currentFrameSetEditChanged();
}
@@ -961,7 +961,7 @@ void KWCanvas::mrCreatePixmap()
setMouseMode( MM_EDIT );
if ( !m_kopicture.isNull() ) {
- KWPictureFrameSet *fs = new KWPictureFrameSet( m_doc, QString::null /*automatic name*/ );
+ KWPictureFrameSet *fs = new KWPictureFrameSet( m_doc, TQString() /*automatic name*/ );
fs->insertPicture( m_kopicture );
fs->setKeepAspectRatio( m_keepRatio );
KWFrame *frame = new KWFrame(fs, picRect.x(), picRect.y(), picRect.width(),
@@ -994,7 +994,7 @@ void KWCanvas::mrCreateFormula()
{
m_insRect = m_insRect.normalize();
if ( !m_doc->snapToGrid() || ( m_insRect.width() > m_doc->gridX() && m_insRect.height() > m_doc->gridY() ) ) {
- KWFormulaFrameSet *frameset = new KWFormulaFrameSet( m_doc, QString::null );
+ KWFormulaFrameSet *frameset = new KWFormulaFrameSet( m_doc, TQString() );
KWFrame *frame = new KWFrame(frameset, m_insRect.x(), m_insRect.y(), m_insRect.width(), m_insRect.height() );
frame->setZOrder( m_doc->maxZOrder( frame->pageNumber(m_doc) ) + 1 ); // make sure it's on top
frameset->addFrame( frame, false );
@@ -1032,8 +1032,8 @@ void KWCanvas::mrCreateTable()
emit docStructChanged(Tables);
}
m_doc->updateAllFrames();
- m_doc->layout();
- repaintAll();
+ m_doc->tqlayout();
+ tqrepaintAll();
}
setMouseMode( MM_EDIT );
@@ -1041,13 +1041,13 @@ void KWCanvas::mrCreateTable()
KWTableFrameSet * KWCanvas::createTable() // uses m_insRect and m_table to create the table
{
- KWTableFrameSet *table = new KWTableFrameSet( m_doc, QString::null /*automatic name*/ );
+ KWTableFrameSet *table = new KWTableFrameSet( m_doc, TQString() /*automatic name*/ );
int pageNum = m_doc->pageManager()->pageNumber(m_insRect.topLeft());
// Create a set of cells with random-size frames.
for ( unsigned int i = 0; i < m_table.rows; i++ ) {
for ( unsigned int j = 0; j < m_table.cols; j++ ) {
- KWTableFrameSet::Cell *cell = new KWTableFrameSet::Cell( table, i, j, QString::null /*automatic name*/ );
+ KWTableFrameSet::Cell *cell = new KWTableFrameSet::Cell( table, i, j, TQString() /*automatic name*/ );
KWFrame *frame = new KWFrame(cell, 0, 0, 0, 0, KWFrame::RA_BOUNDINGRECT ); // pos and size will be set in setBoundingRect
frame->setZOrder( m_doc->maxZOrder( pageNum ) + 1 ); // make sure it's on top
cell->addFrame( frame, false );
@@ -1062,7 +1062,7 @@ KWTableFrameSet * KWCanvas::createTable() // uses m_insRect and m_table to creat
return table;
}
-void KWCanvas::contentsMouseReleaseEvent( QMouseEvent * e )
+void KWCanvas::contentsMouseReleaseEvent( TQMouseEvent * e )
{
if ( m_printing )
return;
@@ -1072,7 +1072,7 @@ void KWCanvas::contentsMouseReleaseEvent( QMouseEvent * e )
if ( m_deleteMovingRect )
deleteMovingRect();
- QPoint normalPoint = m_viewMode->viewToNormal( e->pos() );
+ TQPoint normalPoint = m_viewMode->viewToNormal( e->pos() );
KoPoint docPoint = m_doc->unzoomPoint( normalPoint );
if(m_insRect.bottom()==0 && m_insRect.right()==0) {
@@ -1081,8 +1081,8 @@ void KWCanvas::contentsMouseReleaseEvent( QMouseEvent * e )
if(page == -1)
return;
KoPageLayout pageLayout = m_doc->pageManager()->pageLayout(page);
- m_insRect.setLeft(QMIN(m_insRect.left(), pageLayout.ptWidth - 200));
- m_insRect.setTop(QMIN(m_insRect.top(), pageLayout.ptHeight - 150));
+ m_insRect.setLeft(TQMIN(m_insRect.left(), pageLayout.ptWidth - 200));
+ m_insRect.setTop(TQMIN(m_insRect.top(), pageLayout.ptHeight - 150));
m_insRect.setBottom(m_insRect.top()+150);
m_insRect.setRight(m_insRect.left()+200);
}
@@ -1127,16 +1127,16 @@ void KWCanvas::contentsMouseReleaseEvent( QMouseEvent * e )
}
if ( old_mouseMove != MM_EDIT && !m_doc->showGrid() && m_doc->snapToGrid() )
- repaintContents( FALSE ); //draw the grid over the whole canvas
+ tqrepaintContents( FALSE ); //draw the grid over the whole canvas
m_mousePressed = false;
}
}
-void KWCanvas::contentsMouseDoubleClickEvent( QMouseEvent * e )
+void KWCanvas::contentsMouseDoubleClickEvent( TQMouseEvent * e )
{
if ( m_printing )
return;
- QPoint normalPoint = m_viewMode->viewToNormal( e->pos() );
+ TQPoint normalPoint = m_viewMode->viewToNormal( e->pos() );
KoPoint docPoint = m_doc->unzoomPoint( normalPoint );
switch ( m_mouseMode ) {
case MM_EDIT:
@@ -1163,22 +1163,22 @@ void KWCanvas::contentsMouseDoubleClickEvent( QMouseEvent * e )
}
}
-void KWCanvas::setFrameBackgroundColor( const QBrush &_backColor )
+void KWCanvas::setFrameBackgroundColor( const TQBrush &_backColor )
{
- QValueList<KWFrameView*> selectedFrames = m_frameViewManager->selectedFrames();
+ TQValueList<KWFrameView*> selectedFrames = m_frameViewManager->selectedFrames();
if (selectedFrames.isEmpty())
return;
bool colorChanged=false;
- QPtrList<FrameIndex> frameindexList;
- QPtrList<QBrush> oldColor;
+ TQPtrList<FrameIndex> frameindexList;
+ TQPtrList<TQBrush> oldColor;
- QValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
while(framesIterator != selectedFrames.end()) {
KWFrame *frame = KWFrameSet::settingsFrame( (*framesIterator)->frame() );
FrameIndex *index=new FrameIndex( frame );
frameindexList.append(index);
- QBrush *_color=new QBrush(frame->backgroundColor());
+ TQBrush *_color=new TQBrush(frame->backgroundColor());
oldColor.append(_color);
if (frame->frameSet() && frame->frameSet()->type()!=FT_PICTURE && frame->frameSet()->type()!=FT_PART && _backColor!=frame->backgroundColor())
@@ -1192,7 +1192,7 @@ void KWCanvas::setFrameBackgroundColor( const QBrush &_backColor )
{
KWFrameBackGroundColorCommand *cmd=new KWFrameBackGroundColorCommand(i18n("Change Frame Background Color"),frameindexList,oldColor,_backColor);
m_doc->addCommand(cmd);
- m_doc->repaintAllViews();
+ m_doc->tqrepaintAllViews();
}
else
{
@@ -1212,15 +1212,15 @@ void KWCanvas::editFrameProperties( KWFrameSet * frameset )
void KWCanvas::editFrameProperties()
{
- QValueList<KWFrameView*> selectedFrames = m_frameViewManager->selectedFrames();
+ TQValueList<KWFrameView*> selectedFrames = m_frameViewManager->selectedFrames();
if(selectedFrames.count()==0) return;
KWFrameDia *frameDia;
if(selectedFrames.count()==1)
frameDia = new KWFrameDia( this, selectedFrames[0]->frame());
else { // multi frame dia.
- QPtrList<KWFrame> frames;
- QValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQPtrList<KWFrame> frames;
+ TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
for(;framesIterator != selectedFrames.end(); ++framesIterator)
frames.append( (*framesIterator)->frame() );
frameDia = new KWFrameDia( this, frames );
@@ -1230,8 +1230,8 @@ void KWCanvas::editFrameProperties()
}
void KWCanvas::selectAllFrames( bool select ) {
- QValueList<KWFrameView*> frameViews = m_frameViewManager->frameViewsIterator();
- QValueList<KWFrameView*>::iterator frames = frameViews.begin();
+ TQValueList<KWFrameView*> frameViews = m_frameViewManager->frameViewsIterator();
+ TQValueList<KWFrameView*>::iterator frames = frameViews.begin();
for(; frames != frameViews.end(); ++frames ) {
KWFrameSet *fs = (*frames)->frame()->frameSet();
if ( !fs->isVisible() ) continue;
@@ -1370,7 +1370,7 @@ void KWCanvas::terminateCurrentEdit()
delete m_currentFrameSetEdit;
m_currentFrameSetEdit = 0L;
emit currentFrameSetEditChanged();
- repaintAll();
+ tqrepaintAll();
}
void KWCanvas::terminateEditing( KWFrameSet *fs )
@@ -1378,7 +1378,7 @@ void KWCanvas::terminateEditing( KWFrameSet *fs )
if ( m_currentFrameSetEdit && m_currentFrameSetEdit->frameSet() == fs )
terminateCurrentEdit();
// Also deselect the frames from this frameset
- QPtrListIterator<KWFrame> frameIt = fs->frameIterator();
+ TQPtrListIterator<KWFrame> frameIt = fs->frameIterator();
for ( ; frameIt.current(); ++frameIt ) {
KWFrameView* view = m_frameViewManager->view(frameIt.current());
Q_ASSERT(view);
@@ -1404,7 +1404,7 @@ void KWCanvas::setMouseMode( MouseMode newMouseMode )
m_mouseMode = newMouseMode;
if ( !m_doc->showGrid() && m_doc->snapToGrid() )
- repaintContents( FALSE ); //draw the grid over the whole canvas
+ tqrepaintContents( FALSE ); //draw the grid over the whole canvas
}
else
m_mouseMode = newMouseMode;
@@ -1412,8 +1412,8 @@ void KWCanvas::setMouseMode( MouseMode newMouseMode )
switch ( m_mouseMode ) {
case MM_EDIT: {
- QPoint mousep = mapFromGlobal(QCursor::pos()) + QPoint( contentsX(), contentsY() );
- QPoint normalPoint = m_viewMode->viewToNormal( mousep );
+ TQPoint mousep = mapFromGlobal(TQCursor::pos()) + TQPoint( contentsX(), contentsY() );
+ TQPoint normalPoint = m_viewMode->viewToNormal( mousep );
KoPoint docPoint = m_doc->unzoomPoint( normalPoint );
viewport()->setCursor( m_frameViewManager->mouseCursor( docPoint, 0 ) );
m_frameInline = false;
@@ -1428,7 +1428,7 @@ void KWCanvas::setMouseMode( MouseMode newMouseMode )
}
}
-void KWCanvas::insertPicture( const KoPicture& newPicture, QSize pixmapSize, bool _keepRatio )
+void KWCanvas::insertPicture( const KoPicture& newPicture, TQSize pixmapSize, bool _keepRatio )
{
setMouseMode( MM_CREATE_PIX );
m_kopicture = newPicture;
@@ -1438,7 +1438,7 @@ void KWCanvas::insertPicture( const KoPicture& newPicture, QSize pixmapSize, boo
m_keepRatio = _keepRatio;
}
-void KWCanvas::insertPictureDirect( const KoPicture& picture, const KoPoint& pos, const QSize& sz )
+void KWCanvas::insertPictureDirect( const KoPicture& picture, const KoPoint& pos, const TQSize& sz )
{
// Prepare things for mrCreatePixmap
m_pixmapSize = sz.isEmpty() ? picture.getOriginalSize() : sz;
@@ -1459,7 +1459,7 @@ void KWCanvas::insertPart( const KoDocumentEntry &entry )
setMouseMode( MM_CREATE_PART );
}
-void KWCanvas::contentsDragEnterEvent( QDragEnterEvent *e )
+void KWCanvas::contentsDragEnterEvent( TQDragEnterEvent *e )
{
int provides = KWView::checkClipboard( e );
if ( ( provides & KWView::ProvidesImage ) || KURLDrag::canDecode( e ) )
@@ -1475,11 +1475,11 @@ void KWCanvas::contentsDragEnterEvent( QDragEnterEvent *e )
}
}
-void KWCanvas::contentsDragMoveEvent( QDragMoveEvent *e )
+void KWCanvas::contentsDragMoveEvent( TQDragMoveEvent *e )
{
if ( !m_imageDrag /*&& m_currentFrameSetEdit*/ )
{
- QPoint normalPoint = m_viewMode->viewToNormal( e->pos() );
+ TQPoint normalPoint = m_viewMode->viewToNormal( e->pos() );
KoPoint docPoint = m_doc->unzoomPoint( normalPoint );
KWFrameView *view = m_frameViewManager->view(docPoint, KWFrameViewManager::frameOnTop);
KWFrame *frame = view ? view->frame() : 0;
@@ -1500,18 +1500,18 @@ void KWCanvas::contentsDragMoveEvent( QDragMoveEvent *e )
}
}
-void KWCanvas::contentsDragLeaveEvent( QDragLeaveEvent *e )
+void KWCanvas::contentsDragLeaveEvent( TQDragLeaveEvent *e )
{
if ( !m_imageDrag && m_currentFrameSetEdit )
m_currentFrameSetEdit->dragLeaveEvent( e );
}
-void KWCanvas::contentsDropEvent( QDropEvent *e )
+void KWCanvas::contentsDropEvent( TQDropEvent *e )
{
- QPoint normalPoint = m_viewMode->viewToNormal( e->pos() );
+ TQPoint normalPoint = m_viewMode->viewToNormal( e->pos() );
KoPoint docPoint = m_doc->unzoomPoint( normalPoint );
- if ( QImageDrag::canDecode( e ) ) {
+ if ( TQImageDrag::canDecode( e ) ) {
pasteImage( e, docPoint );
} else if ( KURLDrag::canDecode( e ) ) {
@@ -1525,15 +1525,15 @@ void KWCanvas::contentsDropEvent( QDropEvent *e )
for ( ; it != lst.end(); ++it ) {
const KURL &url( *it );
- QString filename;
+ TQString filename;
if ( !KIO::NetAccess::download( url, filename, this ) )
continue;
KMimeType::Ptr res = KMimeType::findByFileContent( filename );
if ( res && res->isValid() ) {
- QString mimetype = res->name();
- if ( mimetype.contains( "image" ) ) {
+ TQString mimetype = res->name();
+ if ( mimetype.tqcontains( "image" ) ) {
KoPictureKey key;
key.setKeyFromFile( filename );
KoPicture newKoPicture;
@@ -1556,14 +1556,14 @@ void KWCanvas::contentsDropEvent( QDropEvent *e )
m_imageDrag = false;
}
-void KWCanvas::pasteImage( QMimeSource *e, const KoPoint &docPoint )
+void KWCanvas::pasteImage( TQMimeSource *e, const KoPoint &docPoint )
{
- QImage i;
- if ( !QImageDrag::decode(e, i) ) {
+ TQImage i;
+ if ( !TQImageDrag::decode(e, i) ) {
kdWarning() << "Couldn't decode image" << endl;
return;
}
- KTempFile tmpFile( QString::null, ".png");
+ KTempFile tmpFile( TQString(), ".png");
tmpFile.setAutoDelete( true );
if ( !i.save(tmpFile.name(), "PNG") ) {
kdWarning() << "Couldn't save image to " << tmpFile.name() << endl;
@@ -1591,9 +1591,9 @@ void KWCanvas::doAutoScroll()
}
// This code comes from khtml
- QPoint pos( mapFromGlobal( QCursor::pos() ) );
+ TQPoint pos( mapFromGlobal( TQCursor::pos() ) );
- pos = QPoint(pos.x() - viewport()->x(), pos.y() - viewport()->y());
+ pos = TQPoint(pos.x() - viewport()->x(), pos.y() - viewport()->y());
if ( (pos.y() < 0) || (pos.y() > visibleHeight()) ||
(pos.x() < 0) || (pos.x() > visibleWidth()) )
{
@@ -1611,13 +1611,13 @@ void KWCanvas::doAutoScroll()
void KWCanvas::slotContentsMoving( int cx, int cy )
{
- //QPoint nPointTop = m_viewMode->viewToNormal( QPoint( cx, cy ) );
- QPoint nPointBottom = m_viewMode->viewToNormal( QPoint( cx + visibleWidth(), cy + visibleHeight() ) );
+ //TQPoint nPointTop = m_viewMode->viewToNormal( TQPoint( cx, cy ) );
+ TQPoint nPointBottom = m_viewMode->viewToNormal( TQPoint( cx + visibleWidth(), cy + visibleHeight() ) );
//kdDebug() << "KWCanvas::slotContentsMoving cx=" << cx << " cy=" << cy << endl;
//kdDebug() << " visibleWidth()=" << visibleWidth() << " visibleHeight()=" << visibleHeight() << endl;
// Update our "formatted paragraphs needs" in all the text framesets
- QPtrList<KWTextFrameSet> textFrameSets = m_doc->allTextFramesets( false );
- QPtrListIterator<KWTextFrameSet> fit( textFrameSets );
+ TQPtrList<KWTextFrameSet> textFrameSets = m_doc->allTextFramesets( false );
+ TQPtrListIterator<KWTextFrameSet> fit( textFrameSets );
for ( ; fit.current() ; ++fit )
{
if(! fit.current()->isVisible()) continue;
@@ -1631,7 +1631,7 @@ void KWCanvas::slotContentsMoving( int cx, int cy )
// so that it will reposition any active embedded object.
// This needs to be delayed since contents moving is emitted -before- moving,
// and from resizeEvent it's too early too.
- QTimer::singleShot( 0, this, SIGNAL( viewTransformationsChanged() ) );
+ TQTimer::singleShot( 0, this, TQT_SIGNAL( viewTransformationsChanged() ) );
}
void KWCanvas::slotMainTextHeightChanged()
@@ -1647,18 +1647,18 @@ void KWCanvas::slotMainTextHeightChanged()
void KWCanvas::slotNewContentsSize()
{
- QSize size = m_viewMode->contentsSize();
- if ( size != QSize( contentsWidth(), contentsHeight() ) )
+ TQSize size = m_viewMode->contentsSize();
+ if ( size != TQSize( contentsWidth(), contentsHeight() ) )
{
//kdDebug() << "KWCanvas::slotNewContentsSize " << size.width() << "x" << size.height() << endl;
resizeContents( size.width(), size.height() );
}
}
-void KWCanvas::resizeEvent( QResizeEvent *e )
+void KWCanvas::resizeEvent( TQResizeEvent *e )
{
slotContentsMoving( contentsX(), contentsY() );
- QScrollView::resizeEvent( e );
+ TQScrollView::resizeEvent( e );
}
void KWCanvas::scrollToOffset( const KoPoint & d )
@@ -1669,8 +1669,8 @@ void KWCanvas::scrollToOffset( const KoPoint & d )
if ( blinking )
stopBlinkCursor();
#endif
- QPoint nPoint = m_doc->zoomPoint( d );
- QPoint cPoint = m_viewMode->normalToView( nPoint );
+ TQPoint nPoint = m_doc->zoomPoint( d );
+ TQPoint cPoint = m_viewMode->normalToView( nPoint );
setContentsPos( cPoint.x(), cPoint.y() );
#if 0
@@ -1688,7 +1688,7 @@ void KWCanvas::updateRulerOffsets( int cx, int cy )
}
// The offset is usually just the scrollview offset
// But we also need to offset to the current page, for the graduations
- QPoint pc = m_viewMode->pageCorner();
+ TQPoint pc = m_viewMode->pageCorner();
//kdDebug() << "KWCanvas::updateRulerOffsets contentsX=" << cx << ", contentsY=" << cy << endl;
if (m_gui->getHorzRuler())
m_gui->getHorzRuler()->setOffset( cx - pc.x(), 0 );
@@ -1697,61 +1697,61 @@ void KWCanvas::updateRulerOffsets( int cx, int cy )
}
-bool KWCanvas::eventFilter( QObject *o, QEvent *e )
+bool KWCanvas::eventFilter( TQObject *o, TQEvent *e )
{
- if ( o == this || o == viewport() ) {
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) {
- if(m_currentFrameSetEdit && o == this )
+ if(m_currentFrameSetEdit && TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) )
{
// Pass event to auto-hide-cursor code (see kcursor.h for details)
KCursor::autoHideEventFilter( o, e );
}
switch ( e->type() ) {
- case QEvent::FocusIn:
- // kdDebug() << "KWCanvas::eventFilter QEvent::FocusIn" << endl;
+ case TQEvent::FocusIn:
+ // kdDebug() << "KWCanvas::eventFilter TQEvent::FocusIn" << endl;
if ( m_currentFrameSetEdit && !m_printing )
m_currentFrameSetEdit->focusInEvent();
break;
- case QEvent::FocusOut:
- // kdDebug() << "KWCanvas::eventFilter QEvent::FocusOut" << endl;
+ case TQEvent::FocusOut:
+ // kdDebug() << "KWCanvas::eventFilter TQEvent::FocusOut" << endl;
if ( m_currentFrameSetEdit && !m_printing )
m_currentFrameSetEdit->focusOutEvent();
if ( m_scrollTimer->isActive() )
m_scrollTimer->stop();
m_mousePressed = false;
break;
- case QEvent::AccelOverride: // was part of KeyPress - changed due to kdelibs BUG!
+ case TQEvent::AccelOverride: // was part of KeyPress - changed due to kdelibs BUG!
{
// kdDebug() << " KeyPress m_currentFrameSetEdit=" << m_currentFrameSetEdit << " isRW="<<m_doc->isReadWrite() << endl;
// kdDebug() << " m_printing=" << m_printing << " mousemode=" << m_mouseMode << " (MM_EDIT=" << MM_EDIT<<")"<<endl;
- QKeyEvent * keyev = static_cast<QKeyEvent *>(e);
+ TQKeyEvent * keyev = TQT_TQKEYEVENT(e);
#ifndef NDEBUG
// Debug keys
if ( ( keyev->state() & ControlButton ) && ( keyev->state() & ShiftButton ) )
{
switch ( keyev->key() ) {
- case Qt::Key_P: // 'P' -> paragraph debug
+ case TQt::Key_P: // 'P' -> paragraph debug
printRTDebug( 0 );
keyev->accept();
break;
- case Qt::Key_V: // 'V' -> verbose parag debug
+ case TQt::Key_V: // 'V' -> verbose parag debug
printRTDebug( 1 );
keyev->accept();
break;
- case Qt::Key_F: // 'F' -> frames debug
+ case TQt::Key_F: // 'F' -> frames debug
m_doc->printDebug();
kdDebug(32002) << "Current framesetedit: " << m_currentFrameSetEdit << " " <<
( m_currentFrameSetEdit ? m_currentFrameSetEdit->frameSet()->className() : "" ) << endl;
keyev->accept();
break;
- case Qt::Key_S: // 'S' -> styles debug
+ case TQt::Key_S: // 'S' -> styles debug
m_doc->printStyleDebug();
keyev->accept();
break;
- case Qt::Key_M: // 'M' -> mark debug output
+ case TQt::Key_M: // 'M' -> mark debug output
{
- const QDateTime dtMark ( QDateTime::currentDateTime() );
+ const TQDateTime dtMark ( TQDateTime::tqcurrentDateTime() );
kdDebug(32002) << "Developer mark: " << dtMark.toString("yyyy-MM-dd hh:mm:ss,zzz") << endl;
keyev->accept();
break;
@@ -1764,37 +1764,37 @@ bool KWCanvas::eventFilter( QObject *o, QEvent *e )
#endif
}
break;
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
{
// kdDebug() << " KeyPress m_currentFrameSetEdit=" << m_currentFrameSetEdit << " isRW="<<m_doc->isReadWrite() << endl;
// kdDebug() << " m_printing=" << m_printing << " mousemode=" << m_mouseMode << " (MM_EDIT=" << MM_EDIT<<")"<<endl;
- QKeyEvent * keyev = static_cast<QKeyEvent *>(e);
+ TQKeyEvent * keyev = TQT_TQKEYEVENT(e);
// By default PgUp and PgDown move the scrollbars and not the caret anymore - this is done here
if ( !m_doc->pgUpDownMovesCaret() && ( (keyev->state() & ShiftButton) == 0 )
- && ( keyev->key() == Qt::Key_PageUp || keyev->key() == Key_PageDown ) )
+ && ( keyev->key() == TQt::Key_PageUp || keyev->key() == Key_PageDown ) )
{
- viewportScroll( keyev->key() == Qt::Key_PageUp );
+ viewportScroll( keyev->key() == TQt::Key_PageUp );
}
// Activate this code (and in focusNextPreviousChild() to allow Shift+Tab
// out of document window. Disabled because it conflicts with Shift+Tab inside a table.
- // else if ( keyev->key() == Qt::Key_BackTab )
+ // else if ( keyev->key() == TQt::Key_BackTab )
// return FALSE;
else if ( keyev->key() == KGlobalSettings::contextMenuKey() ) {
// The popups are not available in readonly mode, since the GUI isn't built...
if(!m_doc->isReadWrite()) return TRUE;
if (m_mouseMode != MM_EDIT) return TRUE;
- KoPoint docPoint = m_doc->unzoomPoint( QCursor::pos() );
+ KoPoint docPoint = m_doc->unzoomPoint( TQCursor::pos() );
if ( viewMode()->type()=="ModeText") {
KWFrameView *view = m_frameViewManager->view(m_doc->frameSet( 0 )->frame(0));
- view->showPopup(docPoint, m_gui->getView(), QCursor::pos());
+ view->showPopup(docPoint, m_gui->getView(), TQCursor::pos());
}
else {
m_frameViewManager->showPopup( docPoint, m_gui->getView(), keyev->state(), pos());
}
return true;
}
- else if ( keyev->key() == Qt::Key_Return && keyev->state() == 0
+ else if ( keyev->key() == TQt::Key_Return && keyev->state() == 0
&& (m_mouseMode != MM_EDIT || m_frameInline )) {
// When inserting an inline or non-line frame,
// simulate mouse press and release at caret position.
@@ -1807,22 +1807,22 @@ bool KWCanvas::eventFilter( QObject *o, QEvent *e )
if (m_lastCaretPos.isNull()) return TRUE;
int page = m_doc->pageManager()->pageNumber(m_lastCaretPos);
if(page == -1) return TRUE;
- QPoint normalPoint = m_doc->zoomPoint(m_lastCaretPos);
+ TQPoint normalPoint = m_doc->zoomPoint(m_lastCaretPos);
// Coordinate is at the very top of the caret. In the case of an
// inline frame, adjust slightly down and to the right in order
// to avoid "clicking" the frame border.
if (m_frameInline)
- normalPoint += QPoint(2,2);
- QPoint vP = m_viewMode->normalToView(normalPoint);
- QPoint gP = mapToGlobal(vP);
- QMouseEvent mevPress(QEvent::MouseButtonPress, vP,
+ normalPoint += TQPoint(2,2);
+ TQPoint vP = m_viewMode->normalToView(normalPoint);
+ TQPoint gP = mapToGlobal(vP);
+ TQMouseEvent mevPress(TQEvent::MouseButtonPress, vP,
gP, Qt::LeftButton, 0);
contentsMousePressEvent(&mevPress);
- QMouseEvent mevRelease(QEvent::MouseButtonRelease, vP,
+ TQMouseEvent mevRelease(TQEvent::MouseButtonRelease, vP,
gP, Qt::LeftButton, 0);
contentsMouseReleaseEvent(&mevRelease);
}
- else if ( keyev->key() == Qt::Key_Escape ) {
+ else if ( keyev->key() == TQt::Key_Escape ) {
if ( m_mouseMode != MM_EDIT ) // Abort frame creation
setMouseMode( MM_EDIT );
else if(m_interactionPolicy) {
@@ -1832,12 +1832,12 @@ bool KWCanvas::eventFilter( QObject *o, QEvent *e )
m_mousePressed = false;
// reset cursor
- QPoint mousep = mapFromGlobal(QCursor::pos()) + QPoint( contentsX(), contentsY() );
- QPoint normalPoint = m_viewMode->viewToNormal( mousep );
+ TQPoint mousep = mapFromGlobal(TQCursor::pos()) + TQPoint( contentsX(), contentsY() );
+ TQPoint normalPoint = m_viewMode->viewToNormal( mousep );
KoPoint docPoint = m_doc->unzoomPoint( normalPoint );
viewport()->setCursor( m_frameViewManager->mouseCursor( docPoint, keyev->stateAfter() ) );
if ( !m_doc->showGrid() && m_doc->snapToGrid() )
- repaintContents();
+ tqrepaintContents();
}
}
else if ( keyev->key() == Key_Insert && keyev->state() == 0 ) {
@@ -1866,24 +1866,24 @@ bool KWCanvas::eventFilter( QObject *o, QEvent *e )
}
// Because of the dependency on the control key, we need to update the mouse cursor here
- if ( keyev->key() == Qt::Key_Control )
+ if ( keyev->key() == TQt::Key_Control )
{
- QPoint mousep = mapFromGlobal(QCursor::pos()) + QPoint( contentsX(), contentsY() );
- QPoint normalPoint = m_viewMode->viewToNormal( mousep );
+ TQPoint mousep = mapFromGlobal(TQCursor::pos()) + TQPoint( contentsX(), contentsY() );
+ TQPoint normalPoint = m_viewMode->viewToNormal( mousep );
KoPoint docPoint = m_doc->unzoomPoint( normalPoint );
viewport()->setCursor( m_frameViewManager->mouseCursor( docPoint, keyev->stateAfter() ) );
}
- else if ( (keyev->key() == Qt::Key_Delete || keyev->key() ==Key_Backspace )
+ else if ( (keyev->key() == TQt::Key_Delete || keyev->key() ==Key_Backspace )
&& m_frameViewManager->selectedFrame() && !m_printing )
m_gui->getView()->editDeleteFrame();
} break;
- case QEvent::KeyRelease:
+ case TQEvent::KeyRelease:
{
- QKeyEvent * keyev = static_cast<QKeyEvent *>(e);
- if ( keyev->key() == Qt::Key_Control )
+ TQKeyEvent * keyev = TQT_TQKEYEVENT(e);
+ if ( keyev->key() == TQt::Key_Control )
{
- QPoint mousep = mapFromGlobal(QCursor::pos()) + QPoint( contentsX(), contentsY() );
- QPoint normalPoint = m_viewMode->viewToNormal( mousep );
+ TQPoint mousep = mapFromGlobal(TQCursor::pos()) + TQPoint( contentsX(), contentsY() );
+ TQPoint normalPoint = m_viewMode->viewToNormal( mousep );
KoPoint docPoint = m_doc->unzoomPoint( normalPoint );
viewport()->setCursor( m_frameViewManager->mouseCursor( docPoint, keyev->stateAfter() ) );
}
@@ -1895,21 +1895,21 @@ bool KWCanvas::eventFilter( QObject *o, QEvent *e )
}
}
break;
- case QEvent::IMStart:
+ case TQEvent::IMStart:
{
- QIMEvent * imev = static_cast<QIMEvent *>(e);
+ TQIMEvent * imev = static_cast<TQIMEvent *>(e);
m_currentFrameSetEdit->imStartEvent( imev );
}
break;
- case QEvent::IMCompose:
+ case TQEvent::IMCompose:
{
- QIMEvent * imev = static_cast<QIMEvent *>(e);
+ TQIMEvent * imev = static_cast<TQIMEvent *>(e);
m_currentFrameSetEdit->imComposeEvent( imev );
}
break;
- case QEvent::IMEnd:
+ case TQEvent::IMEnd:
{
- QIMEvent * imev = static_cast<QIMEvent *>(e);
+ TQIMEvent * imev = static_cast<TQIMEvent *>(e);
m_currentFrameSetEdit->imEndEvent( imev );
}
break;
@@ -1917,7 +1917,7 @@ bool KWCanvas::eventFilter( QObject *o, QEvent *e )
break;
}
}
- return QScrollView::eventFilter( o, e );
+ return TQScrollView::eventFilter( o, e );
}
bool KWCanvas::focusNextPrevChild( bool next)
@@ -1926,7 +1926,7 @@ bool KWCanvas::focusNextPrevChild( bool next)
return TRUE; // Don't allow to go out of the canvas widget by pressing "Tab"
// Don't allow to go out of the canvas widget by pressing Tab, but do allow Shift+Tab.
// if (next) return TRUE;
- // return QWidget::focusNextPrevChild( next );
+ // return TQWidget::focusNextPrevChild( next );
}
void KWCanvas::updateCurrentFormat()
@@ -1956,12 +1956,12 @@ void KWCanvas::printRTDebug( int info )
void KWCanvas::setXimPosition( int x, int y, int w, int h )
{
- /* Check for hasFocus() to avoid crashes in QXIMInputContext as in bug #123941.
- This is only a workaround, the real problem might be in Qt. See also
+ /* Check for hasFocus() to avoid crashes in TQXIMInputContext as in bug #123941.
+ This is only a workaround, the real problem might be in TQt. See also
http://lists.kde.org/?l=kde-core-devel&m=115770546313922&w=2 .
*/
if (hasFocus())
- QWidget::setMicroFocusHint( x - contentsX(), y - contentsY(), w, h );
+ TQWidget::setMicroFocusHint( x - contentsX(), y - contentsY(), w, h );
}
void KWCanvas::inlinePictureStarted()
@@ -2029,22 +2029,22 @@ KoPoint KWCanvas::caretPos()
KWFrame* currentFrame = m_currentFrameSetEdit->currentFrame();
if (!currentFrame) return KoPoint();
- QPoint viewP = textFrameset->cursorPos(cursor, this, currentFrame);
+ TQPoint viewP = textFrameset->cursorPos(cursor, this, currentFrame);
viewP.rx() += contentsX();
viewP.ry() += contentsY();
- QPoint normalP = m_viewMode->viewToNormal(viewP);
+ TQPoint normalP = m_viewMode->viewToNormal(viewP);
KoPoint docP = m_doc->unzoomPoint(normalP);
return docP;
}
// ************** InteractionPolicy ***********************
-InteractionPolicy::InteractionPolicy(KWCanvas *parent, bool doInit, bool includeInlineFrames) {
+InteractionPolicy::InteractionPolicy(KWCanvas *tqparent, bool doInit, bool includeInlineFrames) {
m_gotDragEvents = false;
- m_parent = parent;
+ m_parent = tqparent;
if(doInit) {
- QValueList<KWFrameView*> selectedFrames = m_parent->frameViewManager()->selectedFrames();
- QValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQValueList<KWFrameView*> selectedFrames = m_parent->frameViewManager()->selectedFrames();
+ TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
for(;framesIterator != selectedFrames.end(); ++framesIterator) {
KWFrame *frame = (*framesIterator)->frame();
KWFrameSet *fs = frame->frameSet();
@@ -2061,12 +2061,12 @@ InteractionPolicy::InteractionPolicy(KWCanvas *parent, bool doInit, bool include
}
}
-InteractionPolicy* InteractionPolicy::createPolicy(KWCanvas *parent, MouseMeaning meaning, KoPoint &point, Qt::ButtonState buttonState, Qt::ButtonState keyState) {
+InteractionPolicy* InteractionPolicy::createPolicy(KWCanvas *tqparent, MouseMeaning meaning, KoPoint &point, TQt::ButtonState buttonState, TQt::ButtonState keyState) {
if(buttonState & Qt::LeftButton || buttonState & Qt::RightButton) {
// little inner class to make sure we don't duplicate code
class Selector {
public:
- Selector(KWCanvas *canvas, KoPoint &point, Qt::ButtonState buttonState, Qt::ButtonState keyState) :
+ Selector(KWCanvas *canvas, KoPoint &point, TQt::ButtonState buttonState, TQt::ButtonState keyState) :
m_canvas(canvas), m_point(point), m_state(keyState) {
m_leftClick = buttonState & Qt::LeftButton;
KWFrameView *view = canvas->frameViewManager()->view(point,
@@ -2081,15 +2081,15 @@ InteractionPolicy* InteractionPolicy::createPolicy(KWCanvas *parent, MouseMeanin
private:
KWCanvas *m_canvas;
KoPoint m_point;
- Qt::ButtonState m_state;
+ TQt::ButtonState m_state;
bool m_leftClick, m_doSomething;
};
- Selector selector(parent, point, buttonState, keyState);
+ Selector selector(tqparent, point, buttonState, keyState);
switch(meaning) {
case MEANING_MOUSE_MOVE:
selector.doSelect();
- return new FrameMovePolicy(parent, point);
+ return new FrameMovePolicy(tqparent, point);
case MEANING_TOPLEFT:
case MEANING_TOP:
case MEANING_TOPRIGHT:
@@ -2099,9 +2099,9 @@ InteractionPolicy* InteractionPolicy::createPolicy(KWCanvas *parent, MouseMeanin
case MEANING_BOTTOMLEFT:
case MEANING_LEFT:
selector.doSelect();
- return new FrameResizePolicy(parent, meaning, point);
+ return new FrameResizePolicy(tqparent, meaning, point);
default:
- FrameSelectPolicy *fsp = new FrameSelectPolicy(parent, meaning, point, buttonState, keyState);
+ FrameSelectPolicy *fsp = new FrameSelectPolicy(tqparent, meaning, point, buttonState, keyState);
if(fsp->isValid())
return fsp;
delete fsp;
@@ -2120,8 +2120,8 @@ void InteractionPolicy::cancelInteraction() {
// ************** FrameResizePolicy ***********************
-FrameResizePolicy::FrameResizePolicy(KWCanvas *parent, MouseMeaning meaning, KoPoint &point) :
- InteractionPolicy (parent, true, true), m_boundingRect() {
+FrameResizePolicy::FrameResizePolicy(KWCanvas *tqparent, MouseMeaning meaning, KoPoint &point) :
+ InteractionPolicy (tqparent, true, true), m_boundingRect() {
if( meaning == MEANING_TOPLEFT) {
m_top = true; m_bottom = false; m_left = true; m_right = false;
@@ -2148,7 +2148,7 @@ FrameResizePolicy::FrameResizePolicy(KWCanvas *parent, MouseMeaning meaning, KoP
m_top = false; m_bottom = false; m_left = true; m_right = false;
}
- QValueListConstIterator<KWFrame*> framesIterator = m_frames.begin();
+ TQValueListConstIterator<KWFrame*> framesIterator = m_frames.begin();
for(;framesIterator != m_frames.end(); ++framesIterator) {
KWFrame *frame = *framesIterator;
FrameResizeStruct frs(*frame, frame->minimumFrameHeight(), *frame);
@@ -2158,20 +2158,20 @@ FrameResizePolicy::FrameResizePolicy(KWCanvas *parent, MouseMeaning meaning, KoP
m_hotSpot = point - m_boundingRect.topLeft();
}
-void FrameResizePolicy::handleMouseMove(Qt::ButtonState keyState, const KoPoint &point) {
+void FrameResizePolicy::handleMouseMove(TQt::ButtonState keyState, const KoPoint &point) {
//kdDebug() << "handleMouseMove " << (m_top?"top ":"") << (m_bottom?"bottom ":"") << (m_left?"left ":"") << (m_right?"right":"") << endl;
//kdDebug() << " + point: " << point
// << " boundingrect: " << m_boundingRect << endl;
- bool keepAspect = keyState & Qt::AltButton;
+ bool keepAspect = keyState & TQt::AltButton;
for(unsigned int i=0; !keepAspect && i < m_frames.count(); i++) {
KWPictureFrameSet *picFs = dynamic_cast<KWPictureFrameSet*>(m_frames[i]->frameSet());
if(picFs)
keepAspect = picFs->keepAspectRatio();
}
- bool noGrid = keyState & Qt::ShiftButton;
- bool scaleFromCenter = keyState & Qt::ControlButton;
+ bool noGrid = keyState & TQt::ShiftButton;
+ bool scaleFromCenter = keyState & TQt::ControlButton;
KoPoint p( point.x() - (m_hotSpot.x() + m_boundingRect.x()),
point.y() - (m_hotSpot.y() + m_boundingRect.y()) );
@@ -2228,10 +2228,10 @@ void FrameResizePolicy::handleMouseMove(Qt::ButtonState keyState, const KoPoint
KWPageManager *pageManager = m_parent->kWordDocument()->pageManager();
sizeRect.moveTopLeft(pageManager->clipToDocument(sizeRect.topLeft()));
sizeRect.moveBottomRight(pageManager->clipToDocument(sizeRect.bottomRight()));
- sizeRect.setX( QMAX(0, sizeRect.x()) ); // otherwise it would get wider than the page
+ sizeRect.setX( TQMAX(0, sizeRect.x()) ); // otherwise it would get wider than the page
}
- // each frame in m_frames should be reshaped from the original size stored in the
+ // each frame in m_frames should be retqshaped from the original size stored in the
// m_frameResize data to a size that equals the reshaping of m_boundingrect to sizeRect
class Converter {
public:
@@ -2244,21 +2244,21 @@ void FrameResizePolicy::handleMouseMove(Qt::ButtonState keyState, const KoPoint
//kdDebug() << "Converter " << from << ", " << to << " x: " << m_diffX << ", y: " << m_diffY << endl;
}
void update(KWFrame *frame, KoRect &orig) {
- QRect oldRect( m_viewMode->normalToView( frame->outerRect(m_viewMode) ) );
+ TQRect oldRect( m_viewMode->normalToView( frame->outerRect(m_viewMode) ) );
if(! frame->frameSet()->isFloating())
frame->moveTopLeft( convert( orig.topLeft() ) );
KoPoint bottomRight( convert( orig.bottomRight() ) );
frame->setBottom( bottomRight.y() );
frame->setRight( bottomRight.x() );
- QRect newRect( frame->outerRect(m_viewMode) );
- QRect frameRect( m_viewMode->normalToView( newRect ) );
+ TQRect newRect( frame->outerRect(m_viewMode) );
+ TQRect frameRect( m_viewMode->normalToView( newRect ) );
// Repaint only the changed rects (oldRect U newRect)
- m_repaintRegion += QRegion(oldRect).unite(frameRect).boundingRect();
+ m_tqrepaintRegion += TQRegion(oldRect).unite(frameRect).boundingRect();
}
- QRegion repaintRegion() {
- return m_repaintRegion;
+ TQRegion tqrepaintRegion() {
+ return m_tqrepaintRegion;
}
private:
@@ -2271,7 +2271,7 @@ void FrameResizePolicy::handleMouseMove(Qt::ButtonState keyState, const KoPoint
private: // vars
KoPoint m_from, m_to;
KWViewMode *m_viewMode;
- QRegion m_repaintRegion;
+ TQRegion m_tqrepaintRegion;
double m_diffX, m_diffY;
};
@@ -2280,9 +2280,9 @@ void FrameResizePolicy::handleMouseMove(Qt::ButtonState keyState, const KoPoint
converter.update(m_frames[i], m_frameResize[i].oldRect);
if ( !m_parent->kWordDocument()->showGrid() && m_parent->kWordDocument()->snapToGrid() )
- m_parent->repaintContents( false ); //draw the grid over the whole canvas
+ m_parent->tqrepaintContents( false ); //draw the grid over the whole canvas
else
- m_parent->repaintContents( converter.repaintRegion().boundingRect(), false );
+ m_parent->tqrepaintContents( converter.tqrepaintRegion().boundingRect(), false );
m_parent->gui()->getView()->updateFrameStatusBarItem();
}
@@ -2308,10 +2308,10 @@ void FrameResizePolicy::finishInteraction() {
// *************** FrameMovePolicy ************************
-FrameMovePolicy::FrameMovePolicy(KWCanvas *parent, KoPoint &point) :
- InteractionPolicy (parent), m_boundingRect() {
+FrameMovePolicy::FrameMovePolicy(KWCanvas *tqparent, KoPoint &point) :
+ InteractionPolicy (tqparent), m_boundingRect() {
- QValueListConstIterator<KWFrame*> framesIterator = m_frames.begin();
+ TQValueListConstIterator<KWFrame*> framesIterator = m_frames.begin();
for(;framesIterator != m_frames.end(); ++framesIterator) {
KWFrame *frame = *framesIterator;
m_boundingRect |= frame->outerKoRect();
@@ -2323,9 +2323,9 @@ FrameMovePolicy::FrameMovePolicy(KWCanvas *parent, KoPoint &point) :
m_startPoint = m_boundingRect.topLeft();
}
-void FrameMovePolicy::handleMouseMove(Qt::ButtonState keyState, const KoPoint &point) {
- bool noGrid = keyState & Qt::ShiftButton;
- bool linearMove = (keyState & Qt::AltButton) || (keyState & Qt::ControlButton);
+void FrameMovePolicy::handleMouseMove(TQt::ButtonState keyState, const KoPoint &point) {
+ bool noGrid = keyState & TQt::ShiftButton;
+ bool linearMove = (keyState & TQt::AltButton) || (keyState & TQt::ControlButton);
KWPageManager *pageManager = m_parent->kWordDocument()->pageManager();
@@ -2335,7 +2335,7 @@ void FrameMovePolicy::handleMouseMove(Qt::ButtonState keyState, const KoPoint &p
KoPoint p( point.x() - m_hotSpot.x(), point.y() - m_hotSpot.y() );
if(linearMove) {
- if(QABS(p.x() - m_startPoint.x()) < QABS(p.y() - m_startPoint.y()))
+ if(TQABS(p.x() - m_startPoint.x()) < TQABS(p.y() - m_startPoint.y()))
p.setX(m_startPoint.x());
else
p.setY(m_startPoint.y());
@@ -2371,30 +2371,30 @@ void FrameMovePolicy::handleMouseMove(Qt::ButtonState keyState, const KoPoint &p
kdDebug() << " boundingX+hotspotX=" << m_boundingRect.left() + m_hotSpot.x() << endl;
kdDebug() << " point.x()=" << point.x() << endl; */
- QPtrList<KWTableFrameSet> tablesMoved;
+ TQPtrList<KWTableFrameSet> tablesMoved;
tablesMoved.setAutoDelete( FALSE );
- QRegion repaintRegion;
+ TQRegion tqrepaintRegion;
KoPoint _move=m_boundingRect.topLeft() - oldBoundingRect.topLeft();
- QValueListIterator<KWFrame*> framesIterator = m_frames.begin();
+ TQValueListIterator<KWFrame*> framesIterator = m_frames.begin();
for(; framesIterator != m_frames.end(); ++framesIterator) {
KWFrame *frame = *framesIterator;
KWFrameSet *fs = frame->frameSet();
if ( fs->type() == FT_TABLE ) {
- if ( tablesMoved.findRef( static_cast<KWTableFrameSet *> (fs) ) == -1 )
+ if ( tablesMoved.tqfindRef( static_cast<KWTableFrameSet *> (fs) ) == -1 )
tablesMoved.append( static_cast<KWTableFrameSet *> (fs));
}
else {
- QRect oldRect( m_parent->viewMode()->normalToView( frame->outerRect(m_parent->viewMode()) ) );
+ TQRect oldRect( m_parent->viewMode()->normalToView( frame->outerRect(m_parent->viewMode()) ) );
// Move the frame
frame->moveTopLeft( frame->topLeft() + _move );
// Calculate new rectangle for this frame
- QRect newRect( frame->outerRect(m_parent->viewMode()) );
+ TQRect newRect( frame->outerRect(m_parent->viewMode()) );
- QRect frameRect( m_parent->viewMode()->normalToView( newRect ) );
+ TQRect frameRect( m_parent->viewMode()->normalToView( newRect ) );
// Repaint only the changed rects (oldRect U newRect)
- repaintRegion += QRegion(oldRect).unite(frameRect).boundingRect();
+ tqrepaintRegion += TQRegion(oldRect).unite(frameRect).boundingRect();
}
}
@@ -2404,21 +2404,21 @@ void FrameMovePolicy::handleMouseMove(Qt::ButtonState keyState, const KoPoint &p
KWTableFrameSet *table = tablesMoved.at( i );
for ( KWTableFrameSet::TableIter k(table) ; k ; ++k ) {
KWFrame * frame = k->frame( 0 );
- QRect oldRect( m_parent->viewMode()->normalToView( frame->outerRect(m_parent->viewMode()) ) );
+ TQRect oldRect( m_parent->viewMode()->normalToView( frame->outerRect(m_parent->viewMode()) ) );
frame->moveTopLeft( frame->topLeft() + _move );
// Calculate new rectangle for this frame
- QRect newRect( frame->outerRect(m_parent->viewMode()) );
- QRect frameRect( m_parent->viewMode()->normalToView( newRect ) );
+ TQRect newRect( frame->outerRect(m_parent->viewMode()) );
+ TQRect frameRect( m_parent->viewMode()->normalToView( newRect ) );
// Repaing only the changed rects (oldRect U newRect)
- repaintRegion += QRegion(oldRect).unite(frameRect).boundingRect();
+ tqrepaintRegion += TQRegion(oldRect).unite(frameRect).boundingRect();
}
}
}
if ( !m_parent->kWordDocument()->showGrid() && m_parent->kWordDocument()->snapToGrid() )
- m_parent->repaintContents( false ); //draw the grid over the whole canvas
+ m_parent->tqrepaintContents( false ); //draw the grid over the whole canvas
else
- m_parent->repaintContents( repaintRegion.boundingRect(), false );
+ m_parent->tqrepaintContents( tqrepaintRegion.boundingRect(), false );
m_parent->gui()->getView()->updateFrameStatusBarItem();
}
@@ -2442,29 +2442,29 @@ void FrameMovePolicy::finishInteraction() {
// ************** FrameSelectPolicy ***********************
-FrameSelectPolicy::FrameSelectPolicy(KWCanvas *parent, MouseMeaning meaning, KoPoint &point, Qt::ButtonState buttonState, Qt::ButtonState keyState)
- : InteractionPolicy(parent, false) {
+FrameSelectPolicy::FrameSelectPolicy(KWCanvas *tqparent, MouseMeaning meaning, KoPoint &point, TQt::ButtonState buttonState, TQt::ButtonState keyState)
+ : InteractionPolicy(tqparent, false) {
bool leftButton = buttonState & Qt::LeftButton;
// this is a special case; if a frame that is curently being edited is 'selected' on the border
// we redirect that click to the text part of the frame.
// this means we give the user a lot more space to click on the left side of the frame to
// select the first characters.
- KWFrameSetEdit *fse = parent->currentFrameSetEdit();
+ KWFrameSetEdit *fse = tqparent->currentFrameSetEdit();
if(leftButton && fse) {
KWFrameView *view = m_parent->frameViewManager()->view(point,
KWFrameViewManager::unselected, true);
if(view && view->frame()->frameSet() == fse->frameSet()) {
// make sure 'point' is inside the frame
- point.setX(QMAX(point.x(), view->frame()->left()));
- point.setY(QMAX(point.y(), view->frame()->top()));
- point.setX(QMIN(point.x(), view->frame()->right()));
- point.setY(QMIN(point.y(), view->frame()->bottom()));
+ point.setX(TQMAX(point.x(), view->frame()->left()));
+ point.setY(TQMAX(point.y(), view->frame()->top()));
+ point.setX(TQMIN(point.x(), view->frame()->right()));
+ point.setY(TQMIN(point.y(), view->frame()->bottom()));
// convert point to the view coordinate system.
- QPoint normalPoint = parent->kWordDocument()->zoomPoint(point);
- QPoint mousePos = parent->viewMode()->normalToView(normalPoint);
- QMouseEvent *me = new QMouseEvent(QEvent::MouseButtonPress, mousePos,
+ TQPoint normalPoint = tqparent->kWordDocument()->zoomPoint(point);
+ TQPoint mousePos = tqparent->viewMode()->normalToView(normalPoint);
+ TQMouseEvent *me = new TQMouseEvent(TQEvent::MouseButtonPress, mousePos,
buttonState, keyState);
fse->mousePressEvent(me, normalPoint, point );
delete me;
@@ -2478,7 +2478,7 @@ FrameSelectPolicy::FrameSelectPolicy(KWCanvas *parent, MouseMeaning meaning, KoP
m_parent->frameViewManager()->selectFrames(point, keyState, leftButton );
}
-void FrameSelectPolicy::handleMouseMove(Qt::ButtonState keyState, const KoPoint &point) {
+void FrameSelectPolicy::handleMouseMove(TQt::ButtonState keyState, const KoPoint &point) {
Q_UNUSED(keyState);
Q_UNUSED(point);
}
diff --git a/kword/KWCanvas.h b/kword/KWCanvas.h
index ffd1e85e..223161f6 100644
--- a/kword/KWCanvas.h
+++ b/kword/KWCanvas.h
@@ -24,8 +24,8 @@
#include <kprinter.h>
#include <KoRect.h>
-#include <qscrollview.h>
-#include <qstylesheet.h>
+#include <tqscrollview.h>
+#include <tqstylesheet.h>
#include <KoRichText.h>
#include <KoQueryTrader.h>
#include <KoPicture.h>
@@ -47,7 +47,7 @@ class KWFrameViewManager;
class KWGUI;
class KWTableTemplate;
class KoTextParag;
-class QTimer;
+class TQTimer;
class InteractionPolicy;
class KWFrameView;
@@ -57,12 +57,13 @@ class KWFrameView;
* the screen as well as the interaction with the user via mouse
* and keyboard. There is one per view.
*/
-class KWCanvas : public QScrollView
+class KWCanvas : public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWCanvas(const QString& viewMode, QWidget *parent, KWDocument *d, KWGUI *lGui);
+ KWCanvas(const TQString& viewMode, TQWidget *tqparent, KWDocument *d, KWGUI *lGui);
virtual ~KWCanvas();
KWDocument * kWordDocument() const { return m_doc; }
@@ -70,25 +71,25 @@ public:
KWFrameViewManager* frameViewManager() { return m_frameViewManager; }
KWFrameSetEdit *currentFrameSetEdit() const { return m_currentFrameSetEdit; }
- void switchViewMode( const QString& newViewMode );
+ void switchViewMode( const TQString& newViewMode );
KWViewMode *viewMode() const { return m_viewMode; }
- void repaintAll( bool erase = false );
+ void tqrepaintAll( bool erase = false );
/**
- * Only repaint the frameset @p fs.
+ * Only tqrepaint the frameset @p fs.
* @p resetChanged should only be true for the last view
* (see KWFrameSet::drawContents)
*/
- void repaintChanged( KWFrameSet * fs, bool resetChanged );
+ void tqrepaintChanged( KWFrameSet * fs, bool resetChanged );
- /** We need to repaint if the window is resized. */
- void viewportResizeEvent( QResizeEvent * );
+ /** We need to tqrepaint if the window is resized. */
+ void viewportResizeEvent( TQResizeEvent * );
- void print( QPainter *painter, KPrinter *printer );
- bool eventFilter( QObject *o, QEvent *e );
+ void print( TQPainter *painter, KPrinter *printer );
+ bool eventFilter( TQObject *o, TQEvent *e );
bool focusNextPrevChild( bool next);
- void setFrameBackgroundColor( const QBrush &backColor );
+ void setFrameBackgroundColor( const TQBrush &backColor );
void editFrameProperties();
void editFrameProperties( KWFrameSet * frameset );
@@ -96,10 +97,10 @@ public:
void pasteFrames();
// Mouse press
- void mpCreate( const QPoint& normalPoint, bool noGrid );
- void mpCreatePixmap( const QPoint& normalPoint, bool noGrid );
+ void mpCreate( const TQPoint& normalPoint, bool noGrid );
+ void mpCreatePixmap( const TQPoint& normalPoint, bool noGrid );
// Mouse move
- void mmCreate( const QPoint& normalPoint, bool noGrid );
+ void mmCreate( const TQPoint& normalPoint, bool noGrid );
// Mouse release
void mrEditFrame();
void mrCreateText();
@@ -120,11 +121,11 @@ public:
MouseMode mouseMode()const { return m_mouseMode; }
// makes the user draw the rect for inserting the picture
- void insertPicture( const KoPicture& newPicture, QSize pixmapSize, bool _keepRatio );
+ void insertPicture( const KoPicture& newPicture, TQSize pixmapSize, bool _keepRatio );
void insertPart( const KoDocumentEntry &entry );
- void pasteImage( QMimeSource *e, const KoPoint &docPoint );
+ void pasteImage( TQMimeSource *e, const KoPoint &docPoint );
// insert a (non-inline) picture at the given position; used by dnd and dcop
- void insertPictureDirect( const KoPicture& picture, const KoPoint& pos, const QSize& sz = QSize() );
+ void insertPictureDirect( const KoPicture& picture, const KoPoint& pos, const TQSize& sz = TQSize() );
void updateCurrentFormat();
@@ -142,8 +143,8 @@ public:
void setTableFormat(int _nb){ m_table.format=_nb;}
- QString tableTemplateName()const { return m_table.tableTemplateName;}
- void setTableTemplateName(const QString &_name) { m_table.tableTemplateName=_name;}
+ TQString tableTemplateName()const { return m_table.tableTemplateName;}
+ void setTableTemplateName(const TQString &_name) { m_table.tableTemplateName=_name;}
void setPictureInline( bool _inline) { m_picture.pictureInline = _inline;}
bool pictureInline() const { return m_picture.pictureInline; }
@@ -220,35 +221,35 @@ public:
bool insertInlinePicture();
protected:
- void drawGrid( QPainter &p, const QRect& rect );
+ void drawGrid( TQPainter &p, const TQRect& rect );
/**
- * Reimplemented from QScrollView, to draw the contents of the canvas
+ * Reimplemented from TQScrollView, to draw the contents of the canvas
*/
- virtual void drawContents( QPainter *p, int cx, int cy, int cw, int ch );
+ virtual void drawContents( TQPainter *p, int cx, int cy, int cw, int ch );
/**
* The main drawing method.
* @param painter guess
- * @param crect the area to be repainted, in contents coordinates
+ * @param crect the area to be tqrepainted, in contents coordinates
* @param viewMode the view mode to be used (usually m_viewMode, except when printing)
*/
- void drawDocument( QPainter *painter, const QRect &crect, KWViewMode* viewMode );
+ void drawDocument( TQPainter *painter, const TQRect &crect, KWViewMode* viewMode );
/**
* Draw page borders, but also clear up the space between the frames and the page borders,
* draw the page shadow, and the gray area.
*/
- void drawPageBorders( QPainter * painter, const QRect & crect, const QRegion & emptySpaceRegion );
-
- virtual void keyPressEvent( QKeyEvent *e );
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void contentsMouseMoveEvent( QMouseEvent *e );
- virtual void contentsMouseReleaseEvent( QMouseEvent *e );
- virtual void contentsMouseDoubleClickEvent( QMouseEvent *e );
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
- virtual void contentsDropEvent( QDropEvent *e );
- virtual void resizeEvent( QResizeEvent *e );
+ void drawPageBorders( TQPainter * painter, const TQRect & crect, const TQRegion & emptySpaceRegion );
+
+ virtual void keyPressEvent( TQKeyEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void contentsMouseMoveEvent( TQMouseEvent *e );
+ virtual void contentsMouseReleaseEvent( TQMouseEvent *e );
+ virtual void contentsMouseDoubleClickEvent( TQMouseEvent *e );
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *e );
+ virtual void resizeEvent( TQResizeEvent *e );
KWTableFrameSet * createTable(); // uses m_insRect and m_table to create the table
@@ -288,10 +289,10 @@ private:
* Draw the contents of one frameset
* @param resetChanged whether the changed flag should be reset to false while redrawing
*/
- void drawFrameSet( KWFrameSet * frameset, QPainter * painter,
- const QRect & crect, bool onlyChanged, bool resetChanged, KWViewMode* viewMode );
+ void drawFrameSet( KWFrameSet * frameset, TQPainter * painter,
+ const TQRect & crect, bool onlyChanged, bool resetChanged, KWViewMode* viewMode );
- void drawMovingRect( QPainter & p );
+ void drawMovingRect( TQPainter & p );
void deleteMovingRect();
/**
* make the parag rectangle have the aspect ratio by changing either the height
@@ -309,7 +310,7 @@ private:
KWDocument *m_doc;
KWFrameSetEdit *m_currentFrameSetEdit;
KWGUI *m_gui;
- QTimer *m_scrollTimer;
+ TQTimer *m_scrollTimer;
bool m_mousePressed;
bool m_printing;
bool m_imageDrag;
@@ -330,7 +331,7 @@ private:
KoRect m_insRect; ///< variable updated and painted to represent the to insert frame
bool m_deleteMovingRect;
KoPicture m_kopicture; // The picture
- QSize m_pixmapSize; // size when inserting a picture (not necessarily the size of the picture)
+ TQSize m_pixmapSize; // size when inserting a picture (not necessarily the size of the picture)
bool m_keepRatio;//when inserting a picture
KoDocumentEntry m_partEntry; // when inserting a part
int m_rowColResized; // when resizing a row or column
@@ -349,7 +350,7 @@ private:
int /*KWTableFrameSet::CellSize*/ width;
int /*KWTableFrameSet::CellSize*/ height;
bool floating;
- QString tableTemplateName;
+ TQString tableTemplateName;
KWTableTemplate *tt;
} m_table;
KWTableFrameSet *m_currentTable;
@@ -385,7 +386,7 @@ class InteractionPolicy {
* @param point the new point where the mouse if at. This is in the document (pt-based)
* coordinate system.
*/
- virtual void handleMouseMove(Qt::ButtonState keyState, const KoPoint &point) = 0;
+ virtual void handleMouseMove(TQt::ButtonState keyState, const KoPoint &point) = 0;
/**
* For interactions that are undo-able this method should be implemented to return such
* a command. Implementations should return 0 otherwise.
@@ -404,13 +405,13 @@ class InteractionPolicy {
/**
* This instanciates a new policy object and decides which policy is created based on the params.
- * @param parent the parent canvas for things like redraw commands.
+ * @param tqparent the tqparent canvas for things like redraw commands.
* @param meaning the mouseMeaning of as it is at 'point'
* @param point the place where the mouseDown is registred.
* @param buttonState which button is used to click, like Qt::LeftButton
- * @param keyState which keys are held down at the click, like Qt::ControlButton
+ * @param keyState which keys are held down at the click, like TQt::ControlButton
*/
- static InteractionPolicy* createPolicy(KWCanvas *parent, MouseMeaning meaning, KoPoint &point, Qt::ButtonState buttonState, Qt::ButtonState keyState);
+ static InteractionPolicy* createPolicy(KWCanvas *tqparent, MouseMeaning meaning, KoPoint &point, TQt::ButtonState buttonState, TQt::ButtonState keyState);
void hadDragEvents() { m_gotDragEvents = true; }
bool gotDragEvents() { return m_gotDragEvents; }
@@ -418,15 +419,15 @@ class InteractionPolicy {
protected:
/**
* Constructor.
- * @param parent the parent canvas.
+ * @param tqparent the tqparent canvas.
* @param doInit if true this will initialize the m_frames and m_indexFrame variables.
* @param includeInlineFrames if true the m_frames will include inline frames
*/
- InteractionPolicy(KWCanvas *parent, bool doInit = true, bool includeInlineFrames = false);
+ InteractionPolicy(KWCanvas *tqparent, bool doInit = true, bool includeInlineFrames = false);
- QValueList<FrameIndex> m_indexFrame;
+ TQValueList<FrameIndex> m_indexFrame;
KWCanvas *m_parent;
- QValueList<KWFrame*> m_frames;
+ TQValueList<KWFrame*> m_frames;
private:
void init();
@@ -440,13 +441,13 @@ class InteractionPolicy {
*/
class FrameResizePolicy : public InteractionPolicy {
public:
- FrameResizePolicy(KWCanvas *parent, MouseMeaning meaning, KoPoint &point);
- void handleMouseMove(Qt::ButtonState keyState, const KoPoint &point);
+ FrameResizePolicy(KWCanvas *tqparent, MouseMeaning meaning, KoPoint &point);
+ void handleMouseMove(TQt::ButtonState keyState, const KoPoint &point);
KCommand *createCommand();
void finishInteraction();
private:
- QValueList<FrameResizeStruct> m_frameResize;
+ TQValueList<FrameResizeStruct> m_frameResize;
bool m_top, m_bottom, m_left, m_right;
KoRect m_boundingRect;
KoPoint m_hotSpot;
@@ -459,12 +460,12 @@ class FrameResizePolicy : public InteractionPolicy {
*/
class FrameMovePolicy : public InteractionPolicy {
public:
- FrameMovePolicy(KWCanvas *parent, KoPoint &point);
- void handleMouseMove(Qt::ButtonState keyState, const KoPoint &point);
+ FrameMovePolicy(KWCanvas *tqparent, KoPoint &point);
+ void handleMouseMove(TQt::ButtonState keyState, const KoPoint &point);
KCommand *createCommand();
void finishInteraction();
private:
- QValueList<FrameMoveStruct> m_frameMove;
+ TQValueList<FrameMoveStruct> m_frameMove;
KoPoint m_hotSpot;
KoPoint m_startPoint;
KoRect m_boundingRect;
@@ -475,8 +476,8 @@ class FrameMovePolicy : public InteractionPolicy {
*/
class FrameSelectPolicy : public InteractionPolicy {
public:
- FrameSelectPolicy(KWCanvas *parent, MouseMeaning meaning, KoPoint &point, Qt::ButtonState state, Qt::ButtonState keyState);
- void handleMouseMove(Qt::ButtonState keyState, const KoPoint &point);
+ FrameSelectPolicy(KWCanvas *tqparent, MouseMeaning meaning, KoPoint &point, TQt::ButtonState state, TQt::ButtonState keyState);
+ void handleMouseMove(TQt::ButtonState keyState, const KoPoint &point);
KCommand *createCommand();
void finishInteraction();
bool isValid() { return m_validSelection; }
diff --git a/kword/KWCollectFramesetsVisitor.h b/kword/KWCollectFramesetsVisitor.h
index e2eb84f6..49a5d955 100644
--- a/kword/KWCollectFramesetsVisitor.h
+++ b/kword/KWCollectFramesetsVisitor.h
@@ -22,7 +22,7 @@
#include <KoTextDocument.h>
class KWFrameSet;
-template <class T> class QValueList;
+template <class T> class TQValueList;
// This paragraph visitor collects the inline framesets (found via KWAnchor)
// found in a text selection.
@@ -32,10 +32,10 @@ public:
KWCollectFramesetsVisitor() : KoParagVisitor() {}
virtual bool visit( KoTextParag *parag, int start, int end );
- const QValueList<KWFrameSet *>& frameSets() const { return m_framesets; }
+ const TQValueList<KWFrameSet *>& frameSets() const { return m_framesets; }
private:
- QValueList<KWFrameSet *> m_framesets;
+ TQValueList<KWFrameSet *> m_framesets;
};
#endif /* KWORD_PARAGVISITORS_H */
diff --git a/kword/KWCommand.cpp b/kword/KWCommand.cpp
index 52383db4..810856ef 100644
--- a/kword/KWCommand.cpp
+++ b/kword/KWCommand.cpp
@@ -47,8 +47,8 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qxml.h>
-#include <qbuffer.h>
+#include <tqxml.h>
+#include <tqbuffer.h>
#include <algorithm>
// Helper class for deleting all custom items
@@ -79,7 +79,7 @@ public:
#if 0 // kept for comparison with KWOasisPasteCommand
KWPasteTextCommand::KWPasteTextCommand( KoTextDocument *d, int parag, int idx,
- const QCString & data )
+ const TQCString & data )
: KoTextDocCommand( d ), m_parag( parag ), m_idx( idx ), m_data( data ), m_oldParagLayout( 0 )
{
}
@@ -97,23 +97,23 @@ KoTextCursor * KWPasteTextCommand::execute( KoTextCursor *c )
cursor.setIndex( m_idx );
c->setParag( firstParag );
c->setIndex( m_idx );
- QDomDocument domDoc;
+ TQDomDocument domDoc;
domDoc.setContent( m_data );
- QDomElement elem = domDoc.documentElement();
+ TQDomElement elem = domDoc.documentElement();
KWTextDocument * textdoc = static_cast<KWTextDocument *>(doc);
KWTextFrameSet * textFs = textdoc->textFrameSet();
// We iterate twice over the list of paragraphs.
// First time to gather the text,
// second time to apply the character & paragraph formatting
- QString text;
+ TQString text;
- QValueList<QDomElement> listParagraphs;
- QDomElement paragraph = elem.firstChild().toElement();
+ TQValueList<TQDomElement> listParagraphs;
+ TQDomElement paragraph = elem.firstChild().toElement();
for ( ; !paragraph.isNull() ; paragraph = paragraph.nextSibling().toElement() )
{
if ( paragraph.tagName() == "PARAGRAPH" )
{
- QString s = paragraph.namedItem( "TEXT" ).toElement().text();
+ TQString s = paragraph.namedItem( "TEXT" ).toElement().text();
//kdDebug() << "KWPasteTextCommand::execute Inserting text: '" << s << "'" << endl;
c->insert( s, false /*newline=linebreak, not new parag*/ );
@@ -135,8 +135,8 @@ KoTextCursor * KWPasteTextCommand::execute( KoTextCursor *c )
KWTextParag * parag = static_cast<KWTextParag *>(firstParag);
//kdDebug() << "KWPasteTextCommand::execute starting at parag " << parag << " " << parag->paragId() << endl;
uint count = listParagraphs.count();
- QValueList<QDomElement>::Iterator it = listParagraphs.begin();
- QValueList<QDomElement>::Iterator end = listParagraphs.end();
+ TQValueList<TQDomElement>::Iterator it = listParagraphs.begin();
+ TQValueList<TQDomElement>::Iterator end = listParagraphs.end();
for ( uint item = 0 ; it != end ; ++it, ++item )
{
if (!parag)
@@ -144,18 +144,18 @@ KoTextCursor * KWPasteTextCommand::execute( KoTextCursor *c )
kdWarning() << "KWPasteTextCommand: parag==0L ! KWord bug, please report." << endl;
break;
}
- QDomElement paragElem = *it;
- // First line (if appending to non-empty line) : apply offset to formatting, don't apply parag layout
+ TQDomElement paragElem = *it;
+ // First line (if appending to non-empty line) : apply offset to formatting, don't apply parag tqlayout
if ( item == 0 && m_idx > 0 )
{
// First load the default format, but only apply it to our new chars
- QDomElement layout = paragElem.namedItem( "LAYOUT" ).toElement();
- if ( !layout.isNull() )
+ TQDomElement tqlayout = paragElem.namedItem( "LAYOUT" ).toElement();
+ if ( !tqlayout.isNull() )
{
- QDomElement formatElem = layout.namedItem( "FORMAT" ).toElement();
+ TQDomElement formatElem = tqlayout.namedItem( "FORMAT" ).toElement();
if ( !formatElem.isNull() )
{
- KoTextFormat f = parag->loadFormat( formatElem, 0L, QFont(), KGlobal::locale()->language(),false );
+ KoTextFormat f = parag->loadFormat( formatElem, 0L, TQFont(), KGlobal::locale()->language(),false );
KoTextFormat * defaultFormat = doc->formatCollection()->format( &f );
// Last paragraph (i.e. only one in all) : some of the text might be from before the paste
int endIndex = (item == count-1) ? c->index() : parag->string()->length() - 1;
@@ -167,7 +167,7 @@ KoTextCursor * KWPasteTextCommand::execute( KoTextCursor *c )
}
else
{
- if ( item == 0 ) // This paragraph existed, store its parag layout
+ if ( item == 0 ) // This paragraph existed, store its parag tqlayout
{
delete m_oldParagLayout;
m_oldParagLayout = new KoParagLayout( parag->paragLayout() );
@@ -179,7 +179,7 @@ KoTextCursor * KWPasteTextCommand::execute( KoTextCursor *c )
parag->setFormat( 0, len, parag->paragFormat(), TRUE );
parag->loadFormatting( paragElem, 0, (textFs->isMainFrameset()) );
}
- parag->invalidate(0); // the formatting will be done by caller (either KWTextFrameSet::pasteOasis or KoTextObject::undo/redo)
+ parag->tqinvalidate(0); // the formatting will be done by caller (either KWTextFrameSet::pasteOasis or KoTextObject::undo/redo)
parag->setChanged( TRUE );
parag = static_cast<KWTextParag *>(parag->next());
//kdDebug() << "KWPasteTextCommand::execute going to next parag: " << parag << endl;
@@ -246,7 +246,7 @@ KoTextCursor * KWPasteTextCommand::unexecute( KoTextCursor *c )
#endif
KWOasisPasteCommand::KWOasisPasteCommand( KoTextDocument *d, int parag, int idx,
- const QByteArray& data )
+ const TQByteArray& data )
: KoTextDocCommand( d ), m_parag( parag ), m_idx( idx ), m_data( data ), m_oldParagLayout( 0 )
{
}
@@ -267,9 +267,9 @@ KoTextCursor * KWOasisPasteCommand::execute( KoTextCursor *c )
KWTextDocument * textdoc = static_cast<KWTextDocument *>(doc);
- QBuffer buffer( m_data );
+ TQBuffer buffer( m_data );
- KoStore * store = KoStore::createStore( &buffer, KoStore::Read );
+ KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read );
KWDocument* kwdoc = textdoc->textFrameSet()->kWordDocument();
KWOasisLoader loader( kwdoc );
loader.insertOasisData( store, c );
@@ -327,9 +327,9 @@ KoTextCursor * KWOasisPasteCommand::unexecute( KoTextCursor *c )
}
-KWTextDeleteCommand::KWTextDeleteCommand( KoTextDocument *d, int i, int idx, const QMemArray<KoTextStringChar> &str,
+KWTextDeleteCommand::KWTextDeleteCommand( KoTextDocument *d, int i, int idx, const TQMemArray<KoTextStringChar> &str,
const CustomItemsMap & customItemsMap,
- const QValueList<KoParagLayout> & oldParagLayouts )
+ const TQValueList<KoParagLayout> & oldParagLayouts )
:KoTextDeleteCommand(d, i, idx, str, customItemsMap, oldParagLayouts)
{
//createBookmarkList();
@@ -344,9 +344,9 @@ void KWTextDeleteCommand::createBookmarkList()
return;
}
- // Now restore the parag layouts (i.e. libkotext specific stuff)
- QValueList<KoParagLayout>::Iterator lit = m_oldParagLayouts.begin();
- kdDebug(32500) << "KWTextDeleteCommand::createBookmarkList " << m_oldParagLayouts.count() << " parag layouts. First parag=" << s->paragId() << endl;
+ // Now restore the parag tqlayouts (i.e. libkotext specific stuff)
+ TQValueList<KoParagLayout>::Iterator lit = m_oldParagLayouts.begin();
+ kdDebug(32500) << "KWTextDeleteCommand::createBookmarkList " << m_oldParagLayouts.count() << " parag tqlayouts. First parag=" << s->paragId() << endl;
Q_ASSERT( id == s->paragId() );
KoTextParag *p = s;
while ( p ) {
@@ -381,7 +381,7 @@ FrameIndex::FrameIndex( KWFrame *frame )
m_iFrameIndex=m_pFrameSet->frameFromPtr(frame);
}
-KWFrameBorderCommand::KWFrameBorderCommand( const QString &name, QPtrList<FrameIndex> &_listFrameIndex, QPtrList<FrameBorderTypeStruct> &_frameTypeBorder,const KoBorder & _newBorder):
+KWFrameBorderCommand::KWFrameBorderCommand( const TQString &name, TQPtrList<FrameIndex> &_listFrameIndex, TQPtrList<FrameBorderTypeStruct> &_frameTypeBorder,const KoBorder & _newBorder):
KNamedCommand(name),
m_indexFrame(_listFrameIndex),
m_oldBorderFrameType(_frameTypeBorder),
@@ -405,7 +405,7 @@ void KWFrameBorderCommand::execute()
doc = frameSet->kWordDocument();
KWFrame *frame=frameSet->frame(tmp->m_iFrameIndex);
KWTableFrameSet::Cell *cell = dynamic_cast<KWTableFrameSet::Cell *>(frame->frameSet());
- FrameBorderTypeStruct *tmpFrameStruct=m_oldBorderFrameType.at(m_indexFrame.find(tmp));
+ FrameBorderTypeStruct *tmpFrameStruct=m_oldBorderFrameType.at(m_indexFrame.tqfind(tmp));
switch( tmpFrameStruct->m_EFrameType)
{
@@ -446,7 +446,7 @@ void KWFrameBorderCommand::execute()
if ( doc )
{
- doc->repaintAllViews();
+ doc->tqrepaintAllViews();
}
}
@@ -460,7 +460,7 @@ void KWFrameBorderCommand::unexecute()
doc = frameSet->kWordDocument();
KWFrame *frame=frameSet->frame(tmp->m_iFrameIndex);
KWTableFrameSet::Cell *cell = dynamic_cast<KWTableFrameSet::Cell *>(frame->frameSet());
- FrameBorderTypeStruct *tmpFrameStruct=m_oldBorderFrameType.at(m_indexFrame.find(tmp));
+ FrameBorderTypeStruct *tmpFrameStruct=m_oldBorderFrameType.at(m_indexFrame.tqfind(tmp));
switch(tmpFrameStruct->m_EFrameType)
{
case KoBorder::LeftBorder:
@@ -501,11 +501,11 @@ void KWFrameBorderCommand::unexecute()
if ( doc )
{
//update frames
- doc->repaintAllViews();
+ doc->tqrepaintAllViews();
}
}
-KWFrameBackGroundColorCommand::KWFrameBackGroundColorCommand( const QString &name, QPtrList<FrameIndex> &_listFrameIndex, QPtrList<QBrush> &_oldBrush,const QBrush & _newColor ):
+KWFrameBackGroundColorCommand::KWFrameBackGroundColorCommand( const TQString &name, TQPtrList<FrameIndex> &_listFrameIndex, TQPtrList<TQBrush> &_oldBrush,const TQBrush & _newColor ):
KNamedCommand(name),
m_indexFrame(_listFrameIndex),
m_oldBackGroundColor(_oldBrush),
@@ -536,7 +536,7 @@ void KWFrameBackGroundColorCommand::execute()
}
//update frame
if ( doc )
- doc->repaintAllViews();
+ doc->tqrepaintAllViews();
}
void KWFrameBackGroundColorCommand::unexecute()
@@ -550,22 +550,22 @@ void KWFrameBackGroundColorCommand::unexecute()
{
doc = frameSet->kWordDocument();
KWFrame *frame=frameSet->frame(tmp->m_iFrameIndex);
- QBrush *tmpFrameStruct=m_oldBackGroundColor.at(m_indexFrame.find(tmp));
+ TQBrush *tmpFrameStruct=m_oldBackGroundColor.at(m_indexFrame.tqfind(tmp));
frame->setBackgroundColor(*tmpFrameStruct);
}
}
//update frames
if ( doc )
- doc->repaintAllViews();
+ doc->tqrepaintAllViews();
}
-KWFrameStyleCommand::KWFrameStyleCommand( const QString &name, KWFrame *_frame, KWFrameStyle *_fs, bool _repaintViews ) :
+KWFrameStyleCommand::KWFrameStyleCommand( const TQString &name, KWFrame *_frame, KWFrameStyle *_fs, bool _tqrepaintViews ) :
KNamedCommand( name )
{
m_frame = _frame;
m_fs = _fs;
- repaintViews = _repaintViews;
+ tqrepaintViews = _tqrepaintViews;
m_oldValues = new KWFrameStyle( "Old", m_frame );
}
@@ -590,20 +590,20 @@ void KWFrameStyleCommand::applyFrameStyle( KWFrameStyle * _sty )
m_frame->setBottomBorder( _sty->bottomBorder() );
m_frame->frameBordersChanged();
- if ( repaintViews )
- m_frame->frameSet()->kWordDocument()->repaintAllViews();
+ if ( tqrepaintViews )
+ m_frame->frameSet()->kWordDocument()->tqrepaintAllViews();
}
-KWTableStyleCommand::KWTableStyleCommand( const QString &name, KWFrame *_frame, KWTableStyle *_ts, bool _repaintViews ) :
+KWTableStyleCommand::KWTableStyleCommand( const TQString &name, KWFrame *_frame, KWTableStyle *_ts, bool _tqrepaintViews ) :
KNamedCommand( name )
{
m_frame = _frame;
m_ts = _ts;
- repaintViews = _repaintViews;
+ tqrepaintViews = _tqrepaintViews;
// No need for i18n because it will never be displayed.
- m_fsc = new KWFrameStyleCommand( "Apply Framestyle to Frame", m_frame, m_ts->frameStyle(), repaintViews );
+ m_fsc = new KWFrameStyleCommand( "Apply Framestyle to Frame", m_frame, m_ts->frameStyle(), tqrepaintViews );
m_sc = 0L;
}
@@ -627,8 +627,8 @@ void KWTableStyleCommand::execute()
}
m_frame->frameBordersChanged();
- if ( repaintViews )
- m_frame->frameSet()->kWordDocument()->repaintAllViews();
+ if ( tqrepaintViews )
+ m_frame->frameSet()->kWordDocument()->tqrepaintAllViews();
}
@@ -640,11 +640,11 @@ void KWTableStyleCommand::unexecute()
m_sc->unexecute();
m_frame->frameBordersChanged();
- if ( repaintViews )
- m_frame->frameSet()->kWordDocument()->repaintAllViews();
+ if ( tqrepaintViews )
+ m_frame->frameSet()->kWordDocument()->tqrepaintAllViews();
}
-KWTableTemplateCommand::KWTableTemplateCommand( const QString &name, KWTableFrameSet *_table, KWTableTemplate *_tt ) :
+KWTableTemplateCommand::KWTableTemplateCommand( const TQString &name, KWTableFrameSet *_table, KWTableTemplate *_tt ) :
KNamedCommand( name )
{
m_table = _table;
@@ -702,21 +702,21 @@ KWTableTemplateCommand::~KWTableTemplateCommand()
void KWTableTemplateCommand::execute()
{
m_tableCommands->execute();
- m_table->kWordDocument()->repaintAllViews();
+ m_table->kWordDocument()->tqrepaintAllViews();
}
void KWTableTemplateCommand::unexecute()
{
m_tableCommands->unexecute();
- m_table->kWordDocument()->repaintAllViews();
+ m_table->kWordDocument()->tqrepaintAllViews();
}
-KWFrameResizeCommand::KWFrameResizeCommand(const QString &name, const QValueList<FrameIndex> &frameIndex, const QValueList<FrameResizeStruct> &frameResize )
+KWFrameResizeCommand::KWFrameResizeCommand(const TQString &name, const TQValueList<FrameIndex> &frameIndex, const TQValueList<FrameResizeStruct> &frameResize )
: KNamedCommand(name), m_indexFrame(frameIndex), m_frameResize(frameResize) {
Q_ASSERT(m_indexFrame.count() == m_frameResize.count());
}
-KWFrameResizeCommand::KWFrameResizeCommand(const QString &name, FrameIndex frameIndex, const FrameResizeStruct &frameResize )
+KWFrameResizeCommand::KWFrameResizeCommand(const TQString &name, FrameIndex frameIndex, const FrameResizeStruct &frameResize )
: KNamedCommand(name) {
m_indexFrame.append(frameIndex);
m_frameResize.append(frameResize);
@@ -724,8 +724,8 @@ KWFrameResizeCommand::KWFrameResizeCommand(const QString &name, FrameIndex frame
void KWFrameResizeCommand::execute()
{
- QValueList<FrameResizeStruct>::Iterator resizeIter = m_frameResize.begin();
- QValueList<FrameIndex>::Iterator iter = m_indexFrame.begin();
+ TQValueList<FrameResizeStruct>::Iterator resizeIter = m_frameResize.begin();
+ TQValueList<FrameIndex>::Iterator iter = m_indexFrame.begin();
for(; iter != m_indexFrame.end() && resizeIter != m_frameResize.end(); ++resizeIter, ++iter ) {
FrameIndex index = *iter;
FrameResizeStruct frs = *resizeIter;
@@ -760,8 +760,8 @@ void KWFrameResizeCommand::execute()
void KWFrameResizeCommand::unexecute()
{
- QValueList<FrameResizeStruct>::Iterator resizeIter = m_frameResize.begin();
- QValueList<FrameIndex>::Iterator iter = m_indexFrame.begin();
+ TQValueList<FrameResizeStruct>::Iterator resizeIter = m_frameResize.begin();
+ TQValueList<FrameIndex>::Iterator iter = m_indexFrame.begin();
for(; iter != m_indexFrame.end() && resizeIter != m_frameResize.end(); ++resizeIter, ++iter ) {
FrameIndex index = *iter;
FrameResizeStruct frs = *resizeIter;
@@ -794,7 +794,7 @@ void KWFrameResizeCommand::unexecute()
}
}
-KWFrameChangePictureCommand::KWFrameChangePictureCommand( const QString &name, FrameIndex _frameIndex, const KoPictureKey & _oldKey, const KoPictureKey & _newKey ) :
+KWFrameChangePictureCommand::KWFrameChangePictureCommand( const TQString &name, FrameIndex _frameIndex, const KoPictureKey & _oldKey, const KoPictureKey & _newKey ) :
KNamedCommand(name),
m_indexFrame(_frameIndex),
m_oldKey(_oldKey),
@@ -827,7 +827,7 @@ void KWFrameChangePictureCommand::unexecute()
}
-KWFramePartMoveCommand::KWFramePartMoveCommand( const QString &name, FrameIndex _frameIndex, FrameResizeStruct _frameMove ) :
+KWFramePartMoveCommand::KWFramePartMoveCommand( const TQString &name, FrameIndex _frameIndex, FrameResizeStruct _frameMove ) :
KNamedCommand(name),
m_indexFrame(_frameIndex),
m_frameMove(_frameMove)
@@ -866,7 +866,7 @@ bool KWFramePartMoveCommand::frameMoved()
return (m_frameMove.oldRect!=m_frameMove.newRect);
}
-KWFramePartInternalCommand::KWFramePartInternalCommand( const QString &name, KWPartFrameSet *part ) :
+KWFramePartInternalCommand::KWFramePartInternalCommand( const TQString &name, KWPartFrameSet *part ) :
KNamedCommand(name),
m_part(part)
{
@@ -885,7 +885,7 @@ void KWFramePartInternalCommand::unexecute()
}
-KWFramePartExternalCommand::KWFramePartExternalCommand( const QString &name, KWPartFrameSet *part ) :
+KWFramePartExternalCommand::KWFramePartExternalCommand( const TQString &name, KWPartFrameSet *part ) :
KNamedCommand(name),
m_part(part)
{
@@ -902,9 +902,9 @@ void KWFramePartExternalCommand::unexecute()
}
-KWFrameMoveCommand::KWFrameMoveCommand( const QString &name,
- const QValueList<FrameIndex> & _frameIndex,
- const QValueList<FrameMoveStruct> & _frameMove ) :
+KWFrameMoveCommand::KWFrameMoveCommand( const TQString &name,
+ const TQValueList<FrameIndex> & _frameIndex,
+ const TQValueList<FrameMoveStruct> & _frameMove ) :
KNamedCommand(name),
m_indexFrame(_frameIndex),
m_frameMove(_frameMove)
@@ -913,10 +913,10 @@ KWFrameMoveCommand::KWFrameMoveCommand( const QString &name,
void KWFrameMoveCommand::execute()
{
- bool needRelayout = false;
+ bool needRetqlayout = false;
KWDocument * doc = 0L;
- QValueList<FrameMoveStruct>::Iterator moveIt = m_frameMove.begin();
- QValueList<FrameIndex>::Iterator tmp = m_indexFrame.begin();
+ TQValueList<FrameMoveStruct>::Iterator moveIt = m_frameMove.begin();
+ TQValueList<FrameIndex>::Iterator tmp = m_indexFrame.begin();
for( ; tmp != m_indexFrame.end() && moveIt != m_frameMove.end(); ++tmp, ++moveIt )
{
KWFrameSet *frameSet = (*tmp).m_pFrameSet;
@@ -925,25 +925,25 @@ void KWFrameMoveCommand::execute()
frame->moveTopLeft( (*moveIt).newPos );
frame->updateRulerHandles();
- needRelayout = needRelayout || ( frame->runAround() != KWFrame::RA_NO );
+ needRetqlayout = needRetqlayout || ( frame->runAround() != KWFrame::RA_NO );
}
if ( doc )
{
doc->updateAllFrames();
- if ( needRelayout )
- doc->layout();
+ if ( needRetqlayout )
+ doc->tqlayout();
doc->updateRulerFrameStartEnd();
- doc->repaintAllViews();
+ doc->tqrepaintAllViews();
}
}
void KWFrameMoveCommand::unexecute()
{
- bool needRelayout = false;
+ bool needRetqlayout = false;
KWDocument * doc = 0L;
- QValueList<FrameMoveStruct>::Iterator moveIt = m_frameMove.begin();
- QValueList<FrameIndex>::Iterator tmp = m_indexFrame.begin();
+ TQValueList<FrameMoveStruct>::Iterator moveIt = m_frameMove.begin();
+ TQValueList<FrameIndex>::Iterator tmp = m_indexFrame.begin();
for( ; tmp != m_indexFrame.end() && moveIt != m_frameMove.end(); ++tmp, ++moveIt )
{
KWFrameSet *frameSet = (*tmp).m_pFrameSet;
@@ -952,20 +952,20 @@ void KWFrameMoveCommand::unexecute()
frame->moveTopLeft( (*moveIt).oldPos );
frame->updateRulerHandles();
- needRelayout = needRelayout || ( frame->runAround() != KWFrame::RA_NO );
+ needRetqlayout = needRetqlayout || ( frame->runAround() != KWFrame::RA_NO );
}
if ( doc )
{
doc->updateAllFrames();
- if ( needRelayout )
- doc->layout();
+ if ( needRetqlayout )
+ doc->tqlayout();
doc->updateRulerFrameStartEnd();
- doc->repaintAllViews();
+ doc->tqrepaintAllViews();
}
}
-KWFramePropertiesCommand::KWFramePropertiesCommand( const QString &name, KWFrame *_frameBefore, KWFrame *_frameAfter ) :
+KWFramePropertiesCommand::KWFramePropertiesCommand( const TQString &name, KWFrame *_frameBefore, KWFrame *_frameAfter ) :
KNamedCommand(name),
m_frameIndex( _frameAfter ),
m_frameBefore(_frameBefore),
@@ -995,8 +995,8 @@ void KWFramePropertiesCommand::execute()
{
doc->frameChanged( frame );
doc->updateAllFrames();
- doc->layout();
- doc->repaintAllViews();
+ doc->tqlayout();
+ doc->tqrepaintAllViews();
doc->updateRulerFrameStartEnd();
}
}
@@ -1016,14 +1016,14 @@ void KWFramePropertiesCommand::unexecute()
{
doc->frameChanged( frame );
doc->updateAllFrames();
- doc->layout();
- doc->repaintAllViews();
+ doc->tqlayout();
+ doc->tqrepaintAllViews();
doc->updateRulerFrameStartEnd();
}
}
-KWFrameSetInlineCommand::KWFrameSetInlineCommand( const QString &name, KWFrameSet *frameset, bool value ) :
+KWFrameSetInlineCommand::KWFrameSetInlineCommand( const TQString &name, KWFrameSet *frameset, bool value ) :
KNamedCommand(name),
m_pFrameSet( frameset ),
m_value( value )
@@ -1060,7 +1060,7 @@ void KWFrameSetInlineCommand::unexecute()
setValue( m_oldValue );
}
-KWPageLayoutCommand::KWPageLayoutCommand( const QString &name,KWDocument *_doc,KWPageLayoutStruct &_oldLayout, KWPageLayoutStruct &_newLayout ) :
+KWPageLayoutCommand::KWPageLayoutCommand( const TQString &name,KWDocument *_doc,KWPageLayoutStruct &_oldLayout, KWPageLayoutStruct &_newLayout ) :
KNamedCommand(name),
m_pDoc(_doc),
m_oldLayout(_oldLayout),
@@ -1079,7 +1079,7 @@ void KWPageLayoutCommand::unexecute()
}
-KWDeleteFrameCommand::KWDeleteFrameCommand( const QString &name, KWFrame * frame ):
+KWDeleteFrameCommand::KWDeleteFrameCommand( const TQString &name, KWFrame * frame ):
KNamedCommand(name),
m_frameIndex( frame ),
m_copyFrame( frame->getCopy() )
@@ -1145,12 +1145,12 @@ void KWDeleteFrameCommand::unexecute()
doc->updateRulerFrameStartEnd();
}
-KWCreateFrameCommand::KWCreateFrameCommand( const QString &name, KWFrame * frame ) :
+KWCreateFrameCommand::KWCreateFrameCommand( const TQString &name, KWFrame * frame ) :
KWDeleteFrameCommand( name, frame )
{}
-KWUngroupTableCommand::KWUngroupTableCommand( const QString &name, KWTableFrameSet * _table ):
+KWUngroupTableCommand::KWUngroupTableCommand( const TQString &name, KWTableFrameSet * _table ):
KNamedCommand(name),
m_pTable(_table)
{
@@ -1180,7 +1180,7 @@ void KWUngroupTableCommand::execute()
doc->refreshDocStructure(refresh);
doc->updateAllFrames();
- doc->repaintAllViews();
+ doc->tqrepaintAllViews();
}
void KWUngroupTableCommand::unexecute()
@@ -1206,11 +1206,11 @@ void KWUngroupTableCommand::unexecute()
doc->updateAllFrames();
- doc->repaintAllViews();
+ doc->tqrepaintAllViews();
}
-KWDeleteTableCommand::KWDeleteTableCommand( const QString &name, KWTableFrameSet * _table ):
+KWDeleteTableCommand::KWDeleteTableCommand( const TQString &name, KWTableFrameSet * _table ):
KNamedCommand(name),
m_pTable(_table)
{
@@ -1226,8 +1226,8 @@ void KWDeleteTableCommand::execute()
doc->refreshDocStructure((int)Tables);
doc->updateAllFrames();
m_pTable->updateFrames(); // not in the doc list anymore, so the above call didn't do it!
- doc->layout();
- doc->repaintAllViews();
+ doc->tqlayout();
+ doc->tqrepaintAllViews();
doc->updateRulerFrameStartEnd();
}
@@ -1240,13 +1240,13 @@ void KWDeleteTableCommand::unexecute()
doc->addFrameSet(m_pTable);
doc->refreshDocStructure((int)Tables);
doc->updateAllFrames();
- doc->layout();
- doc->repaintAllViews();
+ doc->tqlayout();
+ doc->tqrepaintAllViews();
doc->updateRulerFrameStartEnd();
}
-KWInsertColumnCommand::KWInsertColumnCommand( const QString &name, KWTableFrameSet * _table, int _col, double _maxRight ):
+KWInsertColumnCommand::KWInsertColumnCommand( const TQString &name, KWTableFrameSet * _table, int _col, double _maxRight ):
KNamedCommand(name),
m_pTable(_table),
m_rc(new RemovedColumn()),
@@ -1284,8 +1284,8 @@ void KWInsertColumnCommand::execute()
}
Q_ASSERT(m_pTable->boundingRect().right() <= m_maxRight);
doc->updateAllFrames();
- doc->layout();
- doc->repaintAllViews();
+ doc->tqlayout();
+ doc->tqrepaintAllViews();
}
void KWInsertColumnCommand::unexecute()
@@ -1300,13 +1300,13 @@ void KWInsertColumnCommand::unexecute()
m_pTable->resizeWidth(m_oldWidth);
}
doc->updateAllFrames();
- doc->layout();
- doc->repaintAllViews();
+ doc->tqlayout();
+ doc->tqrepaintAllViews();
}
-KWInsertRowCommand::KWInsertRowCommand( const QString &name, KWTableFrameSet * _table, int _row ):
+KWInsertRowCommand::KWInsertRowCommand( const TQString &name, KWTableFrameSet * _table, int _row ):
KNamedCommand(name),
m_pTable(_table),
m_rr(new RemovedRow()),
@@ -1332,8 +1332,8 @@ void KWInsertRowCommand::execute()
m_pTable->insertNewRow(m_rowPos); //only happens the first time
}
doc->updateAllFrames();
- doc->layout();
- doc->repaintAllViews();
+ doc->tqlayout();
+ doc->tqrepaintAllViews();
}
void KWInsertRowCommand::unexecute()
@@ -1345,11 +1345,11 @@ void KWInsertRowCommand::unexecute()
m_pTable->deleteRow( m_rowPos, *m_rr);
doc->updateAllFrames();
- doc->layout();
+ doc->tqlayout();
}
-KWRemoveRowCommand::KWRemoveRowCommand( const QString &name, KWTableFrameSet * _table, int _row ):
+KWRemoveRowCommand::KWRemoveRowCommand( const TQString &name, KWTableFrameSet * _table, int _row ):
KNamedCommand(name),
m_pTable(_table),
m_rr(new RemovedRow()),
@@ -1372,7 +1372,7 @@ void KWRemoveRowCommand::execute()
m_pTable->deleteRow( m_rowPos, *m_rr);
doc->updateAllFrames();
- doc->layout();
+ doc->tqlayout();
}
void KWRemoveRowCommand::unexecute()
@@ -1381,11 +1381,11 @@ void KWRemoveRowCommand::unexecute()
KWDocument * doc = m_pTable->kWordDocument();
m_pTable->reInsertRow(*m_rr);
doc->updateAllFrames();
- doc->layout();
- doc->repaintAllViews();
+ doc->tqlayout();
+ doc->tqrepaintAllViews();
}
-KWRemoveColumnCommand::KWRemoveColumnCommand( const QString &name, KWTableFrameSet * _table, int _col ):
+KWRemoveColumnCommand::KWRemoveColumnCommand( const TQString &name, KWTableFrameSet * _table, int _col ):
KNamedCommand(name),
m_pTable(_table),
m_rc(new RemovedColumn()),
@@ -1407,7 +1407,7 @@ void KWRemoveColumnCommand::execute()
m_pTable->deleteColumn( m_colPos, *m_rc);
doc->updateAllFrames();
- doc->layout();
+ doc->tqlayout();
}
void KWRemoveColumnCommand::unexecute()
@@ -1416,13 +1416,13 @@ void KWRemoveColumnCommand::unexecute()
KWDocument * doc = m_pTable->kWordDocument();
m_pTable->reInsertColumn(*m_rc);
doc->updateAllFrames();
- doc->layout();
- doc->repaintAllViews();
+ doc->tqlayout();
+ doc->tqrepaintAllViews();
}
-KWSplitCellCommand::KWSplitCellCommand( const QString &name, KWTableFrameSet * _table,unsigned int colBegin,unsigned int rowBegin, unsigned int colEnd,unsigned int rowEnd ):
+KWSplitCellCommand::KWSplitCellCommand( const TQString &name, KWTableFrameSet * _table,unsigned int colBegin,unsigned int rowBegin, unsigned int colEnd,unsigned int rowEnd ):
KNamedCommand(name),
m_pTable(_table),
m_colBegin(colBegin),
@@ -1441,7 +1441,7 @@ void KWSplitCellCommand::execute()
//kdDebug()<<"split Cell m_colBegin :"<<m_colBegin<<" m_colEnd :"<<m_colEnd<<" m_rowBegin :"<<m_rowBegin<<" m_colEnd :"<<m_colEnd<<endl;
m_pTable->splitCell(m_rowEnd, m_colEnd,m_colBegin,m_rowBegin,m_ListFrameSet);
doc->updateAllFrames();
- doc->layout();
+ doc->tqlayout();
}
void KWSplitCellCommand::unexecute()
@@ -1478,12 +1478,12 @@ void KWSplitCellCommand::unexecute()
m_rowBegin+m_rowEnd-1+cell->rowSpan()-1);
doc->updateAllFrames();
- doc->layout();
+ doc->tqlayout();
}
-KWJoinCellCommand::KWJoinCellCommand( const QString &name, KWTableFrameSet * _table,unsigned int colBegin,unsigned int rowBegin, unsigned int colEnd,unsigned int rowEnd, QPtrList<KWFrameSet> listFrameSet,QPtrList<KWFrame> listCopyFrame):
+KWJoinCellCommand::KWJoinCellCommand( const TQString &name, KWTableFrameSet * _table,unsigned int colBegin,unsigned int rowBegin, unsigned int colEnd,unsigned int rowEnd, TQPtrList<KWFrameSet> listFrameSet,TQPtrList<KWFrame> listCopyFrame):
KNamedCommand(name),
m_pTable(_table),
m_colBegin(colBegin),
@@ -1507,7 +1507,7 @@ void KWJoinCellCommand::execute()
doc->terminateEditing(m_pTable);
m_pTable->joinCells(m_colBegin,m_rowBegin,m_colEnd,m_rowEnd);
doc->updateAllFrames();
- doc->layout();
+ doc->tqlayout();
}
void KWJoinCellCommand::unexecute()
@@ -1517,11 +1517,11 @@ void KWJoinCellCommand::unexecute()
doc->terminateEditing(m_pTable);
m_pTable->splitCell(m_rowEnd-m_rowBegin+1, m_colEnd-m_colBegin+1,m_colBegin,m_rowBegin,m_ListFrameSet,m_copyFrame);
doc->updateAllFrames();
- doc->layout();
+ doc->tqlayout();
}
-KWChangeStartingPageCommand::KWChangeStartingPageCommand( const QString &name, KWDocument *_doc, int _oldStartingPage, int _newStartingPage):
+KWChangeStartingPageCommand::KWChangeStartingPageCommand( const TQString &name, KWDocument *_doc, int _oldStartingPage, int _newStartingPage):
KNamedCommand(name),
m_doc(_doc),
oldStartingPage(_oldStartingPage),
@@ -1541,7 +1541,7 @@ void KWChangeStartingPageCommand::unexecute()
m_doc->recalcVariables( VT_PGNUM );
}
-KWChangeVariableSettingsCommand::KWChangeVariableSettingsCommand( const QString &name, KWDocument *_doc, bool _oldValue, bool _newValue, VariableProperties _type):
+KWChangeVariableSettingsCommand::KWChangeVariableSettingsCommand( const TQString &name, KWDocument *_doc, bool _oldValue, bool _newValue, VariableProperties _type):
KNamedCommand(name),
m_doc(_doc),
type(_type),
@@ -1586,7 +1586,7 @@ void KWChangeVariableSettingsCommand::unexecute()
changeValue(m_bOldValue);
}
-KWChangeCustomVariableValue::KWChangeCustomVariableValue( const QString &name, KWDocument *_doc,const QString & _oldValue, const QString & _newValue,KoCustomVariable *var):
+KWChangeCustomVariableValue::KWChangeCustomVariableValue( const TQString &name, KWDocument *_doc,const TQString & _oldValue, const TQString & _newValue,KoCustomVariable *var):
KNamedCommand(name),
m_doc(_doc),
newValue(_newValue),
@@ -1613,8 +1613,8 @@ void KWChangeCustomVariableValue::unexecute()
m_doc->recalcVariables( VT_CUSTOM );
}
-KWChangeVariableNoteText::KWChangeVariableNoteText( const QString &name, KWDocument *_doc,
- const QString &_oldValue,const QString &_newValue,
+KWChangeVariableNoteText::KWChangeVariableNoteText( const TQString &name, KWDocument *_doc,
+ const TQString &_oldValue,const TQString &_newValue,
KoNoteVariable *var):
KNamedCommand(name),
m_doc(_doc),
@@ -1641,7 +1641,7 @@ void KWChangeVariableNoteText::unexecute()
}
// TODO: move to libkotext to remove code duplication with kpresenter
-KWChangeLinkVariable::KWChangeLinkVariable( const QString &name, KWDocument *_doc,const QString & _oldHref, const QString & _newHref, const QString & _oldLink,const QString &_newLink, KoLinkVariable *var):
+KWChangeLinkVariable::KWChangeLinkVariable( const TQString &name, KWDocument *_doc,const TQString & _oldHref, const TQString & _newHref, const TQString & _oldLink,const TQString &_newLink, KoLinkVariable *var):
KNamedCommand(name),
m_doc(_doc),
oldHref(_oldHref),
@@ -1665,7 +1665,7 @@ void KWChangeLinkVariable::unexecute()
m_doc->recalcVariables(VT_LINK);
}
-KWHideShowHeader::KWHideShowHeader( const QString &name, KWDocument *_doc, bool _newValue):
+KWHideShowHeader::KWHideShowHeader( const TQString &name, KWDocument *_doc, bool _newValue):
KNamedCommand(name),
m_doc(_doc),
newValue(_newValue)
@@ -1686,7 +1686,7 @@ void KWHideShowHeader::unexecute()
m_doc->updateHeaderButton();
}
-KWHideShowFooter::KWHideShowFooter( const QString &name, KWDocument *_doc, bool _newValue):
+KWHideShowFooter::KWHideShowFooter( const TQString &name, KWDocument *_doc, bool _newValue):
KNamedCommand(name),
m_doc(_doc),
newValue(_newValue)
@@ -1707,7 +1707,7 @@ void KWHideShowFooter::unexecute()
}
-KWProtectContentCommand::KWProtectContentCommand( const QString &name, KWTextFrameSet*frameset, bool _protect):
+KWProtectContentCommand::KWProtectContentCommand( const TQString &name, KWTextFrameSet*frameset, bool _protect):
KNamedCommand(name),
m_pFrameSet(frameset),
m_bProtect(_protect)
@@ -1738,15 +1738,15 @@ KWInsertRemovePageCommand::KWInsertRemovePageCommand( KWDocument *_doc, Command
{}
KWInsertRemovePageCommand::~KWInsertRemovePageCommand() {
- QValueListIterator<KCommand*> cmdIter = childCommands.begin();
+ TQValueListIterator<KCommand*> cmdIter = childCommands.begin();
for(;cmdIter != childCommands.end(); ++ cmdIter)
delete (*cmdIter);
}
-QString KWInsertRemovePageCommand::name() const
+TQString KWInsertRemovePageCommand::name() const
{
return m_cmd == Insert ? i18n("Insert Page") // problem with after/before page
- : i18n("Delete Page %1").arg(m_pgNum);
+ : i18n("Delete Page %1").tqarg(m_pgNum);
}
void KWInsertRemovePageCommand::execute() {
@@ -1768,9 +1768,9 @@ void KWInsertRemovePageCommand::unexecute() {
void KWInsertRemovePageCommand::doRemove(int pageNumber) {
bool firstRun = childCommands.count() == 0;
if(firstRun) {
- QValueVector<FrameIndex> indexes;
- QPtrList<KWFrame> frames = m_doc->framesInPage(pageNumber, false);
- QPtrListIterator<KWFrame> framesIter(frames);
+ TQValueVector<FrameIndex> indexes;
+ TQPtrList<KWFrame> frames = m_doc->framesInPage(pageNumber, false);
+ TQPtrListIterator<KWFrame> framesIter(frames);
for(; framesIter.current(); ++framesIter)
indexes.append(FrameIndex(*framesIter));
@@ -1778,11 +1778,11 @@ void KWInsertRemovePageCommand::doRemove(int pageNumber) {
// to get mixed up when there is more then one frame of a frameset on the page
std::sort(indexes.begin(), indexes.end(), compareIndex);
- QValueVector<FrameIndex>::iterator iter = indexes.begin();
+ TQValueVector<FrameIndex>::iterator iter = indexes.begin();
for(; iter != indexes.end(); ++iter)
childCommands.append(new KWDeleteFrameCommand(*iter));
}
- QValueListIterator<KCommand*> cmdIter = childCommands.begin();
+ TQValueListIterator<KCommand*> cmdIter = childCommands.begin();
for(;cmdIter != childCommands.end(); ++ cmdIter)
(*cmdIter)->execute();
@@ -1796,17 +1796,17 @@ void KWInsertRemovePageCommand::doRemove(int pageNumber) {
if(firstRun && m_doc->lastPage() >= pageNumber) { // only walk frames when there was a page
// after the deleted one
- QValueList<FrameIndex> indexes;
- QValueList<FrameMoveStruct> moveStructs;
- QPtrListIterator<KWFrameSet> fss = m_doc->framesetsIterator();
+ TQValueList<FrameIndex> indexes;
+ TQValueList<FrameMoveStruct> moveStructs;
+ TQPtrListIterator<KWFrameSet> fss = m_doc->framesetsIterator();
for(;fss.current(); ++fss) {
KWFrameSet *fs = *fss;
if(fs->isMainFrameset()) continue;
if(fs->isHeaderOrFooter()) continue;
if(fs->isFootEndNote()) continue;
if(! fs->isVisible()) continue;
- QPtrList<KWFrame> frames = fs->frameIterator();
- QPtrListIterator<KWFrame> framesIter(frames);
+ TQPtrList<KWFrame> frames = fs->frameIterator();
+ TQPtrListIterator<KWFrame> framesIter(frames);
for(; framesIter.current(); ++framesIter) {
KWFrame *frame = *framesIter;
if(frame->top() > topOfPage) {
@@ -1854,7 +1854,7 @@ FramePaddingStruct::FramePaddingStruct( double _left, double _top, double _right
}
-KWFrameChangeFramePaddingCommand::KWFrameChangeFramePaddingCommand( const QString &name, FrameIndex _frameIndex, FramePaddingStruct _framePaddingBegin, FramePaddingStruct _framePaddingEnd ) :
+KWFrameChangeFramePaddingCommand::KWFrameChangeFramePaddingCommand( const TQString &name, FrameIndex _frameIndex, FramePaddingStruct _framePaddingBegin, FramePaddingStruct _framePaddingEnd ) :
KNamedCommand(name),
m_indexFrame(_frameIndex),
m_framePaddingBegin(_framePaddingBegin),
@@ -1882,7 +1882,7 @@ void KWFrameChangeFramePaddingCommand::unexecute()
frameSet->kWordDocument()->frameChanged( frame );
}
-KWChangeFootEndNoteSettingsCommand::KWChangeFootEndNoteSettingsCommand( const QString &name, KoParagCounter _oldCounter, KoParagCounter _newCounter ,bool _footNote ,KWDocument *_doc):
+KWChangeFootEndNoteSettingsCommand::KWChangeFootEndNoteSettingsCommand( const TQString &name, KoParagCounter _oldCounter, KoParagCounter _newCounter ,bool _footNote ,KWDocument *_doc):
KNamedCommand(name),
m_oldCounter(_oldCounter),
m_newCounter(_newCounter),
@@ -1915,7 +1915,7 @@ void KWChangeFootEndNoteSettingsCommand::changeCounter( KoParagCounter counter)
}
-KWChangeTabStopValueCommand::KWChangeTabStopValueCommand( const QString &name, double _oldValue, double _newValue, KWDocument *_doc):
+KWChangeTabStopValueCommand::KWChangeTabStopValueCommand( const TQString &name, double _oldValue, double _newValue, KWDocument *_doc):
KNamedCommand(name),
m_doc( _doc ),
m_oldValue(_oldValue),
@@ -1942,14 +1942,14 @@ FootNoteParameter::FootNoteParameter( KWFootNoteVariable *_var )
manualString = _var->manualString();
}
-FootNoteParameter::FootNoteParameter( NoteType _noteType, KWFootNoteVariable::Numbering _numberingType, const QString &_manualString)
+FootNoteParameter::FootNoteParameter( NoteType _noteType, KWFootNoteVariable::Numbering _numberingType, const TQString &_manualString)
{
noteType= _noteType;
numberingType = _numberingType;
manualString = _manualString;
}
-KWChangeFootNoteParametersCommand::KWChangeFootNoteParametersCommand( const QString &name, KWFootNoteVariable * _var, FootNoteParameter _oldParameter, FootNoteParameter _newParameter, KWDocument *_doc):
+KWChangeFootNoteParametersCommand::KWChangeFootNoteParametersCommand( const TQString &name, KWFootNoteVariable * _var, FootNoteParameter _oldParameter, FootNoteParameter _newParameter, KWDocument *_doc):
KNamedCommand(name),
m_doc( _doc ),
m_var( _var ),
@@ -1977,7 +1977,7 @@ void KWChangeFootNoteParametersCommand::changeVariableParameter( FootNoteParamet
if ( m_var->numberingType()== KWFootNoteVariable::Manual)
{
m_var->resize();
- m_var->paragraph()->invalidate(0);
+ m_var->paragraph()->tqinvalidate(0);
m_var->paragraph()->setChanged( true );
}
@@ -1986,7 +1986,7 @@ void KWChangeFootNoteParametersCommand::changeVariableParameter( FootNoteParamet
if ( frameset)
frameset->renumberFootNotes();
- // Re-layout the footnote/endnote frame
+ // Re-tqlayout the footnote/endnote frame
KWFrame* footNoteFrame = m_var->frameSet()->frame( 0 );
int framePage = footNoteFrame->pageNumber();
m_doc->recalcFrames( framePage, -1 );
@@ -1996,7 +1996,7 @@ void KWChangeFootNoteParametersCommand::changeVariableParameter( FootNoteParamet
}
-KWChangeFootNoteLineSeparatorParametersCommand::KWChangeFootNoteLineSeparatorParametersCommand( const QString &name, SeparatorLinePos _oldValuePos, SeparatorLinePos _newValuePos, int _oldLength, int _newLength, double _oldWidth, double _newWidth, SeparatorLineLineType _oldLineType, SeparatorLineLineType _newLineType, KWDocument *_doc):
+KWChangeFootNoteLineSeparatorParametersCommand::KWChangeFootNoteLineSeparatorParametersCommand( const TQString &name, SeparatorLinePos _oldValuePos, SeparatorLinePos _newValuePos, int _oldLength, int _newLength, double _oldWidth, double _newWidth, SeparatorLineLineType _oldLineType, SeparatorLineLineType _newLineType, KWDocument *_doc):
KNamedCommand(name),
m_doc( _doc ),
m_oldValuePos(_oldValuePos),
@@ -2027,11 +2027,11 @@ void KWChangeFootNoteLineSeparatorParametersCommand::changeLineSeparatorParamete
m_doc->setFootNoteSeparatorLineLength( _length);
m_doc->setFootNoteSeparatorLineWidth(_width );
m_doc->setFootNoteSeparatorLineType( _type );
- m_doc->repaintAllViews();
+ m_doc->tqrepaintAllViews();
}
-KWRenameBookmarkCommand::KWRenameBookmarkCommand( const QString &name, const QString & _oldname, const QString & _newName, KWDocument *_doc):
+KWRenameBookmarkCommand::KWRenameBookmarkCommand( const TQString &name, const TQString & _oldname, const TQString & _newName, KWDocument *_doc):
KNamedCommand(name),
m_doc( _doc ),
m_oldName( _oldname),
@@ -2061,15 +2061,15 @@ KWResizeColumnCommand::KWResizeColumnCommand( KWTableFrameSet *table, int col, d
void KWResizeColumnCommand::execute()
{
m_table->resizeColumn(m_col, m_newSize);
- m_table->kWordDocument()->layout();
- m_table->kWordDocument()->repaintAllViews();
+ m_table->kWordDocument()->tqlayout();
+ m_table->kWordDocument()->tqrepaintAllViews();
}
void KWResizeColumnCommand::unexecute()
{
m_table->resizeColumn(m_col, m_oldSize);
- m_table->kWordDocument()->layout();
- m_table->kWordDocument()->repaintAllViews();
+ m_table->kWordDocument()->tqlayout();
+ m_table->kWordDocument()->tqrepaintAllViews();
}
KWResizeRowCommand::KWResizeRowCommand( KWTableFrameSet *table, int row, double oldSize, double newSize ):
@@ -2084,11 +2084,11 @@ KWResizeRowCommand::KWResizeRowCommand( KWTableFrameSet *table, int row, double
void KWResizeRowCommand::execute()
{
m_table->resizeRow( m_row, m_newSize );
- m_table->kWordDocument()->repaintAllViews();
+ m_table->kWordDocument()->tqrepaintAllViews();
}
void KWResizeRowCommand::unexecute()
{
m_table->resizeRow( m_row, m_oldSize );
- m_table->kWordDocument()->repaintAllViews();
+ m_table->kWordDocument()->tqrepaintAllViews();
}
diff --git a/kword/KWCommand.h b/kword/KWCommand.h
index 02d58f9a..a3272104 100644
--- a/kword/KWCommand.h
+++ b/kword/KWCommand.h
@@ -59,13 +59,13 @@ class KWOasisPasteCommand : public KoTextDocCommand
{
public:
KWOasisPasteCommand( KoTextDocument *d, int parag, int idx,
- const QByteArray & data );
+ const TQByteArray & data );
KoTextCursor *execute( KoTextCursor *c );
KoTextCursor *unexecute( KoTextCursor *c );
protected:
int m_parag;
int m_idx;
- QByteArray m_data;
+ TQByteArray m_data;
// filled in by execute(), for unexecute()
int m_lastParag;
int m_lastIndex;
@@ -73,7 +73,7 @@ protected:
};
struct ParagBookmark {
- QString m_bookName;
+ TQString m_bookName;
int m_startParagIndex;
int m_endParagIndex;
};
@@ -81,14 +81,14 @@ struct ParagBookmark {
class KWTextDeleteCommand : public KoTextDeleteCommand
{
public:
- KWTextDeleteCommand( KoTextDocument *d, int i, int idx, const QMemArray<KoTextStringChar> &str,
+ KWTextDeleteCommand( KoTextDocument *d, int i, int idx, const TQMemArray<KoTextStringChar> &str,
const CustomItemsMap & customItemsMap,
- const QValueList<KoParagLayout> & oldParagLayouts );
+ const TQValueList<KoParagLayout> & oldParagLayouts );
KoTextCursor *execute( KoTextCursor *c );
KoTextCursor *unexecute( KoTextCursor *c );
void createBookmarkList();
private:
- QValueList<ParagBookmark> m_listParagBookmark;
+ TQValueList<ParagBookmark> m_listParagBookmark;
};
@@ -116,15 +116,15 @@ public:
KoBorder m_OldBorder;
};
- KWFrameBorderCommand( const QString &name, QPtrList<FrameIndex> &_listFrameIndex, QPtrList<FrameBorderTypeStruct> &_frameTypeBorder,const KoBorder & _newBorder ) ;
+ KWFrameBorderCommand( const TQString &name, TQPtrList<FrameIndex> &_listFrameIndex, TQPtrList<FrameBorderTypeStruct> &_frameTypeBorder,const KoBorder & _newBorder ) ;
~ KWFrameBorderCommand();
void execute();
void unexecute();
protected:
- QPtrList<FrameIndex> m_indexFrame;
- QPtrList<FrameBorderTypeStruct> m_oldBorderFrameType;
+ TQPtrList<FrameIndex> m_indexFrame;
+ TQPtrList<FrameBorderTypeStruct> m_oldBorderFrameType;
KoBorder m_newBorder;
};
@@ -134,16 +134,16 @@ protected:
class KWFrameBackGroundColorCommand : public KNamedCommand
{
public:
- KWFrameBackGroundColorCommand( const QString &name, QPtrList<FrameIndex> &_listFrameIndex, QPtrList<QBrush> &_oldBrush, const QBrush & _newColor ) ;
+ KWFrameBackGroundColorCommand( const TQString &name, TQPtrList<FrameIndex> &_listFrameIndex, TQPtrList<TQBrush> &_oldBrush, const TQBrush & _newColor ) ;
~KWFrameBackGroundColorCommand();
void execute();
void unexecute();
protected:
- QPtrList<FrameIndex> m_indexFrame;
- QPtrList<QBrush> m_oldBackGroundColor;
- QBrush m_newColor;
+ TQPtrList<FrameIndex> m_indexFrame;
+ TQPtrList<TQBrush> m_oldBackGroundColor;
+ TQBrush m_newColor;
};
/**
@@ -152,7 +152,7 @@ protected:
class KWFrameStyleCommand : public KNamedCommand
{
public:
- KWFrameStyleCommand( const QString &name, KWFrame *_frame, KWFrameStyle *_fs, bool _repaintViews = true );
+ KWFrameStyleCommand( const TQString &name, KWFrame *_frame, KWFrameStyle *_fs, bool _tqrepaintViews = true );
~ KWFrameStyleCommand() { if (m_oldValues) delete m_oldValues; }
void execute();
@@ -163,7 +163,7 @@ protected:
KWFrame *m_frame ;
KWFrameStyle * m_fs;
KWFrameStyle * m_oldValues;
- bool repaintViews;
+ bool tqrepaintViews;
};
@@ -173,7 +173,7 @@ protected:
class KWTableStyleCommand : public KNamedCommand
{
public:
- KWTableStyleCommand( const QString &name, KWFrame *_frame, KWTableStyle *_ts, bool _repaintViews = true );
+ KWTableStyleCommand( const TQString &name, KWFrame *_frame, KWTableStyle *_ts, bool _tqrepaintViews = true );
~ KWTableStyleCommand();
void execute();
@@ -184,7 +184,7 @@ protected:
KWTableStyle * m_ts;
KWFrameStyleCommand * m_fsc;
KCommand * m_sc;
- bool repaintViews;
+ bool tqrepaintViews;
};
/**
@@ -193,7 +193,7 @@ protected:
class KWTableTemplateCommand : public KNamedCommand
{
public:
- KWTableTemplateCommand( const QString &name, KWTableFrameSet *_table, KWTableTemplate *_tt );
+ KWTableTemplateCommand( const TQString &name, KWTableFrameSet *_table, KWTableTemplate *_tt );
~ KWTableTemplateCommand();
void execute();
@@ -227,16 +227,16 @@ struct FrameResizeStruct {
class KWFrameResizeCommand : public KNamedCommand
{
public:
- KWFrameResizeCommand(const QString &name, const QValueList<FrameIndex> &frameIndex, const QValueList<FrameResizeStruct> &frameResize );
- KWFrameResizeCommand(const QString &name, FrameIndex frameIndex, const FrameResizeStruct &frameResize );
+ KWFrameResizeCommand(const TQString &name, const TQValueList<FrameIndex> &frameIndex, const TQValueList<FrameResizeStruct> &frameResize );
+ KWFrameResizeCommand(const TQString &name, FrameIndex frameIndex, const FrameResizeStruct &frameResize );
~KWFrameResizeCommand() {}
void execute();
void unexecute();
protected:
- QValueList<FrameIndex> m_indexFrame;
- QValueList<FrameResizeStruct> m_frameResize;
+ TQValueList<FrameIndex> m_indexFrame;
+ TQValueList<FrameResizeStruct> m_frameResize;
};
/**
@@ -245,7 +245,7 @@ protected:
class KWFrameChangePictureCommand : public KNamedCommand
{
public:
- KWFrameChangePictureCommand( const QString &name, FrameIndex _frameIndex, const KoPictureKey & _oldFile, const KoPictureKey & _newFile) ;
+ KWFrameChangePictureCommand( const TQString &name, FrameIndex _frameIndex, const KoPictureKey & _oldFile, const KoPictureKey & _newFile) ;
~KWFrameChangePictureCommand() {}
void execute();
@@ -258,7 +258,7 @@ protected:
};
struct FrameMoveStruct {
- FrameMoveStruct() {} // for QValueList
+ FrameMoveStruct() {} // for TQValueList
FrameMoveStruct( const KoPoint& p1, const KoPoint& p2 )
: oldPos(p1), newPos(p2) {
}
@@ -272,17 +272,17 @@ struct FrameMoveStruct {
class KWFrameMoveCommand : public KNamedCommand
{
public:
- KWFrameMoveCommand( const QString &name,
- const QValueList<FrameIndex> & _frameIndex,
- const QValueList<FrameMoveStruct> & _frameMove );
+ KWFrameMoveCommand( const TQString &name,
+ const TQValueList<FrameIndex> & _frameIndex,
+ const TQValueList<FrameMoveStruct> & _frameMove );
~KWFrameMoveCommand() {}
void execute();
void unexecute();
- QValueList<FrameMoveStruct> & listFrameMoved() { return m_frameMove; }
+ TQValueList<FrameMoveStruct> & listFrameMoved() { return m_frameMove; }
protected:
- QValueList<FrameIndex> m_indexFrame;
- QValueList<FrameMoveStruct> m_frameMove;
+ TQValueList<FrameIndex> m_indexFrame;
+ TQValueList<FrameMoveStruct> m_frameMove;
};
/**
@@ -299,7 +299,7 @@ public:
/** A copy of frameAfter is done internally.
* But make sure frameBefore is already a copy, its ownership is moved to the command.
*/
- KWFramePropertiesCommand( const QString &name, KWFrame *_frameBefore, KWFrame *_frameAfter );
+ KWFramePropertiesCommand( const TQString &name, KWFrame *_frameBefore, KWFrame *_frameAfter );
~KWFramePropertiesCommand();
void execute();
void unexecute();
@@ -316,7 +316,7 @@ protected:
class KWFramePartMoveCommand : public KNamedCommand
{
public:
- KWFramePartMoveCommand( const QString &name,FrameIndex _frameIndex,FrameResizeStruct _frameMove ) ;
+ KWFramePartMoveCommand( const TQString &name,FrameIndex _frameIndex,FrameResizeStruct _frameMove ) ;
~KWFramePartMoveCommand() {}
void execute();
@@ -334,7 +334,7 @@ protected:
class KWFramePartInternalCommand : public KNamedCommand
{
public:
- KWFramePartInternalCommand( const QString &name, KWPartFrameSet *part ) ;
+ KWFramePartInternalCommand( const TQString &name, KWPartFrameSet *part ) ;
~KWFramePartInternalCommand() {}
void execute();
@@ -350,7 +350,7 @@ protected:
class KWFramePartExternalCommand : public KNamedCommand
{
public:
- KWFramePartExternalCommand( const QString &name, KWPartFrameSet *part ) ;
+ KWFramePartExternalCommand( const TQString &name, KWPartFrameSet *part ) ;
~KWFramePartExternalCommand() {}
void execute();
@@ -365,7 +365,7 @@ protected:
class KWFrameSetInlineCommand : public KNamedCommand
{
public:
- KWFrameSetInlineCommand( const QString &name, KWFrameSet *frameset,
+ KWFrameSetInlineCommand( const TQString &name, KWFrameSet *frameset,
bool value );
~KWFrameSetInlineCommand() {}
@@ -380,7 +380,7 @@ protected:
bool m_oldValue;
};
-///////////////////////////////layout command///////////////////////////
+///////////////////////////////tqlayout command///////////////////////////
struct KWPageLayoutStruct {
KWPageLayoutStruct( const KoPageLayout& pgLayout, const KoColumns& cl, const KoKWHeaderFooter& hf )
: _pgLayout(pgLayout), _cl(cl), _hf(hf) {
@@ -391,12 +391,12 @@ struct KWPageLayoutStruct {
};
/**
- * Command created when changing the page layout
+ * Command created when changing the page tqlayout
*/
class KWPageLayoutCommand : public KNamedCommand
{
public:
- KWPageLayoutCommand( const QString &name, KWDocument *_doc, KWPageLayoutStruct &_oldLayout, KWPageLayoutStruct &_newLayout);
+ KWPageLayoutCommand( const TQString &name, KWDocument *_doc, KWPageLayoutStruct &_oldLayout, KWPageLayoutStruct &_newLayout);
~KWPageLayoutCommand() {}
void execute();
@@ -414,7 +414,7 @@ protected:
class KWDeleteFrameCommand : public KNamedCommand
{
public:
- KWDeleteFrameCommand( const QString &name, KWFrame * frame) ;
+ KWDeleteFrameCommand( const TQString &name, KWFrame * frame) ;
/**
* Constructor to be used for chaining commands, i.e. inside another command.
* @param frameIndex a frameIndex object that specifies which frame to delete
@@ -435,7 +435,7 @@ protected:
class KWCreateFrameCommand : public KWDeleteFrameCommand
{
public:
- KWCreateFrameCommand( const QString &name, KWFrame * frame);
+ KWCreateFrameCommand( const TQString &name, KWFrame * frame);
~KWCreateFrameCommand() {}
void execute() { KWDeleteFrameCommand::unexecute(); }
@@ -448,14 +448,14 @@ public:
class KWUngroupTableCommand : public KNamedCommand
{
public:
- KWUngroupTableCommand( const QString &name, KWTableFrameSet * _table) ;
+ KWUngroupTableCommand( const TQString &name, KWTableFrameSet * _table) ;
~KWUngroupTableCommand() {}
void execute();
void unexecute();
protected:
KWTableFrameSet *m_pTable;
- QPtrList<KWFrameSet> m_ListFrame;
+ TQPtrList<KWFrameSet> m_ListFrame;
};
/**
@@ -464,7 +464,7 @@ protected:
class KWDeleteTableCommand : public KNamedCommand
{
public:
- KWDeleteTableCommand( const QString &name, KWTableFrameSet * _table) ;
+ KWDeleteTableCommand( const TQString &name, KWTableFrameSet * _table) ;
~KWDeleteTableCommand() {}
void execute();
@@ -480,7 +480,7 @@ protected:
class KWCreateTableCommand : public KWDeleteTableCommand
{
public:
- KWCreateTableCommand( const QString &name, KWTableFrameSet * _table)
+ KWCreateTableCommand( const TQString &name, KWTableFrameSet * _table)
: KWDeleteTableCommand( name, _table ) {}
~KWCreateTableCommand() {}
@@ -495,7 +495,7 @@ class KWInsertColumnCommand : public KNamedCommand
{
public:
/* for the last parameter, _maxRight, you should pass the maximum offset that the table can use at its right (normally m_maxRight - m_pTable->boundingRect().left())*/
- KWInsertColumnCommand( const QString &name, KWTableFrameSet * _table, int _pos, double _maxRight);
+ KWInsertColumnCommand( const TQString &name, KWTableFrameSet * _table, int _pos, double _maxRight);
~KWInsertColumnCommand();
void execute();
@@ -516,7 +516,7 @@ protected:
class KWInsertRowCommand : public KNamedCommand
{
public:
- KWInsertRowCommand( const QString &name, KWTableFrameSet * _table, int _pos);
+ KWInsertRowCommand( const TQString &name, KWTableFrameSet * _table, int _pos);
~KWInsertRowCommand();
void execute();
@@ -534,7 +534,7 @@ protected:
class KWRemoveRowCommand : public KNamedCommand
{
public:
- KWRemoveRowCommand( const QString &name, KWTableFrameSet * _table, int _pos);
+ KWRemoveRowCommand( const TQString &name, KWTableFrameSet * _table, int _pos);
~KWRemoveRowCommand();
void execute();
@@ -551,7 +551,7 @@ protected:
class KWRemoveColumnCommand : public KNamedCommand
{
public:
- KWRemoveColumnCommand( const QString &name, KWTableFrameSet * _table, int _pos);
+ KWRemoveColumnCommand( const TQString &name, KWTableFrameSet * _table, int _pos);
~KWRemoveColumnCommand();
void execute();
@@ -568,7 +568,7 @@ protected:
class KWSplitCellCommand : public KNamedCommand
{
public:
- KWSplitCellCommand( const QString &name, KWTableFrameSet * _table,unsigned int colBegin,unsigned int rowBegin, unsigned int colEnd,unsigned int rowEnd );
+ KWSplitCellCommand( const TQString &name, KWTableFrameSet * _table,unsigned int colBegin,unsigned int rowBegin, unsigned int colEnd,unsigned int rowEnd );
~KWSplitCellCommand() {}
void execute();
@@ -579,7 +579,7 @@ protected:
unsigned int m_rowBegin;
unsigned int m_colEnd;
unsigned int m_rowEnd;
- QPtrList<KWFrameSet> m_ListFrameSet;
+ TQPtrList<KWFrameSet> m_ListFrameSet;
};
/**
@@ -588,7 +588,7 @@ protected:
class KWJoinCellCommand : public KNamedCommand
{
public:
- KWJoinCellCommand( const QString &name, KWTableFrameSet * _table,unsigned int colBegin,unsigned int rowBegin, unsigned int colEnd,unsigned int rowEnd, QPtrList<KWFrameSet> listFrameSet,QPtrList<KWFrame> listCopyFrame);
+ KWJoinCellCommand( const TQString &name, KWTableFrameSet * _table,unsigned int colBegin,unsigned int rowBegin, unsigned int colEnd,unsigned int rowEnd, TQPtrList<KWFrameSet> listFrameSet,TQPtrList<KWFrame> listCopyFrame);
~KWJoinCellCommand();
void execute();
@@ -599,8 +599,8 @@ protected:
unsigned int m_rowBegin;
unsigned int m_colEnd;
unsigned int m_rowEnd;
- QPtrList<KWFrameSet> m_ListFrameSet;
- QPtrList<KWFrame> m_copyFrame;
+ TQPtrList<KWFrameSet> m_ListFrameSet;
+ TQPtrList<KWFrame> m_copyFrame;
};
/**
@@ -609,7 +609,7 @@ protected:
class KWChangeStartingPageCommand : public KNamedCommand
{
public:
- KWChangeStartingPageCommand( const QString &name, KWDocument *_doc, int _oldStartingPage, int _newStartingPage);
+ KWChangeStartingPageCommand( const TQString &name, KWDocument *_doc, int _oldStartingPage, int _newStartingPage);
~KWChangeStartingPageCommand(){}
void execute();
@@ -627,7 +627,7 @@ class KWChangeVariableSettingsCommand : public KNamedCommand
{
public:
enum VariableProperties { VS_DISPLAYLINK, VS_UNDERLINELINK, VS_DISPLAYCOMMENT, VS_DISPLAYFIELDCODE};
- KWChangeVariableSettingsCommand( const QString &name, KWDocument *_doc, bool _oldDisplay, bool _newDisplay, VariableProperties _type);
+ KWChangeVariableSettingsCommand( const TQString &name, KWDocument *_doc, bool _oldDisplay, bool _newDisplay, VariableProperties _type);
~KWChangeVariableSettingsCommand(){}
void execute();
@@ -643,51 +643,51 @@ protected:
class KWChangeCustomVariableValue : public KNamedCommand
{
public:
- KWChangeCustomVariableValue( const QString &name, KWDocument *_doc,const QString & _oldValue, const QString & _newValue, KoCustomVariable *var);
+ KWChangeCustomVariableValue( const TQString &name, KWDocument *_doc,const TQString & _oldValue, const TQString & _newValue, KoCustomVariable *var);
~KWChangeCustomVariableValue();
void execute();
void unexecute();
protected:
KWDocument *m_doc;
- QString newValue;
- QString oldValue;
+ TQString newValue;
+ TQString oldValue;
KoCustomVariable *m_var;
};
class KWChangeVariableNoteText : public KNamedCommand
{
public:
- KWChangeVariableNoteText( const QString &name, KWDocument *_doc, const QString &_oldValue,const QString &_newValue, KoNoteVariable *var);
+ KWChangeVariableNoteText( const TQString &name, KWDocument *_doc, const TQString &_oldValue,const TQString &_newValue, KoNoteVariable *var);
~KWChangeVariableNoteText();
void execute();
void unexecute();
protected:
KWDocument *m_doc;
- QString newValue;
- QString oldValue;
+ TQString newValue;
+ TQString oldValue;
KoNoteVariable *m_var;
};
class KWChangeLinkVariable : public KNamedCommand
{
public:
- KWChangeLinkVariable( const QString &name, KWDocument *_doc,const QString & _oldHref, const QString & _newHref, const QString & _oldLink,const QString &_newLink, KoLinkVariable *var);
+ KWChangeLinkVariable( const TQString &name, KWDocument *_doc,const TQString & _oldHref, const TQString & _newHref, const TQString & _oldLink,const TQString &_newLink, KoLinkVariable *var);
~KWChangeLinkVariable(){};
void execute();
void unexecute();
protected:
KWDocument *m_doc;
- QString oldHref;
- QString newHref;
- QString oldLink;
- QString newLink;
+ TQString oldHref;
+ TQString newHref;
+ TQString oldLink;
+ TQString newLink;
KoLinkVariable *m_var;
};
class KWHideShowHeader : public KNamedCommand
{
public:
- KWHideShowHeader( const QString &name, KWDocument *_doc, bool _newValue);
+ KWHideShowHeader( const TQString &name, KWDocument *_doc, bool _newValue);
~KWHideShowHeader(){};
void execute();
void unexecute();
@@ -699,7 +699,7 @@ class KWHideShowHeader : public KNamedCommand
class KWHideShowFooter : public KNamedCommand
{
public:
- KWHideShowFooter( const QString &name, KWDocument *_doc, bool _newValue);
+ KWHideShowFooter( const TQString &name, KWDocument *_doc, bool _newValue);
~KWHideShowFooter(){};
void execute();
void unexecute();
@@ -712,7 +712,7 @@ class KWHideShowFooter : public KNamedCommand
class KWProtectContentCommand : public KNamedCommand
{
public:
- KWProtectContentCommand( const QString &name, KWTextFrameSet*frameset,bool protect );
+ KWProtectContentCommand( const TQString &name, KWTextFrameSet*frameset,bool protect );
~KWProtectContentCommand() {}
void execute();
@@ -729,14 +729,14 @@ class KWInsertRemovePageCommand : public KCommand
enum Command { Insert, Remove };
KWInsertRemovePageCommand( KWDocument *_doc, Command cmd, int pgNum);
~KWInsertRemovePageCommand();
- virtual QString name() const;
+ virtual TQString name() const;
void execute();
void unexecute();
protected:
KWDocument *m_doc;
Command m_cmd;
int m_pgNum;
- QValueList<KCommand*> childCommands;
+ TQValueList<KCommand*> childCommands;
void doRemove(int pageNumber);
void doInsert(int pageNumber);
@@ -758,7 +758,7 @@ struct FramePaddingStruct {
class KWFrameChangeFramePaddingCommand :public KNamedCommand
{
public:
- KWFrameChangeFramePaddingCommand( const QString &name, FrameIndex _frameIndex, FramePaddingStruct _framePaddingBegin, FramePaddingStruct _framePaddingEnd );
+ KWFrameChangeFramePaddingCommand( const TQString &name, FrameIndex _frameIndex, FramePaddingStruct _framePaddingBegin, FramePaddingStruct _framePaddingEnd );
~KWFrameChangeFramePaddingCommand() {}
void execute();
void unexecute();
@@ -772,7 +772,7 @@ protected:
class KWChangeFootEndNoteSettingsCommand : public KNamedCommand
{
public:
- KWChangeFootEndNoteSettingsCommand( const QString &name, KoParagCounter _oldCounter, KoParagCounter _newCounter ,bool _footNote ,KWDocument *_doc );
+ KWChangeFootEndNoteSettingsCommand( const TQString &name, KoParagCounter _oldCounter, KoParagCounter _newCounter ,bool _footNote ,KWDocument *_doc );
~KWChangeFootEndNoteSettingsCommand() {}
void execute();
@@ -789,7 +789,7 @@ protected:
class KWChangeTabStopValueCommand : public KNamedCommand
{
public:
- KWChangeTabStopValueCommand( const QString &name, double _oldValue, double _newValue, KWDocument *_doc);
+ KWChangeTabStopValueCommand( const TQString &name, double _oldValue, double _newValue, KWDocument *_doc);
~KWChangeTabStopValueCommand() {}
@@ -805,16 +805,16 @@ protected:
struct FootNoteParameter {
FootNoteParameter() {}
FootNoteParameter( KWFootNoteVariable *_var );
- FootNoteParameter( NoteType _noteType, KWFootNoteVariable::Numbering _numberingType, const QString &_manualString);
+ FootNoteParameter( NoteType _noteType, KWFootNoteVariable::Numbering _numberingType, const TQString &_manualString);
NoteType noteType;
KWFootNoteVariable::Numbering numberingType;
- QString manualString;
+ TQString manualString;
};
class KWChangeFootNoteParametersCommand : public KNamedCommand
{
public:
- KWChangeFootNoteParametersCommand( const QString &name, KWFootNoteVariable * _var, FootNoteParameter _oldParameter, FootNoteParameter _newParameter, KWDocument *_doc);
+ KWChangeFootNoteParametersCommand( const TQString &name, KWFootNoteVariable * _var, FootNoteParameter _oldParameter, FootNoteParameter _newParameter, KWDocument *_doc);
~KWChangeFootNoteParametersCommand() {}
@@ -832,7 +832,7 @@ protected:
class KWChangeFootNoteLineSeparatorParametersCommand : public KNamedCommand
{
public:
- KWChangeFootNoteLineSeparatorParametersCommand( const QString &name, SeparatorLinePos _oldValuePos, SeparatorLinePos _newValuePos, int _oldLength, int _newLength, double _oldWidth, double _newWidth,SeparatorLineLineType _oldLineType, SeparatorLineLineType _newLineType, KWDocument *_doc);
+ KWChangeFootNoteLineSeparatorParametersCommand( const TQString &name, SeparatorLinePos _oldValuePos, SeparatorLinePos _newValuePos, int _oldLength, int _newLength, double _oldWidth, double _newWidth,SeparatorLineLineType _oldLineType, SeparatorLineLineType _newLineType, KWDocument *_doc);
~KWChangeFootNoteLineSeparatorParametersCommand() {}
@@ -854,7 +854,7 @@ protected:
class KWRenameBookmarkCommand : public KNamedCommand
{
public:
- KWRenameBookmarkCommand( const QString &name, const QString & _oldname, const QString & _newName, KWDocument *_doc);
+ KWRenameBookmarkCommand( const TQString &name, const TQString & _oldname, const TQString & _newName, KWDocument *_doc);
~KWRenameBookmarkCommand() {}
@@ -862,8 +862,8 @@ public:
virtual void unexecute();
protected:
KWDocument *m_doc;
- QString m_oldName;
- QString m_newName;
+ TQString m_oldName;
+ TQString m_newName;
};
class KWResizeColumnCommand : public KNamedCommand
diff --git a/kword/KWConfig.cpp b/kword/KWConfig.cpp
index 3819bd61..e7f2f8f2 100644
--- a/kword/KWConfig.cpp
+++ b/kword/KWConfig.cpp
@@ -27,16 +27,16 @@
#include <kfontdialog.h>
#include <kdebug.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qcombobox.h>
-#include <qwhatsthis.h>
-#include <qvgroupbox.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqcombobox.h>
+#include <tqwhatsthis.h>
+#include <tqvgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
#include "KWConfig.h"
#include "KWView.h"
@@ -67,60 +67,60 @@ using namespace KSpell2;
#include <kglobal.h>
#include <kurlrequesterdlg.h>
#include <kfiledialog.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <keditlistbox.h>
#include <KoGlobal.h>
// little helper stolen from kmail
-// (Note: KDialogBase should have version of the methods that take a QString for the icon name)
-static inline QPixmap loadIcon( const char * name ) {
+// (Note: KDialogBase should have version of the methods that take a TQString for the icon name)
+static inline TQPixmap loadIcon( const char * name ) {
return KGlobal::instance()->iconLoader()
- ->loadIcon( QString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium );
+ ->loadIcon( TQString::tqfromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium );
}
-KWConfig::KWConfig( KWView* parent )
+KWConfig::KWConfig( KWView* tqparent )
: KDialogBase(KDialogBase::IconList,i18n("Configure KWord") ,
KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel| KDialogBase::Default,
- KDialogBase::Ok, parent)
+ KDialogBase::Ok, tqparent)
{
- QVBox *page2 = addVBoxPage( i18n("Interface"), i18n("Interface Settings"),
+ TQVBox *page2 = addVBoxPage( i18n("Interface"), i18n("Interface Settings"),
loadIcon("configure") );
- m_interfacePage=new ConfigureInterfacePage(parent, page2);
+ m_interfacePage=new ConfigureInterfacePage(tqparent, page2);
- QVBox *page4 = addVBoxPage( i18n("Document"), i18n("Document Settings"),
+ TQVBox *page4 = addVBoxPage( i18n("Document"), i18n("Document Settings"),
loadIcon("kword_kwd") );
- m_defaultDocPage=new ConfigureDefaultDocPage(parent, page4);
+ m_defaultDocPage=new ConfigureDefaultDocPage(tqparent, page4);
- QVBox *page = addVBoxPage( i18n("Spelling"), i18n("Spell Checker Behavior"),
+ TQVBox *page = addVBoxPage( i18n("Spelling"), i18n("Spell Checker Behavior"),
loadIcon("spellcheck") );
- m_spellPage = new ConfigureSpellPage(parent, page);
+ m_spellPage = new ConfigureSpellPage(tqparent, page);
- QVBox *page5 = addVBoxPage( i18n("Formula"), i18n("Formula Defaults"),
+ TQVBox *page5 = addVBoxPage( i18n("Formula"), i18n("Formula Defaults"),
loadIcon("kformula") );
- m_formulaPage=new KFormula::ConfigurePage( parent->kWordDocument()->formulaDocument( false ),
+ m_formulaPage=new KFormula::ConfigurePage( tqparent->kWordDocument()->formulaDocument( false ),
this, KWFactory::instance()->config(), page5 );
- QVBox *page3 = addVBoxPage( i18n("Misc"), i18n("Misc Settings"),
+ TQVBox *page3 = addVBoxPage( i18n("Misc"), i18n("Misc Settings"),
loadIcon("misc") );
- m_miscPage=new ConfigureMiscPage(parent, page3);
+ m_miscPage=new ConfigureMiscPage(tqparent, page3);
- QVBox *page6 = addVBoxPage( i18n("Path"), i18n("Path Settings"),
+ TQVBox *page6 = addVBoxPage( i18n("Path"), i18n("Path Settings"),
loadIcon("path") );
- m_pathPage=new ConfigurePathPage(parent, page6);
+ m_pathPage=new ConfigurePathPage(tqparent, page6);
if (KoSpeaker::isKttsdInstalled()) {
- QVBox *page7 = addVBoxPage( i18n("Abbreviation for Text-to-Speech", "TTS"),
+ TQVBox *page7 = addVBoxPage( i18n("Abbreviation for Text-to-Speech", "TTS"),
i18n("Text-to-Speech Settings"), loadIcon("access") );
- m_ttsPage=new ConfigureTTSPage(parent, page7);
+ m_ttsPage=new ConfigureTTSPage(tqparent, page7);
} else m_ttsPage = 0;
- m_doc = parent->kWordDocument();
- connect(this, SIGNAL(okClicked()),this,SLOT(slotApply()));
+ m_doc = tqparent->kWordDocument();
+ connect(this, TQT_SIGNAL(okClicked()),this,TQT_SLOT(slotApply()));
- connect( m_interfacePage, SIGNAL( unitChanged( int ) ), SLOT( unitChanged( int ) ) );
- unitChanged( parent->kWordDocument()->unit() );
+ connect( m_interfacePage, TQT_SIGNAL( unitChanged( int ) ), TQT_SLOT( unitChanged( int ) ) );
+ unitChanged( tqparent->kWordDocument()->unit() );
}
void KWConfig::unitChanged( int u )
@@ -210,14 +210,14 @@ void KWConfig::slotDefault()
////
-ConfigureSpellPage::ConfigureSpellPage( KWView *view, QVBox *box, char *name )
- : QObject( box->parent(), name )
+ConfigureSpellPage::ConfigureSpellPage( KWView *view, TQVBox *box, char *name )
+ : TQObject( box->tqparent(), name )
{
m_pView=view;
config = KWFactory::instance()->config();
m_spellConfigWidget = new ConfigWidget( view->broker(), box );
m_spellConfigWidget->setBackgroundCheckingButtonShown( true );
- m_spellConfigWidget->layout()->setMargin( 0 );
+ m_spellConfigWidget->tqlayout()->setMargin( 0 );
}
void ConfigureSpellPage::apply()
@@ -238,12 +238,12 @@ void ConfigureSpellPage::slotDefault()
m_spellConfigWidget->slotDefault();
}
-ConfigureInterfacePage::ConfigureInterfacePage( KWView *view, QVBox *box, char *name )
- : QObject( box->parent(), name )
+ConfigureInterfacePage::ConfigureInterfacePage( KWView *view, TQVBox *box, char *name )
+ : TQObject( box->tqparent(), name )
{
m_pView=view;
config = KWFactory::instance()->config();
- QVGroupBox* gbInterfaceGroup = new QVGroupBox( i18n("Interface"), box, "GroupBox" );
+ TQVGroupBox* gbInterfaceGroup = new TQVGroupBox( i18n("Interface"), box, "GroupBox" );
gbInterfaceGroup->setMargin( KDialog::marginHint() );
gbInterfaceGroup->setInsideSpacing( KDialog::spacingHint() );
@@ -269,51 +269,51 @@ ConfigureInterfacePage::ConfigureInterfacePage( KWView *view, QVBox *box, char *
oldShowScrollBar = config->readBoolEntry("ShowScrollBar", true);
}
- QHBox *hbUnit = new QHBox(gbInterfaceGroup);
+ TQHBox *hbUnit = new TQHBox(gbInterfaceGroup);
hbUnit->setSpacing(KDialog::spacingHint());
- QLabel *unitLabel= new QLabel(i18n("&Units:"),hbUnit);
+ TQLabel *unitLabel= new TQLabel(i18n("&Units:"),hbUnit);
- m_unitCombo = new QComboBox( hbUnit );
+ m_unitCombo = new TQComboBox( hbUnit );
m_unitCombo->insertStringList( KoUnit::listOfUnitName() );
- connect(m_unitCombo, SIGNAL(activated(int)), this, SIGNAL(unitChanged(int)));
+ connect(m_unitCombo, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(unitChanged(int)));
unitLabel->setBuddy( m_unitCombo );
- QString unitHelp = i18n("Select the unit type used every time a distance or width/height "
+ TQString unitHelp = i18n("Select the unit type used every time a distance or width/height "
"is displayed or entered. This one setting is for the whole of KWord: all dialogs, the rulers etc. "
"Note that KWord documents specify the unit which was used to create them, so this setting "
"only affects this document and all documents that will be created later.");
- QWhatsThis::add( unitLabel, unitHelp );
- QWhatsThis::add( m_unitCombo, unitHelp );
+ TQWhatsThis::add( unitLabel, unitHelp );
+ TQWhatsThis::add( m_unitCombo, unitHelp );
- showStatusBar = new QCheckBox(i18n("Show &status bar"),gbInterfaceGroup);
+ showStatusBar = new TQCheckBox(i18n("Show &status bar"),gbInterfaceGroup);
showStatusBar->setChecked(oldShowStatusBar);
- QWhatsThis::add( showStatusBar, i18n("Show or hide the status bar. If enabled, the status bar is shown at the bottom, which displays various information."));
+ TQWhatsThis::add( showStatusBar, i18n("Show or hide the status bar. If enabled, the status bar is shown at the bottom, which displays various information."));
- showScrollBar = new QCheckBox( i18n("Show s&crollbar"), gbInterfaceGroup);
+ showScrollBar = new TQCheckBox( i18n("Show s&crollbar"), gbInterfaceGroup);
showScrollBar->setChecked(oldShowScrollBar);
- QWhatsThis::add( showScrollBar, i18n("Show or hide the scroll bar. If enabled, the scroll bar is shown on the right and lets you scroll up and down, which is useful for navigating through the document."));
+ TQWhatsThis::add( showScrollBar, i18n("Show or hide the scroll bar. If enabled, the scroll bar is shown on the right and lets you scroll up and down, which is useful for navigating through the document."));
- pgUpDownMovesCaret = new QCheckBox(i18n("PageUp/PageDown &moves the caret"),gbInterfaceGroup);
+ pgUpDownMovesCaret = new TQCheckBox(i18n("PageUp/PageDown &moves the caret"),gbInterfaceGroup);
pgUpDownMovesCaret->setChecked(oldPgUpDownMovesCaret);
- QWhatsThis::add( pgUpDownMovesCaret, i18n(
+ TQWhatsThis::add( pgUpDownMovesCaret, i18n(
"If this option is enabled, the PageUp and PageDown keys "
"move the text caret, as in other KDE applications. "
"If it is disabled, they move the scrollbars, as in most other word processors." ) );
- QHBox* hbRecent = new QHBox( gbInterfaceGroup );
- QString recentHelp = i18n("The number of files remembered in the file open dialog and in the "
+ TQHBox* hbRecent = new TQHBox( gbInterfaceGroup );
+ TQString recentHelp = i18n("The number of files remembered in the file open dialog and in the "
"recent files menu item.");
- QLabel* labelRecent = new QLabel( i18n("Number of recent &files:"), hbRecent );
- QWhatsThis::add( labelRecent, recentHelp );
+ TQLabel* labelRecent = new TQLabel( i18n("Number of recent &files:"), hbRecent );
+ TQWhatsThis::add( labelRecent, recentHelp );
recentFiles=new KIntNumInput( oldNbRecentFiles, hbRecent );
recentFiles->setRange(1, 20, 1);
labelRecent->setBuddy( recentFiles );
- QWhatsThis::add( recentFiles, recentHelp );
+ TQWhatsThis::add( recentFiles, recentHelp );
- QHBox* hbGridX = new QHBox( gbInterfaceGroup );
- QString gridxHelp = i18n("The grid size on which frames, tabs and other content snaps while "
+ TQHBox* hbGridX = new TQHBox( gbInterfaceGroup );
+ TQString gridxHelp = i18n("The grid size on which frames, tabs and other content snaps while "
"moving and scaling.");
- QLabel* labelGridX = new QLabel( i18n("&Horizontal grid size:"), hbGridX );
- QWhatsThis::add( labelGridX, gridxHelp );
+ TQLabel* labelGridX = new TQLabel( i18n("&Horizontal grid size:"), hbGridX );
+ TQWhatsThis::add( labelGridX, gridxHelp );
gridX=new KoUnitDoubleSpinBox( hbGridX,
0.1,
50,
@@ -321,13 +321,13 @@ ConfigureInterfacePage::ConfigureInterfacePage( KWView *view, QVBox *box, char *
ptGridX,
unit );
labelGridX->setBuddy( gridX );
- QWhatsThis::add( gridX, gridxHelp );
+ TQWhatsThis::add( gridX, gridxHelp );
- QHBox* hbGridY = new QHBox( gbInterfaceGroup );
- QString gridyHelp = i18n("The grid size on which frames and other content snaps while "
+ TQHBox* hbGridY = new TQHBox( gbInterfaceGroup );
+ TQString gridyHelp = i18n("The grid size on which frames and other content snaps while "
"moving and scaling.");
- QLabel* labelGridY = new QLabel( i18n("&Vertical grid size:"), hbGridY );
- QWhatsThis::add( labelGridY, gridyHelp );
+ TQLabel* labelGridY = new TQLabel( i18n("&Vertical grid size:"), hbGridY );
+ TQWhatsThis::add( labelGridY, gridyHelp );
gridY=new KoUnitDoubleSpinBox( hbGridY,
0.1,
50,
@@ -336,15 +336,15 @@ ConfigureInterfacePage::ConfigureInterfacePage( KWView *view, QVBox *box, char *
unit );
labelGridY->setBuddy( gridY );
- QWhatsThis::add( gridY, gridyHelp );
+ TQWhatsThis::add( gridY, gridyHelp );
- QHBox* hbIndent = new QHBox( gbInterfaceGroup );
- QString indentHelp = i18n("Configure the indent width used when using the 'Increase' "
+ TQHBox* hbIndent = new TQHBox( gbInterfaceGroup );
+ TQString indentHelp = i18n("Configure the indent width used when using the 'Increase' "
"or 'Decrease' indentation buttons on a paragraph.<p>The lower the value, "
"the more often the buttons will have to be pressed to gain the same "
"indentation.");
- QLabel* labelIndent = new QLabel( i18n("&Paragraph indent by toolbar buttons:"), hbIndent );
- QWhatsThis::add( labelIndent, indentHelp );
+ TQLabel* labelIndent = new TQLabel( i18n("&Paragraph indent by toolbar buttons:"), hbIndent );
+ TQWhatsThis::add( labelIndent, indentHelp );
indent = new KoUnitDoubleSpinBox( hbIndent,
0.1,
5000,
@@ -352,26 +352,26 @@ ConfigureInterfacePage::ConfigureInterfacePage( KWView *view, QVBox *box, char *
ptIndent,
unit );
labelIndent->setBuddy( indent );
- QWhatsThis::add( indent, indentHelp );
+ TQWhatsThis::add( indent, indentHelp );
- QHBox* hbPagePerRow = new QHBox( gbInterfaceGroup );
- QString pagePerRowHelp = i18n("After selecting Preview Mode (from the \"View\" menu,) "
+ TQHBox* hbPagePerRow = new TQHBox( gbInterfaceGroup );
+ TQString pagePerRowHelp = i18n("After selecting Preview Mode (from the \"View\" menu,) "
"this is the number of pages KWord will "
"position on one horizontal row.");
- QLabel* labelPagePerRow = new QLabel( i18n("Number of pa&ges per row in preview mode:" ), hbPagePerRow );
- QWhatsThis::add( labelPagePerRow, pagePerRowHelp );
+ TQLabel* labelPagePerRow = new TQLabel( i18n("Number of pa&ges per row in preview mode:" ), hbPagePerRow );
+ TQWhatsThis::add( labelPagePerRow, pagePerRowHelp );
m_nbPagePerRow=new KIntNumInput( 0, nbPagePerRow, hbPagePerRow );
m_nbPagePerRow->setRange(1, 10, 1);
labelPagePerRow->setBuddy( m_nbPagePerRow );
hbPagePerRow->setStretchFactor( m_nbPagePerRow, 1 );
- QWhatsThis::add(m_nbPagePerRow , pagePerRowHelp );
+ TQWhatsThis::add(m_nbPagePerRow , pagePerRowHelp );
}
void ConfigureInterfacePage::apply()
{
KWDocument * doc = m_pView->kWordDocument();
- double valX = QMAX( 0.1, gridX->value() );
- double valY = QMAX( 0.1, gridY->value() );
+ double valX = TQMAX( 0.1, gridX->value() );
+ double valY = TQMAX( 0.1, gridY->value() );
int nbRecent=recentFiles->value();
bool statusBar=showStatusBar->isChecked();
@@ -446,7 +446,7 @@ void ConfigureInterfacePage::apply()
// It's already been set in the document, see unitChanged
config->writeEntry( "Units", KoUnit::unitName( unit ) );
if ( updateView )
- doc->repaintAllViews(false);
+ doc->tqrepaintAllViews(false);
}
void ConfigureInterfacePage::setUnit( KoUnit::Unit unit )
@@ -480,12 +480,12 @@ void ConfigureInterfacePage::slotDefault()
////
-ConfigureMiscPage::ConfigureMiscPage( KWView *view, QVBox *box, char *name )
- : QObject( box->parent(), name )
+ConfigureMiscPage::ConfigureMiscPage( KWView *view, TQVBox *box, char *name )
+ : TQObject( box->tqparent(), name )
{
m_pView=view;
config = KWFactory::instance()->config();
- QVGroupBox* gbMiscGroup = new QVGroupBox( i18n("Misc"), box, "GroupBox" );
+ TQVGroupBox* gbMiscGroup = new TQVGroupBox( i18n("Misc"), box, "GroupBox" );
gbMiscGroup->setMargin( KDialog::marginHint() );
gbMiscGroup->setInsideSpacing( KDialog::spacingHint() );
@@ -500,41 +500,41 @@ ConfigureMiscPage::ConfigureMiscPage( KWView *view, QVBox *box, char *name )
m_oldNbRedo=config->readNumEntry("UndoRedo",m_oldNbRedo);
}
- QHBox* hbUndoRedo = new QHBox( gbMiscGroup );
- QLabel* labelUndoRedo = new QLabel( i18n("Undo/&redo limit:"), hbUndoRedo );
- QString undoHelp = i18n("Limit the number of undo/redo actions remembered. "
+ TQHBox* hbUndoRedo = new TQHBox( gbMiscGroup );
+ TQLabel* labelUndoRedo = new TQLabel( i18n("Undo/&redo limit:"), hbUndoRedo );
+ TQString undoHelp = i18n("Limit the number of undo/redo actions remembered. "
"A lower value helps to save memory, a higher value allows "
"you to undo and redo more editing steps.");
m_undoRedoLimit=new KIntNumInput( m_oldNbRedo, hbUndoRedo );
m_undoRedoLimit->setRange(1, 100, 1);
labelUndoRedo->setBuddy( m_undoRedoLimit );
- QWhatsThis::add( m_undoRedoLimit, undoHelp );
- QWhatsThis::add( labelUndoRedo, undoHelp );
+ TQWhatsThis::add( m_undoRedoLimit, undoHelp );
+ TQWhatsThis::add( labelUndoRedo, undoHelp );
KWDocument* doc = m_pView->kWordDocument();
- m_displayLink=new QCheckBox(i18n("Display &links"),gbMiscGroup);
+ m_displayLink=new TQCheckBox(i18n("Display &links"),gbMiscGroup);
m_displayLink->setChecked(doc->variableCollection()->variableSetting()->displayLink());
- QWhatsThis::add( m_displayLink, i18n("If enabled, a link is highlighted as such and is clickable.\n\n"
+ TQWhatsThis::add( m_displayLink, i18n("If enabled, a link is highlighted as such and is clickable.\n\n"
"You can insert a link from the Insert menu."));
- m_underlineLink=new QCheckBox(i18n("&Underline all links"),gbMiscGroup);
+ m_underlineLink=new TQCheckBox(i18n("&Underline all links"),gbMiscGroup);
m_underlineLink->setChecked(doc->variableCollection()->variableSetting()->underlineLink());
- QWhatsThis::add( m_underlineLink, i18n("If enabled, a link is underlined."));
+ TQWhatsThis::add( m_underlineLink, i18n("If enabled, a link is underlined."));
- m_displayComment=new QCheckBox(i18n("Display c&omments"),gbMiscGroup);
+ m_displayComment=new TQCheckBox(i18n("Display c&omments"),gbMiscGroup);
m_displayComment->setChecked(doc->variableCollection()->variableSetting()->displayComment());
- QWhatsThis::add( m_displayComment, i18n("If enabled, comments are indicated by a small yellow box.\n\n"
+ TQWhatsThis::add( m_displayComment, i18n("If enabled, comments are indicated by a small yellow box.\n\n"
"You can show and edit a comment from the context menu."));
- m_displayFieldCode=new QCheckBox(i18n("Display field code"),gbMiscGroup);
+ m_displayFieldCode=new TQCheckBox(i18n("Display field code"),gbMiscGroup);
m_displayFieldCode->setChecked(doc->variableCollection()->variableSetting()->displayFieldCode());
- QWhatsThis::add( m_displayFieldCode, i18n("If enabled, the type of link is displayed instead "
+ TQWhatsThis::add( m_displayFieldCode, i18n("If enabled, the type of link is displayed instead "
"of displaying the link text.\n\n"
"There are various types of link that can be inserted, "
"such as hyperlinks, files, mail, news and bookmarks."));
- QVGroupBox* gbViewFormatting = new QVGroupBox( i18n("View Formatting"), box, "view_formatting" );
- QWhatsThis::add( gbViewFormatting, i18n("These settings can be used to select the formatting "
+ TQVGroupBox* gbViewFormatting = new TQVGroupBox( i18n("View Formatting"), box, "view_formatting" );
+ TQWhatsThis::add( gbViewFormatting, i18n("These settings can be used to select the formatting "
"characters that should be shown.\n\n"
"Note that the selected formatting characters are only "
"shown if formatting characters are enabled in general, "
@@ -547,16 +547,16 @@ ConfigureMiscPage::ConfigureMiscPage( KWView *view, QVBox *box, char *name )
m_oldFormattingTabs = doc->viewFormattingTabs();
m_oldFormattingBreak = doc->viewFormattingBreak();
- m_cbViewFormattingEndParag = new QCheckBox( i18n("View formatting end paragraph"), gbViewFormatting);
+ m_cbViewFormattingEndParag = new TQCheckBox( i18n("View formatting end paragraph"), gbViewFormatting);
m_cbViewFormattingEndParag->setChecked(m_oldFormattingEndParag);
- m_cbViewFormattingSpace = new QCheckBox( i18n("View formatting space"), gbViewFormatting);
+ m_cbViewFormattingSpace = new TQCheckBox( i18n("View formatting space"), gbViewFormatting);
m_cbViewFormattingSpace->setChecked(m_oldFormattingSpace);
- m_cbViewFormattingTabs = new QCheckBox( i18n("View formatting tabs"), gbViewFormatting);
+ m_cbViewFormattingTabs = new TQCheckBox( i18n("View formatting tabs"), gbViewFormatting);
m_cbViewFormattingTabs->setChecked(m_oldFormattingTabs);
- m_cbViewFormattingBreak = new QCheckBox( i18n("View formatting break"), gbViewFormatting);
+ m_cbViewFormattingBreak = new TQCheckBox( i18n("View formatting break"), gbViewFormatting);
m_cbViewFormattingBreak->setChecked(m_oldFormattingBreak);
}
@@ -655,8 +655,8 @@ KCommand *ConfigureMiscPage::apply()
}
if ( needRepaint )
{
- doc->layout();
- doc->repaintAllViews();
+ doc->tqlayout();
+ doc->tqrepaintAllViews();
}
return macroCmd;
}
@@ -680,13 +680,13 @@ void ConfigureMiscPage::setUnit( KoUnit::Unit )
////
-ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char *name )
- : QObject( box->parent(), name )
+ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, TQVBox *box, char *name )
+ : TQObject( box->tqparent(), name )
{
m_pView=view;
KWDocument * doc = m_pView->kWordDocument();
config = KWFactory::instance()->config();
- QVGroupBox* gbDocumentDefaults = new QVGroupBox( i18n("Document Defaults"), box, "GroupBox" );
+ TQVGroupBox* gbDocumentDefaults = new TQVGroupBox( i18n("Document Defaults"), box, "GroupBox" );
gbDocumentDefaults->setMargin( KDialog::marginHint() );
gbDocumentDefaults->setInsideSpacing( KDialog::spacingHint() );
@@ -700,8 +700,8 @@ ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char
}
- QHBox* hbColumnSpacing = new QHBox( gbDocumentDefaults );
- QLabel* columnSpacingLabel = new QLabel( i18n("Default column spacing:"), hbColumnSpacing );
+ TQHBox* hbColumnSpacing = new TQHBox( gbDocumentDefaults );
+ TQLabel* columnSpacingLabel = new TQLabel( i18n("Default column spacing:"), hbColumnSpacing );
m_columnSpacing = new KoUnitDoubleSpinBox( hbColumnSpacing,
0.1,
50,
@@ -709,29 +709,29 @@ ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char
ptColumnSpacing,
unit );
columnSpacingLabel->setBuddy( m_columnSpacing );
- QWhatsThis::add( m_columnSpacing, i18n("When setting a document to use more than one column "
+ TQWhatsThis::add( m_columnSpacing, i18n("When setting a document to use more than one column "
"this distance will be used to separate the columns. This value is merely a default "
"setting as the column spacing can be changed per document") );
- QWidget *fontContainer = new QWidget(gbDocumentDefaults);
- QGridLayout * fontLayout = new QGridLayout(fontContainer, 1, 3);
+ TQWidget *fontContainer = new TQWidget(gbDocumentDefaults);
+ TQGridLayout * fontLayout = new TQGridLayout(fontContainer, 1, 3);
fontLayout->setSpacing(KDialog::spacingHint());
fontLayout->setColStretch(0, 0);
fontLayout->setColStretch(1, 1);
fontLayout->setColStretch(2, 0);
- QLabel *fontTitle = new QLabel(i18n("Default font:"), fontContainer);
+ TQLabel *fontTitle = new TQLabel(i18n("Default font:"), fontContainer);
- font= new QFont( doc->defaultFont() );
+ font= new TQFont( doc->defaultFont() );
- QString labelName = font->family() + ' ' + QString::number(font->pointSize());
- fontName = new QLabel(labelName, fontContainer);
+ TQString labelName = font->family() + ' ' + TQString::number(font->pointSize());
+ fontName = new TQLabel(labelName, fontContainer);
fontName->setFont(*font);
- fontName->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ fontName->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken);
- QPushButton *chooseButton = new QPushButton(i18n("Choose..."), fontContainer);
- connect(chooseButton, SIGNAL(clicked()), this, SLOT(selectNewDefaultFont()));
+ TQPushButton *chooseButton = new TQPushButton(i18n("Choose..."), fontContainer);
+ connect(chooseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectNewDefaultFont()));
fontLayout->addWidget(fontTitle, 0, 0);
fontLayout->addWidget(fontName, 0, 1);
@@ -750,35 +750,35 @@ ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char
}
- QWidget *languageContainer = new QWidget(gbDocumentDefaults);
- QGridLayout * languageLayout = new QGridLayout(languageContainer, 1, 3);
+ TQWidget *languageContainer = new TQWidget(gbDocumentDefaults);
+ TQGridLayout * languageLayout = new TQGridLayout(languageContainer, 1, 3);
languageLayout->setSpacing(KDialog::spacingHint());
languageLayout->setColStretch(0, 0);
languageLayout->setColStretch(1, 1);
- QLabel *languageTitle = new QLabel(i18n("Global language:"), languageContainer);
+ TQLabel *languageTitle = new TQLabel(i18n("Global language:"), languageContainer);
- m_globalLanguage = new QComboBox( languageContainer );
+ m_globalLanguage = new TQComboBox( languageContainer );
m_globalLanguage->insertStringList( KoGlobal::listOfLanguages() );
m_globalLanguage->setCurrentText( KoGlobal::languageFromTag( m_oldLanguage ) );
languageLayout->addWidget(languageTitle, 0, 0);
languageLayout->addWidget(m_globalLanguage, 0, 1);
- m_autoHyphenation = new QCheckBox( i18n("Automatic hyphenation"), gbDocumentDefaults);
+ m_autoHyphenation = new TQCheckBox( i18n("Automatic hyphenation"), gbDocumentDefaults);
m_autoHyphenation->setChecked( m_oldHyphenation );
- QVGroupBox* gbDocumentSettings = new QVGroupBox( i18n("Document Settings"), box );
+ TQVGroupBox* gbDocumentSettings = new TQVGroupBox( i18n("Document Settings"), box );
gbDocumentSettings->setMargin( KDialog::marginHint() );
gbDocumentSettings->setInsideSpacing( KDialog::spacingHint() );
- QHBox* hbAutoSave = new QHBox( gbDocumentSettings );
- QLabel* labelAutoSave = new QLabel( i18n("Autosave every (min):"), hbAutoSave );
+ TQHBox* hbAutoSave = new TQHBox( gbDocumentSettings );
+ TQLabel* labelAutoSave = new TQLabel( i18n("Autosave every (min):"), hbAutoSave );
autoSave = new KIntNumInput( oldAutoSaveValue, hbAutoSave );
autoSave->setRange(0, 60, 1);
labelAutoSave->setBuddy(autoSave);
- QWhatsThis::add( autoSave, i18n("A backup copy of the current document is created when a change "
+ TQWhatsThis::add( autoSave, i18n("A backup copy of the current document is created when a change "
"has been made. The interval used to create backup documents is set here.") );
autoSave->setSpecialValueText(i18n("No autosave"));
autoSave->setSuffix(i18n(" min"));
@@ -790,11 +790,11 @@ ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char
m_oldBackupFile=config->readBoolEntry("BackupFile",m_oldBackupFile);
}
- m_createBackupFile = new QCheckBox( i18n("Create backup file"), gbDocumentSettings);
+ m_createBackupFile = new TQCheckBox( i18n("Create backup file"), gbDocumentSettings);
m_createBackupFile->setChecked( m_oldBackupFile );
- QHBox* hbStartingPage = new QHBox( gbDocumentSettings );
- QLabel* labelStartingPage = new QLabel(i18n("Starting page number:"), hbStartingPage);
+ TQHBox* hbStartingPage = new TQHBox( gbDocumentSettings );
+ TQLabel* labelStartingPage = new TQLabel(i18n("Starting page number:"), hbStartingPage);
m_oldStartingPage=doc->variableCollection()->variableSetting()->startingPageNumber();
m_variableNumberOffset=new KIntNumInput(hbStartingPage);
@@ -802,8 +802,8 @@ ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char
m_variableNumberOffset->setValue(m_oldStartingPage);
labelStartingPage->setBuddy( m_variableNumberOffset );
- QHBox* hbTabStop = new QHBox( gbDocumentSettings );
- tabStop = new QLabel(i18n("Tab stop (%1):").arg(doc->unitName()), hbTabStop);
+ TQHBox* hbTabStop = new TQHBox( gbDocumentSettings );
+ tabStop = new TQLabel(i18n("Tab stop (%1):").tqarg(doc->unitName()), hbTabStop);
m_tabStopWidth = new KoUnitDoubleSpinBox( hbTabStop,
MM_TO_POINT(2),
doc->pageManager()->page(doc->startPage())->width(),
@@ -812,14 +812,14 @@ ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char
unit );
m_oldTabStopWidth = doc->tabStopValue();
- QVGroupBox* gbDocumentCursor = new QVGroupBox( i18n("Cursor"), box );
+ TQVGroupBox* gbDocumentCursor = new TQVGroupBox( i18n("Cursor"), box );
gbDocumentCursor->setMargin( KDialog::marginHint() );
gbDocumentCursor->setInsideSpacing( KDialog::spacingHint() );
- m_cursorInProtectedArea= new QCheckBox(i18n("Cursor in protected area"),gbDocumentCursor);
+ m_cursorInProtectedArea= new TQCheckBox(i18n("Cursor in protected area"),gbDocumentCursor);
m_cursorInProtectedArea->setChecked(doc->cursorInProtectedArea());
-// m_directInsertCursor= new QCheckBox(i18n("Direct insert cursor"),gbDocumentCursor);
+// m_directInsertCursor= new TQCheckBox(i18n("Direct insert cursor"),gbDocumentCursor);
// m_directInsertCursor->setChecked(doc->insertDirectCursor());
}
@@ -833,7 +833,7 @@ KCommand *ConfigureDefaultDocPage::apply()
config->writeEntry( "ColumnSpacing", colSpacing , true, false, 'g', DBL_DIG );
doc->setDefaultColumnSpacing(colSpacing);
}
- config->writeEntry("DefaultFont",font->toString());
+ config->writeEntry("DefaultFont",TQString(font->toString()));
config->setGroup( "Interface" );
int autoSaveVal=autoSave->value();
@@ -865,7 +865,7 @@ KCommand *ConfigureDefaultDocPage::apply()
//Laurent Todo add a message box to inform user that
//global language will change after re-launch kword
- QString lang = KoGlobal::tagOfLanguage( m_globalLanguage->currentText() );
+ TQString lang = KoGlobal::tagOfLanguage( m_globalLanguage->currentText() );
config->writeEntry( "language" , lang);
m_oldLanguage = lang;
//don't call this fiunction otherwise we can have a textobject with
@@ -916,15 +916,15 @@ void ConfigureDefaultDocPage::slotDefault()
}
void ConfigureDefaultDocPage::selectNewDefaultFont() {
- QStringList list;
+ TQStringList list;
KFontChooser::getFontList(list, KFontChooser::SmoothScalableFonts);
- KFontDialog dlg( (QWidget *)this->parent(), "Font Selector", false, true, list, true );
+ KFontDialog dlg( (TQWidget *)this->tqparent(), "Font Selector", false, true, list, true );
dlg.setFont(*font);
int result = dlg.exec();
if (KDialog::Accepted == result) {
delete font;
- font = new QFont(dlg.font());
- fontName->setText(font->family() + ' ' + QString::number(font->pointSize()));
+ font = new TQFont(dlg.font());
+ fontName->setText(font->family() + ' ' + TQString::number(font->pointSize()));
fontName->setFont(*font);
m_pView->kWordDocument()->setDefaultFont( *font );
}
@@ -939,38 +939,38 @@ void ConfigureDefaultDocPage::setUnit( KoUnit::Unit unit )
////
-ConfigurePathPage::ConfigurePathPage( KWView *view, QVBox *box, char *name )
- : QObject( box->parent(), name )
+ConfigurePathPage::ConfigurePathPage( KWView *view, TQVBox *box, char *name )
+ : TQObject( box->tqparent(), name )
{
m_pView=view;
KWDocument * doc = m_pView->kWordDocument();
config = KWFactory::instance()->config();
- QVGroupBox* gbPathGroup = new QVGroupBox( i18n("Path"), box, "GroupBox" );
+ TQVGroupBox* gbPathGroup = new TQVGroupBox( i18n("Path"), box, "GroupBox" );
gbPathGroup->setMargin( KDialog::marginHint() );
gbPathGroup->setInsideSpacing( KDialog::spacingHint() );
m_pPathView = new KListView( gbPathGroup );
- m_pPathView->setResizeMode(QListView::NoColumn);
+ m_pPathView->setResizeMode(TQListView::NoColumn);
m_pPathView->addColumn( i18n( "Type" ) );
m_pPathView->addColumn( i18n( "Path" ), 400 ); // not too big by default
- (void) new QListViewItem( m_pPathView, i18n("Personal Expression"), doc->personalExpressionPath().join(";") );
- (void) new QListViewItem( m_pPathView, i18n("Backup Path"),doc->backupPath() );
+ (void) new TQListViewItem( m_pPathView, i18n("Personal Expression"), doc->personalExpressionPath().join(";") );
+ (void) new TQListViewItem( m_pPathView, i18n("Backup Path"),doc->backupPath() );
- m_modifyPath = new QPushButton( i18n("Modify Path..."), gbPathGroup);
- connect( m_modifyPath, SIGNAL( clicked ()), this, SLOT( slotModifyPath()));
- connect( m_pPathView, SIGNAL( doubleClicked (QListViewItem *, const QPoint &, int )), this, SLOT( slotModifyPath()));
- connect( m_pPathView, SIGNAL( selectionChanged ( QListViewItem * )), this, SLOT( slotSelectionChanged(QListViewItem * )));
+ m_modifyPath = new TQPushButton( i18n("Modify Path..."), gbPathGroup);
+ connect( m_modifyPath, TQT_SIGNAL( clicked ()), this, TQT_SLOT( slotModifyPath()));
+ connect( m_pPathView, TQT_SIGNAL( doubleClicked (TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT( slotModifyPath()));
+ connect( m_pPathView, TQT_SIGNAL( selectionChanged ( TQListViewItem * )), this, TQT_SLOT( slotSelectionChanged(TQListViewItem * )));
slotSelectionChanged(m_pPathView->currentItem());
}
-void ConfigurePathPage::slotSelectionChanged(QListViewItem * item)
+void ConfigurePathPage::slotSelectionChanged(TQListViewItem * item)
{
m_modifyPath->setEnabled( item );
}
void ConfigurePathPage::slotModifyPath()
{
- QListViewItem *item = m_pPathView->currentItem ();
+ TQListViewItem *item = m_pPathView->currentItem ();
if ( item )
{
if ( item->text(0)==i18n("Personal Expression"))
@@ -992,20 +992,20 @@ void ConfigurePathPage::slotModifyPath()
void ConfigurePathPage::slotDefault()
{
- QListViewItem * item = m_pPathView->findItem(i18n("Personal Expression"), 0);
+ TQListViewItem * item = m_pPathView->tqfindItem(i18n("Personal Expression"), 0);
if ( item )
item->setText(1, KWFactory::instance()->dirs()->resourceDirs("expression").join(";"));
- item = m_pPathView->findItem(i18n("Backup Path"), 0);
+ item = m_pPathView->tqfindItem(i18n("Backup Path"), 0);
if ( item )
- item->setText(1, QString::null );
+ item->setText(1, TQString() );
}
void ConfigurePathPage::apply()
{
- QListViewItem * item = m_pPathView->findItem(i18n("Personal Expression"), 0);
+ TQListViewItem * item = m_pPathView->tqfindItem(i18n("Personal Expression"), 0);
if ( item )
{
- QStringList lst = QStringList::split(QString(";"), item->text(1));
+ TQStringList lst = TQStringList::split(TQString(";"), item->text(1));
if ( lst != m_pView->kWordDocument()->personalExpressionPath())
{
m_pView->kWordDocument()->setPersonalExpressionPath(lst);
@@ -1013,10 +1013,10 @@ void ConfigurePathPage::apply()
config->writePathEntry( "expression path", lst);
}
}
- item = m_pPathView->findItem(i18n("Backup Path"), 0);
+ item = m_pPathView->tqfindItem(i18n("Backup Path"), 0);
if ( item )
{
- QString res = item->text(1 );
+ TQString res = item->text(1 );
if ( res != m_pView->kWordDocument()->backupPath())
{
config->setGroup( "Kword Path" );
@@ -1029,35 +1029,35 @@ void ConfigurePathPage::apply()
////
-ConfigureTTSPage::ConfigureTTSPage( KWView *view, QVBox *box, char *name )
- : QObject( box->parent(), name )
+ConfigureTTSPage::ConfigureTTSPage( KWView *view, TQVBox *box, char *name )
+ : TQObject( box->tqparent(), name )
{
Q_UNUSED(view);
// m_pView=_view;
// KWDocument * doc = m_pView->kWordDocument();
- m_cbSpeakPointerWidget = new QCheckBox(i18n("Speak widget under &mouse pointer"), box);
- m_cbSpeakFocusWidget = new QCheckBox(i18n("Speak widget with &focus"), box);
- m_gbScreenReaderOptions = new QVGroupBox("", box);
+ m_cbSpeakPointerWidget = new TQCheckBox(i18n("Speak widget under &mouse pointer"), box);
+ m_cbSpeakFocusWidget = new TQCheckBox(i18n("Speak widget with &focus"), box);
+ m_gbScreenReaderOptions = new TQVGroupBox("", box);
m_gbScreenReaderOptions->setMargin( KDialog::marginHint() );
m_gbScreenReaderOptions->setInsideSpacing( KDialog::spacingHint() );
- m_cbSpeakTooltips = new QCheckBox(i18n("Speak &tool tips"), m_gbScreenReaderOptions);
- m_cbSpeakWhatsThis = new QCheckBox(i18n("Speak &What's This"), m_gbScreenReaderOptions);
- m_cbSpeakDisabled = new QCheckBox(i18n("Verbal indication if widget is disabled (grayed)",
+ m_cbSpeakTooltips = new TQCheckBox(i18n("Speak &tool tips"), m_gbScreenReaderOptions);
+ m_cbSpeakWhatsThis = new TQCheckBox(i18n("Speak &What's This"), m_gbScreenReaderOptions);
+ m_cbSpeakDisabled = new TQCheckBox(i18n("Verbal indication if widget is disabled (grayed)",
"&Say whether disabled"), m_gbScreenReaderOptions);
- m_cbSpeakAccelerators = new QCheckBox(i18n("Spea&k accelerators"), m_gbScreenReaderOptions);
- QHBox* hbAcceleratorPrefix = new QHBox(m_gbScreenReaderOptions);
- QWidget* spacer = new QWidget(hbAcceleratorPrefix);
+ m_cbSpeakAccelerators = new TQCheckBox(i18n("Spea&k accelerators"), m_gbScreenReaderOptions);
+ TQHBox* hbAcceleratorPrefix = new TQHBox(m_gbScreenReaderOptions);
+ TQWidget* spacer = new TQWidget(hbAcceleratorPrefix);
spacer->setMinimumWidth(2 * KDialog::marginHint());
m_lblAcceleratorPrefix =
- new QLabel(i18n("A word spoken before another word", "Pr&efaced by the word:"),
+ new TQLabel(i18n("A word spoken before another word", "Pr&efaced by the word:"),
hbAcceleratorPrefix);
- m_leAcceleratorPrefixWord = new QLineEdit(i18n("Keyboard accelerator, such as Alt+F", "Accelerator"),
+ m_leAcceleratorPrefixWord = new TQLineEdit(i18n("Keyboard accelerator, such as Alt+F", "Accelerator"),
hbAcceleratorPrefix);
m_lblAcceleratorPrefix->setBuddy(m_leAcceleratorPrefixWord);
- QHBox* hbPollingInterval = new QHBox(m_gbScreenReaderOptions);
+ TQHBox* hbPollingInterval = new TQHBox(m_gbScreenReaderOptions);
hbPollingInterval->setMargin( 0 );
- QLabel* lblPollingInterval = new QLabel(i18n("&Polling interval:"), hbPollingInterval);
+ TQLabel* lblPollingInterval = new TQLabel(i18n("&Polling interval:"), hbPollingInterval);
m_iniPollingInterval = new KIntNumInput(hbPollingInterval);
m_iniPollingInterval->setSuffix(" ms");
m_iniPollingInterval->setRange(100, 5000, 100, true);
@@ -1076,9 +1076,9 @@ ConfigureTTSPage::ConfigureTTSPage( KWView *view, QVBox *box, char *name )
m_iniPollingInterval->setValue(config->readNumEntry("PollingInterval", 600));
screenReaderOptionChanged();
- connect(m_cbSpeakPointerWidget, SIGNAL(toggled(bool)), this, SLOT(screenReaderOptionChanged()));
- connect(m_cbSpeakFocusWidget, SIGNAL(toggled(bool)), this, SLOT(screenReaderOptionChanged()));
- connect(m_cbSpeakAccelerators, SIGNAL(toggled(bool)), this, SLOT(screenReaderOptionChanged()));
+ connect(m_cbSpeakPointerWidget, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(screenReaderOptionChanged()));
+ connect(m_cbSpeakFocusWidget, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(screenReaderOptionChanged()));
+ connect(m_cbSpeakAccelerators, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(screenReaderOptionChanged()));
}
void ConfigureTTSPage::slotDefault()
diff --git a/kword/KWConfig.h b/kword/KWConfig.h
index 1b563f92..afe41b74 100644
--- a/kword/KWConfig.h
+++ b/kword/KWConfig.h
@@ -27,27 +27,28 @@ namespace KFormula {
}
class KWView;
-class QCheckBox;
+class TQCheckBox;
class KIntNumInput;
class KoUnitDoubleSpinBox;
class KConfig;
-class QComboBox;
+class TQComboBox;
class KIntNumInput;
class KCommand;
class KWDocument;
class KListView;
-class QVGroupBox;
-class QLabel;
+class TQVGroupBox;
+class TQLabel;
namespace KSpell2 {
class ConfigWidget;
}
-class ConfigureSpellPage : public QObject
+class ConfigureSpellPage : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigureSpellPage( KWView *view, QVBox *box, char *name = 0 );
+ ConfigureSpellPage( KWView *view, TQVBox *box, char *name = 0 );
void apply();
void slotDefault();
private:
@@ -56,11 +57,12 @@ private:
KSpell2::ConfigWidget *m_spellConfigWidget;
};
-class ConfigureInterfacePage : public QObject
+class ConfigureInterfacePage : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigureInterfacePage( KWView *view, QVBox *box, char *name = 0 );
+ ConfigureInterfacePage( KWView *view, TQVBox *box, char *name = 0 );
void apply();
void slotDefault();
void setUnit( KoUnit::Unit unit );
@@ -71,20 +73,21 @@ signals:
private:
KWView* m_pView;
KConfig* config;
- QComboBox *m_unitCombo;
+ TQComboBox *m_unitCombo;
KoUnitDoubleSpinBox* gridX,*gridY;
KoUnitDoubleSpinBox* indent;
KIntNumInput* recentFiles;
- QCheckBox *showStatusBar, *showScrollBar, *pgUpDownMovesCaret;
+ TQCheckBox *showStatusBar, *showScrollBar, *pgUpDownMovesCaret;
int oldNbRecentFiles;
KIntNumInput *m_nbPagePerRow;
};
-class ConfigureMiscPage : public QObject
+class ConfigureMiscPage : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigureMiscPage( KWView *view, QVBox *box, char *name = 0 );
+ ConfigureMiscPage( KWView *view, TQVBox *box, char *name = 0 );
KCommand* apply();
void slotDefault();
void setUnit( KoUnit::Unit unit );
@@ -94,16 +97,17 @@ private:
KIntNumInput* m_undoRedoLimit;
int m_oldNbRedo;
bool m_oldFormattingEndParag, m_oldFormattingSpace, m_oldFormattingTabs, m_oldFormattingBreak;
- QCheckBox* m_displayLink, *m_displayComment, *m_underlineLink, *m_displayFieldCode;
- QCheckBox* m_cbViewFormattingEndParag, *m_cbViewFormattingSpace;
- QCheckBox* m_cbViewFormattingTabs, *m_cbViewFormattingBreak;
+ TQCheckBox* m_displayLink, *m_displayComment, *m_underlineLink, *m_displayFieldCode;
+ TQCheckBox* m_cbViewFormattingEndParag, *m_cbViewFormattingSpace;
+ TQCheckBox* m_cbViewFormattingTabs, *m_cbViewFormattingBreak;
};
-class ConfigureDefaultDocPage : public QObject
+class ConfigureDefaultDocPage : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigureDefaultDocPage( KWView *view, QVBox *box, char *name = 0 );
+ ConfigureDefaultDocPage( KWView *view, TQVBox *box, char *name = 0 );
~ConfigureDefaultDocPage();
KCommand* apply();
void slotDefault();
@@ -113,9 +117,9 @@ public slots:
private:
KWView* m_pView;
KConfig* config;
- QFont *font;
- QLabel *fontName;
- QLabel *tabStop;
+ TQFont *font;
+ TQLabel *fontName;
+ TQLabel *tabStop;
KoUnitDoubleSpinBox* m_columnSpacing;
@@ -127,61 +131,64 @@ private:
bool m_oldBackupFile;
KIntNumInput* m_variableNumberOffset;
KoUnitDoubleSpinBox *m_tabStopWidth;
- QCheckBox *m_cursorInProtectedArea;
- QCheckBox *m_createBackupFile;
-// QCheckBox *m_directInsertCursor;
- QCheckBox *m_autoHyphenation;
- QComboBox *m_globalLanguage;
- QString m_oldLanguage;
+ TQCheckBox *m_cursorInProtectedArea;
+ TQCheckBox *m_createBackupFile;
+// TQCheckBox *m_directInsertCursor;
+ TQCheckBox *m_autoHyphenation;
+ TQComboBox *m_globalLanguage;
+ TQString m_oldLanguage;
bool m_oldHyphenation;
};
-class ConfigurePathPage : public QObject
+class ConfigurePathPage : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigurePathPage( KWView *view, QVBox *box, char *name = 0 );
+ ConfigurePathPage( KWView *view, TQVBox *box, char *name = 0 );
void slotDefault();
void apply();
private slots:
void slotModifyPath();
- void slotSelectionChanged(QListViewItem *);
+ void slotSelectionChanged(TQListViewItem *);
private:
KWView* m_pView;
KConfig* config;
KListView* m_pPathView;
- QPushButton *m_modifyPath;
+ TQPushButton *m_modifyPath;
};
-class ConfigureTTSPage : public QObject
+class ConfigureTTSPage : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigureTTSPage( KWView *view, QVBox *box, char *name = 0 );
+ ConfigureTTSPage( KWView *view, TQVBox *box, char *name = 0 );
void slotDefault();
void apply();
private slots:
void screenReaderOptionChanged();
private:
KConfig* config;
- QCheckBox* m_cbSpeakPointerWidget;
- QCheckBox* m_cbSpeakFocusWidget;
- QVGroupBox* m_gbScreenReaderOptions;
- QCheckBox* m_cbSpeakTooltips;
- QCheckBox* m_cbSpeakWhatsThis;
- QCheckBox* m_cbSpeakDisabled;
- QCheckBox* m_cbSpeakAccelerators;
- QLabel* m_lblAcceleratorPrefix;
- QLineEdit* m_leAcceleratorPrefixWord;
+ TQCheckBox* m_cbSpeakPointerWidget;
+ TQCheckBox* m_cbSpeakFocusWidget;
+ TQVGroupBox* m_gbScreenReaderOptions;
+ TQCheckBox* m_cbSpeakTooltips;
+ TQCheckBox* m_cbSpeakWhatsThis;
+ TQCheckBox* m_cbSpeakDisabled;
+ TQCheckBox* m_cbSpeakAccelerators;
+ TQLabel* m_lblAcceleratorPrefix;
+ TQLineEdit* m_leAcceleratorPrefixWord;
KIntNumInput* m_iniPollingInterval;
};
class KWConfig : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum { KW_KSPELL=1,KP_INTERFACE=2,KP_MISC=4, KP_DOCUMENT=8, KP_FORMULA=16, KP_PATH = 32};
- KWConfig( KWView* parent );
+ KWConfig( KWView* tqparent );
void openPage(int flags);
public slots:
void slotApply();
diff --git a/kword/KWConfigFootNoteDia.cpp b/kword/KWConfigFootNoteDia.cpp
index f2d606c6..6743e36f 100644
--- a/kword/KWConfigFootNoteDia.cpp
+++ b/kword/KWConfigFootNoteDia.cpp
@@ -30,17 +30,17 @@
#include <klocale.h>
#include <knuminput.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
-#include <qvbuttongroup.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qcombobox.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
+#include <tqvbuttongroup.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
-KWConfigFootNoteDia::KWConfigFootNoteDia( QWidget *parent, const char *name, KWDocument *doc )
- : KDialogBase(Tabbed, QString::null, Ok | Cancel , Ok, parent, name, true)
+KWConfigFootNoteDia::KWConfigFootNoteDia( TQWidget *tqparent, const char *name, KWDocument *doc )
+ : KDialogBase(Tabbed, TQString(), Ok | Cancel , Ok, tqparent, name, true)
{
setCaption( i18n("Configure Endnote/Footnote") );
m_doc = doc;
@@ -53,7 +53,7 @@ KWConfigFootNoteDia::KWConfigFootNoteDia( QWidget *parent, const char *name, KWD
void KWConfigFootNoteDia::setupTab1()
{
- QVBox * page = addVBoxPage( i18n( "Footnotes" ) );
+ TQVBox * page = addVBoxPage( i18n( "Footnotes" ) );
m_footNoteConfig = new KoCounterStyleWidget( false, true, false, page );
//m_footNoteConfig->numTypeChanged( KoParagCounter::NUM_LIST );
m_footNoteConfig->setCounter (static_cast<KWVariableSettings*>(m_doc->variableCollection()->variableSetting())->footNoteCounter() );
@@ -61,7 +61,7 @@ void KWConfigFootNoteDia::setupTab1()
void KWConfigFootNoteDia::setupTab2()
{
- QVBox * page = addVBoxPage( i18n( "Endnotes" ) );
+ TQVBox * page = addVBoxPage( i18n( "Endnotes" ) );
m_endNoteConfig = new KoCounterStyleWidget( false, true/*onlyStyleLetter*/,false, page );
//m_endNoteConfig->numTypeChanged( KoParagCounter::NUM_LIST );
m_endNoteConfig->setCounter (static_cast<KWVariableSettings*>(m_doc->variableCollection()->variableSetting())->endNoteCounter() );
@@ -70,28 +70,28 @@ void KWConfigFootNoteDia::setupTab2()
void KWConfigFootNoteDia::setupTab3()
{
- QFrame * page = addPage( i18n( "Separator Line" ) );
- QString comment= i18n ("Configure the separator line. The separator line "
+ TQFrame * page = addPage( i18n( "Separator Line" ) );
+ TQString comment= i18n ("Configure the separator line. The separator line "
"is drawn directly above the frame for the footnotes.");
- QWhatsThis::add(page, comment);
- QVBoxLayout *pageLayout= new QVBoxLayout( page, 0, KDialog::spacingHint());
+ TQWhatsThis::add(page, comment);
+ TQVBoxLayout *pageLayout= new TQVBoxLayout( page, 0, KDialog::spacingHint());
- QButtonGroup *positionGroupBox = new QButtonGroup( i18n( "Position"), page );
+ TQButtonGroup *positionGroupBox = new TQButtonGroup( i18n( "Position"), page );
comment= i18n ("The separator can be positioned horizontally by picking one "
- "of the three alignments.");
- QWhatsThis::add(positionGroupBox, comment);
+ "of the three tqalignments.");
+ TQWhatsThis::add(positionGroupBox, comment);
positionGroupBox->setColumnLayout(0, Qt::Vertical );
- QVBoxLayout *positionLayout = new QVBoxLayout( positionGroupBox->layout() );
- positionLayout->setAlignment( Qt::AlignTop );
+ TQVBoxLayout *positionLayout = new TQVBoxLayout( positionGroupBox->tqlayout() );
+ positionLayout->tqsetAlignment( TQt::AlignTop );
// i18n context information necessary for gender considerations (e.g. in Polish)
- rbPosLeft = new QRadioButton( i18n("Position", "Left"), positionGroupBox, "rbPosLeft" );
+ rbPosLeft = new TQRadioButton( i18n("Position", "Left"), positionGroupBox, "rbPosLeft" );
positionLayout->addWidget( rbPosLeft );
- rbPosCentered = new QRadioButton( i18n("Position", "Centered"), positionGroupBox, "rbPosCentered" );
+ rbPosCentered = new TQRadioButton( i18n("Position", "Centered"), positionGroupBox, "rbPosCentered" );
positionLayout->addWidget( rbPosCentered );
- rbPosRight = new QRadioButton( i18n("Position", "Right"), positionGroupBox, "rbPosRight" );
+ rbPosRight = new TQRadioButton( i18n("Position", "Right"), positionGroupBox, "rbPosRight" );
positionLayout->addWidget( rbPosRight );
pageLayout->addWidget( positionGroupBox );
switch( m_doc->footNoteSeparatorLinePosition() ) {
@@ -106,43 +106,43 @@ void KWConfigFootNoteDia::setupTab3()
break;
}
- QGridLayout *layout = new QGridLayout( 0, 1, 1, 0, KDialog::spacingHint());
+ TQGridLayout *tqlayout = new TQGridLayout( 0, 1, 1, 0, KDialog::spacingHint());
spWidth = new KoUnitDoubleSpinBox(page, 0, 5, 0.5, m_doc->footNoteSeparatorLineWidth(), m_doc->unit(), 1);
- layout->addWidget( spWidth, 1, 1 );
+ tqlayout->addWidget( spWidth, 1, 1 );
spLength = new KIntNumInput( page, "spLength" );
spLength->setRange( 1, 100, 1,false );
spLength->setValue( m_doc->footNoteSeparatorLineLength());
spLength->setSuffix(i18n(" %"));
- layout->addWidget( spLength, 0, 1 );
+ tqlayout->addWidget( spLength, 0, 1 );
- QLabel *lSize = new QLabel( i18n( "&Width:"), page );
+ TQLabel *lSize = new TQLabel( i18n( "&Width:"), page );
lSize->setBuddy( spWidth );
comment= i18n ("The width is the thickness of the separator line, set to 0 for no separator line.");
- QWhatsThis::add(lSize, comment);
- QWhatsThis::add(spWidth, comment);
- layout->addWidget( lSize, 1, 0 );
+ TQWhatsThis::add(lSize, comment);
+ TQWhatsThis::add(spWidth, comment);
+ tqlayout->addWidget( lSize, 1, 0 );
- QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- layout->addMultiCell( spacer, 0, 1, 2, 2 );
+ TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
+ tqlayout->addMultiCell( spacer, 0, 1, 2, 2 );
- QLabel *lWidth = new QLabel( i18n("&Size on page:"), page, "lWidth" );
+ TQLabel *lWidth = new TQLabel( i18n("&Size on page:"), page, "lWidth" );
lWidth->setBuddy( spLength );
comment= i18n ("The size of the separator line can be defined as a percentage of the width of the page.");
- QWhatsThis::add(spLength, comment);
- QWhatsThis::add(lWidth, comment);
- layout->addWidget( lWidth, 0, 0 );
- pageLayout->addLayout( layout );
+ TQWhatsThis::add(spLength, comment);
+ TQWhatsThis::add(lWidth, comment);
+ tqlayout->addWidget( lWidth, 0, 0 );
+ pageLayout->addLayout( tqlayout );
- QHBoxLayout *styleLayout = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "styleLayout");
+ TQHBoxLayout *styleLayout = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "styleLayout");
- QLabel *styleLabel = new QLabel( i18n("Style:"), page );
+ TQLabel *styleLabel = new TQLabel( i18n("Style:"), page );
styleLayout->addWidget( styleLabel );
- m_cbLineType = new QComboBox( page );
- QStringList lst;
+ m_cbLineType = new TQComboBox( page );
+ TQStringList lst;
lst <<i18n("Solid");
lst <<i18n("Dash Line");
lst <<i18n("Dot Line");
@@ -152,14 +152,14 @@ void KWConfigFootNoteDia::setupTab3()
m_cbLineType->setCurrentItem( static_cast<int>(m_doc->footNoteSeparatorLineType()));
comment= i18n ("The separator line can be drawn as a solid line or as a line which has a "
"pattern; the pattern can be set in the style-type.");
- QWhatsThis::add(styleLabel, comment);
- QWhatsThis::add(m_cbLineType, comment);
+ TQWhatsThis::add(styleLabel, comment);
+ TQWhatsThis::add(m_cbLineType, comment);
styleLayout->addWidget( m_cbLineType );
- QSpacerItem* spacer_2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer_2 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
styleLayout->addItem( spacer_2 );
pageLayout->addLayout( styleLayout );
- QSpacerItem* spacer_3 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ TQSpacerItem* spacer_3 = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
pageLayout->addItem( spacer_3 );
}
diff --git a/kword/KWConfigFootNoteDia.h b/kword/KWConfigFootNoteDia.h
index 7ec62eb4..1b08765b 100644
--- a/kword/KWConfigFootNoteDia.h
+++ b/kword/KWConfigFootNoteDia.h
@@ -23,18 +23,19 @@
#include <kdialogbase.h>
class KWDocument;
-class QWidget;
+class TQWidget;
class KoCounterStyleWidget;
-class QRadioButton;
+class TQRadioButton;
class KIntNumInput;
-class QComboBox;
+class TQComboBox;
class KoUnitDoubleSpinBox;
class KWConfigFootNoteDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWConfigFootNoteDia( QWidget *parent, const char *name, KWDocument *doc );
+ KWConfigFootNoteDia( TQWidget *tqparent, const char *name, KWDocument *doc );
protected:
void setupTab1();
void setupTab2();
@@ -43,12 +44,12 @@ private:
KoCounterStyleWidget *m_footNoteConfig;
KoCounterStyleWidget *m_endNoteConfig;
KWDocument *m_doc;
- QRadioButton *rbPosLeft;
- QRadioButton *rbPosCentered;
- QRadioButton *rbPosRight;
+ TQRadioButton *rbPosLeft;
+ TQRadioButton *rbPosCentered;
+ TQRadioButton *rbPosRight;
KIntNumInput *spLength;
KoUnitDoubleSpinBox *spWidth;
- QComboBox *m_cbLineType;
+ TQComboBox *m_cbLineType;
protected slots:
virtual void slotOk();
};
diff --git a/kword/KWCreateBookmarkDia.cpp b/kword/KWCreateBookmarkDia.cpp
index 2bc3a1c7..19089366 100644
--- a/kword/KWCreateBookmarkDia.cpp
+++ b/kword/KWCreateBookmarkDia.cpp
@@ -19,11 +19,11 @@
#include <klocale.h>
#include "KWDocument.h"
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
#include <kmessagebox.h>
#include "KWCommand.h"
#include "KWCreateBookmarkDia.h"
@@ -31,16 +31,16 @@
#include "KWFrame.h"
#include "KWFrameSet.h"
-KWCreateBookmarkDia::KWCreateBookmarkDia( const QStringList & _list, QWidget *parent, const char *name )
- : KDialogBase( parent, name , true, "", Ok|Cancel, Ok, true )
+KWCreateBookmarkDia::KWCreateBookmarkDia( const TQStringList & _list, TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name , true, "", Ok|Cancel, Ok, true )
{
setCaption( i18n("Create New Bookmark") );
listBookMark = _list;
init();
}
-KWCreateBookmarkDia::KWCreateBookmarkDia( const QStringList & _list, const QString & _name, QWidget *parent, const char *name )
- : KDialogBase( parent, name , true, "", Ok|Cancel, Ok, true )
+KWCreateBookmarkDia::KWCreateBookmarkDia( const TQStringList & _list, const TQString & _name, TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name , true, "", Ok|Cancel, Ok, true )
{
setCaption( i18n("Rename Bookmark") );
listBookMark = _list;
@@ -53,14 +53,14 @@ void KWCreateBookmarkDia::init()
KWCreateBookmarkDiaBase *dia = new KWCreateBookmarkDiaBase( this );
m_bookmarkName = dia->m_bookmarkName;
enableButtonOK( false );
- connect( m_bookmarkName, SIGNAL(textChanged ( const QString & )), this, SLOT(nameChanged( const QString &)));
+ connect( m_bookmarkName, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(nameChanged( const TQString &)));
setMainWidget( dia );
m_bookmarkName->setFocus();
}
void KWCreateBookmarkDia::slotOk()
{
- if ( listBookMark.findIndex(m_bookmarkName->text() ) != -1 )
+ if ( listBookMark.tqfindIndex(m_bookmarkName->text() ) != -1 )
{
KMessageBox::error(this, i18n("That name already exists, please choose another name."));
}
@@ -68,43 +68,43 @@ void KWCreateBookmarkDia::slotOk()
KDialogBase::slotOk();
}
-QString KWCreateBookmarkDia::bookmarkName()const
+TQString KWCreateBookmarkDia::bookmarkName()const
{
return m_bookmarkName->text();
}
-void KWCreateBookmarkDia::nameChanged( const QString &text)
+void KWCreateBookmarkDia::nameChanged( const TQString &text)
{
enableButtonOK( !text.isEmpty() );
}
/* **************************** */
-KWSelectBookmarkDia::KWSelectBookmarkDia( const QStringList & _list, KWDocument *_doc, QWidget *parent, const char *name )
- : KDialogBase( parent, name , true, "", Ok|Cancel, Ok, true )
+KWSelectBookmarkDia::KWSelectBookmarkDia( const TQStringList & _list, KWDocument *_doc, TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name , true, "", Ok|Cancel, Ok, true )
{
m_doc=_doc;
setCaption( i18n("Select Bookmark") );
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QGridLayout * grid = new QGridLayout(page, 5, 2, KDialog::marginHint(), KDialog::spacingHint());
- m_bookmarkList = new QListBox( page );
+ TQGridLayout * grid = new TQGridLayout(page, 5, 2, KDialog::marginHint(), KDialog::spacingHint());
+ m_bookmarkList = new TQListBox( page );
grid->addMultiCellWidget(m_bookmarkList, 0, 4, 0, 0);
m_bookmarkList->insertStringList(_list);
- connect(m_bookmarkList, SIGNAL( selectionChanged ()), this, SLOT(slotSelectionChanged()));
- connect(m_bookmarkList, SIGNAL(doubleClicked ( QListBoxItem * )), this, SLOT(slotOk()));
- connect(m_bookmarkList, SIGNAL(returnPressed ( QListBoxItem * )), this, SLOT(slotOk()));
+ connect(m_bookmarkList, TQT_SIGNAL( selectionChanged ()), this, TQT_SLOT(slotSelectionChanged()));
+ connect(m_bookmarkList, TQT_SIGNAL(doubleClicked ( TQListBoxItem * )), this, TQT_SLOT(slotOk()));
+ connect(m_bookmarkList, TQT_SIGNAL(returnPressed ( TQListBoxItem * )), this, TQT_SLOT(slotOk()));
- m_pbRename = new QPushButton( i18n("Rename Bookmark"), page );
+ m_pbRename = new TQPushButton( i18n("Rename Bookmark"), page );
grid->addWidget( m_pbRename, 0, 1);
- connect( m_pbRename, SIGNAL(clicked()), this, SLOT(slotRenameBookmark()));
+ connect( m_pbRename, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRenameBookmark()));
- m_pbDelete = new QPushButton( i18n("Delete Bookmark"), page );
+ m_pbDelete = new TQPushButton( i18n("Delete Bookmark"), page );
grid->addWidget( m_pbDelete, 1, 1);
- connect( m_pbDelete, SIGNAL(clicked()), this, SLOT(slotDeleteBookmark()));
+ connect( m_pbDelete, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteBookmark()));
m_bookmarkList->setFocus();
slotSelectionChanged();
@@ -112,15 +112,15 @@ KWSelectBookmarkDia::KWSelectBookmarkDia( const QStringList & _list, KWDocument
void KWSelectBookmarkDia::slotRenameBookmark()
{
- QString tmp =m_bookmarkList->currentText();
+ TQString tmp =m_bookmarkList->currentText();
if ( tmp.isEmpty() )
return;
//all bookmark name
- QStringList lst =m_doc->listOfBookmarkName(0L);
+ TQStringList lst =m_doc->listOfBookmarkName(0L);
lst.remove( tmp );
KWCreateBookmarkDia dia( lst, tmp, this, 0 );
if ( dia.exec() ) {
- QString newName = dia.bookmarkName();
+ TQString newName = dia.bookmarkName();
KWRenameBookmarkCommand *cmd = new KWRenameBookmarkCommand( i18n("Rename Bookmark"), tmp, newName, m_doc);
m_doc->addCommand( cmd );
cmd->execute();
@@ -130,7 +130,7 @@ void KWSelectBookmarkDia::slotRenameBookmark()
void KWSelectBookmarkDia::slotDeleteBookmark()
{
- QString tmp =m_bookmarkList->currentText();
+ TQString tmp =m_bookmarkList->currentText();
if ( !tmp.isEmpty())
{
m_doc->deleteBookmark(tmp);
@@ -139,7 +139,7 @@ void KWSelectBookmarkDia::slotDeleteBookmark()
}
-QString KWSelectBookmarkDia::bookmarkSelected()const
+TQString KWSelectBookmarkDia::bookmarkSelected()const
{
return m_bookmarkList->currentText();
}
diff --git a/kword/KWCreateBookmarkDia.h b/kword/KWCreateBookmarkDia.h
index cd5f732c..a18d1aca 100644
--- a/kword/KWCreateBookmarkDia.h
+++ b/kword/KWCreateBookmarkDia.h
@@ -21,45 +21,47 @@
#define __KWCreateBookmarkDia__
#include <kdialogbase.h>
-#include <qstringlist.h>
-class QLineEdit;
-class QListBox;
+#include <tqstringlist.h>
+class TQLineEdit;
+class TQListBox;
class KWDocument;
-class QPushButton;
+class TQPushButton;
class KWCreateBookmarkDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWCreateBookmarkDia( const QStringList & _list, QWidget *parent, const char *name );
- KWCreateBookmarkDia( const QStringList & _list, const QString & _name, QWidget *parent, const char *name );
- QString bookmarkName()const;
+ KWCreateBookmarkDia( const TQStringList & _list, TQWidget *tqparent, const char *name );
+ KWCreateBookmarkDia( const TQStringList & _list, const TQString & _name, TQWidget *tqparent, const char *name );
+ TQString bookmarkName()const;
protected slots:
virtual void slotOk();
- void nameChanged( const QString &text);
+ void nameChanged( const TQString &text);
protected:
void init();
- QStringList listBookMark;
- QLineEdit *m_bookmarkName;
+ TQStringList listBookMark;
+ TQLineEdit *m_bookmarkName;
};
class KWSelectBookmarkDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWSelectBookmarkDia( const QStringList & _list, KWDocument *_doc, QWidget *parent, const char *name );
- QString bookmarkSelected()const;
+ KWSelectBookmarkDia( const TQStringList & _list, KWDocument *_doc, TQWidget *tqparent, const char *name );
+ TQString bookmarkSelected()const;
protected slots:
void slotSelectionChanged();
void slotRenameBookmark();
void slotDeleteBookmark();
private:
- QListBox *m_bookmarkList;
+ TQListBox *m_bookmarkList;
KWDocument *m_doc;
- QPushButton *m_pbDelete;
- QPushButton *m_pbRename;
+ TQPushButton *m_pbDelete;
+ TQPushButton *m_pbRename;
};
#endif
diff --git a/kword/KWCreateBookmarkDiaBase.ui b/kword/KWCreateBookmarkDiaBase.ui
index 08c7b05d..872c0d8b 100644
--- a/kword/KWCreateBookmarkDiaBase.ui
+++ b/kword/KWCreateBookmarkDiaBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>KWCreateBookmarkDiaBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>createBookmarkDia</cstring>
</property>
@@ -19,15 +19,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>lName</cstring>
</property>
@@ -35,14 +35,14 @@
<string>Name:</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>m_bookmarkName</cstring>
</property>
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>lExplain</cstring>
</property>
@@ -53,5 +53,5 @@ Please provide the name of your bookmark.</string>
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="6"/>
+<tqlayoutdefaults spacing="6" margin="6"/>
</UI>
diff --git a/kword/KWDeleteDia.cpp b/kword/KWDeleteDia.cpp
index ab447cc6..cb64b61b 100644
--- a/kword/KWDeleteDia.cpp
+++ b/kword/KWDeleteDia.cpp
@@ -23,17 +23,17 @@
#include "KWView.h"
#include <klocale.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
-KWDeleteDia::KWDeleteDia( KWView *parent, KWTableFrameSet *table, DeleteType type, QValueList<uint> remove)
- : KDialogBase( Plain, (type==deleteRow?i18n("Delete Row") : i18n("Delete Column")), Ok | Cancel, Ok, parent, "Delete Table items dialog", true )
+KWDeleteDia::KWDeleteDia( KWView *tqparent, KWTableFrameSet *table, DeleteType type, TQValueList<uint> remove)
+ : KDialogBase( Plain, (type==deleteRow?i18n("Delete Row") : i18n("Delete Column")), Ok | Cancel, Ok, tqparent, "Delete Table items dialog", true )
{
Q_ASSERT(type == deleteRow || type == deleteColumn);
m_type = type;
m_table = table;
m_toRemove = remove;
- m_view = parent;
+ m_view = tqparent;
setupTab1();
setButtonOK( KGuiItem(
@@ -43,12 +43,12 @@ KWDeleteDia::KWDeleteDia( KWView *parent, KWTableFrameSet *table, DeleteType typ
}
void KWDeleteDia::setupTab1() {
- QWidget *tab1 = plainPage();
- QGridLayout *grid1 = new QGridLayout( tab1, 4, 1, 0, spacingHint() );
+ TQWidget *tab1 = plainPage();
+ TQGridLayout *grid1 = new TQGridLayout( tab1, 4, 1, 0, spacingHint() );
unsigned int count = m_toRemove.count();
Q_ASSERT(count > 0);
- QString message;
+ TQString message;
if ( count == ( (m_type == deleteRow) ? m_table->getRows() : m_table->getColumns() ) )
// all the columns are selected and the user asked to remove columns or the same with rows
// => we want to delete the whole table
@@ -58,24 +58,24 @@ void KWDeleteDia::setupTab1() {
message = m_type == deleteRow ? i18n("Delete all selected rows?") : i18n("Delete all selected cells?");
else if ( count == 1 ) {
message = m_type == deleteRow ? i18n( "Delete row number %1?" ) : i18n( "Delete column number %1?" );
- message = message.arg( m_toRemove.first() + 1 ); // +1 because humans count from 1
+ message = message.tqarg( m_toRemove.first() + 1 ); // +1 because humans count from 1
}
else {
message = m_type == deleteRow ? i18n( "Delete rows: %1 ?" ) : i18n( "Delete columns: %1 ?" );
- QValueListIterator<uint> items = m_toRemove.begin();
- QString rows;
+ TQValueListIterator<uint> items = m_toRemove.begin();
+ TQString rows;
for(;items != m_toRemove.end(); ++items) {
if(! rows.isEmpty())
rows += ", ";
- rows += QString().setNum((*items) +1);
+ rows += TQString().setNum((*items) +1);
}
- message = message.arg( rows );
+ message = message.tqarg( rows );
}
- QLabel *rc = new QLabel( message , tab1 );
- rc->resize( rc->sizeHint() );
- rc->setAlignment( AlignLeft | AlignBottom );
+ TQLabel *rc = new TQLabel( message , tab1 );
+ rc->resize( rc->tqsizeHint() );
+ rc->tqsetAlignment( AlignLeft | AlignBottom );
grid1->addWidget( rc, 1, 0 );
}
diff --git a/kword/KWDeleteDia.h b/kword/KWDeleteDia.h
index 9a2ad6d5..e2ce9ff4 100644
--- a/kword/KWDeleteDia.h
+++ b/kword/KWDeleteDia.h
@@ -33,19 +33,20 @@ class KWView;
class KWDeleteDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum DeleteType {deleteRow, deleteColumn};
/**
* Constructor for the ok-to-delete dialog.
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param name the internal name for the widget
* @param table the table the rows or columns are to be deleted from
* @param type the type of dialog this should become, either deleteRow or deleteColumn
* @param remove a list of all the rows or columns that should be deleted.
*/
- KWDeleteDia( KWView *parent, KWTableFrameSet *table, DeleteType type, QValueList<uint> remove);
+ KWDeleteDia( KWView *tqparent, KWTableFrameSet *table, DeleteType type, TQValueList<uint> remove);
protected:
void setupTab1();
@@ -54,7 +55,7 @@ protected:
KWTableFrameSet *m_table;
DeleteType m_type;
- QValueList<uint> m_toRemove;
+ TQValueList<uint> m_toRemove;
protected slots:
virtual void slotOk();
diff --git a/kword/KWDocStruct.cpp b/kword/KWDocStruct.cpp
index f32e4181..62925918 100644
--- a/kword/KWDocStruct.cpp
+++ b/kword/KWDocStruct.cpp
@@ -44,7 +44,7 @@
#include <ktoolbar.h>
#include <ktoolbarbutton.h>
-#include <qlayout.h>
+#include <tqlayout.h>
/******************************************************************/
/* Class: KWOrderedFrameSet */
@@ -74,18 +74,18 @@ bool KWOrderedFrameSet::operator<( KWOrderedFrameSet ofs )
/* Class: KWDocDocListViewItem */
/******************************************************************/
-KWDocListViewItem::KWDocListViewItem(QListViewItem* parent, const QString& text)
- : KListViewItem(parent, text)
+KWDocListViewItem::KWDocListViewItem(TQListViewItem* tqparent, const TQString& text)
+ : KListViewItem(tqparent, text)
{
}
-KWDocListViewItem::KWDocListViewItem(QListViewItem* parent, QListViewItem* after, const QString& text )
- :KListViewItem(parent, after, text)
+KWDocListViewItem::KWDocListViewItem(TQListViewItem* tqparent, TQListViewItem* after, const TQString& text )
+ :KListViewItem(tqparent, after, text)
{
}
-KWDocListViewItem::KWDocListViewItem(QListView* parent, const QString& text)
- :KListViewItem(parent, text)
+KWDocListViewItem::KWDocListViewItem(TQListView* tqparent, const TQString& text)
+ :KListViewItem(tqparent, text)
{
}
@@ -93,8 +93,8 @@ void KWDocListViewItem::deleteAllChildren()
{
if ( childCount() > 0 )
{
- QListViewItem *child = firstChild();
- QListViewItem *delChild;
+ TQListViewItem *child = firstChild();
+ TQListViewItem *delChild;
while( child )
{
@@ -120,18 +120,18 @@ KWGUI* KWDocListViewItem::gui()
/* Class: KWDocStructParagItem */
/******************************************************************/
-KWDocStructParagItem::KWDocStructParagItem(QListViewItem* parent, const QString& text, KWTextParag* parag )
- : KWDocListViewItem(parent, text), m_parag(parag)
+KWDocStructParagItem::KWDocStructParagItem(TQListViewItem* tqparent, const TQString& text, KWTextParag* parag )
+ : KWDocListViewItem(tqparent, text), m_parag(parag)
{
}
-KWDocStructParagItem::KWDocStructParagItem(QListViewItem* parent, QListViewItem* after,
- const QString& text, KWTextParag* parag )
- : KWDocListViewItem(parent, after, text), m_parag(parag)
+KWDocStructParagItem::KWDocStructParagItem(TQListViewItem* tqparent, TQListViewItem* after,
+ const TQString& text, KWTextParag* parag )
+ : KWDocListViewItem(tqparent, after, text), m_parag(parag)
{
}
-void KWDocStructParagItem::contextMenu(QListViewItem* item, const QPoint& p, int )
+void KWDocStructParagItem::contextMenu(TQListViewItem* item, const TQPoint& p, int )
{
if (item == this)
{
@@ -143,10 +143,10 @@ void KWDocStructParagItem::contextMenu(QListViewItem* item, const QPoint& p, int
void KWDocStructParagItem::selectItem()
{
KWTextFrameSet* fs = m_parag->kwTextDocument()->textFrameSet();
- QPoint iPoint = m_parag->rect().topLeft(); // small bug if a paragraph is cut between two pages.
+ TQPoint iPoint = m_parag->rect().topLeft(); // small bug if a paragraph is cut between two pages.
KoPoint dPoint;
fs->internalToDocument(iPoint, dPoint);
- QPoint nPoint = fs->kWordDocument()->zoomPoint(dPoint);
+ TQPoint nPoint = fs->kWordDocument()->zoomPoint(dPoint);
gui()->canvasWidget()->scrollToOffset(fs->kWordDocument()->unzoomPoint(nPoint));
}
@@ -169,7 +169,7 @@ void KWDocStructParagItem::editProperties()
void KWDocStructParagItem::speakItem()
{
- QString text;
+ TQString text;
KoParagCounter* tmpCounter = m_parag->counter();
if (tmpCounter)
text = tmpCounter->text(m_parag) + " ";
@@ -185,22 +185,22 @@ void KWDocStructParagItem::speakItem()
/* Class: KWDocStructTextFrameItem */
/******************************************************************/
-KWDocStructTextFrameItem::KWDocStructTextFrameItem(QListViewItem* parent, const QString& text,
+KWDocStructTextFrameItem::KWDocStructTextFrameItem(TQListViewItem* tqparent, const TQString& text,
KWTextFrameSet* frameset, KWFrame* frame)
- : KWDocListViewItem(parent, text), m_frame(frame), m_frameset(frameset)
+ : KWDocListViewItem(tqparent, text), m_frame(frame), m_frameset(frameset)
{
}
-KWDocStructTextFrameItem::KWDocStructTextFrameItem(QListViewItem* parent, QListViewItem* after,
- const QString& text, KWTextFrameSet* frameset, KWFrame* frame)
- : KWDocListViewItem(parent, after, text), m_frame(frame), m_frameset(frameset)
+KWDocStructTextFrameItem::KWDocStructTextFrameItem(TQListViewItem* tqparent, TQListViewItem* after,
+ const TQString& text, KWTextFrameSet* frameset, KWFrame* frame)
+ : KWDocListViewItem(tqparent, after, text), m_frame(frame), m_frameset(frameset)
{
}
void KWDocStructTextFrameItem::setupTextParags()
{
// Build a list of pointers to paragraphs.
- QPtrList<KWTextParag> paragPtrs;
+ TQPtrList<KWTextParag> paragPtrs;
paragPtrs.setAutoDelete(false);
KoTextParag* textParag = 0;
KoTextParag* lastParag = 0;
@@ -218,7 +218,7 @@ void KWDocStructTextFrameItem::setupTextParags()
KWTextParag* parag = dynamic_cast<KWTextParag *>(textParag);
if (parag) {
// Don't display an empty paragraph.
- QString text = parag->toString().stripWhiteSpace();
+ TQString text = parag->toString().stripWhiteSpace();
if ( text.length() > 0)
paragPtrs.append(parag);
}
@@ -235,15 +235,15 @@ void KWDocStructTextFrameItem::setupTextParags()
while (item) {
delItem = item;
item = dynamic_cast<KWDocStructParagItem *>(item->nextSibling());
- if (paragPtrs.containsRef(delItem->parag()) == 0) delete delItem;
+ if (paragPtrs.tqcontainsRef(delItem->parag()) == 0) delete delItem;
}
// Add new paragraphs to the list or update existing ones.
KWDocStructParagItem* after = 0;
for (uint j = 0; j < paragPtrs.count(); j++) {
KWTextParag* parag = paragPtrs.at(j);
- QString text = parag->toString().stripWhiteSpace();
- QString name = text.left(20);
+ TQString text = parag->toString().stripWhiteSpace();
+ TQString name = text.left(20);
KoParagCounter* tmpCounter = parag->counter();
if (tmpCounter)
name.prepend(tmpCounter->text(parag) + " ");
@@ -260,7 +260,7 @@ void KWDocStructTextFrameItem::setupTextParags()
}
}
-void KWDocStructTextFrameItem::contextMenu(QListViewItem* item, const QPoint& p, int )
+void KWDocStructTextFrameItem::contextMenu(TQListViewItem* item, const TQPoint& p, int )
{
if (item == this)
gui()->getView()->openDocStructurePopupMenu(p, m_frameset, 0);
@@ -310,7 +310,7 @@ void KWDocStructTextFrameItem::speakItem()
KWTextParag* parag = dynamic_cast<KWTextParag *>(textParag);
if (parag) {
// Don't speak an empty paragraph.
- QString text = parag->toString().stripWhiteSpace();
+ TQString text = parag->toString().stripWhiteSpace();
if ( text.length() > 0) {
kospeaker->queueSpeech(text, parag->paragraphFormat()->language(), first);
first = false;
@@ -329,7 +329,7 @@ KWDocStructParagItem* KWDocStructTextFrameItem::findTextParagItem(const KWTextPa
{
if ( childCount() > 0 )
{
- QListViewItem *child = firstChild();
+ TQListViewItem *child = firstChild();
while( child )
{
if (dynamic_cast<KWDocStructParagItem *>(child)->parag() == parag)
@@ -345,15 +345,15 @@ KWDocStructParagItem* KWDocStructTextFrameItem::findTextParagItem(const KWTextPa
/* Class: KWDocStructTextFrameSetItem */
/******************************************************************/
-KWDocStructTextFrameSetItem::KWDocStructTextFrameSetItem(QListViewItem* parent, const QString& text,
+KWDocStructTextFrameSetItem::KWDocStructTextFrameSetItem(TQListViewItem* tqparent, const TQString& text,
KWTextFrameSet* frameset)
- : KWDocListViewItem(parent, text ), m_frameset(frameset)
+ : KWDocListViewItem(tqparent, text ), m_frameset(frameset)
{
}
-KWDocStructTextFrameSetItem::KWDocStructTextFrameSetItem(QListViewItem* parent, QListViewItem* after,
- const QString& text, KWTextFrameSet* frameset)
- : KWDocListViewItem(parent, after, text), m_frameset(frameset)
+KWDocStructTextFrameSetItem::KWDocStructTextFrameSetItem(TQListViewItem* tqparent, TQListViewItem* after,
+ const TQString& text, KWTextFrameSet* frameset)
+ : KWDocListViewItem(tqparent, after, text), m_frameset(frameset)
{
}
@@ -361,7 +361,7 @@ void KWDocStructTextFrameSetItem::setupTextFrames()
{
// TODO: KWTextFrameSet::frame() method returns frames in screen order?
// Build a list of frame pointers.
- QPtrList<KWFrame> framePtrs;
+ TQPtrList<KWFrame> framePtrs;
framePtrs.setAutoDelete(false);
for (uint j = 0; j < m_frameset->frameCount(); j++)
framePtrs.append(m_frameset->frame(j));
@@ -372,7 +372,7 @@ void KWDocStructTextFrameSetItem::setupTextFrames()
while (item) {
delItem = item;
item = dynamic_cast<KWDocStructTextFrameItem *>(item->nextSibling());
- if (framePtrs.containsRef(delItem->frame()) == 0) delete delItem;
+ if (framePtrs.tqcontainsRef(delItem->frame()) == 0) delete delItem;
}
// Add new frames to the list or update existing ones.
@@ -381,16 +381,16 @@ void KWDocStructTextFrameSetItem::setupTextFrames()
for (uint j = 0; j < framePtrs.count(); j++)
{
KWFrame* frame = framePtrs.at(j);
- QString name;
- if ( KListViewItem::parent()->firstChild() == this && dok->processingType() == KWDocument::WP )
+ TQString name;
+ if ( KListViewItem::tqparent()->firstChild() == this && dok->processingType() == KWDocument::WP )
{
if ( dok->numColumns() == 1 )
- name=i18n( "Page %1" ).arg(QString::number(j + 1));
+ name=i18n( "Page %1" ).tqarg(TQString::number(j + 1));
else
- name=i18n( "Column %1" ).arg(QString::number(j + 1));
+ name=i18n( "Column %1" ).tqarg(TQString::number(j + 1));
}
else
- name=i18n( "Text Frame %1" ).arg(QString::number(j + 1));
+ name=i18n( "Text Frame %1" ).tqarg(TQString::number(j + 1));
KWDocStructTextFrameItem* child = findTextFrameItem(frame);
if (child)
child->setText(0, name);
@@ -405,7 +405,7 @@ void KWDocStructTextFrameSetItem::setupTextFrames()
}
}
-void KWDocStructTextFrameSetItem::contextMenu(QListViewItem* item, const QPoint& p, int )
+void KWDocStructTextFrameSetItem::contextMenu(TQListViewItem* item, const TQPoint& p, int )
{
if (item == this)
gui()->getView()->openDocStructurePopupMenu(p, m_frameset, 0);
@@ -447,7 +447,7 @@ KWDocStructTextFrameItem* KWDocStructTextFrameSetItem::findTextFrameItem(const K
{
if ( childCount() > 0 )
{
- QListViewItem *child = firstChild();
+ TQListViewItem *child = firstChild();
while( child )
{
if (dynamic_cast<KWDocStructTextFrameItem *>(child)->frame() == frame)
@@ -463,15 +463,15 @@ KWDocStructTextFrameItem* KWDocStructTextFrameSetItem::findTextFrameItem(const K
/* Class: KWDocStructTableItem */
/******************************************************************/
-KWDocStructTableItem::KWDocStructTableItem(QListViewItem* parent, const QString& text,
+KWDocStructTableItem::KWDocStructTableItem(TQListViewItem* tqparent, const TQString& text,
KWTableFrameSet* table)
- :KWDocListViewItem(parent, text), m_table(table)
+ :KWDocListViewItem(tqparent, text), m_table(table)
{
}
-KWDocStructTableItem::KWDocStructTableItem(QListViewItem* parent, QListViewItem* after,
- const QString& text, KWTableFrameSet* table)
- :KWDocListViewItem(parent, after, text), m_table(table)
+KWDocStructTableItem::KWDocStructTableItem(TQListViewItem* tqparent, TQListViewItem* after,
+ const TQString& text, KWTableFrameSet* table)
+ :KWDocListViewItem(tqparent, after, text), m_table(table)
{
}
@@ -479,7 +479,7 @@ void KWDocStructTableItem::setupCells()
{
// TODO: KWTableFrameSet::cell() method returns cells in screen order?
// Build a list of cell pointers.
- QPtrList<KWTextFrameSet> cellPtrs;
+ TQPtrList<KWTextFrameSet> cellPtrs;
cellPtrs.setAutoDelete(false);
for (uint row = 0; row < m_table->getRows(); ++row)
for (uint col = 0; col < m_table->getColumns(); ++ col) {
@@ -494,7 +494,7 @@ void KWDocStructTableItem::setupCells()
while (item) {
delItem = item;
item = dynamic_cast<KWDocStructTextFrameItem *>(item->nextSibling());
- if (cellPtrs.containsRef(delItem->frameSet()) == 0) delete delItem;
+ if (cellPtrs.tqcontainsRef(delItem->frameSet()) == 0) delete delItem;
}
// Add new cells to the list or update existing ones.
@@ -507,7 +507,7 @@ void KWDocStructTableItem::setupCells()
KWTextFrameSet* cell = cellPtrs.at(j);
KWFrame* frame = cell->frame(0);
if (frame) {
- QString name = cell->name();
+ TQString name = cell->name();
child = findCellItem(cell);
if (child)
child->setText(0, name);
@@ -523,7 +523,7 @@ void KWDocStructTableItem::setupCells()
}
}
-void KWDocStructTableItem::contextMenu(QListViewItem* item, const QPoint& p, int )
+void KWDocStructTableItem::contextMenu(TQListViewItem* item, const TQPoint& p, int )
{
if (item == this)
gui()->getView()->openDocStructurePopupMenu(p, m_table, 0);
@@ -573,7 +573,7 @@ KWDocStructTextFrameItem* KWDocStructTableItem::findCellItem(const KWTextFrameSe
{
if ( childCount() > 0 )
{
- QListViewItem *child = firstChild();
+ TQListViewItem *child = firstChild();
while( child )
{
if (dynamic_cast<KWDocStructTextFrameItem *>(child)->frameSet() == cell)
@@ -589,13 +589,13 @@ KWDocStructTextFrameItem* KWDocStructTableItem::findCellItem(const KWTextFrameSe
/* Class: KWDocStructPictureItem */
/******************************************************************/
-KWDocStructPictureItem::KWDocStructPictureItem(QListViewItem* parent, const QString& text,
+KWDocStructPictureItem::KWDocStructPictureItem(TQListViewItem* tqparent, const TQString& text,
KWPictureFrameSet* pic)
- : KWDocListViewItem(parent, text), m_pic(pic)
+ : KWDocListViewItem(tqparent, text), m_pic(pic)
{
}
-void KWDocStructPictureItem::contextMenu(QListViewItem* item, const QPoint& p, int )
+void KWDocStructPictureItem::contextMenu(TQListViewItem* item, const TQPoint& p, int )
{
if (item == this)
gui()->getView()->openDocStructurePopupMenu(p, m_pic, 0);
@@ -629,13 +629,13 @@ void KWDocStructPictureItem::editProperties()
/* Class: KWDocStructFormulaItem */
/******************************************************************/
-KWDocStructFormulaItem::KWDocStructFormulaItem(QListViewItem* parent, const QString& text,
+KWDocStructFormulaItem::KWDocStructFormulaItem(TQListViewItem* tqparent, const TQString& text,
KWFormulaFrameSet* form)
- : KWDocListViewItem(parent, text), m_form(form)
+ : KWDocListViewItem(tqparent, text), m_form(form)
{
}
-void KWDocStructFormulaItem::contextMenu(QListViewItem* item, const QPoint& p, int )
+void KWDocStructFormulaItem::contextMenu(TQListViewItem* item, const TQPoint& p, int )
{
if (item == this)
gui()->getView()->openDocStructurePopupMenu(p, m_form, 0);
@@ -675,13 +675,13 @@ void KWDocStructFormulaItem::speakItem()
/* Class: KWDocStructPartItem */
/******************************************************************/
-KWDocStructPartItem::KWDocStructPartItem(QListViewItem* parent, const QString& text,
+KWDocStructPartItem::KWDocStructPartItem(TQListViewItem* tqparent, const TQString& text,
KWPartFrameSet* part)
- : KWDocListViewItem(parent, text), m_part(part)
+ : KWDocListViewItem(tqparent, text), m_part(part)
{
}
-void KWDocStructPartItem::contextMenu(QListViewItem* item, const QPoint& p, int )
+void KWDocStructPartItem::contextMenu(TQListViewItem* item, const TQPoint& p, int )
{
if (item == this)
gui()->getView()->openDocStructurePopupMenu(p, m_part, 0);
@@ -715,9 +715,9 @@ void KWDocStructPartItem::editProperties()
/* Class: KWDocStructRootItem */
/******************************************************************/
-KWDocStructRootItem::KWDocStructRootItem(QListView* parent, const QString& text,
+KWDocStructRootItem::KWDocStructRootItem(TQListView* tqparent, const TQString& text,
TypeStructDocItem type )
- : KWDocListViewItem(parent, text), m_type(type)
+ : KWDocListViewItem(tqparent, text), m_type(type)
{
switch ( type ) {
case Arrangement: {
@@ -767,14 +767,14 @@ void KWDocStructRootItem::setOpen(bool o)
break;
}
}
- QListViewItem::setOpen(o);
+ TQListViewItem::setOpen(o);
}
void KWDocStructRootItem::setupArrangement()
{
deleteAllChildren();
- QIntDict<KWDocStructParagItem> parags;
+ TQIntDict<KWDocStructParagItem> parags;
parags.setAutoDelete( false );
KWFrameSet* frameset = 0L;
@@ -783,7 +783,7 @@ void KWDocStructRootItem::setupArrangement()
KWDocument* dok = doc();
KWDocStructTextFrameSetItem *item = 0L;
- QString _name;
+ TQString _name;
for ( int i = dok->frameSetCount() - 1; i >= 0; i-- )
{
@@ -803,18 +803,18 @@ void KWDocStructRootItem::setupArrangement()
if ( _depth == 0 )
{
if ( item->childCount() == 0 )
- parags.replace( _depth, new KWDocStructParagItem( item,QString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ),parag) );
+ parags.tqreplace( _depth, new KWDocStructParagItem( item,TQString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ),parag) );
else
- parags.replace( _depth, new KWDocStructParagItem( item, parags[ _depth ],QString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ),parag) );
+ parags.tqreplace( _depth, new KWDocStructParagItem( item, parags[ _depth ],TQString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ),parag) );
}
else
{
if (parags[ _depth - 1 ]==0)
- parags.replace( _depth, new KWDocStructParagItem( item,QString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ), parag) );
+ parags.tqreplace( _depth, new KWDocStructParagItem( item,TQString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ), parag) );
else if ( parags[ _depth - 1 ]->childCount() == 0 )
- parags.replace( _depth, new KWDocStructParagItem( parags[ _depth - 1 ],QString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ), parag) );
+ parags.tqreplace( _depth, new KWDocStructParagItem( parags[ _depth - 1 ],TQString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ), parag) );
else
- parags.replace( _depth, new KWDocStructParagItem( parags[ _depth - 1 ], parags[ _depth ],QString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ), parag) );
+ parags.tqreplace( _depth, new KWDocStructParagItem( parags[ _depth - 1 ], parags[ _depth ],TQString( tmpCounter->text(parag) + " " +parag->string()->toString().mid( 0, parag->string()->length() ) ), parag) );
}
}
parag = static_cast<KWTextParag *>(parag->next());
@@ -831,12 +831,12 @@ void KWDocStructRootItem::setupTextFrameSets()
{
// Delete Empty item from list.
- QListViewItem* lvItem = firstChild();
+ TQListViewItem* lvItem = firstChild();
if (lvItem && (lvItem->text(0) == i18n("Empty"))) delete lvItem;
// Build a list of framesets ordered by their screen position (top left corner).
KWDocument* dok = doc();
- QValueList<KWOrderedFrameSet> orderedFrameSets;
+ TQValueList<KWOrderedFrameSet> orderedFrameSets;
for ( int i = dok->frameSetCount() - 1; i >= 0; i-- ) {
KWFrameSet* frameset = dok->frameSet(i);
if ( frameset->type() == FT_TEXT && frameset->frameSetInfo() == KWFrameSet::FI_BODY &&
@@ -847,7 +847,7 @@ void KWDocStructRootItem::setupTextFrameSets()
qHeapSort(orderedFrameSets);
// Build a list of frameset pointers from the sorted list.
- QPtrList<KWTextFrameSet> frameSetPtrs;
+ TQPtrList<KWTextFrameSet> frameSetPtrs;
frameSetPtrs.setAutoDelete(false);
for ( uint i = 0; i < orderedFrameSets.count(); i++ )
frameSetPtrs.append(dynamic_cast<KWTextFrameSet *>(orderedFrameSets[i].frameSet()));
@@ -858,7 +858,7 @@ void KWDocStructRootItem::setupTextFrameSets()
while (item) {
delItem = item;
item = dynamic_cast<KWDocStructTextFrameSetItem *>(item->nextSibling());
- if (frameSetPtrs.containsRef(delItem->frameSet()) == 0) delete delItem;
+ if (frameSetPtrs.tqcontainsRef(delItem->frameSet()) == 0) delete delItem;
}
// Add new framesets to the list or update existing ones.
@@ -889,7 +889,7 @@ void KWDocStructRootItem::setupFormulaFrames()
deleteAllChildren();
KWFrameSet* frameset = 0L;
- QString _name;
+ TQString _name;
KWDocStructFormulaItem* child;
KWDocument* dok = doc();
@@ -899,7 +899,7 @@ void KWDocStructRootItem::setupFormulaFrames()
if ( frameset->type() == FT_FORMULA &&
frameset->frameCount()>0 )
{
- _name=i18n("Formula Frame %1").arg(QString::number(i+1));
+ _name=i18n("Formula Frame %1").tqarg(TQString::number(i+1));
child = new KWDocStructFormulaItem(this, _name, dynamic_cast<KWFormulaFrameSet*>( frameset ));
}
}
@@ -911,12 +911,12 @@ void KWDocStructRootItem::setupFormulaFrames()
void KWDocStructRootItem::setupTables()
{
// Delete Empty item from list.
- QListViewItem* lvItem = firstChild();
+ TQListViewItem* lvItem = firstChild();
if (lvItem && (lvItem->text(0) == i18n("Empty"))) delete lvItem;
// Build a list of framesets ordered by their screen position (top left corner).
KWDocument* dok = doc();
- QValueList<KWOrderedFrameSet> orderedFrameSets;
+ TQValueList<KWOrderedFrameSet> orderedFrameSets;
for ( int i = dok->frameSetCount() - 1; i >= 0; i-- ) {
KWFrameSet* frameset = dok->frameSet(i);
if ( frameset->type() == FT_TABLE)
@@ -925,7 +925,7 @@ void KWDocStructRootItem::setupTables()
qHeapSort(orderedFrameSets);
// Build a list of table pointers from the sorted list.
- QPtrList<KWTableFrameSet> frameSetPtrs;
+ TQPtrList<KWTableFrameSet> frameSetPtrs;
frameSetPtrs.setAutoDelete(false);
for ( uint i = 0; i < orderedFrameSets.count(); i++ )
frameSetPtrs.append(dynamic_cast<KWTableFrameSet *>(orderedFrameSets[i].frameSet()));
@@ -936,7 +936,7 @@ void KWDocStructRootItem::setupTables()
while (item) {
delItem = item;
item = dynamic_cast<KWDocStructTableItem *>(item->nextSibling());
- if (frameSetPtrs.containsRef(delItem->table()) == 0) delete delItem;
+ if (frameSetPtrs.tqcontainsRef(delItem->table()) == 0) delete delItem;
}
// Add new framesets to the list or update existing ones.
@@ -967,7 +967,7 @@ void KWDocStructRootItem::setupPictures()
deleteAllChildren();
KWFrameSet* frameset = 0L;
- QString _name;
+ TQString _name;
KWDocStructPictureItem* child;
KWDocument* dok = doc();
@@ -977,7 +977,7 @@ void KWDocStructRootItem::setupPictures()
frameset = dok->frameSet( i );
if ( frameset->type() == FT_PICTURE && frameset->frameCount()>0)
{
- _name=i18n("Picture (%1) %2").arg(dynamic_cast<KWPictureFrameSet*>( frameset )->key().filename()).arg(++j);
+ _name=i18n("Picture (%1) %2").tqarg(dynamic_cast<KWPictureFrameSet*>( frameset )->key().filename()).tqarg(++j);
child = new KWDocStructPictureItem(this, _name, dynamic_cast<KWPictureFrameSet*>( frameset ));
}
}
@@ -991,7 +991,7 @@ void KWDocStructRootItem::setupEmbedded()
deleteAllChildren();
KWFrameSet* frameset = 0L;
- QString _name;
+ TQString _name;
KWDocStructPartItem* child;
KWDocument* dok = doc();
@@ -1014,7 +1014,7 @@ KWDocStructTextFrameSetItem* KWDocStructRootItem::findTextFrameSetItem(const KWF
{
if ( childCount() > 0 )
{
- QListViewItem *child = firstChild();
+ TQListViewItem *child = firstChild();
while( child )
{
if (dynamic_cast<KWDocStructTextFrameSetItem *>(child)->frameSet() == frameset)
@@ -1029,7 +1029,7 @@ KWDocStructTableItem* KWDocStructRootItem::findTableItem(const KWFrameSet* frame
{
if ( childCount() > 0 )
{
- QListViewItem *child = firstChild();
+ TQListViewItem *child = firstChild();
while( child )
{
if (dynamic_cast<KWDocStructTableItem *>(child)->table() == frameset)
@@ -1046,8 +1046,8 @@ KWDocStructTableItem* KWDocStructRootItem::findTableItem(const KWFrameSet* frame
/* Class: KWDocStructTree */
/******************************************************************/
-KWDocStructTree::KWDocStructTree(QWidget* parent, KWDocument* doc, KWGUI* gui)
- : KListView(parent), m_doc(doc), m_gui(gui)
+KWDocStructTree::KWDocStructTree(TQWidget* tqparent, KWDocument* doc, KWGUI* gui)
+ : KListView(tqparent), m_doc(doc), m_gui(gui)
{
embedded = new KWDocStructRootItem( this, i18n( "Embedded Objects" ), Embedded);
formulafrms = new KWDocStructRootItem( this, i18n( "Formula Frames" ), FormulaFrames);
@@ -1059,14 +1059,14 @@ KWDocStructTree::KWDocStructTree(QWidget* parent, KWDocument* doc, KWGUI* gui)
addColumn( i18n( "Document Structure" ) );
setFullWidth( true );
- connect( this, SIGNAL( doubleClicked(QListViewItem*) ),
- this, SLOT( slotDoubleClicked(QListViewItem*)) );
- connect( this, SIGNAL( returnPressed(QListViewItem*) ),
- this, SLOT( slotReturnPressed(QListViewItem* )) );
- connect( this, SIGNAL(rightButtonClicked(QListViewItem*, const QPoint&,int)),
- this, SLOT( slotRightButtonClicked(QListViewItem *, const QPoint&, int)));
- connect( this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)) );
+ connect( this, TQT_SIGNAL( doubleClicked(TQListViewItem*) ),
+ this, TQT_SLOT( slotDoubleClicked(TQListViewItem*)) );
+ connect( this, TQT_SIGNAL( returnPressed(TQListViewItem*) ),
+ this, TQT_SLOT( slotReturnPressed(TQListViewItem* )) );
+ connect( this, TQT_SIGNAL(rightButtonClicked(TQListViewItem*, const TQPoint&,int)),
+ this, TQT_SLOT( slotRightButtonClicked(TQListViewItem *, const TQPoint&, int)));
+ connect( this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)) );
}
KWDocStructTree::~KWDocStructTree()
@@ -1089,7 +1089,7 @@ void KWDocStructTree::setup()
void KWDocStructTree::refreshTree(int type)
{
// TODO: Saving current position by listview item text doesn't work if an item is renamed.
- QString curItemText;
+ TQString curItemText;
if (currentItem()) curItemText = currentItem()->text(0);
// if(((int)Arrangement) & type)
// arrangement->setupArrangement();
@@ -1104,14 +1104,14 @@ void KWDocStructTree::refreshTree(int type)
if(((int)Embedded) & type)
embedded->setupEmbedded();
if (!curItemText.isEmpty()) {
- QListViewItem* item = findItem(curItemText, 0);
+ TQListViewItem* item = tqfindItem(curItemText, 0);
if (item) setCurrentItem(item);
}
}
void KWDocStructTree::selectItem()
{
- QListViewItem* select = currentItem ();
+ TQListViewItem* select = currentItem ();
KWDocListViewItem* tmp = dynamic_cast<KWDocListViewItem *>(select);
if ( tmp )
tmp->selectItem();
@@ -1119,7 +1119,7 @@ void KWDocStructTree::selectItem()
void KWDocStructTree::editItem()
{
- QListViewItem* select = currentItem();
+ TQListViewItem* select = currentItem();
KWDocListViewItem* tmp = dynamic_cast<KWDocListViewItem *>(select);
if ( tmp )
tmp->editItem();
@@ -1128,7 +1128,7 @@ void KWDocStructTree::editItem()
void KWDocStructTree::deleteItem()
{
- QListViewItem* select = currentItem();
+ TQListViewItem* select = currentItem();
KWDocListViewItem *tmp = dynamic_cast<KWDocListViewItem *>(select);
if ( tmp )
tmp->deleteItem();
@@ -1136,7 +1136,7 @@ void KWDocStructTree::deleteItem()
void KWDocStructTree::editProperties()
{
- QListViewItem* select = currentItem();
+ TQListViewItem* select = currentItem();
KWDocListViewItem* tmp = dynamic_cast<KWDocListViewItem *>(select);
if ( tmp )
tmp->editProperties();
@@ -1144,13 +1144,13 @@ void KWDocStructTree::editProperties()
void KWDocStructTree::speakItem()
{
- QListViewItem* select = currentItem();
+ TQListViewItem* select = currentItem();
KWDocListViewItem* tmp = dynamic_cast<KWDocListViewItem *>(select);
if ( tmp )
tmp->speakItem();
}
-void KWDocStructTree::slotContextMenu(KListView* lv, QListViewItem* i, const QPoint& p)
+void KWDocStructTree::slotContextMenu(KListView* lv, TQListViewItem* i, const TQPoint& p)
{
if (lv != this)
return;
@@ -1159,21 +1159,21 @@ void KWDocStructTree::slotContextMenu(KListView* lv, QListViewItem* i, const QPo
item->contextMenu(item, p, 0);
}
-void KWDocStructTree::slotRightButtonClicked(QListViewItem* i, const QPoint& p, int)
+void KWDocStructTree::slotRightButtonClicked(TQListViewItem* i, const TQPoint& p, int)
{
KWDocListViewItem* item = dynamic_cast<KWDocListViewItem *>(i);
if (item)
item->contextMenu(item, p, 0);
}
-void KWDocStructTree::slotDoubleClicked(QListViewItem* i)
+void KWDocStructTree::slotDoubleClicked(TQListViewItem* i)
{
KWDocListViewItem* item = dynamic_cast<KWDocListViewItem *>(i);
if (item)
item->selectItem();
}
-void KWDocStructTree::slotReturnPressed(QListViewItem* i)
+void KWDocStructTree::slotReturnPressed(TQListViewItem* i)
{
KWDocListViewItem* item = dynamic_cast<KWDocListViewItem *>(i);
if (item) {
@@ -1188,10 +1188,10 @@ void KWDocStructTree::slotReturnPressed(QListViewItem* i)
/* Class: KWDocStruct */
/******************************************************************/
-KWDocStruct::KWDocStruct(QWidget* parent, KWDocument* doc, KWGUI* gui)
- : QWidget(parent), m_doc(doc), m_gui(gui)
+KWDocStruct::KWDocStruct(TQWidget* tqparent, KWDocument* doc, KWGUI* gui)
+ : TQWidget(tqparent), m_doc(doc), m_gui(gui)
{
- m_layout = new QVBoxLayout( this );
+ m_layout = new TQVBoxLayout( this );
KToolBar* searchBar = new KToolBar( this );
searchBar->setFlat( true );
@@ -1202,7 +1202,7 @@ KWDocStruct::KWDocStruct(QWidget* parent, KWDocument* doc, KWGUI* gui)
m_tree->setAlternateBackground( KGlobalSettings::alternateBackgroundColor() );
KListViewSearchLine* searchLine = new KListViewSearchLine( searchBar, m_tree );
searchBar->setStretchableWidget( searchLine );
- connect( eraseButton, SIGNAL( clicked() ), searchLine, SLOT( clear() ) );
+ connect( eraseButton, TQT_SIGNAL( clicked() ), searchLine, TQT_SLOT( clear() ) );
m_layout->addWidget(searchBar);
m_layout->addWidget(m_tree);
@@ -1210,13 +1210,13 @@ KWDocStruct::KWDocStruct(QWidget* parent, KWDocument* doc, KWGUI* gui)
dirtyTreeTypes = 0;
}
-void KWDocStruct::paintEvent (QPaintEvent* ev)
+void KWDocStruct::paintEvent (TQPaintEvent* ev)
{
if (dirtyTreeTypes) {
m_tree->refreshTree(dirtyTreeTypes);
dirtyTreeTypes = 0;
}
- QWidget::paintEvent(ev);
+ TQWidget::paintEvent(ev);
}
void KWDocStruct::refreshTree(int type)
diff --git a/kword/KWDocStruct.h b/kword/KWDocStruct.h
index fdf4d92f..6d17eeb6 100644
--- a/kword/KWDocStruct.h
+++ b/kword/KWDocStruct.h
@@ -21,15 +21,15 @@
#define docstruct_h
#include <klistview.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class KWDocument;
class KWFormulaFrameSet;
class KWPictureFrameSet;
class KWPartFrameSet;
class KWGUI;
-class QWidget;
-class QVBoxLayout;
+class TQWidget;
+class TQVBoxLayout;
class KWFrame;
class KWFrameSet;
class KWTextParag;
@@ -38,7 +38,7 @@ class KWTextParag;
/* Class: KWOrderedFrameSet */
/******************************************************************/
-/** Provides a way to sort framesets using a QValueList based on their top left corner. */
+/** Provides a way to sort framesets using a TQValueList based on their top left corner. */
class KWOrderedFrameSet
{
public:
@@ -67,16 +67,16 @@ public:
IT_PARAG = 13
};
- KWDocListViewItem(QListViewItem *_parent, const QString &_text);
- KWDocListViewItem(QListViewItem *_parent, QListViewItem *_after, const QString &_text);
- KWDocListViewItem(QListView *_parent, const QString &_text);
+ KWDocListViewItem(TQListViewItem *_parent, const TQString &_text);
+ KWDocListViewItem(TQListViewItem *_parent, TQListViewItem *_after, const TQString &_text);
+ KWDocListViewItem(TQListView *_parent, const TQString &_text);
virtual ItemType itemType() { return IT_BASE; }
virtual void selectItem() {}
virtual void editItem() {}
virtual void deleteItem() {}
virtual void editProperties() {}
virtual void speakItem() {}
- virtual void contextMenu(QListViewItem *, const QPoint &, int) {}
+ virtual void contextMenu(TQListViewItem *, const TQPoint &, int) {}
protected:
KWDocument* doc();
@@ -91,15 +91,15 @@ protected:
class KWDocStructParagItem : public KWDocListViewItem
{
public:
- KWDocStructParagItem(QListViewItem* parent, const QString& text, KWTextParag* parag);
- KWDocStructParagItem(QListViewItem* parent, QListViewItem* after, const QString& text, KWTextParag* parag);
+ KWDocStructParagItem(TQListViewItem* tqparent, const TQString& text, KWTextParag* parag);
+ KWDocStructParagItem(TQListViewItem* tqparent, TQListViewItem* after, const TQString& text, KWTextParag* parag);
virtual ItemType itemType() { return IT_PARAG; }
virtual void selectItem();
virtual void editItem();
virtual void deleteItem();
virtual void editProperties();
virtual void speakItem();
- virtual void contextMenu(QListViewItem* item, const QPoint& p, int);
+ virtual void contextMenu(TQListViewItem* item, const TQPoint& p, int);
KWTextParag* parag() const { return m_parag; }
@@ -114,9 +114,9 @@ protected:
class KWDocStructTextFrameItem : public KWDocListViewItem
{
public:
- KWDocStructTextFrameItem(QListViewItem* parent, const QString& text,
+ KWDocStructTextFrameItem(TQListViewItem* tqparent, const TQString& text,
KWTextFrameSet* frameset, KWFrame* frame );
- KWDocStructTextFrameItem(QListViewItem* parent, QListViewItem* after, const QString& text,
+ KWDocStructTextFrameItem(TQListViewItem* tqparent, TQListViewItem* after, const TQString& text,
KWTextFrameSet* frameset, KWFrame* frame );
virtual int ItemType() { return IT_TEXTFRAME; }
virtual void selectItem();
@@ -124,7 +124,7 @@ public:
virtual void deleteItem();
virtual void editProperties();
virtual void speakItem();
- virtual void contextMenu(QListViewItem* item, const QPoint& p, int);
+ virtual void contextMenu(TQListViewItem* item, const TQPoint& p, int);
KWFrame* frame() const { return m_frame; }
KWTextFrameSet* frameSet() const { return m_frameset; };
@@ -144,8 +144,8 @@ protected:
class KWDocStructTextFrameSetItem : public KWDocListViewItem
{
public:
- KWDocStructTextFrameSetItem(QListViewItem* parent, const QString& text, KWTextFrameSet* frameset);
- KWDocStructTextFrameSetItem(QListViewItem* parent, QListViewItem* after, const QString& text,
+ KWDocStructTextFrameSetItem(TQListViewItem* tqparent, const TQString& text, KWTextFrameSet* frameset);
+ KWDocStructTextFrameSetItem(TQListViewItem* tqparent, TQListViewItem* after, const TQString& text,
KWTextFrameSet* frameset );
virtual int ItemType() { return IT_TEXT; }
virtual void selectItem();
@@ -153,7 +153,7 @@ public:
virtual void deleteItem();
virtual void editProperties();
virtual void speakItem();
- virtual void contextMenu(QListViewItem* item, const QPoint& p, int);
+ virtual void contextMenu(TQListViewItem* item, const TQPoint& p, int);
KWTextFrameSet* frameSet() const { return m_frameset; };
void setupTextFrames();
@@ -171,8 +171,8 @@ protected:
class KWDocStructTableItem : public KWDocListViewItem
{
public:
- KWDocStructTableItem(QListViewItem* parent, const QString& text, KWTableFrameSet* table );
- KWDocStructTableItem(QListViewItem* parent, QListViewItem* after, const QString& text,
+ KWDocStructTableItem(TQListViewItem* tqparent, const TQString& text, KWTableFrameSet* table );
+ KWDocStructTableItem(TQListViewItem* tqparent, TQListViewItem* after, const TQString& text,
KWTableFrameSet* table );
virtual int ItemType() { return IT_TABLE; }
virtual void selectItem();
@@ -180,7 +180,7 @@ public:
virtual void deleteItem();
virtual void editProperties();
virtual void speakItem();
- virtual void contextMenu(QListViewItem* item, const QPoint& p, int);
+ virtual void contextMenu(TQListViewItem* item, const TQPoint& p, int);
KWTableFrameSet* table() const { return m_table; };
void setupCells();
@@ -197,14 +197,14 @@ protected:
class KWDocStructFormulaItem : public KWDocListViewItem
{
public:
- KWDocStructFormulaItem(QListViewItem* parent, const QString& text, KWFormulaFrameSet* form);
+ KWDocStructFormulaItem(TQListViewItem* tqparent, const TQString& text, KWFormulaFrameSet* form);
virtual int ItemType() { return IT_FORMULA; }
virtual void selectItem();
virtual void editItem();
virtual void deleteItem();
virtual void editProperties();
virtual void speakItem();
- virtual void contextMenu(QListViewItem* item, const QPoint& p, int);
+ virtual void contextMenu(TQListViewItem* item, const TQPoint& p, int);
protected:
KWFormulaFrameSet* m_form;
@@ -218,13 +218,13 @@ protected:
class KWDocStructPictureItem : public KWDocListViewItem
{
public:
- KWDocStructPictureItem(QListViewItem* parent, const QString& text, KWPictureFrameSet* pic);
+ KWDocStructPictureItem(TQListViewItem* tqparent, const TQString& text, KWPictureFrameSet* pic);
virtual int ItemType() { return IT_PICTURE; }
virtual void selectItem();
virtual void editItem();
virtual void deleteItem();
virtual void editProperties();
- virtual void contextMenu(QListViewItem* item, const QPoint& p, int);
+ virtual void contextMenu(TQListViewItem* item, const TQPoint& p, int);
protected:
KWPictureFrameSet* m_pic;
@@ -237,13 +237,13 @@ protected:
class KWDocStructPartItem : public KWDocListViewItem
{
public:
- KWDocStructPartItem(QListViewItem* parent, const QString& text, KWPartFrameSet* part);
+ KWDocStructPartItem(TQListViewItem* tqparent, const TQString& text, KWPartFrameSet* part);
virtual int ItemType() { return IT_PART; }
virtual void selectItem();
virtual void editItem();
virtual void deleteItem();
virtual void editProperties();
- virtual void contextMenu(QListViewItem* item, const QPoint& p, int);
+ virtual void contextMenu(TQListViewItem* item, const TQPoint& p, int);
protected:
KWPartFrameSet* m_part;
@@ -256,7 +256,7 @@ protected:
class KWDocStructRootItem : public KWDocListViewItem
{
public:
- KWDocStructRootItem(QListView* parent, const QString& text, TypeStructDocItem type);
+ KWDocStructRootItem(TQListView* tqparent, const TQString& text, TypeStructDocItem type);
virtual int ItemType() { return IT_ROOT; }
void setupArrangement();
@@ -282,15 +282,16 @@ protected:
class KWDocStructTree : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWDocStructTree( QWidget* parent, KWDocument* doc, KWGUI* gui );
+ KWDocStructTree( TQWidget* tqparent, KWDocument* doc, KWGUI* gui );
~KWDocStructTree();
void setup();
void refreshTree(int _type);
- QSize minimumSizeHint() const {
- return QSize( 0, 0 );
+ TQSize tqminimumSizeHint() const {
+ return TQSize( 0, 0 );
}
void selectItem();
void editItem();
@@ -302,10 +303,10 @@ public:
KWGUI* gui() { return m_gui; };
public slots:
- void slotContextMenu(KListView* l, QListViewItem* i, const QPoint& p);
- void slotRightButtonClicked(QListViewItem*, const QPoint&, int);
- void slotDoubleClicked(QListViewItem* item);
- void slotReturnPressed(QListViewItem* item);
+ void slotContextMenu(KListView* l, TQListViewItem* i, const TQPoint& p);
+ void slotRightButtonClicked(TQListViewItem*, const TQPoint&, int);
+ void slotDoubleClicked(TQListViewItem* item);
+ void slotReturnPressed(TQListViewItem* item);
protected:
KWDocument* m_doc;
@@ -318,12 +319,13 @@ protected:
/* Class: KWDocStruct */
/******************************************************************/
-class KWDocStruct : public QWidget
+class KWDocStruct : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWDocStruct( QWidget* parent, KWDocument* doc, KWGUI* gui );
+ KWDocStruct( TQWidget* tqparent, KWDocument* doc, KWGUI* gui );
void selectItem();
void editItem();
void deleteItem();
@@ -341,9 +343,9 @@ public slots:
protected:
KWDocStructTree* m_tree;
- QVBoxLayout* m_layout;
+ TQVBoxLayout* m_layout;
- virtual void paintEvent(QPaintEvent* ev);
+ virtual void paintEvent(TQPaintEvent* ev);
KWDocument* m_doc;
KWGUI* m_gui;
diff --git a/kword/KWDocument.cpp b/kword/KWDocument.cpp
index eb4f1461..19d87a05 100644
--- a/kword/KWDocument.cpp
+++ b/kword/KWDocument.cpp
@@ -84,10 +84,10 @@
#include <kspell2/settings.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qbuffer.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqbuffer.h>
#include <unistd.h>
#include <math.h>
@@ -105,7 +105,7 @@ class KWCommandHistory : public KoCommandHistory
{
public:
KWCommandHistory( KWDocument * doc ) : KoCommandHistory( doc->actionCollection(), true ), m_pDoc( doc ) {}
-public /*slots*/: // They are already slots in the parent. Running moc on the inherited class shouldn't be necessary AFAICS.
+public /*slots*/: // They are already slots in the tqparent. Running tqmoc on the inherited class shouldn't be necessary AFAICS.
virtual void undo();
virtual void redo();
private:
@@ -129,7 +129,7 @@ void KWCommandHistory::redo()
/******************************************************************/
void KWDocument::clearUndoRedoInfos()
{
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWTextFrameSet *fs = dynamic_cast<KWTextFrameSet *>( fit.current() );
@@ -144,15 +144,15 @@ void KWDocument::clearUndoRedoInfos()
*/
class KWDocument::InitialEditing {
public:
- QString m_initialFrameSet;
+ TQString m_initialFrameSet;
int m_initialCursorParag;
int m_initialCursorIndex;
};
const int KWDocument::CURRENT_SYNTAX_VERSION = 3;
-KWDocument::KWDocument(QWidget *parentWidget, const char *widname, QObject* parent, const char* name, bool singleViewMode )
- : KoDocument( parentWidget, widname, parent, name, singleViewMode ),
+KWDocument::KWDocument(TQWidget *tqparentWidget, const char *widname, TQObject* tqparent, const char* name, bool singleViewMode )
+ : KoDocument( tqparentWidget, widname, tqparent, name, singleViewMode ),
m_urlIntern()
{
KWStatisticVariable::setExtendedType( true );
@@ -201,7 +201,7 @@ KWDocument::KWDocument(QWidget *parentWidget, const char *widname, QObject* pare
m_viewFormattingBreak = true;
m_viewFrameBorders = true;
- m_repaintAllViewsPending = false;
+ m_tqrepaintAllViewsPending = false;
m_recalcFramesPending = -1;
m_bShowDocStruct = true;
m_bShowRuler = true;
@@ -220,8 +220,8 @@ KWDocument::KWDocument(QWidget *parentWidget, const char *widname, QObject* pare
m_layoutViewMode = 0;
m_commandHistory = new KWCommandHistory( this );
- connect( m_commandHistory, SIGNAL( documentRestored() ), this, SLOT( slotDocumentRestored() ) );
- connect( m_commandHistory, SIGNAL( commandExecuted() ), this, SLOT( slotCommandExecuted() ) );
+ connect( m_commandHistory, TQT_SIGNAL( documentRestored() ), this, TQT_SLOT( slotDocumentRestored() ) );
+ connect( m_commandHistory, TQT_SIGNAL( commandExecuted() ), this, TQT_SLOT( slotCommandExecuted() ) );
//styleMask = U_FONT_FAMILY_ALL_SIZE | U_COLOR | U_BORDER | U_INDENT |
// U_NUMBERING | U_ALIGN | U_TABS | U_SMART;
@@ -259,20 +259,20 @@ KWDocument::KWDocument(QWidget *parentWidget, const char *widname, QObject* pare
// Get default font from the KWord config file
KConfig *config = KWFactory::instance()->config();
config->setGroup("Document defaults" );
- QString defaultFontname=config->readEntry("DefaultFont");
+ TQString defaultFontname=config->readEntry("DefaultFont");
if ( !defaultFontname.isEmpty() )
m_defaultFont.fromString( defaultFontname );
// If not found, we automatically fallback to the application font (the one from KControl's font module)
// Try to force a scalable font.
- m_defaultFont.setStyleStrategy( QFont::ForceOutline );
+ m_defaultFont.setStyleStrategy( TQFont::ForceOutline );
int ptSize = m_defaultFont.pointSize();
if ( ptSize == -1 ) // specified with a pixel size ?
- ptSize = QFontInfo(m_defaultFont).pointSize();
+ ptSize = TQFontInfo(m_defaultFont).pointSize();
//kdDebug() << "Default font: requested family: " << m_defaultFont.family() << endl;
- //kdDebug() << "Default font: real family: " << QFontInfo(m_defaultFont).family() << endl;
+ //kdDebug() << "Default font: real family: " << TQFontInfo(m_defaultFont).family() << endl;
if ( name )
dcopObject();
@@ -330,8 +330,8 @@ void KWDocument::initConfig()
if(config->hasGroup("Interface" ) )
{
config->setGroup( "Interface" );
- setGridY(QMAX( config->readDoubleNumEntry("GridY",MM_TO_POINT(5.0) ), 0.1));
- setGridX(QMAX( config->readDoubleNumEntry("GridX",MM_TO_POINT(5.0) ), 0.1));
+ setGridY(TQMAX( config->readDoubleNumEntry("GridY",MM_TO_POINT(5.0) ), 0.1));
+ setGridX(TQMAX( config->readDoubleNumEntry("GridX",MM_TO_POINT(5.0) ), 0.1));
setCursorInProtectedArea( config->readBoolEntry( "cursorInProtectArea", true ));
// Config-file value in mm, default 10 pt
double indent = config->readDoubleNumEntry("Indent", MM_TO_POINT(10.0) ) ;
@@ -457,7 +457,7 @@ void KWDocument::setZoomAndResolution( int zoom, int dpiX, int dpiY )
KWTextFrameSet * KWDocument::textFrameSet ( unsigned int num ) const
{
unsigned int i=0;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
if(fit.current()->isDeleted()) continue;
@@ -476,23 +476,23 @@ void KWDocument::newZoomAndResolution( bool updateViews, bool forPrint )
if ( KFormula::Document* formulaDocument = m_formulaDocumentWrapper->document() )
formulaDocument->newZoomAndResolution( updateViews,forPrint );
#if 0
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
fit.current()->zoom( forPrint );
#endif
// First recalc all frames (including the kotextdocument width)
updateAllFrames();
- // Then relayout the text inside the frames
- layout();
+ // Then retqlayout the text inside the frames
+ tqlayout();
if ( updateViews )
{
emit newContentsSize();
- repaintAllViews( true );
+ tqrepaintAllViews( true );
}
}
-bool KWDocument::initDoc(InitDocFlags flags, QWidget* parentWidget)
+bool KWDocument::initDoc(InitDocFlags flags, TQWidget* tqparentWidget)
{
m_pageColumns.columns = 1;
m_pageColumns.ptColumnSpacing = m_defaultColumnSpacing;
@@ -507,7 +507,7 @@ bool KWDocument::initDoc(InitDocFlags flags, QWidget* parentWidget)
if ( isEmbedded() )
{
- QString fileName( locate( "kword_template", "Normal/.source/Embedded.kwt" , KWFactory::instance() ) );
+ TQString fileName( locate( "kword_template", "Normal/.source/Embedded.kwt" , KWFactory::instance() ) );
resetURL();
ok = loadNativeFormat( fileName );
if ( !ok )
@@ -518,7 +518,7 @@ bool KWDocument::initDoc(InitDocFlags flags, QWidget* parentWidget)
}
else if (flags==KoDocument::InitDocEmpty)
{
- QString fileName( locate( "kword_template", "Normal/.source/PlainText.kwt" , KWFactory::instance() ) );
+ TQString fileName( locate( "kword_template", "Normal/.source/PlainText.kwt" , KWFactory::instance() ) );
resetURL();
ok = loadNativeFormat( fileName );
if ( !ok )
@@ -536,10 +536,10 @@ bool KWDocument::initDoc(InitDocFlags flags, QWidget* parentWidget)
dlgtype = KoTemplateChooseDia::OnlyTemplates;
- QString file;
+ TQString file;
KoTemplateChooseDia::ReturnType ret = KoTemplateChooseDia::choose(
KWFactory::instance(), file,
- dlgtype, "kword_template", parentWidget );
+ dlgtype, "kword_template", tqparentWidget );
if ( ret == KoTemplateChooseDia::Template ) {
resetURL();
ok = loadNativeFormat( file );
@@ -551,7 +551,7 @@ bool KWDocument::initDoc(InitDocFlags flags, QWidget* parentWidget)
//kdDebug() << "KWDocument::initDoc opening URL " << url.prettyURL() << endl;
ok = openURL( url );
} else if ( ret == KoTemplateChooseDia::Empty ) {
- QString fileName( locate( "kword_template", "Normal/.source/PlainText.kwt" , KWFactory::instance() ) );
+ TQString fileName( locate( "kword_template", "Normal/.source/PlainText.kwt" , KWFactory::instance() ) );
resetURL();
ok = loadNativeFormat( fileName );
if ( !ok )
@@ -562,7 +562,7 @@ bool KWDocument::initDoc(InitDocFlags flags, QWidget* parentWidget)
return ok;
}
-void KWDocument::openExistingFile( const QString& file )
+void KWDocument::openExistingFile( const TQString& file )
{
m_pageColumns.columns = 1;
m_pageColumns.ptColumnSpacing = m_defaultColumnSpacing;
@@ -576,7 +576,7 @@ void KWDocument::openExistingFile( const QString& file )
KoDocument::openExistingFile( file );
}
-void KWDocument::openTemplate( const QString& file )
+void KWDocument::openTemplate( const TQString& file )
{
m_pageColumns.columns = 1;
m_pageColumns.ptColumnSpacing = m_defaultColumnSpacing;
@@ -601,7 +601,7 @@ void KWDocument::initEmpty()
m_pageHeaderFooter.ptFooterBodySpacing = 10;
m_pageHeaderFooter.ptFootNoteBodySpacing = 10;
- QString fileName( locate( "kword_template", "Normal/.source/PlainText.kwt" , KWFactory::instance() ) );
+ TQString fileName( locate( "kword_template", "Normal/.source/PlainText.kwt" , KWFactory::instance() ) );
bool ok = loadNativeFormat( fileName );
if ( !ok )
showLoadingErrorDialog();
@@ -617,9 +617,9 @@ KoPageLayout KWDocument::pageLayout(int pageNumber /* = 0 */) const
return pageManager()->pageLayout(pageNumber);
}
-void KWDocument::setPageLayout( const KoPageLayout& layout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews )
+void KWDocument::setPageLayout( const KoPageLayout& tqlayout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews )
{
- m_pageLayout = layout;
+ m_pageLayout = tqlayout;
if ( m_processingType == WP ) {
m_pageColumns = cl;
}
@@ -643,8 +643,8 @@ void KWDocument::setPageLayout( const KoPageLayout& layout, const KoColumns& cl,
if ( updateViews )
{
- // Invalidate document layout, for proper repaint
- this->layout();
+ // Invalidate document tqlayout, for proper tqrepaint
+ this->tqlayout();
emit pageLayoutChanged( m_pageLayout );
updateContentsSize();
}
@@ -659,13 +659,13 @@ double KWDocument::ptColumnWidth() const
/ m_pageColumns.columns;
}
-class KWFootNoteFrameSetList : public QPtrList<KWFootNoteFrameSet>
+class KWFootNoteFrameSetList : public TQPtrList<KWFootNoteFrameSet>
{
public:
KWFootNoteFrameSetList( bool reversed ) : m_reversed( reversed ) {}
protected:
// Compare the order of the associated variables
- virtual int compareItems(QPtrCollection::Item a, QPtrCollection::Item b)
+ virtual int compareItems(TQPtrCollection::Item a, TQPtrCollection::Item b)
{
KWFootNoteFrameSet* fsa = ((KWFootNoteFrameSet *)a);
KWFootNoteFrameSet* fsb = ((KWFootNoteFrameSet *)b);
@@ -688,7 +688,7 @@ private:
/* append headers and footers if needed, and create enough pages for all the existing frames */
void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint flags )
{
- fromPage = QMAX(pageManager()->startPage(), fromPage);
+ fromPage = TQMAX(pageManager()->startPage(), fromPage);
if ( m_lstFrameSet.isEmpty() )
return;
//printDebug();
@@ -707,7 +707,7 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
KWFootNoteFrameSetList footnotesList( true ); // Reversed, we want footnotes from bottom to top
KWFootNoteFrameSetList endnotesList( false ); // Endnotes are in top to bottom order
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet * fs = fit.current();
@@ -762,7 +762,7 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
// This allocation each time might slow things down a bit.
// TODO KWHeaderFooterFrameSet : public KWTextFrameSet, and store the HeaderFooterFrameset data into there.
// ... hmm, and then KWFootNoteFrameSet needs to inherit KWHeaderFooterFrameSet
- QPtrList<KWFrameLayout::HeaderFooterFrameset> headerFooterList;
+ TQPtrList<KWFrameLayout::HeaderFooterFrameset> headerFooterList;
headerFooterList.setAutoDelete( true );
const int firstPageNum = startPage();
@@ -885,11 +885,11 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
// Footer
// In the list it will have to be from top and from bottom:
// Header, Footer, Footnote from bottom to top
- QPtrList<KWFrameLayout::HeaderFooterFrameset> footnotesHFList;
+ TQPtrList<KWFrameLayout::HeaderFooterFrameset> footnotesHFList;
footnotesHFList.setAutoDelete( true );
footnotesList.sort();
- QPtrListIterator<KWFootNoteFrameSet> fnfsIt( footnotesList ); // fnfs == "footnote frameset"
+ TQPtrListIterator<KWFootNoteFrameSet> fnfsIt( footnotesList ); // fnfs == "footnote frameset"
for ( ; fnfsIt.current() ; ++fnfsIt )
{
KWFootNoteFrameSet* fnfs = fnfsIt.current();
@@ -902,18 +902,18 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
// With other kind of framesets, the height is simply frame->height.
// But for footnotes, the height to pass to KWFrameLayout is the sum of the frame heights.
hff->m_height = 0;
- for (QPtrListIterator<KWFrame> f = fnfs->frameIterator(); f.current() ; ++f )
+ for (TQPtrListIterator<KWFrame> f = fnfs->frameIterator(); f.current() ; ++f )
hff->m_height += f.current()->height();
footnotesHFList.append( hff );
}
// Endnotes, however are laid out from top to bottom.
- QPtrList<KWFrameLayout::HeaderFooterFrameset> endnotesHFList;
+ TQPtrList<KWFrameLayout::HeaderFooterFrameset> endnotesHFList;
endnotesHFList.setAutoDelete( true );
endnotesList.sort();
- QPtrListIterator<KWFootNoteFrameSet> enfsIt( endnotesList ); // enfs == "endnote frameset"
+ TQPtrListIterator<KWFootNoteFrameSet> enfsIt( endnotesList ); // enfs == "endnote frameset"
for ( ; enfsIt.current() ; ++enfsIt )
{
KWFootNoteFrameSet* enfs = enfsIt.current();
@@ -924,7 +924,7 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
// The height to pass to KWFrameLayout is the sum of the frame heights.
hff->m_height = 0;
- for (QPtrListIterator<KWFrame> f = enfs->frameIterator(); f.current() ; ++f )
+ for (TQPtrListIterator<KWFrame> f = enfs->frameIterator(); f.current() ; ++f )
hff->m_height += f.current()->height();
endnotesHFList.append( hff );
@@ -932,13 +932,13 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
// append pages as needed.
double maxBottom = 0;
- for (QPtrListIterator<KWFrameSet> fsit = framesetsIterator(); fsit.current() ; ++fsit ) {
+ for (TQPtrListIterator<KWFrameSet> fsit = framesetsIterator(); fsit.current() ; ++fsit ) {
KWFrameSet *fs = fsit.current();
if ( !fs->isVisible() || fs->isAHeader() || !fs->isAFooter() ||
!fs->isFloating() || !fs->isFootEndNote() )
continue;
- for (QPtrListIterator<KWFrame> fit = fs->frameIterator(); fit.current() ; ++fit )
- maxBottom = QMAX(maxBottom, fit.current()->bottom());
+ for (TQPtrListIterator<KWFrame> fit = fs->frameIterator(); fit.current() ; ++fit )
+ maxBottom = TQMAX(maxBottom, fit.current()->bottom());
}
KWPage *last = pageManager()->page(lastPage());
double docHeight = last->offsetInDocument() + last->height();
@@ -953,10 +953,10 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
if ( fromPage > toPage ) // this can happen with "endnotes only" pages :) // ### really?
fromPage = toPage; // ie. start at the last real page
KWFrameLayout frameLayout( this, headerFooterList, footnotesHFList, endnotesHFList );
- frameLayout.layout( frameset, m_pageColumns.columns, fromPage, toPage, flags );
+ frameLayout.tqlayout( frameset, m_pageColumns.columns, fromPage, toPage, flags );
// If the number of pages changed, update views and variables etc.
- // (now that the frame layout has been done)
+ // (now that the frame tqlayout has been done)
if ( pageCount() != oldPages && !m_bGeneratingPreview )
{
// Very much like the end of appendPage, but we don't want to call recalcFrames ;)
@@ -969,12 +969,12 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
else {
// DTP mode: calculate the number of pages from the frames.
double maxBottom=0;
- for (QPtrListIterator<KWFrameSet> fit = framesetsIterator(); fit.current() ; ++fit ) {
+ for (TQPtrListIterator<KWFrameSet> fit = framesetsIterator(); fit.current() ; ++fit ) {
if(fit.current()->isDeleted()) continue;
if(fit.current()->frameSetInfo()==KWFrameSet::FI_BODY && !fit.current()->isFloating()) {
KWFrameSet * fs = fit.current();
- for (QPtrListIterator<KWFrame> f = fs->frameIterator(); f.current() ; ++f )
- maxBottom=QMAX(maxBottom, f.current()->bottom());
+ for (TQPtrListIterator<KWFrame> f = fs->frameIterator(); f.current() ; ++f )
+ maxBottom=TQMAX(maxBottom, f.current()->bottom());
}
}
KWPage *last = pageManager()->page(lastPage());
@@ -996,7 +996,7 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
bool KWDocument::loadChildren( KoStore *store )
{
//kdDebug(32001) << "KWDocument::loadChildren" << endl;
- QPtrListIterator<KoDocumentChild> it( children() );
+ TQPtrListIterator<KoDocumentChild> it( tqchildren() );
for( ; it.current(); ++it ) {
if ( !it.current()->loadDocument( store ) )
return FALSE;
@@ -1005,26 +1005,26 @@ bool KWDocument::loadChildren( KoStore *store )
return TRUE;
}
-void KWDocument::loadPictureMap ( QDomElement& domElement )
+void KWDocument::loadPictureMap ( TQDomElement& domElement )
{
m_pictureMap.clear();
// <PICTURES>
- QDomElement picturesElem = domElement.namedItem( "PICTURES" ).toElement();
+ TQDomElement picturesElem = domElement.namedItem( "PICTURES" ).toElement();
if ( !picturesElem.isNull() )
{
m_pictureCollection->readXML( picturesElem, m_pictureMap );
}
// <PIXMAPS>
- QDomElement pixmapsElem = domElement.namedItem( "PIXMAPS" ).toElement();
+ TQDomElement pixmapsElem = domElement.namedItem( "PIXMAPS" ).toElement();
if ( !pixmapsElem.isNull() )
{
m_pictureCollection->readXML( pixmapsElem, m_pictureMap );
}
// <CLIPARTS>
- QDomElement clipartsElem = domElement.namedItem( "CLIPARTS" ).toElement();
+ TQDomElement clipartsElem = domElement.namedItem( "CLIPARTS" ).toElement();
if ( !clipartsElem.isNull() )
{
m_pictureCollection->readXML( pixmapsElem, m_pictureMap );
@@ -1032,35 +1032,35 @@ void KWDocument::loadPictureMap ( QDomElement& domElement )
}
-bool KWDocument::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const QDomDocument& settings, KoStore* store )
+bool KWDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles, const TQDomDocument& settings, KoStore* store )
{
- QTime dt;
+ TQTime dt;
dt.start();
emit sigProgress( 0 );
clear();
kdDebug(32001) << "KWDocument::loadOasis" << endl;
- QDomElement content = doc.documentElement();
- QDomElement realBody ( KoDom::namedItemNS( content, KoXmlNS::office, "body" ) );
+ TQDomElement content = doc.documentElement();
+ TQDomElement realBody ( KoDom::namedItemNS( content, KoXmlNS::office, "body" ) );
if ( realBody.isNull() )
{
kdError(32001) << "No office:body found!" << endl;
setErrorMessage( i18n( "Invalid OASIS OpenDocument file. No office:body tag found." ) );
return false;
}
- QDomElement body = KoDom::namedItemNS( realBody, KoXmlNS::office, "text" );
+ TQDomElement body = KoDom::namedItemNS( realBody, KoXmlNS::office, "text" );
if ( body.isNull() )
{
kdError(32001) << "No office:text found!" << endl;
- QDomElement childElem;
- QString localName;
+ TQDomElement childElem;
+ TQString localName;
forEachElement( childElem, realBody ) {
localName = childElem.localName();
}
if ( localName.isEmpty() )
setErrorMessage( i18n( "Invalid OASIS OpenDocument file. No tag found inside office:body." ) );
else
- setErrorMessage( i18n( "This is not a word processing document, but %1. Please try opening it with the appropriate application." ).arg( KoDocument::tagNameToDocumentType( localName ) ) );
+ setErrorMessage( i18n( "This is not a word processing document, but %1. Please try opening it with the appropriate application." ).tqarg( KoDocument::tagNameToDocumentType( localName ) ) );
return false;
}
@@ -1072,7 +1072,7 @@ bool KWDocument::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles,
// In theory the page format is the style:master-page-name of the first paragraph...
// But, hmm, in a doc with only a table there was no reference to the master page at all...
- // So we load the standard page layout to start with, and in KWTextParag
+ // So we load the standard page tqlayout to start with, and in KWTextParag
// we might overwrite it with another one.
m_loadingInfo->m_currentMasterPage = "Standard";
if ( !loadOasisPageLayout( m_loadingInfo->m_currentMasterPage, context ) )
@@ -1086,12 +1086,12 @@ bool KWDocument::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles,
m_hasTOC = false;
m_tabStop = MM_TO_POINT(15);
- const QDomElement* defaultParagStyle = oasisStyles.defaultStyle( "paragraph" );
+ const TQDomElement* defaultParagStyle = oasisStyles.defaultStyle( "paragraph" );
if ( defaultParagStyle ) {
KoStyleStack stack;
stack.push( *defaultParagStyle );
stack.setTypeProperties( "paragraph" );
- QString tabStopVal = stack.attributeNS( KoXmlNS::style, "tab-stop-distance" );
+ TQString tabStopVal = stack.attributeNS( KoXmlNS::style, "tab-stop-distance" );
if ( !tabStopVal.isEmpty() )
m_tabStop = KoUnit::parseValue( tabStopVal );
}
@@ -1132,30 +1132,30 @@ bool KWDocument::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles,
fs->addFrame( frame );
// load padding, background and borders for the main frame
- const QDomElement* masterPage = context.oasisStyles().masterPages()[ m_loadingInfo->m_currentMasterPage ];
- const QDomElement *masterPageStyle = masterPage ? context.oasisStyles().findStyle(masterPage->attributeNS( KoXmlNS::style, "page-layout-name", QString::null ) ) : 0;
+ const TQDomElement* masterPage = context.oasisStyles().masterPages()[ m_loadingInfo->m_currentMasterPage ];
+ const TQDomElement *masterPageStyle = masterPage ? context.oasisStyles().findStyle(masterPage->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() ) ) : 0;
if ( masterPageStyle )
{
KoStyleStack styleStack;
styleStack.push( *masterPageStyle );
- styleStack.setTypeProperties( "page-layout" );
+ styleStack.setTypeProperties( "page-tqlayout" );
frame->loadBorderProperties( styleStack );
}
- fs->renumberFootNotes( false /*no repaint*/ );
+ fs->renumberFootNotes( false /*no tqrepaint*/ );
} else {
// DTP mode: the items in the body are page-sequence and then frames
- QDomElement tag;
+ TQDomElement tag;
forEachElement( tag, body )
{
context.styleStack().save();
- const QString localName = tag.localName();
+ const TQString localName = tag.localName();
if ( localName == "page-sequence" && tag.namespaceURI() == KoXmlNS::text )
{
- // We don't have support for changing the page layout yet, so just take the
+ // We don't have support for changing the page tqlayout yet, so just take the
// number of pages
int pages=1;
- QDomElement page;
+ TQDomElement page;
forEachElement( page, tag )
++pages;
kdDebug() << "DTP mode: found " << pages << "pages" << endl;
@@ -1198,39 +1198,39 @@ bool KWDocument::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles,
return true;
}
-bool KWDocument::loadOasisPageLayout( const QString& masterPageName, KoOasisContext& context )
+bool KWDocument::loadOasisPageLayout( const TQString& masterPageName, KoOasisContext& context )
{
KoColumns& columns = m_loadingInfo->columns;
const KoOasisStyles& oasisStyles = context.oasisStyles();
- const QDomElement* masterPage = oasisStyles.masterPages()[ masterPageName ];
+ const TQDomElement* masterPage = oasisStyles.masterPages()[ masterPageName ];
Q_ASSERT( masterPage );
- const QDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-layout-name", QString::null ) ) : 0;
+ const TQDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() ) ) : 0;
Q_ASSERT( masterPageStyle );
if ( masterPageStyle )
{
m_pageLayout.loadOasis( *masterPageStyle );
pageManager()->setDefaultPage(m_pageLayout);
- const QDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-layout-properties" ) );
- const QDomElement footnoteSep = KoDom::namedItemNS( properties, KoXmlNS::style, "footnote-sep" );
+ const TQDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-tqlayout-properties" ) );
+ const TQDomElement footnoteSep = KoDom::namedItemNS( properties, KoXmlNS::style, "footnote-sep" );
if ( !footnoteSep.isNull() ) {
// style:width="0.018cm" style:distance-before-sep="0.101cm"
// style:distance-after-sep="0.101cm" style:adjustment="left"
// style:rel-width="25%" style:color="#000000"
- const QString width = footnoteSep.attributeNS( KoXmlNS::style, "width", QString::null );
+ const TQString width = footnoteSep.attributeNS( KoXmlNS::style, "width", TQString() );
if ( !width.isEmpty() ) {
m_footNoteSeparatorLineWidth = KoUnit::parseValue( width );
}
- QString pageWidth = footnoteSep.attributeNS( KoXmlNS::style, "rel-width", QString::null );
+ TQString pageWidth = footnoteSep.attributeNS( KoXmlNS::style, "rel-width", TQString() );
if ( pageWidth.endsWith( "%" ) ) {
pageWidth.truncate( pageWidth.length() - 1 ); // remove '%'
- m_iFootNoteSeparatorLineLength = qRound( pageWidth.toDouble() );
+ m_iFootNoteSeparatorLineLength = tqRound( pageWidth.toDouble() );
}
// Not in KWord: color, distance before and after separator
- const QString style = footnoteSep.attributeNS( KoXmlNS::style, "line-style", QString::null );
+ const TQString style = footnoteSep.attributeNS( KoXmlNS::style, "line-style", TQString() );
if ( style == "solid" || style.isEmpty() )
m_footNoteSeparatorLineType = SLT_SOLID;
else if ( style == "dash" )
@@ -1244,7 +1244,7 @@ bool KWDocument::loadOasisPageLayout( const QString& masterPageName, KoOasisCont
else
kdDebug() << "Unknown value for m_footNoteSeparatorLineType: " << style << endl;
- const QString pos = footnoteSep.attributeNS( KoXmlNS::style, "adjustment", QString::null );
+ const TQString pos = footnoteSep.attributeNS( KoXmlNS::style, "adjustment", TQString() );
if ( pos == "centered" )
m_footNoteSeparatorLinePos = SLP_CENTERED;
else if ( pos == "right")
@@ -1253,17 +1253,17 @@ bool KWDocument::loadOasisPageLayout( const QString& masterPageName, KoOasisCont
m_footNoteSeparatorLinePos = SLP_LEFT;
}
- const QDomElement columnsElem = KoDom::namedItemNS( properties, KoXmlNS::style, "columns" );
+ const TQDomElement columnsElem = KoDom::namedItemNS( properties, KoXmlNS::style, "columns" );
if ( !columnsElem.isNull() )
{
- columns.columns = columnsElem.attributeNS( KoXmlNS::fo, "column-count", QString::null ).toInt();
+ columns.columns = columnsElem.attributeNS( KoXmlNS::fo, "column-count", TQString() ).toInt();
if ( columns.columns == 0 )
columns.columns = 1;
// TODO OASIS OpenDocument supports columns of different sizes, using <style:column style:rel-width="...">
// (with fo:start-indent/fo:end-indent for per-column spacing)
// But well, it also allows us to specify a single gap.
if ( columnsElem.hasAttributeNS( KoXmlNS::fo, "column-gap" ) )
- columns.ptColumnSpacing = KoUnit::parseValue( columnsElem.attributeNS( KoXmlNS::fo, "column-gap", QString::null ) );
+ columns.ptColumnSpacing = KoUnit::parseValue( columnsElem.attributeNS( KoXmlNS::fo, "column-gap", TQString() ) );
// It also supports drawing a vertical line as a separator...
}
@@ -1287,29 +1287,29 @@ bool KWDocument::loadOasisPageLayout( const QString& masterPageName, KoOasisCont
return true;
}
-bool KWDocument::loadMasterPageStyle( const QString& masterPageName, KoOasisContext& context )
+bool KWDocument::loadMasterPageStyle( const TQString& masterPageName, KoOasisContext& context )
{
const KoOasisStyles& oasisStyles = context.oasisStyles();
- const QDomElement* masterPage = oasisStyles.masterPages()[ masterPageName ];
+ const TQDomElement* masterPage = oasisStyles.masterPages()[ masterPageName ];
Q_ASSERT( masterPage );
- const QDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-layout-name", QString::null ) ) : 0;
+ const TQDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() ) ) : 0;
Q_ASSERT( masterPageStyle );
// This check is done here and not in loadOasisPageLayout in case the Standard master-page
// has no page information but the first paragraph points to a master-page that does (#129585)
if ( m_pageLayout.ptWidth <= 1e-13 || m_pageLayout.ptHeight <= 1e-13 )
{
- // Loading page layout failed, try to see why.
- QDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-layout-properties" ) );
+ // Loading page tqlayout failed, try to see why.
+ TQDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-tqlayout-properties" ) );
//if ( properties.isNull() )
- // setErrorMessage( i18n( "Invalid document. No page layout properties were found. The application which produced this document isn't OASIS-compliant." ) );
+ // setErrorMessage( i18n( "Invalid document. No page tqlayout properties were found. The application which produced this document isn't OASIS-compliant." ) );
//else if ( properties.hasAttributeNS( KoXmlNS::fo, "page-width" ) )
- // setErrorMessage( i18n( "Invalid document. Page layout has no page width. The application which produced this document isn't OASIS-compliant." ) );
+ // setErrorMessage( i18n( "Invalid document. Page tqlayout has no page width. The application which produced this document isn't OASIS-compliant." ) );
//else
if ( properties.hasAttributeNS( "http://www.w3.org/1999/XSL/Format", "page-width" ) )
setErrorMessage( i18n( "Invalid document. 'fo' has the wrong namespace. The application which produced this document is not OASIS-compliant." ) );
else
- setErrorMessage( i18n( "Invalid document. Paper size: %1x%2" ).arg( m_pageLayout.ptWidth ).arg( m_pageLayout.ptHeight ) );
+ setErrorMessage( i18n( "Invalid document. Paper size: %1x%2" ).tqarg( m_pageLayout.ptWidth ).tqarg( m_pageLayout.ptHeight ) );
return false;
}
@@ -1322,10 +1322,10 @@ bool KWDocument::loadMasterPageStyle( const QString& masterPageName, KoOasisCont
{
KWOasisLoader oasisLoader( this );
- QDomElement headerStyle = KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "header-style" );
- QDomElement footerStyle = KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "footer-style" );
- QDomElement headerLeftElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "header-left" );
- QDomElement headerFirstElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "header-first" ); // hack, not oasis compliant
+ TQDomElement headerStyle = KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "header-style" );
+ TQDomElement footerStyle = KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "footer-style" );
+ TQDomElement headerLeftElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "header-left" );
+ TQDomElement headerFirstElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "header-first" ); // hack, not oasis compliant
const bool hasFirstHeader = !headerFirstElem.isNull();
if ( !headerLeftElem.isNull() )
{
@@ -1342,7 +1342,7 @@ bool KWDocument::loadMasterPageStyle( const QString& masterPageName, KoOasisCont
oasisLoader.loadOasisHeaderFooter( headerFirstElem, hasEvenOddHeader, headerStyle, context );
}
- QDomElement headerElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "header" );
+ TQDomElement headerElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "header" );
if ( !headerElem.isNull() )
{
oasisLoader.loadOasisHeaderFooter( headerElem, hasEvenOddHeader, headerStyle, context );
@@ -1350,8 +1350,8 @@ bool KWDocument::loadMasterPageStyle( const QString& masterPageName, KoOasisCont
// -- and now footers
- QDomElement footerLeftElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "footer-left" );
- QDomElement footerFirstElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "footer-first" ); // hack, not oasis compliant
+ TQDomElement footerLeftElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "footer-left" );
+ TQDomElement footerFirstElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "footer-first" ); // hack, not oasis compliant
const bool hasFirstFooter = !footerFirstElem.isNull();
if ( !footerLeftElem.isNull() )
{
@@ -1367,7 +1367,7 @@ bool KWDocument::loadMasterPageStyle( const QString& masterPageName, KoOasisCont
{
oasisLoader.loadOasisHeaderFooter( footerFirstElem, hasEvenOddFooter, footerStyle, context );
}
- QDomElement footerElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "footer" );
+ TQDomElement footerElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "footer" );
if ( !footerElem.isNull() )
{
oasisLoader.loadOasisHeaderFooter( footerElem, hasEvenOddFooter, footerStyle, context );
@@ -1440,11 +1440,11 @@ void KWDocument::clear()
// And let's do the same for framestyles
KWFrameStyle * standardFrameStyle = new KWFrameStyle( "Plain" );
- standardFrameStyle->setBackgroundColor(Qt::white);
- standardFrameStyle->setTopBorder(KoBorder(Qt::black,KoBorder::SOLID,0));
- standardFrameStyle->setRightBorder(KoBorder(Qt::black,KoBorder::SOLID,0));
- standardFrameStyle->setLeftBorder(KoBorder(Qt::black,KoBorder::SOLID,0));
- standardFrameStyle->setBottomBorder(KoBorder(Qt::black,KoBorder::SOLID,0));
+ standardFrameStyle->setBackgroundColor(TQt::white);
+ standardFrameStyle->setTopBorder(KoBorder(TQt::black,KoBorder::SOLID,0));
+ standardFrameStyle->setRightBorder(KoBorder(TQt::black,KoBorder::SOLID,0));
+ standardFrameStyle->setLeftBorder(KoBorder(TQt::black,KoBorder::SOLID,0));
+ standardFrameStyle->setBottomBorder(KoBorder(TQt::black,KoBorder::SOLID,0));
m_frameStyleColl->addStyle( standardFrameStyle );
// And let's do the same for tablestyles
@@ -1452,9 +1452,9 @@ void KWDocument::clear()
m_tableStyleColl->addStyle( standardTableStyle );
}
-bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
+bool KWDocument::loadXML( TQIODevice *, const TQDomDocument & doc )
{
- QTime dt;
+ TQTime dt;
dt.start();
emit sigProgress( 0 );
kdDebug(32001) << "KWDocument::loadXML" << endl;
@@ -1471,10 +1471,10 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
hf.ptFooterBodySpacing = 10.0;
hf.ptFootNoteBodySpacing = 10.0;
- QString value;
- QDomElement word = doc.documentElement();
+ TQString value;
+ TQDomElement word = doc.documentElement();
- value = KWDocument::getAttribute( word, "mime", QString::null );
+ value = KWDocument::getAttribute( word, "mime", TQString() );
if ( value.isEmpty() )
{
kdError(32001) << "No mime type specified!" << endl;
@@ -1484,7 +1484,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
else if ( value != "application/x-kword" && value != "application/vnd.kde.kword" )
{
kdError(32001) << "Unknown mime type " << value << endl;
- setErrorMessage( i18n( "Invalid document. Expected mimetype application/x-kword or application/vnd.kde.kword, got %1" ).arg( value ) );
+ setErrorMessage( i18n( "Invalid document. Expected mimetype application/x-kword or application/vnd.kde.kword, got %1" ).tqarg( value ) );
return false;
}
m_syntaxVersion = KWDocument::getAttribute( word, "syntaxVersion", 0 );
@@ -1492,7 +1492,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
{
int ret = KMessageBox::warningContinueCancel(
0, i18n("This document was created with a newer version of KWord (syntax version: %1)\n"
- "Opening it in this version of KWord will lose some information.").arg(m_syntaxVersion),
+ "Opening it in this version of KWord will lose some information.").tqarg(m_syntaxVersion),
i18n("File Format Mismatch"), KStdGuiItem::cont() );
if ( ret == KMessageBox::Cancel )
{
@@ -1505,7 +1505,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
// Looks like support for the old way of naming images internally,
// see completeLoading.
- value = KWDocument::getAttribute( word, "url", QString::null );
+ value = KWDocument::getAttribute( word, "url", TQString() );
if ( !value.isNull() )
{
m_urlIntern = KURL( value ).path();
@@ -1514,7 +1514,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
emit sigProgress(5);
// <PAPER>
- QDomElement paper = word.namedItem( "PAPER" ).toElement();
+ TQDomElement paper = word.namedItem( "PAPER" ).toElement();
if ( !paper.isNull() )
{
pgLayout.format = static_cast<KoFormat>( KWDocument::getAttribute( paper, "format", 0 ) );
@@ -1535,7 +1535,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
if ( pgLayout.ptWidth <= 0 || pgLayout.ptHeight <= 0 )
{
setErrorMessage( i18n( "Invalid document. Paper size: %1x%2" )
- .arg( pgLayout.ptWidth ).arg( pgLayout.ptHeight ) );
+ .tqarg( pgLayout.ptWidth ).tqarg( pgLayout.ptHeight ) );
return false;
}
}
@@ -1552,7 +1552,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
if ( paper.hasAttribute("slFootNotePosition"))
{
- QString tmp =paper.attribute("slFootNotePosition");
+ TQString tmp =paper.attribute("slFootNotePosition");
if ( tmp =="centered" )
m_footNoteSeparatorLinePos = SLP_CENTERED;
else if ( tmp =="right")
@@ -1582,7 +1582,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
columns.ptColumnSpacing = getAttribute( paper, "ptColumnspc", 0.0 );
// <PAPERBORDERS>
- QDomElement paperborders = paper.namedItem( "PAPERBORDERS" ).toElement();
+ TQDomElement paperborders = paper.namedItem( "PAPERBORDERS" ).toElement();
if ( !paperborders.isNull() )
{
pgLayout.ptLeft = getAttribute( paperborders, "left", 0.0 );
@@ -1607,11 +1607,11 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
kdWarning() << "No <PAPER> tag! This is a mandatory tag! Expect weird page sizes..." << endl;
// <ATTRIBUTES>
- QDomElement attributes = word.namedItem( "ATTRIBUTES" ).toElement();
+ TQDomElement attributes = word.namedItem( "ATTRIBUTES" ).toElement();
if ( !attributes.isNull() )
{
m_processingType = static_cast<ProcessingType>( KWDocument::getAttribute( attributes, "processing", 0 ) );
- //KWDocument::getAttribute( attributes, "standardpage", QString::null );
+ //KWDocument::getAttribute( attributes, "standardpage", TQString() );
m_headerVisible = static_cast<bool>( KWDocument::getAttribute( attributes, "hasHeader", 0 ) );
m_footerVisible = static_cast<bool>( KWDocument::getAttribute( attributes, "hasFooter", 0 ) );
if ( attributes.hasAttribute( "unit" ) )
@@ -1641,8 +1641,8 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
emit sigProgress(10);
- QDomElement mailmerge = word.namedItem( "MAILMERGE" ).toElement();
- if (mailmerge!=QDomElement())
+ TQDomElement mailmerge = word.namedItem( "MAILMERGE" ).toElement();
+ if (mailmerge!=TQDomElement())
{
m_slDataBase->load(mailmerge);
}
@@ -1650,13 +1650,13 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
emit sigProgress(15);
// Load all styles before the corresponding paragraphs try to use them!
- QDomElement stylesElem = word.namedItem( "STYLES" ).toElement();
+ TQDomElement stylesElem = word.namedItem( "STYLES" ).toElement();
if ( !stylesElem.isNull() )
loadStyleTemplates( stylesElem );
emit sigProgress(17);
- QDomElement frameStylesElem = word.namedItem( "FRAMESTYLES" ).toElement();
+ TQDomElement frameStylesElem = word.namedItem( "FRAMESTYLES" ).toElement();
if ( !frameStylesElem.isNull() )
loadFrameStyleTemplates( frameStylesElem );
else // load default styles
@@ -1664,7 +1664,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
emit sigProgress(18);
- QDomElement tableStylesElem = word.namedItem( "TABLESTYLES" ).toElement();
+ TQDomElement tableStylesElem = word.namedItem( "TABLESTYLES" ).toElement();
if ( !tableStylesElem.isNull() )
loadTableStyleTemplates( tableStylesElem );
else // load default styles
@@ -1676,10 +1676,10 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
emit sigProgress(20);
- QDomElement bookmark = word.namedItem( "BOOKMARKS" ).toElement();
+ TQDomElement bookmark = word.namedItem( "BOOKMARKS" ).toElement();
if( !bookmark.isNull() )
{
- QDomElement bookmarkitem = word.namedItem("BOOKMARKS").toElement();
+ TQDomElement bookmarkitem = word.namedItem("BOOKMARKS").toElement();
bookmarkitem = bookmarkitem.firstChild().toElement();
while ( !bookmarkitem.isNull() )
@@ -1700,11 +1700,11 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
}
}
- QStringList lst;
- QDomElement spellCheckIgnore = word.namedItem( "SPELLCHECKIGNORELIST" ).toElement();
+ TQStringList lst;
+ TQDomElement spellCheckIgnore = word.namedItem( "SPELLCHECKIGNORELIST" ).toElement();
if( !spellCheckIgnore.isNull() )
{
- QDomElement spellWord=word.namedItem("SPELLCHECKIGNORELIST").toElement();
+ TQDomElement spellWord=word.namedItem("SPELLCHECKIGNORELIST").toElement();
spellWord=spellWord.firstChild().toElement();
while ( !spellWord.isNull() )
{
@@ -1718,7 +1718,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
emit sigProgress(25);
- QDomElement framesets = word.namedItem( "FRAMESETS" ).toElement();
+ TQDomElement framesets = word.namedItem( "FRAMESETS" ).toElement();
if ( !framesets.isNull() )
loadFrameSets( framesets );
@@ -1743,11 +1743,11 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
{
// insert pages
double maxBottom = 0;
- for (QPtrListIterator<KWFrameSet> fsit = framesetsIterator(); fsit.current() ; ++fsit ) {
+ for (TQPtrListIterator<KWFrameSet> fsit = framesetsIterator(); fsit.current() ; ++fsit ) {
KWFrameSet *fs = fsit.current();
- for (QPtrListIterator<KWFrame> fit = fs->frameIterator(); fit.current() ; ++fit ) {
+ for (TQPtrListIterator<KWFrame> fit = fs->frameIterator(); fit.current() ; ++fit ) {
KWFrame *frame = fit.current();
- maxBottom = QMAX(maxBottom, frame->bottom());
+ maxBottom = TQMAX(maxBottom, frame->bottom());
}
}
KWPage *last = pageManager()->page(lastPage());
@@ -1761,7 +1761,7 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
bool first_footer = false, even_footer = false, odd_footer = false;
bool first_header = false, even_header = false, odd_header = false;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
switch( fit.current()->frameSetInfo() ) {
@@ -1799,7 +1799,7 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
KWTextFrameSet *fs = new KWTextFrameSet( this, i18n( "Odd Pages Header" ) );
//kdDebug(32001) << "KWDocument::loadXML KWTextFrameSet created " << fs << endl;
fs->setFrameSetInfo( KWFrameSet::FI_ODD_HEADER );
- KWPage *page = pageManager()->page(QMIN(startPage()+2, lastPage()));
+ KWPage *page = pageManager()->page(TQMIN(startPage()+2, lastPage()));
KWFrame *frame = new KWFrame(fs, page->leftMargin(), page->topMargin(),
page->width() - page->leftMargin() - page->rightMargin(), 20 );
//kdDebug(32001) << "KWDocument::loadXML KWFrame created " << *frame << endl;
@@ -1813,7 +1813,7 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
KWTextFrameSet *fs = new KWTextFrameSet( this, i18n( "Even Pages Header" ) );
//kdDebug(32001) << "KWDocument::loadXML KWTextFrameSet created " << fs << endl;
fs->setFrameSetInfo( KWFrameSet::FI_EVEN_HEADER );
- KWPage *page = pageManager()->page(QMIN(startPage()+1, lastPage()));
+ KWPage *page = pageManager()->page(TQMIN(startPage()+1, lastPage()));
KWFrame *frame = new KWFrame(fs, page->leftMargin(), page->topMargin(), page->width() -
page->leftMargin() - page->rightMargin(), 20 );
//kdDebug(32001) << "KWDocument::loadXML KWFrame created " << *frame << endl;
@@ -1841,7 +1841,7 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
KWTextFrameSet *fs = new KWTextFrameSet( this, i18n( "Odd Pages Footer" ) );
//kdDebug(32001) << "KWDocument::loadXML KWTextFrameSet created " << fs << endl;
fs->setFrameSetInfo( KWFrameSet::FI_ODD_FOOTER );
- KWPage *page = pageManager()->page(QMIN(startPage()+2, lastPage()));
+ KWPage *page = pageManager()->page(TQMIN(startPage()+2, lastPage()));
KWFrame *frame = new KWFrame(fs, page->leftMargin(), page->height()- page->topMargin() - 20,
page->width() - page->leftMargin() - page->rightMargin(), 20 );
//kdDebug(32001) << "KWDocument::loadXML KWFrame created " << *frame << endl;
@@ -1855,7 +1855,7 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
KWTextFrameSet *fs = new KWTextFrameSet( this, i18n( "Even Pages Footer" ) );
//kdDebug(32001) << "KWDocument::loadXML KWTextFrameSet created " << fs << endl;
fs->setFrameSetInfo( KWFrameSet::FI_EVEN_FOOTER );
- KWPage *page = pageManager()->page(QMIN(startPage()+1, lastPage()));
+ KWPage *page = pageManager()->page(TQMIN(startPage()+1, lastPage()));
KWFrame *frame = new KWFrame(fs, page->leftMargin(), page->height() - page->topMargin()- 20,
page->width() - page->leftMargin() - page->rightMargin(), 20 );
//kdDebug(32001) << "KWDocument::loadXML KWFrame created " << *frame << endl;
@@ -1928,7 +1928,7 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
// Renumber footnotes
KWTextFrameSet *frameset = dynamic_cast<KWTextFrameSet *>( m_lstFrameSet.getFirst() );
if ( frameset )
- frameset->renumberFootNotes( false /*no repaint*/ );
+ frameset->renumberFootNotes( false /*no tqrepaint*/ );
emit sigProgress(-1);
@@ -1936,10 +1936,10 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
// Connect to notifications from main text-frameset
if ( frameset ) {
- connect( frameset->textObject(), SIGNAL( chapterParagraphFormatted( KoTextParag * ) ),
- SLOT( slotChapterParagraphFormatted( KoTextParag * ) ) );
- connect( frameset, SIGNAL( mainTextHeightChanged() ),
- SIGNAL( mainTextHeightChanged() ) );
+ connect( frameset->textObject(), TQT_SIGNAL( chapterParagraphFormatted( KoTextParag * ) ),
+ TQT_SLOT( slotChapterParagraphFormatted( KoTextParag * ) ) );
+ connect( frameset, TQT_SIGNAL( mainTextHeightChanged() ),
+ TQT_SIGNAL( mainTextHeightChanged() ) );
}
// Note that more stuff will happen in completeLoading
@@ -1953,26 +1953,26 @@ void KWDocument::startBackgroundSpellCheck()
}
}
-void KWDocument::loadEmbeddedObjects( QDomElement& word )
+void KWDocument::loadEmbeddedObjects( TQDomElement& word )
{
- QDomNodeList listEmbedded = word.elementsByTagName ( "EMBEDDED" );
+ TQDomNodeList listEmbedded = word.elementsByTagName ( "EMBEDDED" );
for (unsigned int item = 0; item < listEmbedded.count(); item++)
{
- QDomElement embedded = listEmbedded.item( item ).toElement();
+ TQDomElement embedded = listEmbedded.item( item ).toElement();
loadEmbedded( embedded );
}
}
-void KWDocument::loadEmbedded( const QDomElement &embedded )
+void KWDocument::loadEmbedded( const TQDomElement &embedded )
{
- QDomElement object = embedded.namedItem( "OBJECT" ).toElement();
+ TQDomElement object = embedded.namedItem( "OBJECT" ).toElement();
if ( !object.isNull() )
{
KWDocumentChild *ch = new KWDocumentChild( this );
ch->load( object, true );
insertChild( ch );
- QDomElement settings = embedded.namedItem( "SETTINGS" ).toElement();
- QString name;
+ TQDomElement settings = embedded.namedItem( "SETTINGS" ).toElement();
+ TQString name;
if ( !settings.isNull() )
name = settings.attribute( "name" );
KWPartFrameSet *fs = new KWPartFrameSet( this, ch, name );
@@ -1990,10 +1990,10 @@ void KWDocument::loadEmbedded( const QDomElement &embedded )
}
-void KWDocument::loadStyleTemplates( const QDomElement &stylesElem )
+void KWDocument::loadStyleTemplates( const TQDomElement &stylesElem )
{
- QValueList<QString> followingStyles;
- QDomNodeList listStyles = stylesElem.elementsByTagName( "STYLE" );
+ TQValueList<TQString> followingStyles;
+ TQDomNodeList listStyles = stylesElem.elementsByTagName( "STYLE" );
if( listStyles.count() > 0) { // we are going to import at least one style.
KoParagStyle *s = m_styleColl->findStyle("Standard");
//kdDebug(32001) << "KWDocument::loadStyleTemplates looking for Standard, to delete it. Found " << s << endl;
@@ -2001,9 +2001,9 @@ void KWDocument::loadStyleTemplates( const QDomElement &stylesElem )
m_styleColl->removeStyle(s);
}
for (unsigned int item = 0; item < listStyles.count(); item++) {
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
- KoParagStyle *sty = new KoParagStyle( QString::null );
+ KoParagStyle *sty = new KoParagStyle( TQString() );
// Load the style from the <STYLE> element
sty->loadStyle( styleElem, m_syntaxVersion );
@@ -2020,7 +2020,7 @@ void KWDocument::loadStyleTemplates( const QDomElement &stylesElem )
// the real value of followingStyle is set below after loading all styles
sty->setFollowingStyle( sty );
- QDomElement formatElem = styleElem.namedItem( "FORMAT" ).toElement();
+ TQDomElement formatElem = styleElem.namedItem( "FORMAT" ).toElement();
if ( !formatElem.isNull() )
sty->format() = KWTextParag::loadFormat( formatElem, 0L, defaultFont(), globalLanguage(), globalHyphenation() );
else
@@ -2031,7 +2031,7 @@ void KWDocument::loadStyleTemplates( const QDomElement &stylesElem )
if(m_styleColl->styleList().count() > followingStyles.count() )
{
- QString following = styleElem.namedItem("FOLLOWING").toElement().attribute("name");
+ TQString following = styleElem.namedItem("FOLLOWING").toElement().attribute("name");
followingStyles.append( following );
}
else
@@ -2041,23 +2041,23 @@ void KWDocument::loadStyleTemplates( const QDomElement &stylesElem )
Q_ASSERT( followingStyles.count() == m_styleColl->styleList().count() );
unsigned int i=0;
- for( QValueList<QString>::Iterator it = followingStyles.begin(); it != followingStyles.end(); ++it ) {
+ for( TQValueList<TQString>::Iterator it = followingStyles.begin(); it != followingStyles.end(); ++it ) {
KoParagStyle * style = m_styleColl->findStyle(*it);
m_styleColl->styleAt(i++)->setFollowingStyle( style );
}
}
-void KWDocument::loadFrameStyleTemplates( const QDomElement &stylesElem )
+void KWDocument::loadFrameStyleTemplates( const TQDomElement &stylesElem )
{
- QDomNodeList listStyles = stylesElem.elementsByTagName( "FRAMESTYLE" );
+ TQDomNodeList listStyles = stylesElem.elementsByTagName( "FRAMESTYLE" );
if( listStyles.count() > 0) { // we are going to import at least one style.
KWFrameStyle *s = m_frameStyleColl->findStyle("Plain");
if(s) // delete the standard style.
m_frameStyleColl->removeStyle(s);
}
for (unsigned int item = 0; item < listStyles.count(); item++) {
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
KWFrameStyle *sty = new KWFrameStyle( styleElem );
m_frameStyleColl->addStyle( sty );
@@ -2066,7 +2066,7 @@ void KWDocument::loadFrameStyleTemplates( const QDomElement &stylesElem )
void KWDocument::loadDefaultFrameStyleTemplates()
{
- const QString fsfileName( locate("data", "kword/framestyles.xml") );
+ const TQString fsfileName( locate("data", "kword/framestyles.xml") );
kdDebug(30003) << "Data directory: " << KGlobal::dirs()->resourceDirs( "data" ) << endl;
kdDebug(30003) << "Directory searched: " << KGlobal::dirs()->resourceDirs( "data" ) << endl;
@@ -2074,16 +2074,16 @@ void KWDocument::loadDefaultFrameStyleTemplates()
m_frameStyleColl->setDefault( true );
- if ( ! QFile::exists( fsfileName ) )
+ if ( ! TQFile::exists( fsfileName ) )
{
kdWarning(30003) << "Cannot find any framestyles.xml" << endl;
if (!m_frameStyleColl->findStyle("Plain")) {
KWFrameStyle * standardFrameStyle = new KWFrameStyle( "Plain" );
- standardFrameStyle->setBackgroundColor(QColor("white"));
- standardFrameStyle->setTopBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
- standardFrameStyle->setRightBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
- standardFrameStyle->setLeftBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
- standardFrameStyle->setBottomBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setBackgroundColor(TQColor("white"));
+ standardFrameStyle->setTopBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setRightBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setLeftBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setBottomBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
m_frameStyleColl->addStyle( standardFrameStyle );
}
return;
@@ -2092,17 +2092,17 @@ void KWDocument::loadDefaultFrameStyleTemplates()
kdDebug(30003) << "File framestyles.xml found!" << endl;
// Open file and parse it
- QFile in( fsfileName );
+ TQFile in( fsfileName );
if ( !in.open( IO_ReadOnly ) )
{
//i18n( "Couldn't open the file for reading (check read permissions)" );
kdWarning(30003) << "Couldn't open the file for reading (check read permissions)" << endl;
return;
}
- QString errorMsg;
+ TQString errorMsg;
int errorLine;
int errorColumn;
- QDomDocument doc;
+ TQDomDocument doc;
if ( ! doc.setContent( &in , &errorMsg, &errorLine, &errorColumn ) )
{
kdError (30003) << "Parsing Error! Aborting! (in KWDocument::loadDefaultFrameStyleTemplates())" << endl
@@ -2112,32 +2112,32 @@ void KWDocument::loadDefaultFrameStyleTemplates()
in.close();
// Start adding framestyles
- QDomElement stylesElem = doc.documentElement();
+ TQDomElement stylesElem = doc.documentElement();
- QDomNodeList listStyles = stylesElem.elementsByTagName( "FRAMESTYLE" );
+ TQDomNodeList listStyles = stylesElem.elementsByTagName( "FRAMESTYLE" );
if( listStyles.count() > 0) { // we are going to import at least one style.
KWFrameStyle *s = m_frameStyleColl->findStyle("Plain");
if(s) // delete the standard style.
m_frameStyleColl->removeStyle(s);
}
for (unsigned int item = 0; item < listStyles.count(); item++) {
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
KWFrameStyle *sty = new KWFrameStyle( styleElem );
m_frameStyleColl->addStyle( sty );
}
}
-void KWDocument::loadTableStyleTemplates( const QDomElement& stylesElem )
+void KWDocument::loadTableStyleTemplates( const TQDomElement& stylesElem )
{
- QDomNodeList listStyles = stylesElem.elementsByTagName( "TABLESTYLE" );
+ TQDomNodeList listStyles = stylesElem.elementsByTagName( "TABLESTYLE" );
if( listStyles.count() > 0) { // we are going to import at least one style.
KWTableStyle *s = m_tableStyleColl->findStyle("Plain");
if(s) // delete the standard style.
m_tableStyleColl->removeStyle(s);
}
for (unsigned int item = 0; item < listStyles.count(); item++) {
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
KWTableStyle *sty = new KWTableStyle( styleElem, this );
m_tableStyleColl->addStyle( sty );
@@ -2150,7 +2150,7 @@ void KWDocument::loadDefaultTableStyleTemplates()
m_tableStyleColl->setDefault( true );
- if ( ! QFile::exists(locate("data", "kword/tablestyles.xml")) )
+ if ( ! TQFile::exists(locate("data", "kword/tablestyles.xml")) )
{
if (!m_tableStyleColl->findStyle("Plain")) {
m_tableStyleColl->addStyle( new KWTableStyle( "Plain", m_styleColl->styleAt(0), m_frameStyleColl->frameStyleAt(0) ) );
@@ -2161,17 +2161,17 @@ void KWDocument::loadDefaultTableStyleTemplates()
fsfile.setPath( locate("data", "kword/tablestyles.xml") );
// Open file and parse it
- QFile in( fsfile.path() );
+ TQFile in( fsfile.path() );
if ( !in.open( IO_ReadOnly ) )
{
//i18n( "Couldn't open the file for reading (check read permissions)" );
return;
}
in.at(0);
- QString errorMsg;
+ TQString errorMsg;
int errorLine;
int errorColumn;
- QDomDocument doc;
+ TQDomDocument doc;
if ( doc.setContent( &in , &errorMsg, &errorLine, &errorColumn ) ) {
}
else
@@ -2183,16 +2183,16 @@ void KWDocument::loadDefaultTableStyleTemplates()
in.close();
// Start adding tablestyles
- QDomElement stylesElem = doc.documentElement();
+ TQDomElement stylesElem = doc.documentElement();
- QDomNodeList listStyles = stylesElem.elementsByTagName( "TABLESTYLE" );
+ TQDomNodeList listStyles = stylesElem.elementsByTagName( "TABLESTYLE" );
if( listStyles.count() > 0) { // we are going to import at least one style.
KWTableStyle *s = m_tableStyleColl->findStyle("Plain");
if(s) // delete the standard style.
m_tableStyleColl->removeStyle(s);
}
for (unsigned int item = 0; item < listStyles.count(); item++) {
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
KWTableStyle *sty = new KWTableStyle( styleElem, this );
m_tableStyleColl->addStyle( sty );
@@ -2203,7 +2203,7 @@ void KWDocument::loadDefaultTableTemplates()
{
KURL fsfile;
- if ( ! QFile::exists(locate("data", "kword/tabletemplates.xml")) )
+ if ( ! TQFile::exists(locate("data", "kword/tabletemplates.xml")) )
{
if (!m_tableTemplateColl->findTableTemplate("Plain")) {
KWTableTemplate * standardTableTemplate = new KWTableTemplate( "Plain" );
@@ -2225,17 +2225,17 @@ void KWDocument::loadDefaultTableTemplates()
fsfile.setPath( locate("data", "kword/tabletemplates.xml") );
// Open file and parse it
- QFile in( fsfile.path() );
+ TQFile in( fsfile.path() );
if ( !in.open( IO_ReadOnly ) )
{
//i18n( "Couldn't open the file for reading (check read permissions)" );
return;
}
in.at(0);
- QString errorMsg;
+ TQString errorMsg;
int errorLine;
int errorColumn;
- QDomDocument doc;
+ TQDomDocument doc;
if ( doc.setContent( &in , &errorMsg, &errorLine, &errorColumn ) ) {
}
else
@@ -2247,16 +2247,16 @@ void KWDocument::loadDefaultTableTemplates()
in.close();
// Start adding framestyles
- QDomElement templatesElem = doc.documentElement();
+ TQDomElement templatesElem = doc.documentElement();
- QDomNodeList listTemplates = templatesElem.elementsByTagName( "TABLETEMPLATE" );
+ TQDomNodeList listTemplates = templatesElem.elementsByTagName( "TABLETEMPLATE" );
if( listTemplates.count() > 0) {
KWTableTemplate *s = m_tableTemplateColl->findTableTemplate("Plain");
if(s)
m_tableTemplateColl->removeTableTemplate(s);
}
for (unsigned int item = 0; item < listTemplates.count(); item++) {
- QDomElement templateElem = listTemplates.item( item ).toElement();
+ TQDomElement templateElem = listTemplates.item( item ).toElement();
KWTableTemplate *temp = new KWTableTemplate( templateElem, this );
m_tableTemplateColl->addTableTemplate( temp );
@@ -2277,14 +2277,14 @@ void KWDocument::progressItemLoaded()
}
}
-void KWDocument::loadFrameSets( const QDomElement &framesetsElem )
+void KWDocument::loadFrameSets( const TQDomElement &framesetsElem )
{
// <FRAMESET>
// First prepare progress info
m_nrItemsToLoad = 0; // total count of items (mostly paragraph and frames)
- QDomElement framesetElem = framesetsElem.firstChild().toElement();
- // Workaround the slowness of QDom's elementsByTagName
- QValueList<QDomElement> framesets;
+ TQDomElement framesetElem = framesetsElem.firstChild().toElement();
+ // Workaround the slowness of TQDom's elementsByTagName
+ TQValueList<TQDomElement> framesets;
for ( ; !framesetElem.isNull() ; framesetElem = framesetElem.nextSibling().toElement() )
{
if ( framesetElem.tagName() == "FRAMESET" )
@@ -2296,26 +2296,26 @@ void KWDocument::loadFrameSets( const QDomElement &framesetsElem )
m_itemsLoaded = 0;
- QValueList<QDomElement>::Iterator it = framesets.begin();
- QValueList<QDomElement>::Iterator end = framesets.end();
+ TQValueList<TQDomElement>::Iterator it = framesets.begin();
+ TQValueList<TQDomElement>::Iterator end = framesets.end();
for ( ; it != end ; ++it )
{
(void) loadFrameSet( *it );
}
}
-KWFrameSet * KWDocument::loadFrameSet( QDomElement framesetElem, bool loadFrames, bool loadFootnote )
+KWFrameSet * KWDocument::loadFrameSet( TQDomElement framesetElem, bool loadFrames, bool loadFootnote )
{
FrameSetType frameSetType = static_cast<FrameSetType>( KWDocument::getAttribute( framesetElem, "frameType", FT_BASE ) );
- QString fsname = KWDocument::getAttribute( framesetElem, "name", "" );
+ TQString fsname = KWDocument::getAttribute( framesetElem, "name", "" );
switch ( frameSetType ) {
case FT_TEXT: {
- QString tableName = KWDocument::getAttribute( framesetElem, "grpMgr", "" );
+ TQString tableName = KWDocument::getAttribute( framesetElem, "grpMgr", "" );
if ( !tableName.isEmpty() ) {
// Text frameset belongs to a table -> find table by name
KWTableFrameSet *table = 0L;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit ) {
KWFrameSet *f = fit.current();
if( f->type() == FT_TABLE &&
@@ -2356,7 +2356,7 @@ KWFrameSet * KWDocument::loadFrameSet( QDomElement framesetElem, bool loadFrames
if ( framesetElem.hasAttribute( "autoCreateNewFrame" ) )
{
KWFrame::FrameBehavior behav = static_cast<KWFrame::FrameBehavior>( framesetElem.attribute( "autoCreateNewFrame" ).toInt() );
- QPtrListIterator<KWFrame> frameIt( fs->frameIterator() );
+ TQPtrListIterator<KWFrame> frameIt( fs->frameIterator() );
for ( ; frameIt.current() ; ++frameIt ) // Apply it to all frames
frameIt.current()->setFrameBehavior( behav );
}
@@ -2415,7 +2415,7 @@ bool KWDocument::completeLoading( KoStore *store )
processFootNoteRequests();
// Save memory
- m_urlIntern = QString::null;
+ m_urlIntern = TQString();
// The fields and dates just got loaded -> update vars
recalcVariables( VT_FIELD );
@@ -2423,7 +2423,7 @@ bool KWDocument::completeLoading( KoStore *store )
recalcVariables( VT_STATISTIC ); // e.g. number of words etc.
// Finalize all the existing [non-inline] framesets
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
fit.current()->finalize();
@@ -2437,9 +2437,9 @@ bool KWDocument::completeLoading( KoStore *store )
fixZOrders();
emit newContentsSize();
- repaintAllViews( true ); // in case any view exists already
+ tqrepaintAllViews( true ); // in case any view exists already
reactivateBgSpellChecking();
- connect( documentInfo(), SIGNAL( sigDocumentInfoModifed()),this,SLOT(slotDocumentInfoModifed() ) );
+ connect( documentInfo(), TQT_SIGNAL( sigDocumentInfoModifed()),this,TQT_SLOT(slotDocumentInfoModifed() ) );
//desactivate bgspellchecking
//attributes isReadWrite is not placed at the beginning !
@@ -2473,7 +2473,7 @@ void KWDocument::deleteLoadingInfo()
void KWDocument::processPictureRequests()
{
- QPtrListIterator<KWTextImage> it2 ( m_textImageRequests );
+ TQPtrListIterator<KWTextImage> it2 ( m_textImageRequests );
for ( ; it2.current() ; ++it2 )
{
it2.current()->setImage( *m_pictureCollection );
@@ -2481,7 +2481,7 @@ void KWDocument::processPictureRequests()
m_textImageRequests.clear();
//kdDebug(32001) << m_pictureRequests.count() << " picture requests." << endl;
- QPtrListIterator<KWPictureFrameSet> it3( m_pictureRequests );
+ TQPtrListIterator<KWPictureFrameSet> it3( m_pictureRequests );
for ( ; it3.current() ; ++it3 )
it3.current()->setPicture( m_pictureCollection->findPicture( it3.current()->key() ) );
m_pictureRequests.clear();
@@ -2489,17 +2489,17 @@ void KWDocument::processPictureRequests()
void KWDocument::processAnchorRequests()
{
- QMapIterator<QString, KWAnchorPosition> itanch = m_anchorRequests.begin();
+ TQMapIterator<TQString, KWAnchorPosition> itanch = m_anchorRequests.begin();
for ( ; itanch != m_anchorRequests.end(); ++itanch )
{
- QString fsname = itanch.key();
- if ( m_pasteFramesetsMap && m_pasteFramesetsMap->contains( fsname ) )
+ TQString fsname = itanch.key();
+ if ( m_pasteFramesetsMap && m_pasteFramesetsMap->tqcontains( fsname ) )
fsname = (*m_pasteFramesetsMap)[ fsname ];
kdDebug(32001) << "KWDocument::processAnchorRequests anchoring frameset " << fsname << endl;
KWFrameSet * fs = frameSetByName( fsname );
Q_ASSERT( fs );
if ( fs )
- fs->setAnchored( itanch.data().textfs, itanch.data().paragId, itanch.data().index, true, false /*don't repaint yet*/ );
+ fs->setAnchored( itanch.data().textfs, itanch.data().paragId, itanch.data().index, true, false /*don't tqrepaint yet*/ );
}
m_anchorRequests.clear();
}
@@ -2507,11 +2507,11 @@ void KWDocument::processAnchorRequests()
bool KWDocument::processFootNoteRequests()
{
bool ret = false;
- QMapIterator<QString, KWFootNoteVariable *> itvar = m_footnoteVarRequests.begin();
+ TQMapIterator<TQString, KWFootNoteVariable *> itvar = m_footnoteVarRequests.begin();
for ( ; itvar != m_footnoteVarRequests.end(); ++itvar )
{
- QString fsname = itvar.key();
- if ( m_pasteFramesetsMap && m_pasteFramesetsMap->contains( fsname ) )
+ TQString fsname = itvar.key();
+ if ( m_pasteFramesetsMap && m_pasteFramesetsMap->tqcontains( fsname ) )
fsname = (*m_pasteFramesetsMap)[ fsname ];
//kdDebug(32001) << "KWDocument::processFootNoteRequests binding footnote var " << itvar.data() << " and frameset " << fsname << endl;
KWFrameSet * fs = frameSetByName( fsname );
@@ -2533,46 +2533,46 @@ bool KWDocument::processFootNoteRequests()
if ( ret ) {
KWFrameSet *frameset = m_lstFrameSet.getFirst();
if ( frameset && frameset->type() == FT_TEXT )
- static_cast<KWTextFrameSet *>(frameset)->renumberFootNotes( false /*no repaint*/ );
+ static_cast<KWTextFrameSet *>(frameset)->renumberFootNotes( false /*no tqrepaint*/ );
}
return ret;
}
-QString KWDocument::uniqueFramesetName( const QString& oldName )
+TQString KWDocument::uniqueFramesetName( const TQString& oldName )
{
- QString newName = oldName;
+ TQString newName = oldName;
if (frameSetByName( oldName ))//rename it if name frameset exists
{
// make up a new name for the frameset, use Copy[digits]-[oldname] as template.
// Fully translatable naturally :)
- QString searchString( "^(" + i18n("Copy%1-%2").arg("\\d*").arg("){0,1}") );
- searchString = searchString.replace(QRegExp("\\-"), "\\-"); // escape the '-'
- QRegExp searcher(searchString);
+ TQString searchString( "^(" + i18n("Copy%1-%2").tqarg("\\d*").tqarg("){0,1}") );
+ searchString = searchString.tqreplace(TQRegExp("\\-"), "\\-"); // escape the '-'
+ TQRegExp searcher(searchString);
int count=0;
do {
newName=oldName;
- newName.replace(searcher,i18n("Copy%1-%2").arg(count > 0? QString("%1").arg(count):"").arg(""));
+ newName.tqreplace(searcher,i18n("Copy%1-%2").tqarg(count > 0? TQString("%1").tqarg(count):"").tqarg(""));
count++;
} while ( frameSetByName( newName ) );
}
return newName;
}
-void KWDocument::pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, bool copyFootNote, bool loadFootNote, bool selectFrames )
+void KWDocument::pasteFrames( TQDomElement topElem, KMacroCommand * macroCmd, bool copyFootNote, bool loadFootNote, bool selectFrames )
{
- m_pasteFramesetsMap = new QMap<QString, QString>();
- //QPtrList<KWFrameSet> frameSetsToFinalize;
+ m_pasteFramesetsMap = new TQMap<TQString, TQString>();
+ //TQPtrList<KWFrameSet> frameSetsToFinalize;
int ref=0;
int nb = 0;
- QDomElement elem = topElem.firstChild().toElement();
+ TQDomElement elem = topElem.firstChild().toElement();
for ( ; !elem.isNull() ; elem = elem.nextSibling().toElement() )
{
//kdDebug() << "pasteFrames: elem=" << elem.tagName() << endl;
- QDomElement frameElem;
+ TQDomElement frameElem;
KWFrameSet * fs = 0L;
if ( elem.tagName() == "FRAME" )
{
- QString frameSetName = frameElem.attribute( "parentFrameset" );
+ TQString frameSetName = frameElem.attribute( "tqparentFrameset" );
fs = frameSetByName( frameSetName );
if ( !fs )
{
@@ -2584,8 +2584,8 @@ void KWDocument::pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, boo
else if ( elem.tagName() == "FRAMESET" )
{
// Prepare a new name for the frameset
- QString oldName = elem.attribute( "name" );
- QString newName = uniqueFramesetName( oldName ); // make up a new name for the frameset
+ TQString oldName = elem.attribute( "name" );
+ TQString newName = uniqueFramesetName( oldName ); // make up a new name for the frameset
m_pasteFramesetsMap->insert( oldName, newName ); // remember the name transformation
if(oldName != newName)
@@ -2599,7 +2599,7 @@ void KWDocument::pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, boo
m_lstFrameSet.append( table );
table->setZOrder();
if ( macroCmd )
- macroCmd->addCommand( new KWCreateTableCommand( QString::null, table ) );
+ macroCmd->addCommand( new KWCreateTableCommand( TQString(), table ) );
fs = table;
break;
}
@@ -2635,7 +2635,7 @@ void KWDocument::pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, boo
if ( fs )
{
- //if ( frameSetsToFinalize.findRef( fs ) == -1 )
+ //if ( frameSetsToFinalize.tqfindRef( fs ) == -1 )
// frameSetsToFinalize.append( fs );
// Load the frame
@@ -2653,7 +2653,7 @@ void KWDocument::pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, boo
nb++;
fs->addFrame( frame, false );
if ( selectFrames ) {
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin();
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin();
it != m_lstViews.end(); ++it ) {
KWFrameView *fv = (*it)->frameViewManager()->view(frame);
if(fv)
@@ -2662,7 +2662,7 @@ void KWDocument::pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, boo
}
if ( macroCmd )
{
- KWCreateFrameCommand *cmd = new KWCreateFrameCommand( QString::null, frame );
+ KWCreateFrameCommand *cmd = new KWCreateFrameCommand( TQString(), frame );
macroCmd->addCommand(cmd);
}
}
@@ -2705,43 +2705,43 @@ void KWDocument::completePasting()
processAnchorRequests();
if ( processFootNoteRequests() )
{
- // We pasted footnotes. Relayout frames.
+ // We pasted footnotes. Retqlayout frames.
recalcFrames();
}
// Finalize afterwards - especially in case of inline frames, made them inline in processAnchorRequests
- //for ( QPtrListIterator<KWFrameSet> fit( frameSetsToFinalize ); fit.current(); ++fit )
+ //for ( TQPtrListIterator<KWFrameSet> fit( frameSetsToFinalize ); fit.current(); ++fit )
// Do it on all of them (we'd need to store frameSetsToFinalize as member var if this is really slow)
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
fit.current()->finalize();
- repaintAllViews();
+ tqrepaintAllViews();
delete m_pasteFramesetsMap;
m_pasteFramesetsMap = 0L;
}
void KWDocument::completeOasisPasting()
{
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
fit.current()->finalize();
- repaintAllViews();
+ tqrepaintAllViews();
}
-void KWDocument::insertEmbedded( KoStore *store, QDomElement topElem, KMacroCommand * macroCmd, double offset )
+void KWDocument::insertEmbedded( KoStore *store, TQDomElement topElem, KMacroCommand * macroCmd, double offset )
{
if ( !m_pasteFramesetsMap ) // may have been created by pasteFrames
- m_pasteFramesetsMap = new QMap<QString, QString>();
+ m_pasteFramesetsMap = new TQMap<TQString, TQString>();
- QDomElement elem = topElem.firstChild().toElement();
+ TQDomElement elem = topElem.firstChild().toElement();
for ( ; !elem.isNull() ; elem = elem.nextSibling().toElement() )
{
if ( elem.tagName() == "EMBEDDED" )
{
kdDebug()<<"KWDocument::insertEmbedded() Embedded object"<<endl;
- QDomElement object = elem.namedItem( "OBJECT" ).toElement();
- QDomElement settings = elem.namedItem( "SETTINGS" ).toElement();
+ TQDomElement object = elem.namedItem( "OBJECT" ).toElement();
+ TQDomElement settings = elem.namedItem( "SETTINGS" ).toElement();
if ( object.isNull() || settings.isNull() )
{
kdError() << "No <OBJECT> or <SETTINGS> tag" << endl;
@@ -2754,25 +2754,25 @@ void KWDocument::insertEmbedded( KoStore *store, QDomElement topElem, KMacroComm
{
ch->loadDocument( store );
insertChild( ch );
- QString oldName = settings.attribute( "name" );
- QString newName = uniqueFramesetName( oldName );
+ TQString oldName = settings.attribute( "name" );
+ TQString newName = uniqueFramesetName( oldName );
m_pasteFramesetsMap->insert( oldName, newName ); // remember the name transformation
KWPartFrameSet *part = new KWPartFrameSet( this, ch, newName );
m_lstFrameSet.append( part );
kdDebug() << "KWDocument::insertEmbedded loading embedded object" << endl;
part->load( settings );
if ( offset != 0 ) {
- QRect r = ch->geometry();
+ TQRect r = ch->tqgeometry();
r.moveBy( (int)offset, (int)offset );
ch->setGeometry( r );
}
part->setZOrder();
if ( macroCmd )
{
- QPtrListIterator<KWFrame> frameIt( part->frameIterator() );
+ TQPtrListIterator<KWFrame> frameIt( part->frameIterator() );
for ( ; frameIt.current(); ++frameIt )
{
- macroCmd->addCommand( new KWCreateFrameCommand( QString::null, frameIt.current() ) );
+ macroCmd->addCommand( new KWCreateFrameCommand( TQString(), frameIt.current() ) );
}
}
}
@@ -2784,12 +2784,12 @@ void KWDocument::insertEmbedded( KoStore *store, QDomElement topElem, KMacroComm
bool KWDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
{
- QValueList<KWFrameView*> noFrames;
+ TQValueList<KWFrameView*> noFrames;
return saveOasisHelper( store, manifestWriter, SaveAll, noFrames);
}
// can't be const due to recalcVariables()
-bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag saveFlag, const QValueList<KWFrameView*> &selectedFrames, QString* plainText, KoPicture* picture, KWTextFrameSet* fs) {
+bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag saveFlag, const TQValueList<KWFrameView*> &selectedFrames, TQString* plainText, KoPicture* picture, KWTextFrameSet* fs) {
m_pictureCollection->assignUniqueIds();
fixZOrders();
@@ -2800,11 +2800,11 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
if ( !contentWriter )
return false;
- QValueList<KoPictureKey> pictureList;
+ TQValueList<KoPictureKey> pictureList;
if ( saveFlag == SaveAll )
pictureList = savePictureList();
- m_varColl->variableSetting()->setModificationDate(QDateTime::currentDateTime());
+ m_varColl->variableSetting()->setModificationDate(TQDateTime::tqcurrentDateTime());
recalcVariables( VT_DATE );
recalcVariables( VT_TIME ); // for "current time"
recalcVariables( VT_STATISTIC );
@@ -2816,7 +2816,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
// Save user styles as KoGenStyle objects
m_styleColl->saveOasis( mainStyles, KoGenStyle::STYLE_USER, savingContext );
- QByteArray headerFooterContent;
+ TQByteArray headerFooterContent;
if ( saveFlag == SaveAll )
{
// Save visual info for the first view, such as the active frameset and cursor position
@@ -2837,13 +2837,13 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
}
// Header and footers save their content into master-styles/master-page, and their
- // styles into the page-layout automatic-style.
+ // styles into the page-tqlayout automatic-style.
// However the paragraph styles used by header/footers need to be known before
// hand, to promote them to styles.xml. So we collect them first, which means
// storing the content into a buffer.
- QBuffer buffer( headerFooterContent );
+ TQBuffer buffer( headerFooterContent );
buffer.open( IO_WriteOnly );
- KoXmlWriter headerFooterTmpWriter( &buffer ); // TODO pass indentation level
+ KoXmlWriter headerFooterTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
// The order we write out header, header-left, etc. is important. So, we go here
// the dirty way to collect them first and then flush them ordered out.
@@ -2867,7 +2867,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
<< KWFrameSet::FI_FIRST_FOOTER << KWFrameSet::FI_ODD_FOOTER << KWFrameSet::FI_EVEN_FOOTER;
for (uint i=0; i<order.count(); ++i) {
KWFrameSet::Info info = order[i];
- if (tempmap.contains(info)) {
+ if (tempmap.tqcontains(info)) {
const KWFrameSet* fs = tempmap[info];
// Save content
@@ -2877,13 +2877,13 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
}
}
- // Add trailing '0' (Qt4: remove)
+ // Add trailing '0' (TQt4: remove)
headerFooterContent.resize( headerFooterContent.size() + 1 );
headerFooterContent[headerFooterContent.size()-1] = '\0';
// Now mark all autostyles as "for styles.xml" since headers/footers need them
- QValueList<KoGenStyles::NamedStyle> autoStyles = mainStyles.styles( KoGenStyle::STYLE_AUTO );
- for ( QValueList<KoGenStyles::NamedStyle>::const_iterator it = autoStyles.begin();
+ TQValueList<KoGenStyles::NamedStyle> autoStyles = mainStyles.styles( KoGenStyle::STYLE_AUTO );
+ for ( TQValueList<KoGenStyles::NamedStyle>::const_iterator it = autoStyles.begin();
it != autoStyles.end(); ++it ) {
mainStyles.markStyleForStylesXml( (*it).name );
}
@@ -2908,15 +2908,15 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
// Collect inline framesets for e.g. pictures
KWCollectFramesetsVisitor visitor;
fs->textDocument()->visitSelection( KoTextDocument::Standard, &visitor );
- const QValueList<KWFrameSet *>& frameset = visitor.frameSets();
+ const TQValueList<KWFrameSet *>& frameset = visitor.frameSets();
kdDebug(32001) << frameset.count() << " inline framesets" << endl;
- for ( QValueList<KWFrameSet *>::ConstIterator it = frameset.begin(); it != frameset.end(); ++it )
+ for ( TQValueList<KWFrameSet *>::ConstIterator it = frameset.begin(); it != frameset.end(); ++it )
{
switch ( (*it)->type() ) {
case FT_PICTURE:
{
const KoPictureKey key = static_cast<KWPictureFrameSet *>( *it )->key();
- if ( !pictureList.contains( key ) )
+ if ( !pictureList.tqcontains( key ) )
pictureList.append( key );
}
break;
@@ -2929,7 +2929,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
}
// write selected (non-inline) frames
- QString newText;
+ TQString newText;
saveSelectedFrames( *bodyWriter, savingContext, pictureList,
selectedFrames, &newText ); // output vars
*plainText += newText;
@@ -2970,8 +2970,8 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
// not while writing it (like in saveSelectedFrames).
// We can't be writing to two files at the same time.
- QValueList<KoDocumentChild*> embeddedObjects;
- QValueListConstIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQValueList<KoDocumentChild*> embeddedObjects;
+ TQValueListConstIterator<KWFrameView*> framesIterator = selectedFrames.begin();
for(; framesIterator != selectedFrames.end(); ++framesIterator) {
KWFrame *frame = (*framesIterator)->frame();
KWFrameSet *fs = frame->frameSet();
@@ -2980,7 +2980,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
}
}
- QValueList<KoDocumentChild *>::const_iterator chl = embeddedObjects.begin();
+ TQValueList<KoDocumentChild *>::const_iterator chl = embeddedObjects.begin();
for( ; chl != embeddedObjects.end(); ++chl ) {
if ( !(*chl)->saveOasis( store, manifestWriter ) )
return false;
@@ -3007,28 +3007,28 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
}
// can't be const due to recalcVariables()
-QDragObject* KWDocument::dragSelected( const QValueList<KWFrameView*> &selectedFrames) {
+TQDragObject* KWDocument::dragSelected( const TQValueList<KWFrameView*> &selectedFrames) {
return dragSelectedPrivate(0, selectedFrames, 0);
}
// can't be const due to recalcVariables()
-QDragObject* KWDocument::dragSelected( QWidget *parent, KWTextFrameSet* fs) {
- QValueList<KWFrameView*> noFrames;
- return dragSelectedPrivate(parent, noFrames, fs);
+TQDragObject* KWDocument::dragSelected( TQWidget *tqparent, KWTextFrameSet* fs) {
+ TQValueList<KWFrameView*> noFrames;
+ return dragSelectedPrivate(tqparent, noFrames, fs);
}
// can't be const due to recalcVariables()
-QDragObject* KWDocument::dragSelectedPrivate( QWidget *parent, const QValueList<KWFrameView*> &selectedFrames, KWTextFrameSet* fs)
+TQDragObject* KWDocument::dragSelectedPrivate( TQWidget *tqparent, const TQValueList<KWFrameView*> &selectedFrames, KWTextFrameSet* fs)
{
// We'll create a store (ZIP format) in memory
- QBuffer buffer;
- QCString mimeType = KWOasisSaver::selectionMimeType();
- KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType );
+ TQBuffer buffer;
+ TQCString mimeType = KWOasisSaver::selectionMimeType();
+ KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType );
Q_ASSERT( store );
Q_ASSERT( !store->bad() );
KoOasisStore oasisStore( store );
KoXmlWriter* manifestWriter = oasisStore.manifestWriter( mimeType );
- QString plainText;
+ TQString plainText;
KoPicture picture;
if ( !saveOasisHelper( store, manifestWriter, KWDocument::SaveSelected, selectedFrames, &plainText, &picture, fs )
|| !oasisStore.closeManifestWriter() )
@@ -3039,9 +3039,9 @@ QDragObject* KWDocument::dragSelectedPrivate( QWidget *parent, const QValueList<
delete store;
- KMultipleDrag* multiDrag = new KMultipleDrag( parent );
+ KMultipleDrag* multiDrag = new KMultipleDrag( tqparent );
if ( !plainText.isEmpty() )
- multiDrag->addDragObject( new QTextDrag( plainText, 0 ) );
+ multiDrag->addDragObject( new TQTextDrag( plainText, 0 ) );
if ( !picture.isNull() )
multiDrag->addDragObject( picture.dragObject( 0 ) );
KoStoreDrag* storeDrag = new KoStoreDrag( KWOasisSaver::selectionMimeType(), 0 );
@@ -3051,9 +3051,9 @@ QDragObject* KWDocument::dragSelectedPrivate( QWidget *parent, const QValueList<
return multiDrag;
}
-void KWDocument::saveSelectedFrames( KoXmlWriter& bodyWriter, KoSavingContext& savingContext, QValueList<KoPictureKey>& pictureList, const QValueList<KWFrameView*> &selectedFrames, QString* plainText ) const {
- QPtrList<KoDocumentChild> embeddedObjects;
- QValueListConstIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+void KWDocument::saveSelectedFrames( KoXmlWriter& bodyWriter, KoSavingContext& savingContext, TQValueList<KoPictureKey>& pictureList, const TQValueList<KWFrameView*> &selectedFrames, TQString* plainText ) const {
+ TQPtrList<KoDocumentChild> embeddedObjects;
+ TQValueListConstIterator<KWFrameView*> framesIterator = selectedFrames.begin();
for(; framesIterator != selectedFrames.end(); ++framesIterator) {
KWFrame *frame = (*framesIterator)->frame();
KWFrameSet *fs = frame->frameSet();
@@ -3073,13 +3073,13 @@ void KWDocument::saveSelectedFrames( KoXmlWriter& bodyWriter, KoSavingContext& s
else if ( !isTable ) {
#if 0
// Save the frame information
- QDomElement frameElem = parentElem.ownerDocument().createElement( "FRAME" );
- parentElem.appendChild( frameElem );
+ TQDomElement frameElem = tqparentElem.ownerDocument().createElement( "FRAME" );
+ tqparentElem.appendChild( frameElem );
frame->save( frameElem );
if ( frame != firstFrame )
{
// Frame saved alone -> remember which frameset it's part of
- frameElem.setAttribute( "parentFrameset", fs->name() );
+ frameElem.setAttribute( "tqparentFrameset", fs->name() );
}
#endif
}
@@ -3087,7 +3087,7 @@ void KWDocument::saveSelectedFrames( KoXmlWriter& bodyWriter, KoSavingContext& s
kdDebug(32001) << "found non-inline picture framesets" << endl;
const KoPictureKey key = static_cast<KWPictureFrameSet *>( fs )->key();
- if ( !pictureList.contains( key ) )
+ if ( !pictureList.tqcontains( key ) )
pictureList.append( key );
}
if ( isTable ) // Copy tables only once, even if they have many cells selected
@@ -3118,7 +3118,7 @@ void KWDocument::saveOasisSettings( KoXmlWriter& settingsWriter ) const
settingsWriter.endDocument();
}
-void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles, KoSavingContext& savingContext, SaveFlag saveFlag, const QByteArray& headerFooterContent ) const
+void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles, KoSavingContext& savingContext, SaveFlag saveFlag, const TQByteArray& headerFooterContent ) const
{
if ( saveFlag == SaveAll )
{
@@ -3144,8 +3144,8 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
stylesWriter->endElement(); // default-style
}
- QValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_USER );
- QValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
+ TQValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_USER );
+ TQValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
for ( ; it != styles.end() ; ++it ) {
(*it).style->writeStyle( stylesWriter, mainStyles, "style:style", (*it).name, "style:paragraph-properties" );
}
@@ -3169,7 +3169,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
static_cast<KWVariableSettings *>( m_varColl->variableSetting() )->saveNoteConfiguration( *stylesWriter );
stylesWriter->endElement(); // office:styles
- QString pageLayoutName;
+ TQString pageLayoutName;
if ( saveFlag == SaveAll )
{
stylesWriter->startElement( "office:automatic-styles" );
@@ -3187,11 +3187,11 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
}
}
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- KoXmlWriter footnoteSepTmpWriter( &buffer ); // TODO pass indentation level
+ KoXmlWriter footnoteSepTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
footnoteSepTmpWriter.startElement( "style:footnote-sep" );
- QString tmp;
+ TQString tmp;
switch( m_footNoteSeparatorLinePos )
{
case SLP_CENTERED:
@@ -3207,7 +3207,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
footnoteSepTmpWriter.addAttribute( "style:adjustment", tmp );
footnoteSepTmpWriter.addAttributePt( "style:width", m_footNoteSeparatorLineWidth );
- footnoteSepTmpWriter.addAttribute( "style:rel-width", QString::number( footNoteSeparatorLineLength() ) + "%" );
+ footnoteSepTmpWriter.addAttribute( "style:rel-width", TQString::number( footNoteSeparatorLineLength() ) + "%" );
switch( m_footNoteSeparatorLineType )
{
case SLT_SOLID:
@@ -3230,20 +3230,20 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
footnoteSepTmpWriter.addAttribute( "style:line-style", tmp );
footnoteSepTmpWriter.endElement();
- const QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ const TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
pageLayout.addChildElement( "separator", elementContents );
buffer.close();
if ( m_pageColumns.columns > 1 ) {
- buffer.setBuffer( QByteArray() ); // clear data
+ buffer.tqsetBufferFromCopy(TQByteArray()); // clear data
buffer.open( IO_WriteOnly );
- KoXmlWriter columnsTmpWriter( &buffer ); // TODO pass indentation level
+ KoXmlWriter columnsTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
columnsTmpWriter.startElement( "style:columns" );
columnsTmpWriter.addAttribute( "fo:column-count", m_pageColumns.columns );
columnsTmpWriter.addAttributePt( "fo:column-gap", m_pageColumns.ptColumnSpacing );
columnsTmpWriter.endElement(); // style:columns
buffer.close();
- const QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ const TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
pageLayout.addChildElement( "columns", elementContents );
}
@@ -3251,15 +3251,15 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
// if there's more than one pagemaster we need to rethink all this
pageLayoutName = mainStyles.lookup( pageLayout, "pm" );
- pageLayout.writeStyle( stylesWriter, mainStyles, "style:page-layout", pageLayoutName,
- "style:page-layout-properties", false /*don't close*/ );
+ pageLayout.writeStyle( stylesWriter, mainStyles, "style:page-tqlayout", pageLayoutName,
+ "style:page-tqlayout-properties", false /*don't close*/ );
// Ouch another problem: there is only one header style in oasis
// ##### can't have different borders for even/odd headers...
bool headerStyleSaved = false;
bool footerStyleSaved = false;
// ## This loop is duplicated in saveOasis
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit ) {
const KWFrameSet* fs = fit.current();
if ( fs->isVisible() && // HACK to avoid saving [hidden] headers/footers framesets for now
@@ -3301,7 +3301,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
stylesWriter->endElement(); // header-style
}
}
- stylesWriter->endElement(); // style:page-layout
+ stylesWriter->endElement(); // style:page-tqlayout
// Headers and footers might have created new automatic parag/text styles -> save those
KWOasisSaver::writeAutomaticStyles( *stylesWriter, mainStyles, true );
@@ -3313,7 +3313,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
stylesWriter->startElement( "office:master-styles" );
stylesWriter->startElement( "style:master-page" );
stylesWriter->addAttribute( "style:name", "Standard" );
- stylesWriter->addAttribute( "style:page-layout-name", pageLayoutName );
+ stylesWriter->addAttribute( "style:page-tqlayout-name", pageLayoutName );
if ( isHeaderVisible() || isFooterVisible() ) { // ### TODO save them even when hidden (and not empty)?
stylesWriter->addCompleteElement( headerFooterContent.data() );
@@ -3330,7 +3330,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
void KWDocument::saveOasisCustomFied( KoXmlWriter &writer )const
{
bool customVariableFound = false;
- QPtrListIterator<KoVariable> it( m_varColl->getVariables() );
+ TQPtrListIterator<KoVariable> it( m_varColl->getVariables() );
for ( ; it.current() ; ++it )
{
if ( it.current()->type() == VT_CUSTOM )
@@ -3358,7 +3358,7 @@ void KWDocument::saveOasisBody( KoXmlWriter& writer, KoSavingContext& context )
if ( m_processingType == WP ) {
// Write out the non-inline framesets first; OOo wants it that way...
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
++fit; // skip main text frameset
for ( ; fit.current() ; ++fit ) {
KWFrameSet* fs = fit.current();
@@ -3390,7 +3390,7 @@ void KWDocument::saveOasisBody( KoXmlWriter& writer, KoSavingContext& context )
}
writer.endElement() ; // "text:page-sequence";
// Now write the framesets
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit ) {
KWFrameSet* fs = fit.current();
if ( !fs->isFloating() &&
@@ -3403,20 +3403,20 @@ void KWDocument::saveOasisBody( KoXmlWriter& writer, KoSavingContext& context )
}
}
-QDomDocument KWDocument::saveXML()
+TQDomDocument KWDocument::saveXML()
{
- m_varColl->variableSetting()->setModificationDate(QDateTime::currentDateTime());
+ m_varColl->variableSetting()->setModificationDate(TQDateTime::tqcurrentDateTime());
recalcVariables( VT_DATE );
recalcVariables( VT_TIME ); // for "current time"
recalcVariables( VT_STATISTIC );
- QDomDocument doc = createDomDocument( "DOC", CURRENT_DTD_VERSION );
- QDomElement kwdoc = doc.documentElement();
+ TQDomDocument doc = createDomDocument( "DOC", CURRENT_DTD_VERSION );
+ TQDomElement kwdoc = doc.documentElement();
kwdoc.setAttribute( "editor", "KWord" );
kwdoc.setAttribute( "mime", "application/x-kword" );
m_syntaxVersion = CURRENT_SYNTAX_VERSION;
kwdoc.setAttribute( "syntaxVersion", m_syntaxVersion );
- QDomElement paper = doc.createElement( "PAPER" );
+ TQDomElement paper = doc.createElement( "PAPER" );
kwdoc.appendChild( paper );
paper.setAttribute( "format", static_cast<int>( m_pageLayout.format ) );
paper.setAttribute( "pages", pageCount() );
@@ -3449,14 +3449,14 @@ QDomDocument KWDocument::saveXML()
// Now part of the app config
//paper.setAttribute( "zoom",m_zoom );
- QDomElement borders = doc.createElement( "PAPERBORDERS" );
+ TQDomElement borders = doc.createElement( "PAPERBORDERS" );
paper.appendChild( borders );
borders.setAttribute( "left", m_pageLayout.ptLeft );
borders.setAttribute( "top", m_pageLayout.ptTop );
borders.setAttribute( "right", m_pageLayout.ptRight );
borders.setAttribute( "bottom", m_pageLayout.ptBottom );
- QDomElement docattrs = doc.createElement( "ATTRIBUTES" );
+ TQDomElement docattrs = doc.createElement( "ATTRIBUTES" );
kwdoc.appendChild( docattrs );
docattrs.setAttribute( "processing", static_cast<int>( m_processingType ) );
docattrs.setAttribute( "standardpage", 1 );
@@ -3486,7 +3486,7 @@ QDomDocument KWDocument::saveXML()
if( !m_bookmarkList->isEmpty() )
{
- QDomElement bookmark = doc.createElement( "BOOKMARKS" );
+ TQDomElement bookmark = doc.createElement( "BOOKMARKS" );
kwdoc.appendChild( bookmark );
for ( KoTextBookmarkList::const_iterator it = m_bookmarkList->begin();
@@ -3498,7 +3498,7 @@ QDomDocument KWDocument::saveXML()
book.endParag() &&
fs && !fs->isDeleted() )
{
- QDomElement bookElem = doc.createElement( "BOOKMARKITEM" );
+ TQDomElement bookElem = doc.createElement( "BOOKMARKITEM" );
bookmark.appendChild( bookElem );
bookElem.setAttribute( "name", book.bookmarkName() );
bookElem.setAttribute( "frameset", fs->name() );
@@ -3512,13 +3512,13 @@ QDomDocument KWDocument::saveXML()
}
variableCollection()->variableSetting()->save(kwdoc );
- QDomElement framesets = doc.createElement( "FRAMESETS" );
+ TQDomElement framesets = doc.createElement( "FRAMESETS" );
kwdoc.appendChild( framesets );
m_textImageRequests.clear(); // for KWTextImage
- QValueList<KoPictureKey> savePictures;
+ TQValueList<KoPictureKey> savePictures;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet *frameSet = fit.current();
@@ -3530,98 +3530,98 @@ QDomDocument KWDocument::saveXML()
if ( !frameSet->isDeleted() && ( frameSet->type() == FT_PICTURE ) )
{
KoPictureKey key = static_cast<KWPictureFrameSet *>( frameSet )->key();
- if ( !savePictures.contains( key ) )
+ if ( !savePictures.tqcontains( key ) )
savePictures.append( key );
}
}
// Process the data of the KWTextImage classes.
- QPtrListIterator<KWTextImage> textIt ( m_textImageRequests );
+ TQPtrListIterator<KWTextImage> textIt ( m_textImageRequests );
for ( ; textIt.current() ; ++textIt )
{
KoPictureKey key = textIt.current()->getKey();
kdDebug(32001) << "KWDocument::saveXML registering text image " << key.toString() << endl;
- if ( !savePictures.contains( key ) )
+ if ( !savePictures.tqcontains( key ) )
savePictures.append( key );
}
- QDomElement styles = doc.createElement( "STYLES" );
+ TQDomElement styles = doc.createElement( "STYLES" );
kwdoc.appendChild( styles );
- QValueList<KoUserStyle *> styleList(m_styleColl->styleList());
- for ( QValueList<KoUserStyle *>::const_iterator it = styleList.begin(), end = styleList.end();
+ TQValueList<KoUserStyle *> styleList(m_styleColl->styleList());
+ for ( TQValueList<KoUserStyle *>::const_iterator it = styleList.begin(), end = styleList.end();
it != end ; ++it )
saveStyle( static_cast<KoParagStyle *>( *it ), styles );
- QDomElement frameStyles = doc.createElement( "FRAMESTYLES" );
+ TQDomElement frameStyles = doc.createElement( "FRAMESTYLES" );
kwdoc.appendChild( frameStyles );
- QValueList<KoUserStyle *> frameStyleList(m_frameStyleColl->styleList());
- for ( QValueList<KoUserStyle *>::const_iterator it = frameStyleList.begin(), end = frameStyleList.end();
+ TQValueList<KoUserStyle *> frameStyleList(m_frameStyleColl->styleList());
+ for ( TQValueList<KoUserStyle *>::const_iterator it = frameStyleList.begin(), end = frameStyleList.end();
it != end ; ++it )
saveFrameStyle( static_cast<KWFrameStyle *>(*it), frameStyles );
- QDomElement tableStyles = doc.createElement( "TABLESTYLES" );
+ TQDomElement tableStyles = doc.createElement( "TABLESTYLES" );
kwdoc.appendChild( tableStyles );
- QValueList<KoUserStyle *> tableStyleList(m_tableStyleColl->styleList());
- for ( QValueList<KoUserStyle *>::const_iterator it = tableStyleList.begin(), end = tableStyleList.end();
+ TQValueList<KoUserStyle *> tableStyleList(m_tableStyleColl->styleList());
+ for ( TQValueList<KoUserStyle *>::const_iterator it = tableStyleList.begin(), end = tableStyleList.end();
it != end ; ++it )
saveTableStyle( static_cast<KWTableStyle *>(*it), tableStyles );
- QDomElement pictures = m_pictureCollection->saveXML( KoPictureCollection::CollectionPicture, doc, savePictures );
+ TQDomElement pictures = m_pictureCollection->saveXML( KoPictureCollection::CollectionPicture, doc, savePictures );
kwdoc.appendChild( pictures );
// Not needed anymore
#if 0
// Write out the list of parags (id) that form the table of contents, see KWContents::createContents
if ( contents->hasContents() ) {
- QDomElement cParags = doc.createElement( "CPARAGS" );
+ TQDomElement cParags = doc.createElement( "CPARAGS" );
kwdoc.appendChild( cParags );
- QValueList<int>::Iterator it = contents->begin();
+ TQValueList<int>::Iterator it = contents->begin();
for ( ; it != contents->end(); ++it )
{
- QDomElement paragElem = doc.createElement( "PARAG" );
+ TQDomElement paragElem = doc.createElement( "PARAG" );
cParags.appendChild( paragElem );
- paragElem.setAttribute( "name", QString::number( *it ) ); // write parag id
+ paragElem.setAttribute( "name", TQString::number( *it ) ); // write parag id
}
}
#endif
- QDomElement mailMerge=m_slDataBase->save(doc);
+ TQDomElement mailMerge=m_slDataBase->save(doc);
kwdoc.appendChild(mailMerge);
if( !m_spellCheckIgnoreList.isEmpty() )
{
- QDomElement spellCheckIgnore = doc.createElement( "SPELLCHECKIGNORELIST" );
+ TQDomElement spellCheckIgnore = doc.createElement( "SPELLCHECKIGNORELIST" );
kwdoc.appendChild( spellCheckIgnore );
- for ( QStringList::ConstIterator it = m_spellCheckIgnoreList.begin(); it != m_spellCheckIgnoreList.end(); ++it )
+ for ( TQStringList::ConstIterator it = m_spellCheckIgnoreList.begin(); it != m_spellCheckIgnoreList.end(); ++it )
{
- QDomElement spellElem = doc.createElement( "SPELLCHECKIGNOREWORD" );
+ TQDomElement spellElem = doc.createElement( "SPELLCHECKIGNOREWORD" );
spellCheckIgnore.appendChild( spellElem );
spellElem.setAttribute( "word", *it );
}
}
// Save embedded objects
- saveEmbeddedObjects( kwdoc, children() );
+ saveEmbeddedObjects( kwdoc, tqchildren() );
return doc;
}
// KWord-1.3 format
-void KWDocument::saveEmbeddedObjects( QDomElement& parentElem, const QPtrList<KoDocumentChild>& childList )
+void KWDocument::saveEmbeddedObjects( TQDomElement& tqparentElem, const TQPtrList<KoDocumentChild>& childList )
{
// Write "OBJECT" tag for every child, appending "EMBEDDING" tags to the main XML
- QPtrListIterator<KoDocumentChild> chl( childList );
- QDomDocument doc = parentElem.ownerDocument();
+ TQPtrListIterator<KoDocumentChild> chl( childList );
+ TQDomDocument doc = tqparentElem.ownerDocument();
for( ; chl.current(); ++chl ) {
KWDocumentChild* curr = static_cast<KWDocumentChild*>(chl.current());
if ( !curr->isDeleted() )
{
- QDomElement embeddedElem = doc.createElement( "EMBEDDED" );
- parentElem.appendChild( embeddedElem );
+ TQDomElement embeddedElem = doc.createElement( "EMBEDDED" );
+ tqparentElem.appendChild( embeddedElem );
- QDomElement objectElem = curr->save( doc, true );
+ TQDomElement objectElem = curr->save( doc, true );
embeddedElem.appendChild( objectElem );
- QDomElement settingsElem = doc.createElement( "SETTINGS" );
+ TQDomElement settingsElem = doc.createElement( "SETTINGS" );
embeddedElem.appendChild( settingsElem );
curr->partFrameSet()->save( settingsElem );
@@ -3630,57 +3630,57 @@ void KWDocument::saveEmbeddedObjects( QDomElement& parentElem, const QPtrList<Ko
}
// KWord-1.3 format
-void KWDocument::saveStyle( KoParagStyle *sty, QDomElement parentElem )
+void KWDocument::saveStyle( KoParagStyle *sty, TQDomElement tqparentElem )
{
- QDomDocument doc = parentElem.ownerDocument();
- QDomElement styleElem = doc.createElement( "STYLE" );
- parentElem.appendChild( styleElem );
+ TQDomDocument doc = tqparentElem.ownerDocument();
+ TQDomElement styleElem = doc.createElement( "STYLE" );
+ tqparentElem.appendChild( styleElem );
sty->saveStyle( styleElem );
- QDomElement formatElem = KWTextParag::saveFormat( doc, &sty->format(), 0L, 0, 0 );
+ TQDomElement formatElem = KWTextParag::saveFormat( doc, &sty->format(), 0L, 0, 0 );
styleElem.appendChild( formatElem );
}
// KWord-1.3 format
-void KWDocument::saveFrameStyle( KWFrameStyle *sty, QDomElement parentElem )
+void KWDocument::saveFrameStyle( KWFrameStyle *sty, TQDomElement tqparentElem )
{
- QDomDocument doc = parentElem.ownerDocument();
- QDomElement frameStyleElem = doc.createElement( "FRAMESTYLE" );
- parentElem.appendChild( frameStyleElem );
+ TQDomDocument doc = tqparentElem.ownerDocument();
+ TQDomElement frameStyleElem = doc.createElement( "FRAMESTYLE" );
+ tqparentElem.appendChild( frameStyleElem );
sty->saveFrameStyle( frameStyleElem );
}
// KWord-1.3 format
-void KWDocument::saveTableStyle( KWTableStyle *sty, QDomElement parentElem )
+void KWDocument::saveTableStyle( KWTableStyle *sty, TQDomElement tqparentElem )
{
- QDomDocument doc = parentElem.ownerDocument();
- QDomElement tableStyleElem = doc.createElement( "TABLESTYLE" );
- parentElem.appendChild( tableStyleElem );
+ TQDomDocument doc = tqparentElem.ownerDocument();
+ TQDomElement tableStyleElem = doc.createElement( "TABLESTYLE" );
+ tqparentElem.appendChild( tableStyleElem );
sty->saveTableStyle( tableStyleElem );
}
-QValueList<KoPictureKey> KWDocument::savePictureList()
+TQValueList<KoPictureKey> KWDocument::savePictureList()
{
- QValueList<KoPictureKey> savePictures;
+ TQValueList<KoPictureKey> savePictures;
// At first, we must process the data of the KWTextImage classes.
// Process the data of the KWTextImage classes.
- QPtrListIterator<KWTextImage> textIt ( m_textImageRequests );
+ TQPtrListIterator<KWTextImage> textIt ( m_textImageRequests );
for ( ; textIt.current() ; ++textIt )
{
KoPictureKey key = textIt.current()->getKey();
kdDebug(32001) << "KWDocument::saveXML registering text image " << key.toString() << endl;
- if ( !savePictures.contains( key ) )
+ if ( !savePictures.tqcontains( key ) )
savePictures.append( key );
}
m_textImageRequests.clear(); // Save some memory!
// Now do the images/cliparts in frames.
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet *frameSet = fit.current();
@@ -3688,7 +3688,7 @@ QValueList<KoPictureKey> KWDocument::savePictureList()
if ( !frameSet->isDeleted() && ( frameSet->type() == FT_PICTURE ) )
{
KoPictureKey key = static_cast<KWPictureFrameSet *>( frameSet )->key();
- if ( !savePictures.contains( key ) )
+ if ( !savePictures.tqcontains( key ) )
savePictures.append( key );
}
}
@@ -3701,9 +3701,9 @@ bool KWDocument::completeSaving( KoStore *store )
if ( !store )
return TRUE;
- QString u = KURL( url() ).path();
+ TQString u = KURL( url() ).path();
- QValueList<KoPictureKey> savePictures( savePictureList() );
+ TQValueList<KoPictureKey> savePictures( savePictureList() );
return m_pictureCollection->saveToStore( KoPictureCollection::CollectionPicture, store, savePictures );
}
@@ -3717,7 +3717,7 @@ void KWDocument::addView( KoView *view )
{
m_lstViews.append( (KWView*)view );
KoDocument::addView( view );
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
(*it)->deselectAllFrames();
}
}
@@ -3730,22 +3730,22 @@ void KWDocument::removeView( KoView *view )
void KWDocument::addShell( KoMainWindow *shell )
{
- connect( shell, SIGNAL( documentSaved() ), m_commandHistory, SLOT( documentSaved() ) );
- connect( shell, SIGNAL( saveDialogShown() ), this, SLOT( saveDialogShown() ) );
+ connect( shell, TQT_SIGNAL( documentSaved() ), m_commandHistory, TQT_SLOT( documentSaved() ) );
+ connect( shell, TQT_SIGNAL( saveDialogShown() ), this, TQT_SLOT( saveDialogShown() ) );
KoDocument::addShell( shell );
}
-KoView* KWDocument::createViewInstance( QWidget* parent, const char* name )
+KoView* KWDocument::createViewInstance( TQWidget* tqparent, const char* name )
{
if ( isEmbedded() )
- return new KWView( "ModeEmbedded", parent, name, this );
+ return new KWView( "ModeEmbedded", tqparent, name, this );
else
- return new KWView( m_viewModeType, parent, name, this );
+ return new KWView( m_viewModeType, tqparent, name, this );
}
// Paint this document when it's embedded
// This is also used to paint the preview.png that goes into the ZIP file
-void KWDocument::paintContent( QPainter& painter, const QRect& rectangle, bool transparent, double zoomX, double zoomY )
+void KWDocument::paintContent( TQPainter& painter, const TQRect& rectangle, bool transparent, double zoomX, double zoomY )
{
//kdDebug(32001) << "KWDocument::paintContent m_zoom=" << m_zoom << " zoomX=" << zoomX << " zoomY=" << zoomY << " transparent=" << transparent << " rectangle=" << rectangle << endl;
Q_ASSERT( zoomX != 0 );
@@ -3761,34 +3761,34 @@ void KWDocument::paintContent( QPainter& painter, const QRect& rectangle, bool t
if ( m_zoomedResolutionX != zoomX || m_zoomedResolutionY != zoomY )
{
//kdDebug(32001) << "m_zoomedResolutionX=" << m_zoomedResolutionX << " != " << zoomX << " -> calling setResolution(" << zoomX << ")" << endl;
- int zoomLevel = qRound( 100 * zoomY / m_zoomedResolutionY ); // ## ignores the case where the x and y scaling differs
+ int zoomLevel = tqRound( 100 * zoomY / m_zoomedResolutionY ); // ## ignores the case where the x and y scaling differs
setZoom( zoomLevel );
- bool forPrint = painter.device() && painter.device()->devType() == QInternal::Printer;
+ bool forPrint = painter.device() && painter.device()->devType() == TQInternal::Printer;
newZoomAndResolution( false, forPrint );
if ( KFormula::Document* formulaDocument = m_formulaDocumentWrapper->document() )
formulaDocument->setZoomAndResolution( zoomLevel, zoomX, zoomY, false, forPrint );
// Note that this zoom and resolution are then used when activating the embedded object!
}
- QRect rect( rectangle );
+ TQRect rect( rectangle );
painter.save();
painter.translate( rect.x(), rect.y() );
- QRect clipRect( 0, 0, rect.width(), rect.height() );
+ TQRect clipRect( 0, 0, rect.width(), rect.height() );
KWViewModeEmbedded * viewMode = new KWViewModeEmbedded( this, 0 /*no canvas*/ );
viewMode->setDrawFrameBackground( !transparent );
viewMode->setDrawSelections( false );
- QColorGroup cg = QApplication::palette().active();
+ TQColorGroup cg = TQApplication::tqpalette().active();
if (!transparent)
{
- QRegion emptyRegion( rect );
+ TQRegion emptyRegion( rect );
createEmptyRegion( rect, emptyRegion, viewMode );
- eraseEmptySpace( &painter, emptyRegion, cg.brush( QColorGroup::Base ) );
+ eraseEmptySpace( &painter, emptyRegion, cg.brush( TQColorGroup::Base ) );
}
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet * frameset = fit.current();
@@ -3802,7 +3802,7 @@ void KWDocument::paintContent( QPainter& painter, const QRect& rectangle, bool t
painter.restore();
}
-QPixmap KWDocument::generatePreview( const QSize& size )
+TQPixmap KWDocument::generatePreview( const TQSize& size )
{
int oldZoom = m_zoom;
double oldResolutionX = resolutionX();
@@ -3810,23 +3810,23 @@ QPixmap KWDocument::generatePreview( const QSize& size )
double oldZoomX = zoomedResolutionX();
double oldZoomY = zoomedResolutionY();
- // Sometimes (due to the different resolution?) the layout creates a new page
- // while saving the preview. If this happens, we don't want to repaint the real views
+ // Sometimes (due to the different resolution?) the tqlayout creates a new page
+ // while saving the preview. If this happens, we don't want to tqrepaint the real views
// (due to KWCanvas::slotNewContentsSize)
// ##### One day when we have real doc/view separation in kotextparag, we shouldn't mess with
// the real view's resolution, we should instead create a fake view for the preview itself.
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
(*it)->getGUI()->canvasWidget()->setUpdatesEnabled( false );
}
Q_ASSERT( !m_bGeneratingPreview );
m_bGeneratingPreview = true;
- QPixmap pix = KoDocument::generatePreview(size);
+ TQPixmap pix = KoDocument::generatePreview(size);
// Restore everything as it was before
setResolution( oldResolutionX, oldResolutionY );
setZoom( oldZoom );
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
(*it)->getGUI()->canvasWidget()->setUpdatesEnabled( true );
}
newZoomAndResolution( true /*set contents size again*/, false );
@@ -3837,9 +3837,9 @@ QPixmap KWDocument::generatePreview( const QSize& size )
return pix;
}
-void KWDocument::createEmptyRegion( const QRect & crect, QRegion & emptyRegion, KWViewMode * viewMode )
+void KWDocument::createEmptyRegion( const TQRect & crect, TQRegion & emptyRegion, KWViewMode * viewMode )
{
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet *frameset = fit.current();
@@ -3848,11 +3848,11 @@ void KWDocument::createEmptyRegion( const QRect & crect, QRegion & emptyRegion,
}
}
-void KWDocument::eraseEmptySpace( QPainter * painter, const QRegion & emptySpaceRegion, const QBrush & brush )
+void KWDocument::eraseEmptySpace( TQPainter * painter, const TQRegion & emptySpaceRegion, const TQBrush & brush )
{
painter->save();
- painter->setClipRegion( emptySpaceRegion, QPainter::CoordPainter );
- painter->setPen( Qt::NoPen );
+ painter->setClipRegion( emptySpaceRegion, TQPainter::CoordPainter );
+ painter->setPen( TQt::NoPen );
//kdDebug(32001) << "KWDocument::eraseEmptySpace emptySpaceRegion: " << emptySpaceRegion << endl;
//kdDebug(32001) << " boundingRect: " << DEBUGRECT( emptySpaceRegion.boundingRect() ) << endl;
@@ -3862,23 +3862,23 @@ void KWDocument::eraseEmptySpace( QPainter * painter, const QRegion & emptySpace
KWDocumentChild* KWDocument::createChildDoc( const KoRect& rect, KoDocument* childDoc )
{
- KWDocumentChild* ch = new KWDocumentChild( this, rect.toQRect(), childDoc );
+ KWDocumentChild* ch = new KWDocumentChild( this, rect.toTQRect(), childDoc );
insertChild( ch );
return ch;
}
-KWPartFrameSet* KWDocument::insertObject( const KoRect& rect, KoDocumentEntry& e, QWidget* parentWidget )
+KWPartFrameSet* KWDocument::insertObject( const KoRect& rect, KoDocumentEntry& e, TQWidget* tqparentWidget )
{
KoDocument* doc = e.createDoc( this );
if ( !doc )
return 0;
- if ( !doc->showEmbedInitDialog( parentWidget ) )
+ if ( !doc->showEmbedInitDialog( tqparentWidget ) )
return 0;
KWDocumentChild* ch = createChildDoc( rect, doc );
setModified( TRUE );
- KWPartFrameSet *frameset = new KWPartFrameSet( this, ch, QString::null );
+ KWPartFrameSet *frameset = new KWPartFrameSet( this, ch, TQString() );
KWFrame *frame = new KWFrame(frameset, rect.x(), rect.y(), rect.width(), rect.height() );
frame->setZOrder( maxZOrder( frame->pageNumber(this) ) + 1 ); // make sure it's on top
frameset->addFrame( frame );
@@ -3887,22 +3887,22 @@ KWPartFrameSet* KWDocument::insertObject( const KoRect& rect, KoDocumentEntry& e
KWCreateFrameCommand *cmd = new KWCreateFrameCommand( i18n("Create Part Frame"), frame);
addCommand(cmd);
- frameChanged( frame ); // repaint etc.
+ frameChanged( frame ); // tqrepaint etc.
return frameset;
}
void KWDocument::delayedRepaintAllViews() {
- if (!m_repaintAllViewsPending) {
- QTimer::singleShot( 0, this, SLOT( slotRepaintAllViews() ) );
- m_repaintAllViewsPending=true;
+ if (!m_tqrepaintAllViewsPending) {
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotRepaintAllViews() ) );
+ m_tqrepaintAllViewsPending=true;
}
}
void KWDocument::slotRepaintAllViews() {
- m_repaintAllViewsPending=false;
- repaintAllViews( false );
+ m_tqrepaintAllViewsPending=false;
+ tqrepaintAllViews( false );
}
void KWDocument::delayedRecalcFrames( int fromPage ) {
@@ -3910,7 +3910,7 @@ void KWDocument::delayedRecalcFrames( int fromPage ) {
if ( m_recalcFramesPending == -1 || fromPage < m_recalcFramesPending )
{
m_recalcFramesPending = fromPage;
- QTimer::singleShot( 0, this, SLOT( slotRecalcFrames() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotRecalcFrames() ) );
}
}
@@ -3922,31 +3922,31 @@ void KWDocument::slotRecalcFrames() {
recalcFrames( from );
}
-void KWDocument::repaintAllViewsExcept( KWView *view, bool erase )
+void KWDocument::tqrepaintAllViewsExcept( KWView *view, bool erase )
{
- //kdDebug(32001) << "KWDocument::repaintAllViewsExcept" << endl;
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
+ //kdDebug(32001) << "KWDocument::tqrepaintAllViewsExcept" << endl;
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
KWView* viewPtr = *it;
if ( viewPtr != view /*&& viewPtr->getGUI() && viewPtr->getGUI()->canvasWidget()*/ ) {
- viewPtr->getGUI()->canvasWidget()->repaintAll( erase );
+ viewPtr->getGUI()->canvasWidget()->tqrepaintAll( erase );
}
}
}
void KWDocument::updateAllStyleLists()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateStyleList();
}
-void KWDocument::updateStyleListOrder( const QStringList &list )
+void KWDocument::updateStyleListOrder( const TQStringList &list )
{
styleCollection()->updateStyleListOrder( list );
}
void KWDocument::applyStyleChange( KoStyleChangeDefMap changed )
{
- QPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
+ TQPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
KWTextFrameSet *frm;
for ( frm=textFramesets.first(); frm != 0; frm=textFramesets.next() ){
@@ -3956,44 +3956,44 @@ void KWDocument::applyStyleChange( KoStyleChangeDefMap changed )
void KWDocument::updateAllFrameStyleLists()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateFrameStyleList();
}
void KWDocument::updateAllTableStyleLists()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateTableStyleList();
}
-void KWDocument::repaintAllViews( bool erase )
+void KWDocument::tqrepaintAllViews( bool erase )
{
- //kdDebug(32001) << "KWDocument::repaintAllViews" << endl;
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
- (*it)->getGUI()->canvasWidget()->repaintAll( erase );
+ //kdDebug(32001) << "KWDocument::tqrepaintAllViews" << endl;
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ (*it)->getGUI()->canvasWidget()->tqrepaintAll( erase );
}
-QPtrList<KWFrame> KWDocument::framesToCopyOnNewPage( int afterPageNum ) const {
+TQPtrList<KWFrame> KWDocument::framesToCopyOnNewPage( int afterPageNum ) const {
// afterPageNum can be -1 for 'before page 1'
// Look at frames on pages afterPageNum and afterPageNum-1 (for sheetside stuff)
- QPtrList<KWFrame> framesToLookAt;
+ TQPtrList<KWFrame> framesToLookAt;
if ( afterPageNum >= startPage() )
framesToLookAt = framesInPage( afterPageNum, false );
if ( afterPageNum >= startPage() + 1 )
{
- QPtrList<KWFrame> framesToAlsoLookAt = framesInPage( afterPageNum-1, false ); // order doesn't matter
+ TQPtrList<KWFrame> framesToAlsoLookAt = framesInPage( afterPageNum-1, false ); // order doesn't matter
// Merge into single list. Other alternative, two loops, code inside moved to another method.
- QPtrListIterator<KWFrame> frameAlsoIt( framesToAlsoLookAt );
+ TQPtrListIterator<KWFrame> frameAlsoIt( framesToAlsoLookAt );
for ( ; frameAlsoIt.current(); ++frameAlsoIt )
framesToLookAt.append( frameAlsoIt.current() );
}
- QPtrList<KWFrame> framesToCopy; // the result
+ TQPtrList<KWFrame> framesToCopy; // the result
- QPtrListIterator<KWFrame> frameIt( framesToLookAt );
+ TQPtrListIterator<KWFrame> frameIt( framesToLookAt );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame * frame = frameIt.current();
@@ -4033,11 +4033,11 @@ KWPage* KWDocument::insertPage( int afterPageNum ) // can be -1 for 'before page
for ( int pg = pageCount () -1 ; pg > afterPageNum ; --pg )
{
// pg is the 'src' page. Its contents must be moved to the page pg+1
- QPtrList<KWFrame> frames = framesInPage( pg, false );
+ TQPtrList<KWFrame> frames = framesInPage( pg, false );
#ifdef DEBUG_PAGES
kdDebug(32002) << "insertPage: moving " << frames.count() << " frames down, from page " << pg << endl;
#endif
- QPtrListIterator<KWFrame> frameIt( frames );
+ TQPtrListIterator<KWFrame> frameIt( frames );
for ( ; frameIt.current(); ++frameIt )
frameIt.current()->moveBy( 0, pageHeight );
}
@@ -4045,8 +4045,8 @@ KWPage* KWDocument::insertPage( int afterPageNum ) // can be -1 for 'before page
KWPage *page = pageManager()->insertPage(afterPageNum+1);
// Fill in the new page
- QPtrList<KWFrame> framesToCopy = framesToCopyOnNewPage( afterPageNum );
- QPtrListIterator<KWFrame> frameIt( framesToCopy );
+ TQPtrList<KWFrame> framesToCopy = framesToCopyOnNewPage( afterPageNum );
+ TQPtrListIterator<KWFrame> frameIt( framesToCopy );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame * frame = frameIt.current();
@@ -4087,13 +4087,13 @@ void KWDocument::afterInsertPage( int pageNum )
recalcVariables( VT_PGNUM );
emit numPagesChanged();
if ( m_viewModeType == "ModePreview" )
- repaintAllViews();
+ tqrepaintAllViews();
}
bool KWDocument::canRemovePage( int num )
{
kdDebug() << "KWDocument::canRemovePage " << num<< endl;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet * frameSet = fit.current();
@@ -4117,11 +4117,11 @@ void KWDocument::removePage( int pageNum )
return;
// ## This assumes that framesInPage is up-to-date.
- QPtrList<KWFrame> framesToDelete = framesInPage( pageNum, false );
+ TQPtrList<KWFrame> framesToDelete = framesInPage( pageNum, false );
#ifdef DEBUG_PAGES
kdDebug(32002) << "KWDocument::removePage " << pageNum << ", " << framesToDelete.count() << " frames to delete" << endl;
#endif
- QPtrListIterator<KWFrame> frameIt( framesToDelete );
+ TQPtrListIterator<KWFrame> frameIt( framesToDelete );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame * frame = frameIt.current();
@@ -4135,11 +4135,11 @@ void KWDocument::removePage( int pageNum )
for ( int pg = pageNum+1 ; pg < pageCount() ; ++pg )
{
// pg is the 'src' page. Its contents must be moved to the page pg-1
- QPtrList<KWFrame> frames = framesInPage( pg, false );
+ TQPtrList<KWFrame> frames = framesInPage( pg, false );
#ifdef DEBUG_PAGES
kdDebug(32002) << "removePage: moving " << frames.count() << " frames up, from page " << pg << endl;
#endif
- QPtrListIterator<KWFrame> frameIt( frames );
+ TQPtrListIterator<KWFrame> frameIt( frames );
for ( ; frameIt.current(); ++frameIt )
frameIt.current()->moveBy( 0, pageManager()->page(0)->height() );
}
@@ -4156,10 +4156,10 @@ void KWDocument::afterRemovePages()
{
//### IMHO recalcFrames should take care of updateAllFrames (it already does it partially).
recalcFrames();
- // Do this before recalcVariables (which repaints). The removed frames must be removed from the frame caches.
+ // Do this before recalcVariables (which tqrepaints). The removed frames must be removed from the frame caches.
// We don't call updateAllFrames() directly, because it still calls
// updateFramesOnTopOrBelow, which is useless (and slow) here.
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
fit.current()->updateFrames();
@@ -4167,7 +4167,7 @@ void KWDocument::afterRemovePages()
if ( !m_bGeneratingPreview )
emit newContentsSize();
if ( m_viewModeType == "ModePreview" )
- repaintAllViews();
+ tqrepaintAllViews();
}
bool KWDocument::tryRemovingPages()
@@ -4192,10 +4192,10 @@ bool KWDocument::tryRemovingPages()
}
-KWFrameSet * KWDocument::frameSetByName( const QString & name )
+KWFrameSet * KWDocument::frameSetByName( const TQString & name )
{
// Note: this isn't recursive, so it won't find table cells.
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
if ( fit.current()->name() == name )
return fit.current();
@@ -4204,13 +4204,13 @@ KWFrameSet * KWDocument::frameSetByName( const QString & name )
//#define DEBUG_FRAMESELECT
-QString KWDocument::generateFramesetName( const QString & templateName )
+TQString KWDocument::generateFramesetName( const TQString & templateName )
{
- QString name;
+ TQString name;
int num = 1;
bool exists;
do {
- name = templateName.arg( num );
+ name = templateName.tqarg( num );
exists = frameSetByName( name );
++num;
} while ( exists );
@@ -4220,7 +4220,7 @@ QString KWDocument::generateFramesetName( const QString & templateName )
void KWDocument::fixZOrders() {
//KWFrame *frameFixed = 0;
for (int pgnum = startPage() ; pgnum <= lastPage() ; pgnum++) {
- QPtrList<KWFrame> frames = framesInPage(pgnum);
+ TQPtrList<KWFrame> frames = framesInPage(pgnum);
// scan this page to see if we need to fixup:
// fix up if two frames have the same zOrder,
// or if a zOrder is negative (not allowed by OASIS)
@@ -4265,10 +4265,10 @@ void KWDocument::fixZOrders() {
void KWDocument::lowerMainFrames( int pageNum )
{
- QPtrList<KWFrame> framesInPage = this->framesInPage(pageNum);
+ TQPtrList<KWFrame> framesInPage = this->framesInPage(pageNum);
int lowestZOrder=10000;
- for ( QPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt )
- lowestZOrder=QMIN(lowestZOrder, frameIt.current()->zOrder());
+ for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt )
+ lowestZOrder=TQMIN(lowestZOrder, frameIt.current()->zOrder());
lowerMainFrames( pageNum, lowestZOrder );
}
@@ -4276,8 +4276,8 @@ void KWDocument::lowerMainFrames( int pageNum )
void KWDocument::lowerMainFrames( int pageNum, int lowestZOrder )
{
// Get the main frameset and see if we have to lower its frame(s).
- QPtrList<KWFrame> framesInPage = this->framesInPage(pageNum);
- for ( QPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
+ TQPtrList<KWFrame> framesInPage = this->framesInPage(pageNum);
+ for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
if(frameIt.current()->frameSet()->isMainFrameset()) {
if(lowestZOrder <= frameIt.current()->zOrder())
frameIt.current()->setZOrder(lowestZOrder-1);
@@ -4286,17 +4286,17 @@ void KWDocument::lowerMainFrames( int pageNum, int lowestZOrder )
}
}
-QPtrList<KWFrame> KWDocument::framesInPage( int pageNum, bool sorted ) const {
+TQPtrList<KWFrame> KWDocument::framesInPage( int pageNum, bool sorted ) const {
ZOrderedFrameList frames;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet *frameSet = fit.current();
if ( !frameSet->isVisible() )
continue;
// Append all frames from frameSet in page pageNum
- QPtrListIterator<KWFrame> it( frameSet->framesInPage( pageNum ) );
+ TQPtrListIterator<KWFrame> it( frameSet->framesInPage( pageNum ) );
for ( ; it.current() ; ++it )
frames.append( it.current() );
}
@@ -4307,10 +4307,10 @@ QPtrList<KWFrame> KWDocument::framesInPage( int pageNum, bool sorted ) const {
void KWDocument::updateAllFrames( int flags )
{
#ifdef DEBUG_SPEED
- QTime dt;
+ TQTime dt;
dt.start();
#endif
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
fit.current()->updateFrames( flags );
@@ -4328,20 +4328,20 @@ void KWDocument::updateAllFrames( int flags )
}
// Tell this method when a frame is moved / resized / created / deleted
-// and everything will be update / repainted accordingly
+// and everything will be update / tqrepainted accordingly
void KWDocument::frameChanged( KWFrame * frame )
{
if(! m_framesChangedHandler) {
m_framesChangedHandler = new FramesChangedHandler(this);
- QTimer::singleShot( 0, this, SLOT( updateFramesChanged() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( updateFramesChanged() ) );
}
m_framesChangedHandler->addFrame(frame);
}
-void KWDocument::framesChanged( const QPtrList<KWFrame> & frames, KWView * view )
+void KWDocument::framesChanged( const TQPtrList<KWFrame> & frames, KWView * view )
{
Q_UNUSED( view ); // DF: seems my idea of excluding one view got thrown away
- QPtrListIterator<KWFrame> it( frames );
+ TQPtrListIterator<KWFrame> it( frames );
for ( ; it.current() ; ++it )
frameChanged(it.current());
}
@@ -4353,8 +4353,8 @@ void KWDocument::updateFramesChanged() { // slot called from frameChanged()
m_framesChangedHandler = 0;
}
-void KWDocument::framesChanged( const QValueList<KWFrame*> &frames) {
- QValueListConstIterator<KWFrame*> framesIterator = frames.begin();
+void KWDocument::framesChanged( const TQValueList<KWFrame*> &frames) {
+ TQValueListConstIterator<KWFrame*> framesIterator = frames.begin();
for(;framesIterator != frames.end(); ++framesIterator)
frameChanged(*framesIterator);
}
@@ -4364,9 +4364,9 @@ void KWDocument::setHeaderVisible( bool h )
m_headerVisible = h;
recalcFrames();
updateAllFrames();
- layout();
+ tqlayout();
setModified(true);
- repaintAllViews( true );
+ tqrepaintAllViews( true );
}
void KWDocument::setFooterVisible( bool f )
@@ -4374,9 +4374,9 @@ void KWDocument::setFooterVisible( bool f )
m_footerVisible = f;
recalcFrames();
updateAllFrames();
- layout();
+ tqlayout();
setModified(true);
- repaintAllViews( true );
+ tqrepaintAllViews( true );
}
bool KWDocument::hasEndNotes() const
@@ -4386,7 +4386,7 @@ bool KWDocument::hasEndNotes() const
void KWDocument::updateHeaderButton()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
{
(*it)->updateHeaderFooterButton();
(*it)->updateHeader();
@@ -4395,7 +4395,7 @@ void KWDocument::updateHeaderButton()
void KWDocument::updateFooterButton()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
{
(*it)->updateHeaderFooterButton();
(*it)->updateFooter();
@@ -4412,12 +4412,12 @@ void KWDocument::addPictureRequest( KWPictureFrameSet *fs )
m_pictureRequests.append( fs );
}
-void KWDocument::addAnchorRequest( const QString &framesetName, const KWAnchorPosition &anchorPos )
+void KWDocument::addAnchorRequest( const TQString &framesetName, const KWAnchorPosition &anchorPos )
{
m_anchorRequests.insert( framesetName, anchorPos );
}
-void KWDocument::addFootNoteRequest( const QString &framesetName, KWFootNoteVariable* var )
+void KWDocument::addFootNoteRequest( const TQString &framesetName, KWFootNoteVariable* var )
{
if ( var->noteType() == EndNote )
m_bHasEndNotes = true;
@@ -4431,14 +4431,14 @@ void KWDocument::refreshMenuCustomVariable()
void KWDocument::recalcVariables( int type )
{
- const QValueList<KoVariable *> modifiedVariables = m_varColl->recalcVariables(type);
+ const TQValueList<KoVariable *> modifiedVariables = m_varColl->recalcVariables(type);
if ( m_bGeneratingPreview )
return;
- QMap<KoTextDocument *, bool> modifiedTextDocuments; // Qt4: QSet
- for ( QValueList<KoVariable *>::const_iterator it = modifiedVariables.begin(), end = modifiedVariables.end() ; it != end ; ++it ) {
+ TQMap<KoTextDocument *, bool> modifiedTextDocuments; // TQt4: TQSet
+ for ( TQValueList<KoVariable *>::const_iterator it = modifiedVariables.begin(), end = modifiedVariables.end() ; it != end ; ++it ) {
KoTextDocument* textdoc = (*it)->textDocument();
- if ( modifiedTextDocuments.find( textdoc ) != modifiedTextDocuments.end() ) // Qt4: !contains
+ if ( modifiedTextDocuments.tqfind( textdoc ) != modifiedTextDocuments.end() ) // TQt4: !tqcontains
{
modifiedTextDocuments.insert( textdoc, true );
KWTextFrameSet * textfs = static_cast<KWTextDocument *>(textdoc)->textFrameSet();
@@ -4457,16 +4457,16 @@ void KWDocument::setMailMergeRecord( int r )
slRecordNum = r;
}
-void KWDocument::getPageLayout( KoPageLayout& layout, KoColumns& cl, KoKWHeaderFooter& hf )
+void KWDocument::getPageLayout( KoPageLayout& tqlayout, KoColumns& cl, KoKWHeaderFooter& hf )
{
- layout = m_pageLayout;
+ tqlayout = m_pageLayout;
cl = m_pageColumns;
hf = m_pageHeaderFooter;
}
void KWDocument::addFrameSet( KWFrameSet *f, bool finalize /*= true*/ )
{
- if(m_lstFrameSet.contains(f) > 0) {
+ if(m_lstFrameSet.tqcontains(f) > 0) {
kdWarning(32001) << "Frameset " << f << " " << f->name() << " already in list!" << endl;
return;
}
@@ -4483,7 +4483,7 @@ void KWDocument::addFrameSet( KWFrameSet *f, bool finalize /*= true*/ )
void KWDocument::removeFrameSet( KWFrameSet *f )
{
emit sig_terminateEditing( f );
- m_lstFrameSet.take( m_lstFrameSet.find(f) );
+ m_lstFrameSet.take( m_lstFrameSet.tqfind(f) );
setModified( true );
emit sigFrameSetRemoved(f);
}
@@ -4525,7 +4525,7 @@ void KWDocument::printDebug()
kdDebug() << "Footer visible: " << isFooterVisible() << endl;
kdDebug() << "Units: " << unit() <<endl;
kdDebug() << "# Framesets: " << frameSetCount() <<endl;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( unsigned int iFrameset = 0; fit.current() ; ++fit, iFrameset++ )
{
KWFrameSet * frameset = fit.current();
@@ -4542,7 +4542,7 @@ void KWDocument::printDebug()
}
/*
kdDebug() << "# Images: " << getImageCollection()->iterator().count() <<endl;
- QDictIterator<KWImage> it( getImageCollection()->iterator() );
+ TQDictIterator<KWImage> it( getImageCollection()->iterator() );
while ( it.current() ) {
kdDebug() << " + " << it.current()->getFilename() << ": "<<it.current()->refCount() <<endl;
++it;
@@ -4560,20 +4560,20 @@ void KWDocument::printDebug()
}
#endif
-void KWDocument::layout()
+void KWDocument::tqlayout()
{
- QPtrListIterator<KWFrameSet> it = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> it = framesetsIterator();
for (; it.current(); ++it )
if ( it.current()->isVisible() )
- it.current()->layout();
+ it.current()->tqlayout();
}
-void KWDocument::invalidate(const KWFrameSet *skipThisFrameSet)
+void KWDocument::tqinvalidate(const KWFrameSet *skipThisFrameSet)
{
- QPtrListIterator<KWFrameSet> it = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> it = framesetsIterator();
for (; it.current(); ++it )
if(it.current()!=skipThisFrameSet)
- it.current()->invalidate();
+ it.current()->tqinvalidate();
}
KFormula::Document* KWDocument::formulaDocument( bool init )
@@ -4586,8 +4586,8 @@ KFormula::Document* KWDocument::formulaDocument( bool init )
if ( formulaDocument != 0 ) {
// re-calculate dpiX and dpiY
formulaDocument->setZoomAndResolution( m_zoom,
- qRound(INCH_TO_POINT( m_resolutionX )),
- qRound(INCH_TO_POINT( m_resolutionY )) );
+ tqRound(INCH_TO_POINT( m_resolutionX )),
+ tqRound(INCH_TO_POINT( m_resolutionY )) );
formulaDocument->newZoomAndResolution(false,false);
}
}
@@ -4599,8 +4599,8 @@ void KWDocument::slotRepaintChanged( KWFrameSet * frameset )
{
// This has to be a loop instead of a signal, so that we can
// send "true" for the last view (see KWFrameSet::drawContents)
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
- (*it)->getGUI()->canvasWidget()->repaintChanged( frameset, it == m_lstViews.fromLast() );
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
+ (*it)->getGUI()->canvasWidget()->tqrepaintChanged( frameset, it == m_lstViews.fromLast() );
}
}
@@ -4626,7 +4626,7 @@ void KWDocument::deleteFrame( KWFrame * frame )
{
KWFrameSet * fs = frame->frameSet();
kdDebug(32002) << "KWDocument::deleteFrame frame=" << frame << " fs=" << fs << endl;
- QString cmdName;
+ TQString cmdName;
TypeStructDocItem docItem = (TypeStructDocItem) 0;
switch (fs->type() ) {
case FT_TEXT:
@@ -4669,7 +4669,7 @@ void KWDocument::deleteFrame( KWFrame * frame )
void KWDocument::reorganizeGUI()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->getGUI()->reorganize();
}
@@ -4715,16 +4715,16 @@ void KWDocument::refreshDocStructure(FrameSetType type)
emit docStructureChanged(typeItemDocStructure(type));
}
-QBrush KWDocument::resolveBgBrush( const QBrush & brush, QPainter * painter )
+TQBrush KWDocument::resolveBgBrush( const TQBrush & brush, TQPainter * painter )
{
if ( brush.color().isValid() )
return brush;
- QBrush ret( brush );
+ TQBrush ret( brush );
ret.setColor( defaultBgColor( painter ) );
return ret;
}
-QColor KWDocument::resolveBgColor( const QColor & col, QPainter * painter )
+TQColor KWDocument::resolveBgColor( const TQColor & col, TQPainter * painter )
{
if (col.isValid())
return col;
@@ -4732,30 +4732,30 @@ QColor KWDocument::resolveBgColor( const QColor & col, QPainter * painter )
return defaultBgColor( painter );
}
-QColor KWDocument::defaultBgColor( QPainter * painter )
+TQColor KWDocument::defaultBgColor( TQPainter * painter )
{
- if ( painter && painter->device()->devType() == QInternal::Printer )
- return Qt::white;
- return QApplication::palette().color( QPalette::Active, QColorGroup::Base );
+ if ( painter && painter->device()->devType() == TQInternal::Printer )
+ return TQt::white;
+ return TQApplication::palette().color( TQPalette::Active, TQColorGroup::Base );
}
void KWDocument::setTocPresent(bool hasToc)
{
m_hasTOC=hasToc;
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateTocActionText(hasToc);
}
void KWDocument::refreshMenuExpression()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->refreshMenuExpression();
}
void KWDocument::updateZoomRuler()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
(*it)->getGUI()->getHorzRuler()->setZoom( zoomedResolutionX() );
(*it)->getGUI()->getVertRuler()->setZoom( zoomedResolutionY() );
(*it)->slotUpdateRuler();
@@ -4764,7 +4764,7 @@ void KWDocument::updateZoomRuler()
void KWDocument::updateRulerFrameStartEnd()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->slotUpdateRuler();
}
@@ -4781,14 +4781,14 @@ void KWDocument::setUndoRedoLimit(int val)
void KWDocument::setGridX(double gridx) {
m_gridX = gridx;
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->getGUI()->getHorzRuler()->setGridSize(gridx);
}
-QValueList<KoTextObject *> KWDocument::visibleTextObjects(KWViewMode *viewmode) const
+TQValueList<KoTextObject *> KWDocument::visibleTextObjects(KWViewMode *viewmode) const
{
- QValueList<KoTextObject *> lst;
- QPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
+ TQValueList<KoTextObject *> lst;
+ TQPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
KWTextFrameSet *frm;
for ( frm=textFramesets.first(); frm != 0; frm=textFramesets.next() ) {
@@ -4803,14 +4803,14 @@ QValueList<KoTextObject *> KWDocument::visibleTextObjects(KWViewMode *viewmode)
void KWDocument::refreshGUIButton()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->initGUIButton();
}
void KWDocument::enableBackgroundSpellCheck( bool b )
{
m_bgSpellCheck->setEnabled(b);
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateBgSpellCheckingState();
}
@@ -4821,13 +4821,13 @@ bool KWDocument::backgroundSpellCheckEnabled() const
void KWDocument::reactivateBgSpellChecking()
{
- QPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
+ TQPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
KWTextFrameSet *frm;
for ( frm=textFramesets.first(); frm != 0; frm=textFramesets.next() ){
frm->textObject()->setNeedSpellCheck(true);
}
- repaintAllViews();
+ tqrepaintAllViews();
startBackgroundSpellCheck();
}
@@ -4835,7 +4835,7 @@ void KWDocument::slotChapterParagraphFormatted( KoTextParag* /*parag*/ )
{
// Attempt at invalidating from the parag's page only
// But that's not good enough - if a header gets moved down,
- // we also need to invalidate the previous page, from where the paragraph disappeared.
+ // we also need to tqinvalidate the previous page, from where the paragraph disappeared.
/*
KoPoint p;
KWFrame* frame = internalToDocument( parag->rect().topLeft(), p );
@@ -4852,12 +4852,12 @@ void KWDocument::slotChapterParagraphFormatted( KoTextParag* /*parag*/ )
// (or if it keeps existing info then it can't update properly)
}
-QString KWDocument::checkSectionTitleInParag( KoTextParag* parag, KWTextFrameSet* frameset, int pageNum ) const
+TQString KWDocument::checkSectionTitleInParag( KoTextParag* parag, KWTextFrameSet* frameset, int pageNum ) const
{
if ( parag->counter() && parag->counter()->numbering() == KoParagCounter::NUM_CHAPTER
&& parag->counter()->depth() == 0 )
{
- QString txt = parag->string()->toString();
+ TQString txt = parag->string()->toString();
txt = txt.left( txt.length() - 1 ); // remove trailing space
#ifndef NDEBUG // not needed, just checking
KoPoint p;
@@ -4876,10 +4876,10 @@ QString KWDocument::checkSectionTitleInParag( KoTextParag* parag, KWTextFrameSet
const_cast<KWDocument*>(this)->m_sectionTitles[ pageNum ] = txt;
return txt;
}
- return QString::null;
+ return TQString();
}
-QString KWDocument::sectionTitle( int pageNum ) const
+TQString KWDocument::sectionTitle( int pageNum ) const
{
//kdDebug(32001) << "KWDocument::sectionTitle(pageNum=" << pageNum << ") m_sectionTitles.size()=" << m_sectionTitles.size() << endl;
// First look in the cache. If info is present, it's uptodate (see slotChapterParagraphFormatted)
@@ -4888,7 +4888,7 @@ QString KWDocument::sectionTitle( int pageNum ) const
// Look whether this page has a section title, and if not, go back pages, one by one
for ( int i = pageNum; i >= 0 ; --i )
{
- const QString& s = m_sectionTitles[i];
+ const TQString& s = m_sectionTitles[i];
if ( !s.isEmpty() )
{
// Update cache, to make this faster next time
@@ -4903,15 +4903,15 @@ QString KWDocument::sectionTitle( int pageNum ) const
// If not in the cache, determine from the paragraphs in the page.
if ( m_lstFrameSet.isEmpty() )
- return QString::null;
+ return TQString();
// We use the "main" frameset to determine section titles.
KWTextFrameSet *frameset = dynamic_cast<KWTextFrameSet *>( m_lstFrameSet.getFirst() );
if ( !frameset )
- return QString::null;
+ return TQString();
int topLUpix, bottomLUpix;
if ( !frameset->minMaxInternalOnPage( pageNum, topLUpix, bottomLUpix ) )
- return QString::null;
+ return TQString();
KoTextParag* parag = frameset->textDocument()->firstParag();
//kdDebug(32001) << "KWDocument::sectionTitle " << pageNum
@@ -4927,7 +4927,7 @@ QString KWDocument::sectionTitle( int pageNum ) const
}
if ( parag->rect().top() > bottomLUpix ) // done
break;
- QString txt = checkSectionTitleInParag( parag, frameset, pageNum );
+ TQString txt = checkSectionTitleInParag( parag, frameset, pageNum );
if ( !txt.isEmpty() )
return txt;
}
@@ -4937,27 +4937,27 @@ QString KWDocument::sectionTitle( int pageNum ) const
parag = lastParagOfPageAbove;
for ( ; parag ; parag = parag->prev() )
{
- QString txt = checkSectionTitleInParag( parag, frameset, pageNum );
+ TQString txt = checkSectionTitleInParag( parag, frameset, pageNum );
if ( !txt.isEmpty() )
return txt;
}
// First page, no heading found
- return QString::null;
+ return TQString();
}
-void KWDocument::setSpellCheckIgnoreList( const QStringList& lst )
+void KWDocument::setSpellCheckIgnoreList( const TQStringList& lst )
{
m_spellCheckIgnoreList = lst;
m_bgSpellCheck->settings()->setCurrentIgnoreList( m_spellCheckIgnoreList + m_spellCheckPersonalDict );
setModified( true );
}
-void KWDocument::addSpellCheckIgnoreWord( const QString & word )
+void KWDocument::addSpellCheckIgnoreWord( const TQString & word )
{
// ### missing: undo/redo support
- if( m_spellCheckIgnoreList.findIndex( word ) == -1 )
+ if( m_spellCheckIgnoreList.tqfindIndex( word ) == -1 )
m_spellCheckIgnoreList.append( word );
setSpellCheckIgnoreList( m_spellCheckIgnoreList );
if ( backgroundSpellCheckEnabled() )
@@ -4969,8 +4969,8 @@ int KWDocument::maxZOrder( int pageNum) const
{
bool first = true;
int maxZOrder = 0; //this value is only used if there's no frame on the page
- QPtrList<KWFrame> frames = framesInPage( pageNum );
- QPtrListIterator<KWFrame> frameIt( frames );
+ TQPtrList<KWFrame> frames = framesInPage( pageNum );
+ TQPtrListIterator<KWFrame> frameIt( frames );
for ( ; frameIt.current(); ++frameIt ) {
if ( first || frameIt.current()->zOrder() > maxZOrder ) {
maxZOrder = frameIt.current()->zOrder();
@@ -4980,10 +4980,10 @@ int KWDocument::maxZOrder( int pageNum) const
return maxZOrder;
}
-QPtrList<KWTextFrameSet> KWDocument::allTextFramesets(bool onlyReadWrite) const
+TQPtrList<KWTextFrameSet> KWDocument::allTextFramesets(bool onlyReadWrite) const
{
- QPtrList<KWTextFrameSet> textFramesets;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrList<KWTextFrameSet> textFramesets;
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit ) {
if(fit.current()->isDeleted()) continue;
fit.current()->addTextFrameSets(textFramesets, onlyReadWrite);
@@ -4991,11 +4991,11 @@ QPtrList<KWTextFrameSet> KWDocument::allTextFramesets(bool onlyReadWrite) const
return textFramesets;
}
-QValueList<KoTextDocument *> KWDocument::allTextDocuments() const
+TQValueList<KoTextDocument *> KWDocument::allTextDocuments() const
{
- QValueList<KoTextDocument *> lst;
- const QPtrList<KWTextFrameSet> textFramesets = allTextFramesets(false);
- QPtrListIterator<KWTextFrameSet> fit( textFramesets );
+ TQValueList<KoTextDocument *> lst;
+ const TQPtrList<KWTextFrameSet> textFramesets = allTextFramesets(false);
+ TQPtrListIterator<KWTextFrameSet> fit( textFramesets );
for ( ; fit.current() ; ++fit ) {
lst.append( fit.current()->textObject()->textDocument() );
}
@@ -5004,8 +5004,8 @@ QValueList<KoTextDocument *> KWDocument::allTextDocuments() const
int KWDocument::numberOfTextFrameSet( KWFrameSet* fs, bool onlyReadWrite )
{
- QPtrList<KWTextFrameSet> textFramesets = allTextFramesets( onlyReadWrite );
- return textFramesets.findRef( static_cast<KWTextFrameSet*>(fs) );
+ TQPtrList<KWTextFrameSet> textFramesets = allTextFramesets( onlyReadWrite );
+ return textFramesets.tqfindRef( static_cast<KWTextFrameSet*>(fs) );
}
KWFrameSet * KWDocument::textFrameSetFromIndex( unsigned int num, bool onlyReadWrite )
@@ -5015,14 +5015,14 @@ KWFrameSet * KWDocument::textFrameSetFromIndex( unsigned int num, bool onlyReadW
void KWDocument::updateTextFrameSetEdit()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->slotFrameSetEditChanged();
}
void KWDocument::displayFootNoteFieldCode()
{
- QPtrListIterator<KoVariable> it( m_varColl->getVariables() );
+ TQPtrListIterator<KoVariable> it( m_varColl->getVariables() );
for ( ; it.current() ; ++it )
{
if ( it.current()->type() == VT_FOOTNOTE )
@@ -5033,7 +5033,7 @@ void KWDocument::displayFootNoteFieldCode()
KoTextParag * parag = it.current()->paragraph();
if ( parag )
{
- parag->invalidate( 0 );
+ parag->tqinvalidate( 0 );
parag->setChanged( true );
}
}
@@ -5042,8 +5042,8 @@ void KWDocument::displayFootNoteFieldCode()
void KWDocument::changeFootNoteConfig()
{
- QMap<KoTextDocument *, bool> modifiedTextDocuments; // Qt4: QSet
- QPtrListIterator<KoVariable> it( m_varColl->getVariables() );
+ TQMap<KoTextDocument *, bool> modifiedTextDocuments; // TQt4: TQSet
+ TQPtrListIterator<KoVariable> it( m_varColl->getVariables() );
for ( ; it.current() ; ++it )
{
if ( it.current()->type() == VT_FOOTNOTE )
@@ -5058,15 +5058,15 @@ void KWDocument::changeFootNoteConfig()
KoTextParag * parag = footNoteVar->paragraph();
if ( parag )
{
- parag->invalidate( 0 );
+ parag->tqinvalidate( 0 );
parag->setChanged( true );
}
KoTextDocument* textdoc = parag->textDocument();
- if ( modifiedTextDocuments.find( textdoc ) != modifiedTextDocuments.end() ) // Qt4: !contains
+ if ( modifiedTextDocuments.tqfind( textdoc ) != modifiedTextDocuments.end() ) // TQt4: !tqcontains
modifiedTextDocuments.insert( textdoc, true );
}
}
- for( QMap<KoTextDocument *,bool>::const_iterator it = modifiedTextDocuments.begin();
+ for( TQMap<KoTextDocument *,bool>::const_iterator it = modifiedTextDocuments.begin();
it != modifiedTextDocuments.end(); ++it ) {
KoTextDocument* textdoc = it.key();
KWTextFrameSet * textfs = static_cast<KWTextDocument *>(textdoc)->textFrameSet();
@@ -5078,14 +5078,14 @@ void KWDocument::changeFootNoteConfig()
void KWDocument::setTabStopValue ( double tabStop )
{
m_tabStop = tabStop;
- QPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
+ TQPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
KWTextFrameSet *frm;
for ( frm=textFramesets.first(); frm != 0; frm=textFramesets.next() ){
frm->textDocument()->setTabStops( ptToLayoutUnitPixX( tabStop ));
- frm->layout();
+ frm->tqlayout();
}
- repaintAllViews();
+ tqrepaintAllViews();
}
void KWDocument::setGlobalHyphenation( bool hyphen )
@@ -5099,11 +5099,11 @@ void KWDocument::setViewFrameBorders( bool b )
{
m_viewFrameBorders = b;
m_layoutViewMode->setDrawFrameBorders( b );
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->getGUI()->canvasWidget()->viewMode()->setDrawFrameBorders( b );
}
-void KWDocument::switchViewMode( const QString& newViewModeType )
+void KWDocument::switchViewMode( const TQString& newViewModeType )
{
// Don't compare m_viewModeType and newViewMode here, it would break
// changing the number of pages per row for the preview mode, in kwconfig.
@@ -5113,21 +5113,21 @@ void KWDocument::switchViewMode( const QString& newViewModeType )
//necessary to switchmode view in all canvas in first.
//otherwise with more than one view kword crashes !
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->getGUI()->canvasWidget()->switchViewMode( m_viewModeType );
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->switchModeView();
emit newContentsSize();
- // Since the text layout depends on the view mode, we need to redo it
+ // Since the text tqlayout depends on the view mode, we need to redo it
// But after telling the canvas about the new viewmode, otherwise stuff like
// slotNewContentsSize will crash.
updateAllFrames();
- layout();
+ tqlayout();
- repaintAllViews( true );
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ tqrepaintAllViews( true );
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->getGUI()->canvasWidget()->ensureCursorVisible();
}
@@ -5140,9 +5140,9 @@ void KWDocument::changeBgSpellCheckingState( bool b )
config->writeEntry( "SpellCheck", (int)b );
}
-QString KWDocument::initialFrameSet() const
+TQString KWDocument::initialFrameSet() const
{
- return m_initialEditing ? m_initialEditing->m_initialFrameSet : QString::null;
+ return m_initialEditing ? m_initialEditing->m_initialFrameSet : TQString();
}
int KWDocument::initialCursorParag() const
@@ -5177,30 +5177,30 @@ void KWDocument::testAndCloseAllFrameSetProtectedContent()
{
if ( !m_cursorInProtectectedArea )
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->testAndCloseAllFrameSetProtectedContent();
}
}
void KWDocument::updateRulerInProtectContentMode()
{
- for( QValueList<KWView *>::const_iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::const_iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateRulerInProtectContentMode();
}
-void KWDocument::insertBookmark( const QString &name, KoTextParag *startparag, KoTextParag *endparag, int start, int end )
+void KWDocument::insertBookmark( const TQString &name, KoTextParag *startparag, KoTextParag *endparag, int start, int end )
{
m_bookmarkList->append( KoTextBookmark( name, startparag, endparag, start, end ) );
}
-void KWDocument::deleteBookmark( const QString &name )
+void KWDocument::deleteBookmark( const TQString &name )
{
if ( m_bookmarkList->removeByName( name ) )
setModified(true);
}
-void KWDocument::renameBookmark( const QString &oldName, const QString &newName )
+void KWDocument::renameBookmark( const TQString &oldName, const TQString &newName )
{
if ( oldName == newName )
return;
@@ -5213,7 +5213,7 @@ void KWDocument::renameBookmark( const QString &oldName, const QString &newName
}
}
-const KoTextBookmark * KWDocument::bookmarkByName( const QString & name ) const
+const KoTextBookmark * KWDocument::bookmarkByName( const TQString & name ) const
{
KoTextBookmarkList::const_iterator it = m_bookmarkList->findByName( name );
if ( it != m_bookmarkList->end() )
@@ -5221,9 +5221,9 @@ const KoTextBookmark * KWDocument::bookmarkByName( const QString & name ) const
return 0;
}
-QStringList KWDocument::listOfBookmarkName( KWViewMode * viewMode ) const
+TQStringList KWDocument::listOfBookmarkName( KWViewMode * viewMode ) const
{
- QStringList list;
+ TQStringList list;
KoTextBookmarkList::const_iterator it = m_bookmarkList->begin();
const KoTextBookmarkList::const_iterator end = m_bookmarkList->end();
for ( ; it != end ; ++it )
@@ -5277,7 +5277,7 @@ void KWDocument::initBookmarkList()
for( ; it != end; ++it )
{
KWFrameSet * fs = 0L;
- QString fsName = (*it).frameSetName;
+ TQString fsName = (*it).frameSetName;
if ( !fsName.isEmpty() )
fs = frameSetByName( fsName );
if ( fs )
@@ -5299,17 +5299,17 @@ void KWDocument::initBookmarkList()
}
}
-QPixmap* KWDocument::doubleBufferPixmap( const QSize& s )
+TQPixmap* KWDocument::doubleBufferPixmap( const TQSize& s )
{
if ( !m_bufPixmap ) {
- int w = QABS( s.width() );
- int h = QABS( s.height() );
- m_bufPixmap = new QPixmap( w, h );
+ int w = TQABS( s.width() );
+ int h = TQABS( s.height() );
+ m_bufPixmap = new TQPixmap( w, h );
} else {
if ( m_bufPixmap->width() < s.width() ||
m_bufPixmap->height() < s.height() ) {
- m_bufPixmap->resize( QMAX( s.width(), m_bufPixmap->width() ),
- QMAX( s.height(), m_bufPixmap->height() ) );
+ m_bufPixmap->resize( TQMAX( s.width(), m_bufPixmap->width() ),
+ TQMAX( s.height(), m_bufPixmap->height() ) );
}
}
@@ -5325,7 +5325,7 @@ void KWDocument::maybeDeleteDoubleBufferPixmap()
}
}
-void KWDocument::setPersonalExpressionPath( const QStringList & lst)
+void KWDocument::setPersonalExpressionPath( const TQStringList & lst)
{
m_personalExpressionPath = lst;
refreshMenuExpression();
@@ -5333,7 +5333,7 @@ void KWDocument::setPersonalExpressionPath( const QStringList & lst)
void KWDocument::updateDirectCursorButton()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateDirectCursorButton();
}
@@ -5353,9 +5353,9 @@ void KWDocument::saveDialogShown()
// Grab first 50 chars from the main frameset's document
// ### This is a somewhat slow method, if the document is huge - better iterate
// over the first few parags until 50 chars have been collected.
- QString first_row = textFrameSet(0)->textDocument()->plainText().left(50);
+ TQString first_row = textFrameSet(0)->textDocument()->plainText().left(50);
bool truncate = false;
- QChar ch;
+ TQChar ch;
for (int i=0; i < (int)first_row.length(); i++)
{
ch = first_row.at(i);
@@ -5378,11 +5378,11 @@ void KWDocument::saveDialogShown()
setURL(first_row);
}
-void KWDocument::addWordToDictionary( const QString& word )
+void KWDocument::addWordToDictionary( const TQString& word )
{
if ( m_bgSpellCheck )
{
- if( m_spellCheckPersonalDict.findIndex( word ) == -1 )
+ if( m_spellCheckPersonalDict.tqfindIndex( word ) == -1 )
m_spellCheckPersonalDict.append( word );
m_bgSpellCheck->settings()->setCurrentIgnoreList( m_spellCheckIgnoreList + m_spellCheckPersonalDict );
if ( backgroundSpellCheckEnabled() )
@@ -5395,14 +5395,14 @@ void KWDocument::setEmpty()
{
KoDocument::setEmpty();
// Whether loaded from template or from empty doc: this is a new one -> set creation date
- m_varColl->variableSetting()->setCreationDate(QDateTime::currentDateTime());
+ m_varColl->variableSetting()->setCreationDate(TQDateTime::tqcurrentDateTime());
recalcVariables( VT_DATE ); // , VST_CREATION_DATE ...
// If we then load a document, it will override that date.
}
void KWDocument::updateGridButton()
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
((KWView*)it.current())->updateGridButton();
@@ -5431,28 +5431,28 @@ int KWDocument::lastPage() const {
return pageManager()->lastPageNumber();
}
-QWidget* KWDocument::createCustomDocumentWidget(QWidget *parent) {
+TQWidget* KWDocument::createCustomDocumentWidget(TQWidget *tqparent) {
KoColumns columns;
columns.columns = 1;
columns.ptColumnSpacing = m_defaultColumnSpacing;
- return new KWStartupWidget(parent, this, columns);
+ return new KWStartupWidget(tqparent, this, columns);
}
-KWDocument::FramesChangedHandler::FramesChangedHandler(KWDocument *parent) {
- m_parent = parent;
+KWDocument::FramesChangedHandler::FramesChangedHandler(KWDocument *tqparent) {
+ m_parent = tqparent;
m_needLayout = false;
}
void KWDocument::FramesChangedHandler::addFrame(KWFrame *frame) {
if(frame == 0) return;
- if(m_frameSets.contains(frame->frameSet())) return;
+ if(m_frameSets.tqcontains(frame->frameSet())) return;
m_frameSets.append(frame->frameSet());
if( frame->runAround() != KWFrame::RA_NO )
m_needLayout = true;
}
void KWDocument::FramesChangedHandler::addFrameSet(KWFrameSet *fs) {
- if(m_frameSets.contains(fs)) return;
+ if(m_frameSets.tqcontains(fs)) return;
m_frameSets.append(fs);
m_needLayout = true;
}
@@ -5461,22 +5461,22 @@ void KWDocument::FramesChangedHandler::execute() {
if(m_frameSets.count() == 0)
m_parent->updateAllFrames();
else {
- QValueListIterator<KWFrameSet*> iter = m_frameSets.begin();
+ TQValueListIterator<KWFrameSet*> iter = m_frameSets.begin();
for(;iter != m_frameSets.end(); ++iter) {
KWFrameSet *fs = *iter;
fs->updateFrames();
if(!m_needLayout)
- fs->layout();
+ fs->tqlayout();
}
KWFrameList::recalcAllFrames(m_parent);
}
- // If frame with text flowing around it -> re-layout all frames
+ // If frame with text flowing around it -> re-tqlayout all frames
if ( m_needLayout)
- m_parent->layout();
- //m_parent->repaintAllViewsExcept( 0 );
- m_parent->repaintAllViews();
+ m_parent->tqlayout();
+ //m_parent->tqrepaintAllViewsExcept( 0 );
+ m_parent->tqrepaintAllViews();
m_parent->updateRulerFrameStartEnd();
}
diff --git a/kword/KWDocument.h b/kword/KWDocument.h
index 1b8ebac9..2d4e5abf 100644
--- a/kword/KWDocument.h
+++ b/kword/KWDocument.h
@@ -26,7 +26,7 @@
#include <config.h>
#endif
-class QDragObject;
+class TQDragObject;
class KoSavingContext;
class KoGenStyles;
class KWDocument;
@@ -48,7 +48,7 @@ class KWFrame;
class KWViewMode;
class KMacroCommand;
class KoDocumentEntry;
-class QPainter;
+class TQPainter;
class KoAutoFormat;
class KCommand;
class KoCommandHistory;
@@ -72,9 +72,9 @@ class KWDocumentChild;
class KWPageManager;
class KWPage;
-class QFont;
-class QStringList;
-class QRect;
+class TQFont;
+class TQStringList;
+class TQRect;
namespace KFormula {
class Document;
@@ -92,10 +92,10 @@ class KoOasisSettings;
#include <KoPictureKey.h>
#include <KoStyleCollection.h> // for KoStyleChangeDefMap
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qfont.h>
-#include <qvaluevector.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqfont.h>
+#include <tqvaluevector.h>
/******************************************************************/
/* Class: KWDocument */
@@ -104,33 +104,34 @@ class KoOasisSettings;
class KWDocument : public KoDocument, public KoTextZoomHandler
{
Q_OBJECT
- Q_PROPERTY( double ptColumnWidth READ ptColumnWidth )
- Q_PROPERTY( double ptColumnSpacing READ ptColumnSpacing )
- Q_PROPERTY( double gridX READ gridX WRITE setGridX )
- Q_PROPERTY( double gridY READ gridY WRITE setGridY )
- Q_PROPERTY( bool snapToGrid READ snapToGrid WRITE setSnapToGrid )
- Q_PROPERTY( double indentValue READ indentValue WRITE setIndentValue )
- Q_PROPERTY( int nbPagePerRow READ nbPagePerRow WRITE setNbPagePerRow )
- Q_PROPERTY( double defaultColumnSpacing READ defaultColumnSpacing WRITE setDefaultColumnSpacing )
- Q_PROPERTY( int maxRecentFiles READ maxRecentFiles )
- Q_PROPERTY( QString globalLanguage READ globalLanguage WRITE setGlobalLanguage )
- Q_PROPERTY( bool globalHyphenation READ globalHyphenation WRITE setGlobalHyphenation )
- Q_PROPERTY( bool insertDirectCursor READ insertDirectCursor WRITE setInsertDirectCursor )
- Q_PROPERTY( QStringList personalExpressionPath READ personalExpressionPath WRITE setPersonalExpressionPath )
- Q_PROPERTY( bool viewFormattingBreak READ viewFormattingBreak WRITE setViewFormattingBreak )
- Q_PROPERTY( bool viewFormattingTabs READ viewFormattingTabs WRITE setViewFormattingTabs )
- Q_PROPERTY( bool viewFormattingSpace READ viewFormattingSpace WRITE setViewFormattingSpace )
- Q_PROPERTY( bool viewFormattingEndParag READ viewFormattingEndParag WRITE setViewFormattingEndParag )
- Q_PROPERTY( bool cursorInProtectedArea READ cursorInProtectedArea WRITE setCursorInProtectedArea )
- Q_PROPERTY( bool pgUpDownMovesCaret READ pgUpDownMovesCaret WRITE setPgUpDownMovesCaret )
- Q_PROPERTY( bool allowAutoFormat READ allowAutoFormat WRITE setAllowAutoFormat )
- Q_PROPERTY( int undoRedoLimit READ undoRedoLimit WRITE setUndoRedoLimit )
+ TQ_OBJECT
+ TQ_PROPERTY( double ptColumnWidth READ ptColumnWidth )
+ TQ_PROPERTY( double ptColumnSpacing READ ptColumnSpacing )
+ TQ_PROPERTY( double gridX READ gridX WRITE setGridX )
+ TQ_PROPERTY( double gridY READ gridY WRITE setGridY )
+ TQ_PROPERTY( bool snapToGrid READ snapToGrid WRITE setSnapToGrid )
+ TQ_PROPERTY( double indentValue READ indentValue WRITE setIndentValue )
+ TQ_PROPERTY( int nbPagePerRow READ nbPagePerRow WRITE setNbPagePerRow )
+ TQ_PROPERTY( double defaultColumnSpacing READ defaultColumnSpacing WRITE setDefaultColumnSpacing )
+ TQ_PROPERTY( int maxRecentFiles READ maxRecentFiles )
+ TQ_PROPERTY( TQString globalLanguage READ globalLanguage WRITE setGlobalLanguage )
+ TQ_PROPERTY( bool globalHyphenation READ globalHyphenation WRITE setGlobalHyphenation )
+ TQ_PROPERTY( bool insertDirectCursor READ insertDirectCursor WRITE setInsertDirectCursor )
+ TQ_PROPERTY( TQStringList personalExpressionPath READ personalExpressionPath WRITE setPersonalExpressionPath )
+ TQ_PROPERTY( bool viewFormattingBreak READ viewFormattingBreak WRITE setViewFormattingBreak )
+ TQ_PROPERTY( bool viewFormattingTabs READ viewFormattingTabs WRITE setViewFormattingTabs )
+ TQ_PROPERTY( bool viewFormattingSpace READ viewFormattingSpace WRITE setViewFormattingSpace )
+ TQ_PROPERTY( bool viewFormattingEndParag READ viewFormattingEndParag WRITE setViewFormattingEndParag )
+ TQ_PROPERTY( bool cursorInProtectedArea READ cursorInProtectedArea WRITE setCursorInProtectedArea )
+ TQ_PROPERTY( bool pgUpDownMovesCaret READ pgUpDownMovesCaret WRITE setPgUpDownMovesCaret )
+ TQ_PROPERTY( bool allowAutoFormat READ allowAutoFormat WRITE setAllowAutoFormat )
+ TQ_PROPERTY( int undoRedoLimit READ undoRedoLimit WRITE setUndoRedoLimit )
public:
friend class KWOasisLoader;
friend class KWStartupWidget;
- KWDocument( QWidget *parentWidget = 0, const char *widname = 0, QObject* parent = 0, const char* name = 0, bool singleViewMode = false );
+ KWDocument( TQWidget *tqparentWidget = 0, const char *widname = 0, TQObject* tqparent = 0, const char* name = 0, bool singleViewMode = false );
~KWDocument();
enum ProcessingType {WP = 0, DTP = 1};
@@ -138,9 +139,9 @@ public:
static const int CURRENT_SYNTAX_VERSION;
public:
- virtual bool initDoc(InitDocFlags flags, QWidget* parentWidget=0);
+ virtual bool initDoc(InitDocFlags flags, TQWidget* tqparentWidget=0);
- virtual bool loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const QDomDocument& settings, KoStore* store );
+ virtual bool loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles, const TQDomDocument& settings, KoStore* store );
/**
* Those values are used as KoGenStyle types.
@@ -164,15 +165,15 @@ public:
/**
* Return a drag object with the selected frames
*/
- QDragObject* dragSelected( const QValueList<KWFrameView*> &selectedFrames);
+ TQDragObject* dragSelected( const TQValueList<KWFrameView*> &selectedFrames);
/**
* Return a drag object with the selected text
*/
- QDragObject* dragSelected( QWidget *parent, KWTextFrameSet* fs );
+ TQDragObject* dragSelected( TQWidget *tqparent, KWTextFrameSet* fs );
- virtual bool loadXML( QIODevice *, const QDomDocument & dom );
+ virtual bool loadXML( TQIODevice *, const TQDomDocument & dom );
virtual bool loadChildren( KoStore *store );
- virtual QDomDocument saveXML();
+ virtual TQDomDocument saveXML();
void processPictureRequests();
void processAnchorRequests();
bool processFootNoteRequests();
@@ -185,20 +186,20 @@ public:
/**
* Draw as embedded.
*/
- virtual void paintContent( QPainter& painter, const QRect& rect, bool transparent = false, double zoomX = 1.0, double zoomY = 1.0 );
+ virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = false, double zoomX = 1.0, double zoomY = 1.0 );
- virtual QPixmap generatePreview( const QSize &size );
+ virtual TQPixmap generatePreview( const TQSize &size );
/**
* @param emptyRegion The region is modified to subtract the areas painted, thus
* allowing the caller to determine which areas remain to be painted.
*/
- void createEmptyRegion( const QRect & crect, QRegion & emptyRegion, KWViewMode * viewMode );
+ void createEmptyRegion( const TQRect & crect, TQRegion & emptyRegion, KWViewMode * viewMode );
/**
* Erase the empty space defined by @p emptySpaceRegion.
* Usually used to clear the space where there is no frame (e.g. page margins).
*/
- void eraseEmptySpace( QPainter * painter, const QRegion & emptySpaceRegion, const QBrush & brush );
+ void eraseEmptySpace( TQPainter * painter, const TQRegion & emptySpaceRegion, const TQBrush & brush );
virtual void setEmpty();
@@ -207,15 +208,15 @@ public:
virtual void addShell( KoMainWindow *shell );
- KWPartFrameSet* insertObject( const KoRect& rect, KoDocumentEntry& e, QWidget* parentWidget );
+ KWPartFrameSet* insertObject( const KoRect& rect, KoDocumentEntry& e, TQWidget* tqparentWidget );
/// Create an embedded document; used by KWPartFrameSet but is defined here
/// because KoDocument:insertChild is protected.
KWDocumentChild* createChildDoc( const KoRect& rect, KoDocument* childDoc );
- void setPageLayout( const KoPageLayout& layout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews = true );
+ void setPageLayout( const KoPageLayout& tqlayout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews = true );
- void getPageLayout( KoPageLayout& layout, KoColumns& cl, KoKWHeaderFooter& hf );
+ void getPageLayout( KoPageLayout& tqlayout, KoColumns& cl, KoKWHeaderFooter& hf );
KWTextFrameSet * textFrameSet ( unsigned int num ) const;
/// Return the frameset number @p num
@@ -223,19 +224,19 @@ public:
{ return m_lstFrameSet.at( num ); }
/// Return the frameset with a given name
- KWFrameSet * frameSetByName( const QString & name );
+ KWFrameSet * frameSetByName( const TQString & name );
/// Return the total number of framesets
unsigned int frameSetCount() const
{ return m_lstFrameSet.count(); }
/// Generate a new name for a frameset. @p templateName must contain a %1 [for a number].
- QString generateFramesetName( const QString & templateName );
+ TQString generateFramesetName( const TQString & templateName );
/// Prefer this over frameSet(i), if iterating over all of them
- QPtrListIterator<KWFrameSet> framesetsIterator() const { return QPtrListIterator<KWFrameSet>(m_lstFrameSet); }
+ TQPtrListIterator<KWFrameSet> framesetsIterator() const { return TQPtrListIterator<KWFrameSet>(m_lstFrameSet); }
- QValueList<KoTextObject *> visibleTextObjects(KWViewMode *viewmode) const;
+ TQValueList<KoTextObject *> visibleTextObjects(KWViewMode *viewmode) const;
/// Register new frameset
void addFrameSet( KWFrameSet *f, bool finalize = true );
@@ -259,27 +260,27 @@ public:
unsigned int numColumns() const { return m_pageColumns.columns; }
- void repaintAllViews( bool erase = false );
+ void tqrepaintAllViews( bool erase = false );
/** Update all views of this document, area can be cleared before redrawing with the
* erase flag. (false implied). All views EXCEPT the argument view are updated ( give 0L for all )
*/
- void repaintAllViewsExcept( KWView *view, bool erase = false );
+ void tqrepaintAllViewsExcept( KWView *view, bool erase = false );
/**
- * schedule a repaint of all views but don't execute immediately
+ * schedule a tqrepaint of all views but don't execute immediately
*/
void delayedRepaintAllViews();
/**
- * schedule a frame layout (e.g. for footnotes) but don't execute immediately
+ * schedule a frame tqlayout (e.g. for footnotes) but don't execute immediately
*/
void delayedRecalcFrames( int fromPage );
/**
* Return a double-buffer pixmap of (at least) the given size.
*/
- QPixmap* doubleBufferPixmap( const QSize& );
+ TQPixmap* doubleBufferPixmap( const TQSize& );
/**
* Call this when you're done with the double-buffer pixmap (at the
* end of the current painting, for all objects that need to be painted).
@@ -289,31 +290,31 @@ public:
/**
* Tell this method when a frame is moved / resized / created / deleted
- * and everything will be update / repainted accordingly.
+ * and everything will be update / tqrepainted accordingly.
*/
void frameChanged( KWFrame * frame );
- void framesChanged( const QPtrList<KWFrame> & frames, KWView * view = 0L );
+ void framesChanged( const TQPtrList<KWFrame> & frames, KWView * view = 0L );
- QString uniqueFramesetName( const QString& oldName );
+ TQString uniqueFramesetName( const TQString& oldName );
/**
* @param copyFootNote ...
* @param dontCreateFootNote true when we copy footnote into an other frameset than mainFrameSet => footnote is removed !
* @param selectFrames if true, pasted frames are auto-selected. Set to false when loading from a file etc.
*/
- void pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, bool copyFootNote = false, bool dontCreateFootNote = false, bool selectFrames = true );
+ void pasteFrames( TQDomElement topElem, KMacroCommand * macroCmd, bool copyFootNote = false, bool dontCreateFootNote = false, bool selectFrames = true );
- void insertEmbedded( KoStore *store, QDomElement topElem, KMacroCommand * macroCmd, double offset );
+ void insertEmbedded( KoStore *store, TQDomElement topElem, KMacroCommand * macroCmd, double offset );
void completePasting();
void completeOasisPasting();
- void saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles, KoSavingContext& savingContext, SaveFlag saveFlag, const QByteArray& headerFooterContent ) const;
+ void saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles, KoSavingContext& savingContext, SaveFlag saveFlag, const TQByteArray& headerFooterContent ) const;
KoStyleCollection * styleCollection()const { return m_styleColl;}
KWFrameStyleCollection * frameStyleCollection()const { return m_frameStyleColl;}
KWTableStyleCollection * tableStyleCollection()const { return m_tableStyleColl;}
KWTableTemplateCollection * tableTemplateCollection()const { return m_tableTemplateColl;}
- QFont defaultFont() const { return m_defaultFont; }
- void setDefaultFont( const QFont & newFont ) {
+ TQFont defaultFont() const { return m_defaultFont; }
+ void setDefaultFont( const TQFont & newFont ) {
m_defaultFont = newFont;
}
@@ -337,7 +338,7 @@ public:
KoPictureCollection *pictureCollection() { return m_pictureCollection; }
KoVariableFormatCollection *variableFormatCollection()const { return m_varFormatCollection; }
- QValueList<KWView *> getAllViews() const { return m_lstViews; }
+ TQValueList<KWView *> getAllViews() const { return m_lstViews; }
/**
* Insert a new page after another,
@@ -364,7 +365,7 @@ public:
* Used by insertPage but also by KWTextFrameSet to check if it's worth
* auto-inserting a new page (to avoid infinite loops if not)
*/
- QPtrList<KWFrame> framesToCopyOnNewPage( int afterPageNum ) const;
+ TQPtrList<KWFrame> framesToCopyOnNewPage( int afterPageNum ) const;
/**
* Remove a page. Call afterRemovePages() after removing one or more pages.
@@ -384,13 +385,13 @@ public:
bool tryRemovingPages();
ProcessingType processingType()const { return m_processingType; }
- int frameSetNum( KWFrameSet* fs ) { return m_lstFrameSet.findRef( fs ); }
+ int frameSetNum( KWFrameSet* fs ) { return m_lstFrameSet.tqfindRef( fs ); }
void lowerMainFrames( int pageNum );
void lowerMainFrames( int pageNum, int lowestZOrder );
/// \note This method considers _all_ text framesets, even table cells
- QPtrList<KWTextFrameSet> allTextFramesets( bool onlyReadWrite ) const;
+ TQPtrList<KWTextFrameSet> allTextFramesets( bool onlyReadWrite ) const;
/// \note This method considers _all_ text framesets, even table cells
int numberOfTextFrameSet( KWFrameSet* fs, bool onlyReadWrite );
/// \note This method considers _all_ text framesets, even table cells
@@ -398,7 +399,7 @@ public:
/// Reimplementation from KoDocument.
/// \note This method considers _all_ text framesets, even table cells
- virtual QValueList<KoTextDocument *> allTextDocuments() const;
+ virtual TQValueList<KoTextDocument *> allTextDocuments() const;
/** Gather all the frames which are on a certain page and return them.
@@ -406,7 +407,7 @@ public:
* @param pageNum the number of the page
* @param sorted if true the list is ordered per z-order. should be true always.
*/
- QPtrList<KWFrame> framesInPage( int pageNum , bool sorted=true) const;
+ TQPtrList<KWFrame> framesInPage( int pageNum , bool sorted=true) const;
/**
@@ -436,12 +437,12 @@ public:
//int applyStyleChangeMask() { return styleMask; }
//void setApplyStyleChangeMask( int f ) { styleMask = f; }
- // paragLayoutChanged is a set of flags for the parag layout - see the enum in KWParagLayout
+ // paragLayoutChanged is a set of flags for the parag tqlayout - see the enum in KWParagLayout
// formatChanged is a set of flags from KoTextFormat
// If both are -1, it means the style has been deleted.
void applyStyleChange( KoStyleChangeDefMap changed );
void updateAllStyleLists();
- void updateStyleListOrder( const QStringList &list );
+ void updateStyleListOrder( const TQStringList &list );
void updateAllFrameStyleLists();
void updateAllTableStyleLists();
@@ -480,18 +481,18 @@ public:
* This is used upon loading, to delay certain things until completeLoading,
* for KWTextParag
*/
- void addAnchorRequest( const QString &framesetName, const KWAnchorPosition &anchorPos );
+ void addAnchorRequest( const TQString &framesetName, const KWAnchorPosition &anchorPos );
/**
* This is used upon loading, to delay certain things until completeLoading,
* for KWFootNoteVariable
*/
- void addFootNoteRequest( const QString &framesetName, KWFootNoteVariable* var );
+ void addFootNoteRequest( const TQString &framesetName, KWFootNoteVariable* var );
/// This is used by loadFrameSets() and by KWCanvas to paste framesets
- KWFrameSet *loadFrameSet( QDomElement framesetElem, bool loadFrames = true , bool loadFootnote = true);
- void loadEmbeddedObjects( QDomElement& word );
- void saveEmbeddedObjects( QDomElement& parentElem, const QPtrList<KoDocumentChild>& childList );
- void loadEmbedded( const QDomElement &embedded );
+ KWFrameSet *loadFrameSet( TQDomElement framesetElem, bool loadFrames = true , bool loadFootnote = true);
+ void loadEmbeddedObjects( TQDomElement& word );
+ void saveEmbeddedObjects( TQDomElement& tqparentElem, const TQPtrList<KoDocumentChild>& childList );
+ void loadEmbedded( const TQDomElement &embedded );
void recalcVariables( int type );
@@ -518,42 +519,42 @@ public:
void newZoomAndResolution( bool updateViews, bool forPrint );
/**
- * Due to the way the text formatter works (it caches layout information in
+ * Due to the way the text formatter works (it caches tqlayout information in
* the paragraphs and characters), we currently can't have one viewmode per view.
* It has to be the same for all views.
*/
- QString viewModeType() const { return m_viewModeType; }
+ TQString viewModeType() const { return m_viewModeType; }
/**
- * The view mode used for text layouting.
+ * The view mode used for text tqlayouting.
*/
- KWViewMode* layoutViewMode() const { return m_layoutViewMode; }
+ KWViewMode* tqlayoutViewMode() const { return m_layoutViewMode; }
/**
* Changes m_viewMode, and updates all views to this viewmode
*/
- void switchViewMode( const QString& newViewMode );
+ void switchViewMode( const TQString& newViewMode );
/// \todo useless method
- static QString getAttribute(QDomElement &element, const char *attributeName, const QString &defaultValue)
+ static TQString getAttribute(TQDomElement &element, const char *attributeName, const TQString &defaultValue)
{
return element.attribute( attributeName, defaultValue );
}
- static int getAttribute(QDomElement &element, const char *attributeName, int defaultValue)
+ static int getAttribute(TQDomElement &element, const char *attributeName, int defaultValue)
{
- QString value;
- if ( ( value = element.attribute( attributeName ) ) != QString::null )
+ TQString value;
+ if ( ( value = element.attribute( attributeName ) ) != TQString() )
return value.toInt();
else
return defaultValue;
}
- static double getAttribute(QDomElement &element, const char *attributeName, double defaultValue)
+ static double getAttribute(TQDomElement &element, const char *attributeName, double defaultValue)
{
- QString value;
- if ( ( value = element.attribute( attributeName ) ) != QString::null )
+ TQString value;
+ if ( ( value = element.attribute( attributeName ) ) != TQString() )
return value.toDouble();
else
return defaultValue;
@@ -564,8 +565,8 @@ public:
void printDebug();
#endif
- /** calls layout() on all framesets */
- void layout();
+ /** calls tqlayout() on all framesets */
+ void tqlayout();
// This settings has to be here [instead of KWView] because we need to
// format paragraphs slightly differently (to add room for the CR char)
@@ -653,18 +654,18 @@ public:
/// Returns if the document has a table of contents
bool tocPresent(){return m_hasTOC;}
- QString sectionTitle( int pageNum ) const;
+ TQString sectionTitle( int pageNum ) const;
void updateRulerFrameStartEnd();
/** Convert a color into a color to be displayed for it
* (when using color schemes, we still want to print black on white).
* See also KoTextFormat::defaultTextColor. */
- static QColor resolveTextColor( const QColor & col, QPainter * painter );
- static QColor defaultTextColor( QPainter * painter );
- static QColor resolveBgColor( const QColor & col, QPainter * painter = 0 );
- static QBrush resolveBgBrush( const QBrush & brush, QPainter * painter = 0 );
- static QColor defaultBgColor( QPainter * painter );
+ static TQColor resolveTextColor( const TQColor & col, TQPainter * painter );
+ static TQColor defaultTextColor( TQPainter * painter );
+ static TQColor resolveBgColor( const TQColor & col, TQPainter * painter = 0 );
+ static TQBrush resolveBgBrush( const TQBrush & brush, TQPainter * painter = 0 );
+ static TQColor defaultBgColor( TQPainter * painter );
virtual DCOPObject* dcopObject();
@@ -684,9 +685,9 @@ public:
void updateHeaderButton();
void updateFooterButton();
- QStringList spellCheckIgnoreList() const { return m_spellCheckIgnoreList; }
- void setSpellCheckIgnoreList( const QStringList& lst );
- void addSpellCheckIgnoreWord( const QString & );
+ TQStringList spellCheckIgnoreList() const { return m_spellCheckIgnoreList; }
+ void setSpellCheckIgnoreList( const TQStringList& lst );
+ void addSpellCheckIgnoreWord( const TQString & );
void updateTextFrameSetEdit();
void changeFootNoteConfig();
@@ -699,7 +700,7 @@ public:
void changeBgSpellCheckingState( bool b );
// To position the cursor when opening a document
- QString initialFrameSet() const; ///< \note can be empty for "unset"
+ TQString initialFrameSet() const; ///< \note can be empty for "unset"
int initialCursorParag() const;
int initialCursorIndex() const;
/// Once we're done with this info, get rid of it
@@ -721,34 +722,34 @@ public:
void setFootNoteSeparatorLineType( SeparatorLineLineType type) {m_footNoteSeparatorLineType = type;}
const KoTextBookmarkList* bookmarkList() const { return m_bookmarkList; }
- void insertBookmark( const QString &name, KoTextParag *startparag, KoTextParag *endparag, int start, int end );
- void deleteBookmark( const QString &name );
- void renameBookmark( const QString &oldname, const QString &newName );
+ void insertBookmark( const TQString &name, KoTextParag *startparag, KoTextParag *endparag, int start, int end );
+ void deleteBookmark( const TQString &name );
+ void renameBookmark( const TQString &oldname, const TQString &newName );
- const KoTextBookmark * bookmarkByName( const QString & name ) const;
- QStringList listOfBookmarkName(KWViewMode * viewMode) const;
+ const KoTextBookmark * bookmarkByName( const TQString & name ) const;
+ TQStringList listOfBookmarkName(KWViewMode * viewMode) const;
void paragraphDeleted( KoTextParag *parag, KWFrameSet *frm);
void paragraphModified(KoTextParag* parag, int /*KoTextParag::ParagModifyType*/ type, int start, int lenght);
void initBookmarkList();
void loadImagesFromStore( KoStore *store );
- void loadPictureMap ( QDomElement& domElement );
+ void loadPictureMap ( TQDomElement& domElement );
void testAndCloseAllFrameSetProtectedContent();
void updateRulerInProtectContentMode();
KoPageLayout pageLayout(int pageNumber = 0) const;
- QStringList personalExpressionPath() const { return m_personalExpressionPath;}
- void setPersonalExpressionPath( const QStringList & );
+ TQStringList personalExpressionPath() const { return m_personalExpressionPath;}
+ void setPersonalExpressionPath( const TQStringList & );
void updateDirectCursorButton();
- QString globalLanguage()const { return m_globalLanguage; }
- void setGlobalLanguage( const QString & lang ){m_globalLanguage = lang;}
- void addWordToDictionary( const QString & );
+ TQString globalLanguage()const { return m_globalLanguage; }
+ void setGlobalLanguage( const TQString & lang ){m_globalLanguage = lang;}
+ void addWordToDictionary( const TQString & );
bool globalHyphenation() const { return m_bGlobalHyphenation; }
void setGlobalHyphenation ( bool hyphen );
@@ -763,8 +764,8 @@ public:
KWBgSpellCheck* backSpeller() const { return m_bgSpellCheck; }
- /// Load the given page layout; public for KWTextParag
- bool loadOasisPageLayout( const QString& masterPageName, KoOasisContext& context );
+ /// Load the given page tqlayout; public for KWTextParag
+ bool loadOasisPageLayout( const TQString& masterPageName, KoOasisContext& context );
// end of public methods
signals:
@@ -772,7 +773,7 @@ signals:
/// This is emitted by setPageLayout if updateViews=true
void pageLayoutChanged( const KoPageLayout& );
- /// Emitted when the scrollview contents must be resized (e.g. new page, new layout...)
+ /// Emitted when the scrollview contents must be resized (e.g. new page, new tqlayout...)
void newContentsSize();
/** This is emitted when the height of the text in the main frameset changes
@@ -793,10 +794,10 @@ signals:
public slots:
void slotRepaintChanged( KWFrameSet * frameset );
- void framesChanged( const QValueList<KWFrame*> &frames);
+ void framesChanged( const TQValueList<KWFrame*> &frames);
- /** calls invalidate() on all framesets */
- void invalidate(const KWFrameSet *skipThisFrameSet=0);
+ /** calls tqinvalidate() on all framesets */
+ void tqinvalidate(const KWFrameSet *skipThisFrameSet=0);
virtual void initEmpty();
@@ -809,8 +810,8 @@ protected slots:
void slotChapterParagraphFormatted( KoTextParag* parag );
void saveDialogShown(); ///< called just before the save-dialog is shown
- virtual void openExistingFile( const QString& file );
- virtual void openTemplate( const QString& file );
+ virtual void openExistingFile( const TQString& file );
+ virtual void openTemplate( const TQString& file );
private slots:
/// is called from a singleShot timer due to frameChanged()
@@ -820,32 +821,32 @@ protected:
void nextParagraphNeedingCheck();
/// fix up Z-order for import from older kword versions.
void fixZOrders();
- QString checkSectionTitleInParag( KoTextParag* parag, KWTextFrameSet*, int pageNum ) const;
- KoView* createViewInstance( QWidget* parent, const char* name );
+ TQString checkSectionTitleInParag( KoTextParag* parag, KWTextFrameSet*, int pageNum ) const;
+ KoView* createViewInstance( TQWidget* tqparent, const char* name );
virtual bool completeLoading( KoStore* store );
virtual bool completeSaving( KoStore *store );
- void loadFrameSets( const QDomElement &framesets );
- void loadStyleTemplates( const QDomElement &styles );
- void saveStyle( KoParagStyle *sty, QDomElement parentElem );
- void saveFrameStyle( KWFrameStyle *sty, QDomElement parentElem );
- void saveTableStyle( KWTableStyle *sty, QDomElement parentElem );
+ void loadFrameSets( const TQDomElement &framesets );
+ void loadStyleTemplates( const TQDomElement &styles );
+ void saveStyle( KoParagStyle *sty, TQDomElement tqparentElem );
+ void saveFrameStyle( KWFrameStyle *sty, TQDomElement tqparentElem );
+ void saveTableStyle( KWTableStyle *sty, TQDomElement tqparentElem );
- void loadFrameStyleTemplates( const QDomElement &styles );
+ void loadFrameStyleTemplates( const TQDomElement &styles );
void loadDefaultFrameStyleTemplates();
- void loadTableStyleTemplates( const QDomElement &styles );
+ void loadTableStyleTemplates( const TQDomElement &styles );
void loadDefaultTableStyleTemplates();
void loadDefaultTableTemplates();
- bool loadMasterPageStyle( const QString& masterPageName, KoOasisContext& context );
+ bool loadMasterPageStyle( const TQString& masterPageName, KoOasisContext& context );
void saveOasisBody( KoXmlWriter& writer, KoSavingContext& context ) const;
void saveOasisCustomFied( KoXmlWriter &writer )const;
- QValueList<KoPictureKey> savePictureList();
+ TQValueList<KoPictureKey> savePictureList();
/// helper method for the 2 different dragSelected() versions
- QDragObject* dragSelectedPrivate( QWidget *parent, const QValueList<KWFrameView*> &selectedFrames, KWTextFrameSet* fs);
+ TQDragObject* dragSelectedPrivate( TQWidget *tqparent, const TQValueList<KWFrameView*> &selectedFrames, KWTextFrameSet* fs);
/**
* Save the whole document, or just the selection, into OASIS format
* When saving the selection, also return the data as plain text and/or plain picture,
@@ -861,16 +862,16 @@ protected:
* @param fs the text frameset, which must be set when saveFlag==SaveSelected.
*/
bool saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag saveFlag,
- const QValueList<KWFrameView*> &selectedFrames,
- QString* plainText = 0, KoPicture* picture = 0, KWTextFrameSet* fs = 0 );
+ const TQValueList<KWFrameView*> &selectedFrames,
+ TQString* plainText = 0, KoPicture* picture = 0, KWTextFrameSet* fs = 0 );
void saveOasisSettings( KoXmlWriter &settingsWriter ) const;
void saveSelectedFrames( KoXmlWriter& bodyWriter,
- KoSavingContext& savingContext, QValueList<KoPictureKey>& pictureList,
- const QValueList<KWFrameView*> &selectedFrames, QString* plainText ) const;
+ KoSavingContext& savingContext, TQValueList<KoPictureKey>& pictureList,
+ const TQValueList<KWFrameView*> &selectedFrames, TQString* plainText ) const;
// inherited from KoDocument
- QWidget* createCustomDocumentWidget(QWidget *parent);
+ TQWidget* createCustomDocumentWidget(TQWidget *tqparent);
private:
void clear();
@@ -878,25 +879,25 @@ private:
class FramesChangedHandler {
public:
- FramesChangedHandler(KWDocument *parent);
+ FramesChangedHandler(KWDocument *tqparent);
void addFrame(KWFrame*);
void addFrameSet(KWFrameSet*);
void execute();
private:
KWDocument *m_parent;
- QValueList<KWFrameSet*> m_frameSets;
+ TQValueList<KWFrameSet*> m_frameSets;
bool m_needLayout;
};
// Variables:
- QValueList<KWView *> m_lstViews;
+ TQValueList<KWView *> m_lstViews;
KoColumns m_pageColumns;
KoKWHeaderFooter m_pageHeaderFooter;
KoPictureCollection* m_pictureCollection;
- QPtrList<KWFrameSet> m_lstFrameSet;
+ TQPtrList<KWFrameSet> m_lstFrameSet;
unsigned int m_itemsLoaded;
unsigned int m_nrItemsToLoad;
@@ -911,18 +912,18 @@ private:
// ===== Legacy loading stuff, remove when switching to OASIS =====
/// \note Shared between loadXML and loadComplete
- QString m_urlIntern;
+ TQString m_urlIntern;
- QMap<KoPictureKey, QString> m_pictureMap;
+ TQMap<KoPictureKey, TQString> m_pictureMap;
/// List used to help loading and saving images of the old type ("text image" of class KWTextImage)
- QPtrList<KWTextImage> m_textImageRequests;
- QPtrList<KWPictureFrameSet> m_pictureRequests;
- QMap<QString, KWAnchorPosition> m_anchorRequests;
- QMap<QString, KWFootNoteVariable *> m_footnoteVarRequests; ///< \todo still needed? (move to KWLoadingInfo if so)
+ TQPtrList<KWTextImage> m_textImageRequests;
+ TQPtrList<KWPictureFrameSet> m_pictureRequests;
+ TQMap<TQString, KWAnchorPosition> m_anchorRequests;
+ TQMap<TQString, KWFootNoteVariable *> m_footnoteVarRequests; ///< \todo still needed? (move to KWLoadingInfo if so)
// ===== End of legacy loading stuff =====
- QMap<QString,QString> * m_pasteFramesetsMap;
+ TQMap<TQString,TQString> * m_pasteFramesetsMap;
KoVariableFormatCollection *m_varFormatCollection;
KWMailMergeDataBase *m_slDataBase;
@@ -935,7 +936,7 @@ private:
*/
int m_syntaxVersion;
- QFont m_defaultFont;
+ TQFont m_defaultFont;
bool m_headerVisible, m_footerVisible;
bool m_viewFrameBorders;
bool m_bShowRuler;
@@ -943,7 +944,7 @@ private:
bool m_hasTOC;
bool m_bShowStatusBar;
bool m_pgUpDownMovesCaret;
- bool m_repaintAllViewsPending;
+ bool m_tqrepaintAllViewsPending;
bool m_bAllowAutoFormat;
bool m_bShowScrollBar;
bool m_cursorInProtectectedArea;
@@ -969,8 +970,8 @@ private:
int m_recalcFramesPending;
/// The name of the viewmode used by all views.
- QString m_viewModeType;
- /// The viewmode used for text layouting
+ TQString m_viewModeType;
+ /// The viewmode used for text tqlayouting
KWViewMode* m_layoutViewMode;
KWVariableCollection *m_varColl;
KWBgSpellCheck *m_bgSpellCheck;
@@ -990,12 +991,12 @@ private:
/** Page number -> section title array, for the Section variable.
* Note that pages without a section title don't appear in the array. */
- QValueVector< QString > m_sectionTitles;
+ TQValueVector< TQString > m_sectionTitles;
double m_tabStop;
- QStringList m_spellCheckIgnoreList; // per-document
- QStringList m_spellCheckPersonalDict; // per-user
- QPixmap* m_bufPixmap;
+ TQStringList m_spellCheckIgnoreList; // per-document
+ TQStringList m_spellCheckPersonalDict; // per-user
+ TQPixmap* m_bufPixmap;
KWLoadingInfo* m_loadingInfo;
@@ -1005,8 +1006,8 @@ private:
KoTextBookmarkList* m_bookmarkList;
- QStringList m_personalExpressionPath;
- QString m_globalLanguage;
+ TQStringList m_personalExpressionPath;
+ TQString m_globalLanguage;
bool m_bGlobalHyphenation;
bool m_bGeneratingPreview;
diff --git a/kword/KWEditPersonnalExpression.cpp b/kword/KWEditPersonnalExpression.cpp
index d11449af..59b79f97 100644
--- a/kword/KWEditPersonnalExpression.cpp
+++ b/kword/KWEditPersonnalExpression.cpp
@@ -25,77 +25,77 @@
#include <kdebug.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-
-KWEditPersonnalExpression::KWEditPersonnalExpression( QWidget *parent, const char *name )
- : KDialogBase( parent, name , true, i18n("Edit Personal Expression"), Ok|Cancel, Ok, true )
+#include <tqfile.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+
+KWEditPersonnalExpression::KWEditPersonnalExpression( TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name , true, i18n("Edit Personal Expression"), Ok|Cancel, Ok, true )
{
resize( 412, 339 );
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QGridLayout* form1Layout = new QGridLayout( page, 1, 1, 0, KDialog::spacingHint(), "form1Layout");
+ TQGridLayout* form1Layout = new TQGridLayout( page, 1, 1, 0, KDialog::spacingHint(), "form1Layout");
- QHBoxLayout *horlayout1 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "horlayout1");
+ TQHBoxLayout *hortqlayout1 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "hortqlayout1");
- QLabel *groupnameLabel = new QLabel(i18n("Group name:"), page, "groupnameLabel" );
- horlayout1->addWidget( groupnameLabel );
+ TQLabel *groupnameLabel = new TQLabel(i18n("Group name:"), page, "groupnameLabel" );
+ hortqlayout1->addWidget( groupnameLabel );
- m_groupLineEdit = new QLineEdit( page, "groupLineEdit" );
- horlayout1->addWidget( m_groupLineEdit );
+ m_groupLineEdit = new TQLineEdit( page, "groupLineEdit" );
+ hortqlayout1->addWidget( m_groupLineEdit );
- form1Layout->addLayout( horlayout1, 0, 1 );
+ form1Layout->addLayout( hortqlayout1, 0, 1 );
- QGroupBox *expressionGroupBox = new QGroupBox( page, "expressionGroupBox" );
- expressionGroupBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 1, 0, expressionGroupBox->sizePolicy().hasHeightForWidth() ) );
+ TQGroupBox *expressionGroupBox = new TQGroupBox( page, "expressionGroupBox" );
+ expressionGroupBox->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 0, expressionGroupBox->sizePolicy().hasHeightForWidth() ) );
expressionGroupBox->setTitle( i18n( "Expressions" ) );
expressionGroupBox->setColumnLayout(0, Qt::Vertical );
- expressionGroupBox->layout()->setSpacing( KDialog::spacingHint() );
- expressionGroupBox->layout()->setMargin( KDialog::marginHint() );
- QVBoxLayout *expressionGroupBoxLayout = new QVBoxLayout( expressionGroupBox->layout() );
- expressionGroupBoxLayout->setAlignment( Qt::AlignTop );
+ expressionGroupBox->tqlayout()->setSpacing( KDialog::spacingHint() );
+ expressionGroupBox->tqlayout()->setMargin( KDialog::marginHint() );
+ TQVBoxLayout *expressionGroupBoxLayout = new TQVBoxLayout( expressionGroupBox->tqlayout() );
+ expressionGroupBoxLayout->tqsetAlignment( TQt::AlignTop );
- m_ExpressionsList = new QListBox( expressionGroupBox, "listOfExpressions" );
- m_ExpressionsList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 1, 0, m_ExpressionsList->sizePolicy().hasHeightForWidth() ) );
+ m_ExpressionsList = new TQListBox( expressionGroupBox, "listOfExpressions" );
+ m_ExpressionsList->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 1, 0, m_ExpressionsList->sizePolicy().hasHeightForWidth() ) );
expressionGroupBoxLayout->addWidget( m_ExpressionsList );
- m_expressionLineEdit = new QLineEdit( expressionGroupBox, "expressionLineEdit" );
+ m_expressionLineEdit = new TQLineEdit( expressionGroupBox, "expressionLineEdit" );
expressionGroupBoxLayout->addWidget( m_expressionLineEdit );
- QHBoxLayout *horlayout2 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "horlayout2");
- QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- horlayout2->addItem( spacer );
+ TQHBoxLayout *hortqlayout2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "hortqlayout2");
+ TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
+ hortqlayout2->addItem( spacer );
- m_addExpression = new QPushButton( i18n("&New"), expressionGroupBox, "m_addExpression" );
- horlayout2->addWidget( m_addExpression );
+ m_addExpression = new TQPushButton( i18n("&New"), expressionGroupBox, "m_addExpression" );
+ hortqlayout2->addWidget( m_addExpression );
- m_delExpression = new QPushButton( i18n("&Delete"), expressionGroupBox, "m_delExpression" );
- horlayout2->addWidget( m_delExpression );
- expressionGroupBoxLayout->addLayout( horlayout2 );
+ m_delExpression = new TQPushButton( i18n("&Delete"), expressionGroupBox, "m_delExpression" );
+ hortqlayout2->addWidget( m_delExpression );
+ expressionGroupBoxLayout->addLayout( hortqlayout2 );
form1Layout->addWidget( expressionGroupBox, 1, 1 );
- QVBoxLayout *vertlayout = new QVBoxLayout( 0, 0, KDialog::spacingHint(), "vertlayout");
+ TQVBoxLayout *verttqlayout = new TQVBoxLayout( 0, 0, KDialog::spacingHint(), "verttqlayout");
- m_groupList = new QListBox( page, "groupList" );
+ m_groupList = new TQListBox( page, "groupList" );
m_groupList->insertItem( "group1" );
- m_groupList->setMaximumSize( QSize( 200, 32767 ) );
- vertlayout->addWidget( m_groupList );
+ m_groupList->setMaximumSize( TQSize( 200, 32767 ) );
+ verttqlayout->addWidget( m_groupList );
- QHBoxLayout *horlayout3 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "horlayout3");
+ TQHBoxLayout *hortqlayout3 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "hortqlayout3");
- m_addGroup = new QPushButton( i18n("New"), page, "m_addGroup" );
- horlayout3->addWidget( m_addGroup );
+ m_addGroup = new TQPushButton( i18n("New"), page, "m_addGroup" );
+ hortqlayout3->addWidget( m_addGroup );
- m_delGroup = new QPushButton(i18n("Delete"), page, "m_delGroup" );
- horlayout3->addWidget( m_delGroup );
- vertlayout->addLayout( horlayout3 );
+ m_delGroup = new TQPushButton(i18n("Delete"), page, "m_delGroup" );
+ hortqlayout3->addWidget( m_delGroup );
+ verttqlayout->addLayout( hortqlayout3 );
- form1Layout->addMultiCellLayout( vertlayout, 0, 1, 0, 0 );
+ form1Layout->addMultiCellLayout( verttqlayout, 0, 1, 0, 0 );
loadFile();
if(listExpression.count() == 0)
@@ -103,16 +103,16 @@ KWEditPersonnalExpression::KWEditPersonnalExpression( QWidget *parent, const cha
else
initGroupList();
- connect(m_groupList,SIGNAL(selectionChanged()), this,SLOT(slotGroupSelected()));
- connect(m_ExpressionsList,SIGNAL(selectionChanged()), this,SLOT(slotExpressionSelected()));
+ connect(m_groupList,TQT_SIGNAL(selectionChanged()), this,TQT_SLOT(slotGroupSelected()));
+ connect(m_ExpressionsList,TQT_SIGNAL(selectionChanged()), this,TQT_SLOT(slotExpressionSelected()));
if(m_groupList->count() > 0) m_groupList->setSelected(0, true);
- connect(m_groupLineEdit,SIGNAL(textChanged(const QString&)), this,SLOT(slotUpdateGroupName(const QString&)));
- connect(m_expressionLineEdit,SIGNAL(textChanged(const QString&)), this,SLOT(slotUpdateExpression(const QString&)));
- connect(m_addExpression, SIGNAL( clicked() ), this,SLOT( slotAddExpression() ));
- connect(m_delExpression, SIGNAL( clicked() ), this,SLOT( slotRemoveExpression() ));
- connect(m_addGroup, SIGNAL( clicked() ), this,SLOT( slotAddGroup()));
- connect(m_delGroup, SIGNAL( clicked() ), this,SLOT( slotRemoveGroup() ));
+ connect(m_groupLineEdit,TQT_SIGNAL(textChanged(const TQString&)), this,TQT_SLOT(slotUpdateGroupName(const TQString&)));
+ connect(m_expressionLineEdit,TQT_SIGNAL(textChanged(const TQString&)), this,TQT_SLOT(slotUpdateExpression(const TQString&)));
+ connect(m_addExpression, TQT_SIGNAL( clicked() ), this,TQT_SLOT( slotAddExpression() ));
+ connect(m_delExpression, TQT_SIGNAL( clicked() ), this,TQT_SLOT( slotRemoveExpression() ));
+ connect(m_addGroup, TQT_SIGNAL( clicked() ), this,TQT_SLOT( slotAddGroup()));
+ connect(m_delGroup, TQT_SIGNAL( clicked() ), this,TQT_SLOT( slotRemoveGroup() ));
updateWidget();
setFocus();
@@ -129,8 +129,8 @@ void KWEditPersonnalExpression::slotGroupSelected()
m_groupLineEdit->blockSignals(true);
m_delExpression->setEnabled(m_groupList->currentItem()!=-1);
m_groupLineEdit->setText(m_groupList->currentText());
- list::Iterator it= listExpression.find(m_groupList->currentText());
- QStringList lst(it.data());
+ list::Iterator it= listExpression.tqfind(m_groupList->currentText());
+ TQStringList lst(it.data());
m_ExpressionsList->blockSignals(true);
m_ExpressionsList->clear();
m_ExpressionsList->insertStringList(lst);
@@ -141,14 +141,14 @@ void KWEditPersonnalExpression::slotGroupSelected()
m_groupLineEdit->blockSignals(false);
}
-void KWEditPersonnalExpression::slotUpdateGroupName(const QString &newGroupName)
+void KWEditPersonnalExpression::slotUpdateGroupName(const TQString &newGroupName)
{
if ( m_groupList->currentItem()==-1 )
return;
m_addGroup->setEnabled( true );
- list::Iterator it= listExpression.find(m_groupList->currentText());
- QStringList lst(it.data());
+ list::Iterator it= listExpression.tqfind(m_groupList->currentText());
+ TQStringList lst(it.data());
listExpression.insert(newGroupName,lst);
listExpression.remove(m_groupList->currentText());
m_groupList->blockSignals(true);
@@ -157,17 +157,17 @@ void KWEditPersonnalExpression::slotUpdateGroupName(const QString &newGroupName)
m_bChanged=true;
}
-void KWEditPersonnalExpression::slotUpdateExpression(const QString &newExpression)
+void KWEditPersonnalExpression::slotUpdateExpression(const TQString &newExpression)
{
if(newExpression.isEmpty() || m_groupList->currentItem()==-1 || m_ExpressionsList->currentText().isEmpty())
return;
- list::Iterator it= listExpression.find(m_groupList->currentText());
- QStringList lst = it.data();
- QStringList::Iterator it2=lst.find(m_ExpressionsList->currentText());
- lst.insert(it2,QString(newExpression));
+ list::Iterator it= listExpression.tqfind(m_groupList->currentText());
+ TQStringList lst = it.data();
+ TQStringList::Iterator it2=lst.tqfind(m_ExpressionsList->currentText());
+ lst.insert(it2,TQString(newExpression));
lst.remove(it2);
- listExpression.replace(m_groupList->currentText(),lst);
+ listExpression.tqreplace(m_groupList->currentText(),lst);
lst.remove(m_ExpressionsList->currentText());
m_ExpressionsList->blockSignals(true);
@@ -178,13 +178,13 @@ void KWEditPersonnalExpression::slotUpdateExpression(const QString &newExpressio
void KWEditPersonnalExpression::loadFile()
{
- QString file=locateLocal("data","kword/expression/perso.xml");
+ TQString file=locateLocal("data","kword/expression/perso.xml");
init( file );
}
void KWEditPersonnalExpression::initGroupList()
{
- QStringList lst;
+ TQStringList lst;
m_groupList->clear();
list::Iterator it;
for( it = listExpression.begin(); it != listExpression.end(); ++it )
@@ -192,40 +192,40 @@ void KWEditPersonnalExpression::initGroupList()
m_groupList->insertStringList(lst);
}
-void KWEditPersonnalExpression::init(const QString& filename )
+void KWEditPersonnalExpression::init(const TQString& filename )
{
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_ReadOnly ) )
return;
kdDebug() << "KWEditPersonnalExpression::init parsing " << filename << endl;
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &file );
file.close();
- QString group = "";
- QStringList list;
- QDomNode n = doc.documentElement().firstChild();
+ TQString group = "";
+ TQStringList list;
+ TQDomNode n = doc.documentElement().firstChild();
for( ; !n.isNull(); n = n.nextSibling() )
{
if ( n.isElement() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "Type" )
{
list.clear();
group = i18n( e.namedItem( "TypeName" ).toElement().text().utf8() );
- QDomNode n2 = e.firstChild();
+ TQDomNode n2 = e.firstChild();
for( ; !n2.isNull(); n2 = n2.nextSibling() )
{
if ( n2.isElement() )
{
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if ( e2.tagName() == "Expression" )
{
- QString text = i18n( e2.namedItem( "Text" ).toElement().text().utf8() );
+ TQString text = i18n( e2.namedItem( "Text" ).toElement().text().utf8() );
list<<text;
}
}
@@ -246,13 +246,13 @@ void KWEditPersonnalExpression::slotOk()
}
void KWEditPersonnalExpression::slotAddExpression() {
- list::Iterator it= listExpression.find(m_groupList->currentText());
- QStringList lst(it.data());
- QString newWord = i18n("empty");
- if ( lst.contains( newWord ))
+ list::Iterator it= listExpression.tqfind(m_groupList->currentText());
+ TQStringList lst(it.data());
+ TQString newWord = i18n("empty");
+ if ( lst.tqcontains( newWord ))
return;
lst<< newWord;
- listExpression.replace(m_groupList->currentText(),lst);
+ listExpression.tqreplace(m_groupList->currentText(),lst);
m_ExpressionsList->blockSignals(true);
m_ExpressionsList->insertItem(newWord);
@@ -269,13 +269,13 @@ void KWEditPersonnalExpression::slotAddExpression() {
}
void KWEditPersonnalExpression::slotRemoveExpression() {
- QString text=m_ExpressionsList->currentText ();
+ TQString text=m_ExpressionsList->currentText ();
if(!text.isEmpty())
{
- list::Iterator it= listExpression.find(m_groupList->currentText());
- QStringList lst(it.data());
+ list::Iterator it= listExpression.tqfind(m_groupList->currentText());
+ TQStringList lst(it.data());
lst.remove(text);
- listExpression.replace(m_groupList->currentText(),lst);
+ listExpression.tqreplace(m_groupList->currentText(),lst);
m_ExpressionsList->blockSignals(true);
m_ExpressionsList->clear();
@@ -290,7 +290,7 @@ void KWEditPersonnalExpression::slotRemoveExpression() {
}
void KWEditPersonnalExpression::slotAddGroup() {
- listExpression.insert(i18n("new group"),QStringList());
+ listExpression.insert(i18n("new group"),TQStringList());
initGroupList();
m_groupList->setCurrentItem(m_groupList->count() -1);
updateWidget();
@@ -298,7 +298,7 @@ void KWEditPersonnalExpression::slotAddGroup() {
}
void KWEditPersonnalExpression::slotRemoveGroup() {
- QString group=m_groupList->currentText();
+ TQString group=m_groupList->currentText();
if(group.isEmpty())
return;
listExpression.remove( group );
@@ -329,35 +329,35 @@ void KWEditPersonnalExpression::updateExpression()
void KWEditPersonnalExpression::saveFile()
{
- QDomDocument doc( "KWordExpression" );
- QDomElement begin = doc.createElement( "KWordExpression" );
+ TQDomDocument doc( "KWordExpression" );
+ TQDomElement begin = doc.createElement( "KWordExpression" );
doc.appendChild( begin );
- QStringList lst;
+ TQStringList lst;
list::Iterator it;
for( it = listExpression.begin(); it != listExpression.end(); ++it )
{
lst=it.data();
if ( !lst.isEmpty() )
{
- QDomElement type = doc.createElement( "Type" );
+ TQDomElement type = doc.createElement( "Type" );
begin.appendChild( type );
- QDomElement typeName = doc.createElement( "TypeName" );
+ TQDomElement typeName = doc.createElement( "TypeName" );
type.appendChild( typeName );
typeName.appendChild( doc.createTextNode(it.key() ) );
for( uint i=0;i<lst.count();i++ )
{
- QDomElement expr = doc.createElement( "Expression" );
+ TQDomElement expr = doc.createElement( "Expression" );
type.appendChild( expr );
- QDomElement text = doc.createElement( "Text" );
+ TQDomElement text = doc.createElement( "Text" );
expr.appendChild( text );
text.appendChild( doc.createTextNode(lst[i] ) );
}
}
}
- QCString s = doc.toCString();
+ TQCString s = doc.toCString();
- QFile file( locateLocal("data","kword/expression/perso.xml") );
+ TQFile file( locateLocal("data","kword/expression/perso.xml") );
if ( !file.open( IO_WriteOnly ) )
{
kdDebug()<<"Error \n";
diff --git a/kword/KWEditPersonnalExpression.h b/kword/KWEditPersonnalExpression.h
index d33e7dfc..a408e412 100644
--- a/kword/KWEditPersonnalExpression.h
+++ b/kword/KWEditPersonnalExpression.h
@@ -21,21 +21,22 @@
#define __KWEditPersonnalExpression__
#include <kdialogbase.h>
-#include <qmap.h>
+#include <tqmap.h>
-class QPushButton;
-class QComboBox;
-class QListBox;
-class QLineEdit;
+class TQPushButton;
+class TQComboBox;
+class TQListBox;
+class TQLineEdit;
class KWEditPersonnalExpression : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWEditPersonnalExpression( QWidget *parent, const char *name = 0 );
+ KWEditPersonnalExpression( TQWidget *tqparent, const char *name = 0 );
protected:
- void init(const QString& filename );
+ void init(const TQString& filename );
void loadFile();
void initGroupList();
void saveFile();
@@ -45,8 +46,8 @@ protected:
protected slots:
void slotGroupSelected();
void slotExpressionSelected();
- void slotUpdateGroupName(const QString &newGroupName);
- void slotUpdateExpression(const QString &newExpression);
+ void slotUpdateGroupName(const TQString &newGroupName);
+ void slotUpdateExpression(const TQString &newExpression);
void slotRemoveExpression();
void slotAddExpression();
void slotRemoveGroup();
@@ -54,16 +55,16 @@ protected slots:
virtual void slotOk();
private:
- typedef QMap<QString,QStringList> list;
+ typedef TQMap<TQString,TQStringList> list;
list listExpression;
- QListBox *m_groupList;
- QListBox *m_ExpressionsList;
- QPushButton *m_addGroup;
- QPushButton *m_delGroup;
- QPushButton *m_addExpression;
- QPushButton *m_delExpression;
- QLineEdit *m_groupLineEdit;
- QLineEdit *m_expressionLineEdit;
+ TQListBox *m_groupList;
+ TQListBox *m_ExpressionsList;
+ TQPushButton *m_addGroup;
+ TQPushButton *m_delGroup;
+ TQPushButton *m_addExpression;
+ TQPushButton *m_delExpression;
+ TQLineEdit *m_groupLineEdit;
+ TQLineEdit *m_expressionLineEdit;
bool m_bChanged;
};
diff --git a/kword/KWFactory.cpp b/kword/KWFactory.cpp
index f19bdc8a..142fb1fb 100644
--- a/kword/KWFactory.cpp
+++ b/kword/KWFactory.cpp
@@ -28,8 +28,8 @@
KInstance* KWFactory::s_instance = 0;
KAboutData* KWFactory::s_aboutData = 0;
-KWFactory::KWFactory( QObject* parent, const char* name )
- : KoFactory( parent, name )
+KWFactory::KWFactory( TQObject* tqparent, const char* name )
+ : KoFactory( tqparent, name )
{
// Create our instance, so that it becomes KGlobal::instance if the
// main app is KWord.
@@ -44,11 +44,11 @@ KWFactory::~KWFactory()
s_instance=0L;
}
-KParts::Part* KWFactory::createPartObject( QWidget *parentWidget, const char *widname, QObject* parent, const char* name, const char* classname, const QStringList & )
+KParts::Part* KWFactory::createPartObject( TQWidget *tqparentWidget, const char *widname, TQObject* tqparent, const char* name, const char* classname, const TQStringList & )
{
bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 );
- KWDocument *doc = new KWDocument( parentWidget, widname, parent, name, !bWantKoDocument );
+ KWDocument *doc = new KWDocument( tqparentWidget, widname, tqparent, name, !bWantKoDocument );
if ( !bWantKoDocument )
doc->setReadWrite( false );
diff --git a/kword/KWFactory.h b/kword/KWFactory.h
index 9330331b..07468397 100644
--- a/kword/KWFactory.h
+++ b/kword/KWFactory.h
@@ -27,11 +27,12 @@ class KAboutData;
class KWFactory : public KoFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWFactory( QObject* parent = 0, const char* name = 0 );
+ KWFactory( TQObject* tqparent = 0, const char* name = 0 );
~KWFactory();
- virtual KParts::Part* createPartObject( QWidget * = 0, const char * = 0, QObject* parent = 0, const char* name = 0, const char* classname = "KoDocument", const QStringList &args = QStringList() );
+ virtual KParts::Part* createPartObject( TQWidget * = 0, const char * = 0, TQObject* tqparent = 0, const char* name = 0, const char* classname = "KoDocument", const TQStringList &args = TQStringList() );
static KInstance* instance();
diff --git a/kword/KWFindReplace.cpp b/kword/KWFindReplace.cpp
index 765b82e3..f1168ba3 100644
--- a/kword/KWFindReplace.cpp
+++ b/kword/KWFindReplace.cpp
@@ -30,13 +30,13 @@
#include "KWTextDocument.h"
//#include <KoTextDocument.h>
-KWFindReplace::KWFindReplace( KWCanvas * canvas, KoSearchDia * dialog, const QValueList<KoTextObject *> & lstObjects, KWTextFrameSetEdit *textView)
+KWFindReplace::KWFindReplace( KWCanvas * canvas, KoSearchDia * dialog, const TQValueList<KoTextObject *> & lstObjects, KWTextFrameSetEdit *textView)
: KoFindReplace( canvas, dialog, lstObjects, textView )
{
m_canvas = canvas;
}
-KWFindReplace::KWFindReplace( KWCanvas * canvas, KoReplaceDia * dialog, const QValueList<KoTextObject *> & lstObjects, KWTextFrameSetEdit *textView )
+KWFindReplace::KWFindReplace( KWCanvas * canvas, KoReplaceDia * dialog, const TQValueList<KoTextObject *> & lstObjects, KWTextFrameSetEdit *textView )
: KoFindReplace( canvas, dialog, lstObjects, textView )
{
m_canvas = canvas;
@@ -55,8 +55,8 @@ void KWFindReplace::emitNewCommand(KCommand *cmd)
void KWFindReplace::highlightPortion(KoTextParag * parag, int index, int length, KoTextDocument *textdocument, KDialogBase* dialog)
{
KWTextDocument *textdoc=static_cast<KWTextDocument *>(textdocument);
- bool repaint = isReplace() ? options() & KReplaceDialog::PromptOnReplace : true;
- textdoc->textFrameSet()->highlightPortion( parag, index, length, m_canvas, repaint, dialog );
+ bool tqrepaint = isReplace() ? options() & KReplaceDialog::PromptOnReplace : true;
+ textdoc->textFrameSet()->highlightPortion( parag, index, length, m_canvas, tqrepaint, dialog );
}
#include "KWFindReplace.moc"
diff --git a/kword/KWFindReplace.h b/kword/KWFindReplace.h
index 86d127dc..270bc10b 100644
--- a/kword/KWFindReplace.h
+++ b/kword/KWFindReplace.h
@@ -22,8 +22,8 @@
#ifndef searchdia_h
#define searchdia_h
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <KoRichText.h>
#include <KoTextObject.h>
#include <KoTextView.h>
@@ -34,16 +34,17 @@ class KWTextFrameSet;
class KMacroCommand;
class KWTextFrameSetEdit;
/**
- * This class implements the 'find' functionality ( the "search next, prompt" loop )
- * and the 'replace' functionality. Same class, to allow centralizing the code that
+ * This class implements the 'tqfind' functionality ( the "search next, prompt" loop )
+ * and the 'tqreplace' functionality. Same class, to allow centralizing the code that
* finds the framesets and paragraphs to look into.
*/
class KWFindReplace : public KoFindReplace
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWFindReplace( KWCanvas * canvas, KoSearchDia * dialog, const QValueList<KoTextObject *> & lstObjects, KWTextFrameSetEdit* textView );
- KWFindReplace( KWCanvas * parent, KoReplaceDia * dialog, const QValueList<KoTextObject *> & lstObjects, KWTextFrameSetEdit* textView );
+ KWFindReplace( KWCanvas * canvas, KoSearchDia * dialog, const TQValueList<KoTextObject *> & lstObjects, KWTextFrameSetEdit* textView );
+ KWFindReplace( KWCanvas * tqparent, KoReplaceDia * dialog, const TQValueList<KoTextObject *> & lstObjects, KWTextFrameSetEdit* textView );
~KWFindReplace();
virtual void emitNewCommand(KCommand *);
diff --git a/kword/KWFootNoteDia.cpp b/kword/KWFootNoteDia.cpp
index 52aa50c5..254260c8 100644
--- a/kword/KWFootNoteDia.cpp
+++ b/kword/KWFootNoteDia.cpp
@@ -20,13 +20,13 @@
#include "KWFootNoteDia.h"
#include "KWFootNoteDia.moc"
-#include <qbuttongroup.h>
-#include <qvbox.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqvbox.h>
+#include <tqradiobutton.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include "KWConfigFootNoteDia.h"
@@ -34,20 +34,20 @@
/* Class: KWFootNoteDia */
/******************************************************************/
-KWFootNoteDia::KWFootNoteDia( NoteType _noteType, KWFootNoteVariable::Numbering _numberingType, const QString & _manualString, QWidget *parent, KWDocument *_doc, const char *name )
- : KDialogBase( parent, name, true, QString::null, Ok|Cancel|User1, Ok, true )
+KWFootNoteDia::KWFootNoteDia( NoteType _noteType, KWFootNoteVariable::Numbering _numberingType, const TQString & _manualString, TQWidget *tqparent, KWDocument *_doc, const char *name )
+ : KDialogBase( tqparent, name, true, TQString(), Ok|Cancel|User1, Ok, true )
{
m_doc =_doc;
//setButtonOKText(i18n("&Insert"));
setCaption( i18n("Insert Footnote/Endnote") );
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- QButtonGroup *grp = new QButtonGroup( i18n("Numbering"), page );
- QGridLayout *grid = new QGridLayout( grp, 9, 4, KDialog::marginHint(), KDialog::spacingHint());
- m_rbAuto = new QRadioButton( i18n("&Automatic"), grp );
- m_rbManual= new QRadioButton( i18n("&Manual"), grp );
+ TQButtonGroup *grp = new TQButtonGroup( i18n("Numbering"), page );
+ TQGridLayout *grid = new TQGridLayout( grp, 9, 4, KDialog::marginHint(), KDialog::spacingHint());
+ m_rbAuto = new TQRadioButton( i18n("&Automatic"), grp );
+ m_rbManual= new TQRadioButton( i18n("&Manual"), grp );
grp->setExclusive( true );
int fHeight = grp->fontMetrics().height();
@@ -58,16 +58,16 @@ KWFootNoteDia::KWFootNoteDia( NoteType _noteType, KWFootNoteVariable::Numbering
m_rbAuto->setChecked( true );
else
m_rbManual->setChecked( true );
- m_footLine = new QLineEdit( grp);
+ m_footLine = new TQLineEdit( grp);
m_footLine->setText( _manualString );
- connect( m_footLine, SIGNAL( textChanged ( const QString & )), this, SLOT(footLineChanged( const QString & )));
- connect( grp, SIGNAL( clicked ( int ) ), this, SLOT(footNoteTypeChanged()));
+ connect( m_footLine, TQT_SIGNAL( textChanged ( const TQString & )), this, TQT_SLOT(footLineChanged( const TQString & )));
+ connect( grp, TQT_SIGNAL( clicked ( int ) ), this, TQT_SLOT(footNoteTypeChanged()));
grid->addWidget( m_footLine, 2, 1);
- grp = new QButtonGroup( 4, Qt::Vertical, page );
- m_rbFootNote = new QRadioButton( i18n("&Footnote"), grp );
- m_rbEndNote = new QRadioButton( i18n("&Endnote"), grp );
+ grp = new TQButtonGroup( 4, Qt::Vertical, page );
+ m_rbFootNote = new TQRadioButton( i18n("&Footnote"), grp );
+ m_rbEndNote = new TQRadioButton( i18n("&Endnote"), grp );
grp->setExclusive( true );
grp->insert( m_rbFootNote );
@@ -79,7 +79,7 @@ KWFootNoteDia::KWFootNoteDia( NoteType _noteType, KWFootNoteVariable::Numbering
footNoteTypeChanged();
setButtonText( KDialogBase::User1, i18n("C&onfigure...") );
- connect( this, SIGNAL( user1Clicked() ), this, SLOT(slotConfigurate()));
+ connect( this, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT(slotConfigurate()));
}
void KWFootNoteDia::footNoteTypeChanged()
@@ -96,7 +96,7 @@ void KWFootNoteDia::footNoteTypeChanged()
}
}
-void KWFootNoteDia::footLineChanged( const QString &text )
+void KWFootNoteDia::footLineChanged( const TQString &text )
{
m_rbManual->setChecked( true );
if ( text.isEmpty() || footNoteAlreadyExists(text) )
@@ -115,9 +115,9 @@ KWFootNoteVariable::Numbering KWFootNoteDia::numberingType()const
return m_rbAuto->isChecked() ? KWFootNoteVariable::Auto : KWFootNoteVariable::Manual;
}
-QString KWFootNoteDia::manualString()const
+TQString KWFootNoteDia::manualString()const
{
- return m_rbAuto->isChecked() ? QString::null : m_footLine->text();
+ return m_rbAuto->isChecked() ? TQString() : m_footLine->text();
}
void KWFootNoteDia::slotConfigurate()
@@ -127,12 +127,12 @@ void KWFootNoteDia::slotConfigurate()
delete dia;
}
-bool KWFootNoteDia::footNoteAlreadyExists( const QString & text )
+bool KWFootNoteDia::footNoteAlreadyExists( const TQString & text )
{
- return manualFootNotes.contains( text );
+ return manualFootNotes.tqcontains( text );
}
-void KWFootNoteDia::appendManualFootNote( const QString & text )
+void KWFootNoteDia::appendManualFootNote( const TQString & text )
{
manualFootNotes.append( text );
}
diff --git a/kword/KWFootNoteDia.h b/kword/KWFootNoteDia.h
index a04584b3..7b9b5670 100644
--- a/kword/KWFootNoteDia.h
+++ b/kword/KWFootNoteDia.h
@@ -23,8 +23,8 @@
#include <kdialogbase.h>
#include "defs.h" // for NoteType
#include "KWVariable.h"
-class QRadioButton;
-class QLineEdit;
+class TQRadioButton;
+class TQLineEdit;
class KWDocument;
/******************************************************************/
/* Class: KWFootNoteDia */
@@ -33,31 +33,32 @@ class KWDocument;
class KWFootNoteDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWFootNoteDia( NoteType _noteType, KWFootNoteVariable::Numbering _numberingType, const QString & _manualString, QWidget *parent, KWDocument *_doc, const char *name = 0 );
+ KWFootNoteDia( NoteType _noteType, KWFootNoteVariable::Numbering _numberingType, const TQString & _manualString, TQWidget *tqparent, KWDocument *_doc, const char *name = 0 );
NoteType noteType() const;
KWFootNoteVariable::Numbering numberingType()const;
- QString manualString()const;
- void appendManualFootNote( const QString & );
+ TQString manualString()const;
+ void appendManualFootNote( const TQString & );
protected:
bool insertFootNote();
- bool footNoteAlreadyExists( const QString & );
+ bool footNoteAlreadyExists( const TQString & );
protected slots:
- void footLineChanged( const QString & );
+ void footLineChanged( const TQString & );
void footNoteTypeChanged();
void slotConfigurate();
private:
- QRadioButton *m_rbAuto;
- QRadioButton *m_rbManual;
+ TQRadioButton *m_rbAuto;
+ TQRadioButton *m_rbManual;
- QRadioButton *m_rbFootNote;
- QRadioButton *m_rbEndNote;
- QLineEdit *m_footLine;
+ TQRadioButton *m_rbFootNote;
+ TQRadioButton *m_rbEndNote;
+ TQLineEdit *m_footLine;
KWDocument *m_doc;
- QValueList<QString> manualFootNotes;
+ TQValueList<TQString> manualFootNotes;
};
#endif
diff --git a/kword/KWFormulaFrameSet.cpp b/kword/KWFormulaFrameSet.cpp
index 7f167a23..970b0de0 100644
--- a/kword/KWFormulaFrameSet.cpp
+++ b/kword/KWFormulaFrameSet.cpp
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include "KWFormulaFrameSet.h"
@@ -53,7 +53,7 @@
/******************************************************************/
/* Class: KWFormulaFrameSet */
/******************************************************************/
-KWFormulaFrameSet::KWFormulaFrameSet( KWDocument *doc, const QString & name )
+KWFormulaFrameSet::KWFormulaFrameSet( KWDocument *doc, const TQString & name )
: KWFrameSet( doc ), m_changed( false ), m_edit( 0 )
{
if ( name.isEmpty() )
@@ -64,11 +64,11 @@ KWFormulaFrameSet::KWFormulaFrameSet( KWDocument *doc, const QString & name )
init();
}
-KWFormulaFrameSet::KWFormulaFrameSet( KWDocument* doc, const QDomElement& frameTag,
- const QDomElement& mathTag, KoOasisContext& context )
+KWFormulaFrameSet::KWFormulaFrameSet( KWDocument* doc, const TQDomElement& frameTag,
+ const TQDomElement& mathTag, KoOasisContext& context )
: KWFrameSet( doc ), m_changed( false ), m_edit( 0 )
{
- m_name = frameTag.attributeNS( KoXmlNS::draw, "name", QString::null );
+ m_name = frameTag.attributeNS( KoXmlNS::draw, "name", TQString() );
if ( doc->frameSetByName( m_name ) ) // already exists!
m_name = doc->generateFramesetName( m_name + " %1" );
@@ -92,10 +92,10 @@ void KWFormulaFrameSet::init()
// there is no need to move the KFormulaContainer anymore, it remains at (0,0).
formula->moveTo( 0, 0 );
- connect( formula, SIGNAL( formulaChanged( double, double ) ),
- this, SLOT( slotFormulaChanged( double, double ) ) );
- connect( formula, SIGNAL( errorMsg( const QString& ) ),
- this, SLOT( slotErrorMessage( const QString& ) ) );
+ connect( formula, TQT_SIGNAL( formulaChanged( double, double ) ),
+ this, TQT_SLOT( slotFormulaChanged( double, double ) ) );
+ connect( formula, TQT_SIGNAL( errorMsg( const TQString& ) ),
+ this, TQT_SLOT( slotErrorMessage( const TQString& ) ) );
/*
if ( isFloating() ) {
@@ -108,7 +108,7 @@ void KWFormulaFrameSet::init()
}
}
*/
- QRect rect = formula->boundingRect();
+ TQRect rect = formula->boundingRect();
slotFormulaChanged(rect.width(), rect.height());
}
@@ -154,8 +154,8 @@ KWFrameSetEdit* KWFormulaFrameSet::createFrameSetEdit(KWCanvas* canvas)
}
void KWFormulaFrameSet::drawFrameContents( KWFrame* /*frame*/,
- QPainter* painter, const QRect& crect,
- const QColorGroup& cg, bool onlyChanged,
+ TQPainter* painter, const TQRect& crect,
+ const TQColorGroup& cg, bool onlyChanged,
bool resetChanged,
KWFrameSetEdit* /*edit*/, KWViewMode * )
{
@@ -164,10 +164,10 @@ void KWFormulaFrameSet::drawFrameContents( KWFrame* /*frame*/,
if ( resetChanged )
m_changed = false;
- bool printing = painter->device()->devType() == QInternal::Printer;
+ bool printing = painter->device()->devType() == TQInternal::Printer;
bool clipping = true;
- QPainter *p;
- QPixmap* pix = 0L;
+ TQPainter *p;
+ TQPixmap* pix = 0L;
if ( printing ) {
p = painter;
clipping = painter->hasClipping();
@@ -178,7 +178,7 @@ void KWFormulaFrameSet::drawFrameContents( KWFrame* /*frame*/,
}
else {
pix = doubleBufferPixmap( crect.size() );
- p = new QPainter( pix );
+ p = new TQPainter( pix );
p->translate( -crect.x(), -crect.y() );
}
@@ -219,9 +219,9 @@ void KWFormulaFrameSet::slotFormulaChanged( double width, double height )
m_frames.first()->setHeight( height );
updateFrames();
- kWordDocument()->layout();
+ kWordDocument()->tqlayout();
if ( ( oldWidth != width ) || ( oldHeight != height ) ) {
- kWordDocument()->repaintAllViews( false );
+ kWordDocument()->tqrepaintAllViews( false );
kWordDocument()->updateRulerFrameStartEnd();
}
@@ -234,7 +234,7 @@ void KWFormulaFrameSet::slotFormulaChanged( double width, double height )
}
}
-void KWFormulaFrameSet::slotErrorMessage( const QString& msg )
+void KWFormulaFrameSet::slotErrorMessage( const TQString& msg )
{
KMessageBox::error( /*m_widget*/ 0, msg );
}
@@ -244,16 +244,16 @@ MouseMeaning KWFormulaFrameSet::getMouseMeaningInsideFrame( const KoPoint& )
return MEANING_MOUSE_INSIDE_TEXT;
}
-QDomElement KWFormulaFrameSet::save(QDomElement& parentElem, bool saveFrames)
+TQDomElement KWFormulaFrameSet::save(TQDomElement& tqparentElem, bool saveFrames)
{
if ( m_frames.isEmpty() ) // Deleted frameset -> don't save
- return QDomElement();
- QDomElement framesetElem = parentElem.ownerDocument().createElement("FRAMESET");
- parentElem.appendChild(framesetElem);
+ return TQDomElement();
+ TQDomElement framesetElem = tqparentElem.ownerDocument().createElement("FRAMESET");
+ tqparentElem.appendChild(framesetElem);
KWFrameSet::saveCommon(framesetElem, saveFrames);
- QDomElement formulaElem = parentElem.ownerDocument().createElement("FORMULA");
+ TQDomElement formulaElem = tqparentElem.ownerDocument().createElement("FORMULA");
framesetElem.appendChild(formulaElem);
formula->save(formulaElem);
return framesetElem;
@@ -266,37 +266,37 @@ void KWFormulaFrameSet::saveOasis(KoXmlWriter& writer, KoSavingContext& context,
KTempFile contentTmpFile;
contentTmpFile.setAutoDelete( true );
- QFile* tmpFile = contentTmpFile.file();
+ TQFile* tmpFile = contentTmpFile.file();
- QTextStream stream(tmpFile);
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream(tmpFile);
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
formula->saveMathML( stream, true );
tmpFile->close();
writer.startElement( "draw:object" );
writer.startElement( "math:math" );
- writer.addCompleteElement( tmpFile );
+ writer.addCompleteElement( TQT_TQIODEVICE(tmpFile) );
writer.endElement(); // math:math
writer.endElement(); // draw:object
writer.endElement(); // draw:frame
}
-void KWFormulaFrameSet::load(QDomElement& attributes, bool loadFrames)
+void KWFormulaFrameSet::load(TQDomElement& attributes, bool loadFrames)
{
KWFrameSet::load(attributes, loadFrames);
- QDomElement formulaElem = attributes.namedItem("FORMULA").toElement();
+ TQDomElement formulaElem = attributes.namedItem("FORMULA").toElement();
paste( formulaElem );
}
-void KWFormulaFrameSet::paste( QDomNode& formulaElem )
+void KWFormulaFrameSet::paste( TQDomNode& formulaElem )
{
if (!formulaElem.isNull()) {
if (formula == 0) {
formula = m_doc->formulaDocument()->createFormula( -1, false );
- connect(formula, SIGNAL(formulaChanged(double, double)),
- this, SLOT(slotFormulaChanged(double, double)));
- connect( formula, SIGNAL( errorMsg( const QString& ) ),
- this, SLOT( slotErrorMessage( const QString& ) ) );
+ connect(formula, TQT_SIGNAL(formulaChanged(double, double)),
+ this, TQT_SLOT(slotFormulaChanged(double, double)));
+ connect( formula, TQT_SIGNAL( errorMsg( const TQString& ) ),
+ this, TQT_SLOT( slotErrorMessage( const TQString& ) ) );
}
m_doc->formulaDocument()->setCreationStrategy( "Oasis" );
if ( !formula->loadMathML( formulaElem.firstChild().toElement() ) ) {
@@ -334,22 +334,22 @@ void KWFormulaFrameSet::setAnchorFormat( KoTextFormat* format, int /*frameNum*/
}
-QPixmap* KWFormulaFrameSet::m_bufPixmap = 0;
+TQPixmap* KWFormulaFrameSet::m_bufPixmap = 0;
// stolen from KWDocument
// However, I don't see if a formula frame can be an underlying
// frame. That is why I use my own buffer.
-QPixmap* KWFormulaFrameSet::doubleBufferPixmap( const QSize& s )
+TQPixmap* KWFormulaFrameSet::doubleBufferPixmap( const TQSize& s )
{
if ( !m_bufPixmap ) {
- int w = QABS( s.width() );
- int h = QABS( s.height() );
- m_bufPixmap = new QPixmap( w, h );
+ int w = TQABS( s.width() );
+ int h = TQABS( s.height() );
+ m_bufPixmap = new TQPixmap( w, h );
} else {
if ( m_bufPixmap->width() < s.width() ||
m_bufPixmap->height() < s.height() ) {
- m_bufPixmap->resize( QMAX( s.width(), m_bufPixmap->width() ),
- QMAX( s.height(), m_bufPixmap->height() ) );
+ m_bufPixmap->resize( TQMAX( s.width(), m_bufPixmap->width() ),
+ TQMAX( s.height(), m_bufPixmap->height() ) );
}
}
@@ -362,10 +362,10 @@ KWFormulaFrameSetEdit::KWFormulaFrameSetEdit(KWFormulaFrameSet* fs, KWCanvas* ca
{
formulaView = new KFormula::View( fs->getFormula() );
- connect( formulaView, SIGNAL( cursorChanged( bool, bool ) ),
- this, SLOT( cursorChanged( bool, bool ) ) );
- connect( fs->getFormula(), SIGNAL( leaveFormula( Container*, FormulaCursor*, int ) ),
- this, SLOT( slotLeaveFormula( Container*, FormulaCursor*, int ) ) );
+ connect( formulaView, TQT_SIGNAL( cursorChanged( bool, bool ) ),
+ this, TQT_SLOT( cursorChanged( bool, bool ) ) );
+ connect( fs->getFormula(), TQT_SIGNAL( leaveFormula( Container*, FormulaCursor*, int ) ),
+ this, TQT_SLOT( slotLeaveFormula( Container*, FormulaCursor*, int ) ) );
fs->m_edit = this;
@@ -391,21 +391,21 @@ KWFormulaFrameSetEdit::~KWFormulaFrameSetEdit()
formulaView = 0;
formulaFrameSet()->getFormula()->startEvaluation();
formulaFrameSet()->setChanged();
- m_canvas->repaintChanged( formulaFrameSet(), true );
+ m_canvas->tqrepaintChanged( formulaFrameSet(), true );
delete dcop;
}
const KFormula::View* KWFormulaFrameSetEdit::getFormulaView() const { return formulaView; }
KFormula::View* KWFormulaFrameSetEdit::getFormulaView() { return formulaView; }
-void KWFormulaFrameSetEdit::keyPressEvent( QKeyEvent* event )
+void KWFormulaFrameSetEdit::keyPressEvent( TQKeyEvent* event )
{
//kdDebug(32001) << "KWFormulaFrameSetEdit::keyPressEvent" << endl;
formulaView->keyPressEvent( event );
}
-void KWFormulaFrameSetEdit::mousePressEvent( QMouseEvent* event,
- const QPoint&,
+void KWFormulaFrameSetEdit::mousePressEvent( TQMouseEvent* event,
+ const TQPoint&,
const KoPoint& pos )
{
// [Note that this method is called upon RMB and MMB as well, now]
@@ -413,16 +413,16 @@ void KWFormulaFrameSetEdit::mousePressEvent( QMouseEvent* event,
formulaView->mousePressEvent( event, pos-tl );
}
-void KWFormulaFrameSetEdit::mouseMoveEvent( QMouseEvent* event,
- const QPoint&,
+void KWFormulaFrameSetEdit::mouseMoveEvent( TQMouseEvent* event,
+ const TQPoint&,
const KoPoint& pos )
{
KoPoint tl = m_currentFrame->topLeft();
formulaView->mouseMoveEvent( event, pos-tl );
}
-void KWFormulaFrameSetEdit::mouseReleaseEvent( QMouseEvent* event,
- const QPoint&,
+void KWFormulaFrameSetEdit::mouseReleaseEvent( TQMouseEvent* event,
+ const TQPoint&,
const KoPoint& pos )
{
KoPoint tl = m_currentFrame->topLeft();
@@ -461,7 +461,7 @@ void KWFormulaFrameSetEdit::paste()
formulaView->getDocument()->paste();
}
-void KWFormulaFrameSetEdit::pasteData( QMimeSource* /*data*/, int /*provides*/, bool )
+void KWFormulaFrameSetEdit::pasteData( TQMimeSource* /*data*/, int /*provides*/, bool )
{
paste(); // TODO use data, for DnD
}
@@ -488,7 +488,7 @@ void KWFormulaFrameSetEdit::removeFormula()
// This call will destroy us! We cannot use 'this' afterwards!
exitRight();
- QKeyEvent keyEvent( QEvent::KeyPress, Key_Backspace, 0, 0 );
+ TQKeyEvent keyEvent( TQEvent::KeyPress, Key_Backspace, 0, 0 );
canvas->currentFrameSetEdit()->keyPressEvent( &keyEvent );
}
}
@@ -499,15 +499,15 @@ void KWFormulaFrameSetEdit::cursorChanged( bool visible, bool /*selecting*/ )
if ( m_currentFrame )
{
// Add the cursor position to the (zoomed) frame position
- QPoint nPoint = frameSet()->kWordDocument()->zoomPoint( m_currentFrame->topLeft() );
+ TQPoint nPoint = frameSet()->kWordDocument()->zoomPoint( m_currentFrame->topLeft() );
nPoint += formulaView->getCursorPoint();
// Apply viewmode conversion
- QPoint p = m_canvas->viewMode()->normalToView( nPoint );
+ TQPoint p = m_canvas->viewMode()->normalToView( nPoint );
m_canvas->ensureVisible( p.x(), p.y() );
}
}
formulaFrameSet()->setChanged();
- m_canvas->repaintChanged( formulaFrameSet(), true );
+ m_canvas->tqrepaintChanged( formulaFrameSet(), true );
}
void KWFormulaFrameSetEdit::slotLeaveFormula( KFormula::Container*,
diff --git a/kword/KWFormulaFrameSet.h b/kword/KWFormulaFrameSet.h
index e7d64987..b9b06a4d 100644
--- a/kword/KWFormulaFrameSet.h
+++ b/kword/KWFormulaFrameSet.h
@@ -44,11 +44,12 @@ class KWFormulaFrameSetEdit;
class KWFormulaFrameSet : public KWFrameSet
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWFormulaFrameSet( KWDocument *doc, const QString & name );
+ KWFormulaFrameSet( KWDocument *doc, const TQString & name );
/// Used for OASIS loading
- KWFormulaFrameSet( KWDocument* doc, const QDomElement& frame,
- const QDomElement& objectTag, KoOasisContext& context );
+ KWFormulaFrameSet( KWDocument* doc, const TQDomElement& frame,
+ const TQDomElement& objectTag, KoOasisContext& context );
virtual ~KWFormulaFrameSet();
virtual KWordFrameSetIface* dcopObject();
@@ -75,14 +76,14 @@ public:
/**
* Paint this frameset
*/
- virtual void drawFrameContents(KWFrame *, QPainter*, const QRect&,
- const QColorGroup&, bool onlyChanged, bool resetChanged,
+ virtual void drawFrameContents(KWFrame *, TQPainter*, const TQRect&,
+ const TQColorGroup&, bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode);
- virtual QDomElement save( QDomElement &parentElem, bool saveFrames = true );
- virtual void load( QDomElement &attributes, bool loadFrames = true );
+ virtual TQDomElement save( TQDomElement &tqparentElem, bool saveFrames = true );
+ virtual void load( TQDomElement &attributes, bool loadFrames = true );
virtual void saveOasis(KoXmlWriter&, KoSavingContext&, bool saveFrames ) const;
- void paste( QDomNode& formulaElem );
+ void paste( TQDomNode& formulaElem );
KFormula::Container* getFormula() const { return formula; }
@@ -101,13 +102,13 @@ public:
protected slots:
void slotFormulaChanged( double width, double height );
- void slotErrorMessage( const QString& msg );
+ void slotErrorMessage( const TQString& msg );
private:
void init();
- static QPixmap* doubleBufferPixmap( const QSize& s );
- static QPixmap* m_bufPixmap;
+ static TQPixmap* doubleBufferPixmap( const TQSize& s );
+ static TQPixmap* m_bufPixmap;
friend class KWFormulaFrameSetEdit;
@@ -118,9 +119,10 @@ private:
};
-class KWFormulaFrameSetEdit : public QObject, public KWFrameSetEdit
+class KWFormulaFrameSetEdit : public TQObject, public KWFrameSetEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
KWFormulaFrameSetEdit(KWFormulaFrameSet* fs, KWCanvas* canvas);
virtual ~KWFormulaFrameSetEdit();
@@ -136,21 +138,21 @@ public:
virtual DCOPObject* dcopObject();
// Events forwarded by the canvas (when being in "edit" mode)
- virtual void keyPressEvent(QKeyEvent*);
- virtual void mousePressEvent(QMouseEvent*, const QPoint & n, const KoPoint & d );
- virtual void mouseMoveEvent(QMouseEvent*, const QPoint & n, const KoPoint & d); // only called if button is pressed
- virtual void mouseReleaseEvent(QMouseEvent*, const QPoint & n, const KoPoint & d);
- //virtual void mouseDoubleClickEvent( QMouseEvent *, const QPoint & n, const KoPoint & d ) {}
- //virtual void dragEnterEvent( QDragEnterEvent * ) {}
- //virtual void dragMoveEvent( QDragMoveEvent *, const QPoint &, const KoPoint & ) {}
- //virtual void dragLeaveEvent( QDragLeaveEvent * ) {}
- //virtual void dropEvent( QDropEvent *, const QPoint &, const KoPoint &, KWView* ) {}
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*, const TQPoint & n, const KoPoint & d );
+ virtual void mouseMoveEvent(TQMouseEvent*, const TQPoint & n, const KoPoint & d); // only called if button is pressed
+ virtual void mouseReleaseEvent(TQMouseEvent*, const TQPoint & n, const KoPoint & d);
+ //virtual void mouseDoubleClickEvent( TQMouseEvent *, const TQPoint & n, const KoPoint & d ) {}
+ //virtual void dragEnterEvent( TQDragEnterEvent * ) {}
+ //virtual void dragMoveEvent( TQDragMoveEvent *, const TQPoint &, const KoPoint & ) {}
+ //virtual void dragLeaveEvent( TQDragLeaveEvent * ) {}
+ //virtual void dropEvent( TQDropEvent *, const TQPoint &, const KoPoint &, KWView* ) {}
virtual void focusInEvent();
virtual void focusOutEvent();
virtual void copy();
virtual void cut();
virtual void paste();
- virtual void pasteData( QMimeSource* data, int provides, bool drop );
+ virtual void pasteData( TQMimeSource* data, int provides, bool drop );
virtual void selectAll();
/** Moves the cursor to the first position */
diff --git a/kword/KWFrame.cpp b/kword/KWFrame.cpp
index cc31aa97..a559b892 100644
--- a/kword/KWFrame.cpp
+++ b/kword/KWFrame.cpp
@@ -44,7 +44,7 @@
/* Class: ZOrderedFrameList */
/******************************************************************/
-int ZOrderedFrameList::compareItems(QPtrCollection::Item a, QPtrCollection::Item b)
+int ZOrderedFrameList::compareItems(TQPtrCollection::Item a, TQPtrCollection::Item b)
{
int za = ((KWFrame *)a)->zOrder();
int zb = ((KWFrame *)b)->zOrder();
@@ -89,11 +89,11 @@ KWFrame::KWFrame(KWFrameSet *fs, double left, double top, double width, double h
m_minFrameHeight( 0.01 ), // not 0, since AutoExtendFrame means min-height in odt
m_internalY( 0 ),
m_zOrder( 0 ),
- m_backgroundColor( (fs && (fs->type() == FT_PICTURE || fs->type() == FT_PART)) ? QBrush( QColor(), Qt::NoBrush) : QBrush( QColor() ) ), // valid brush with invalid color ( default )
- m_borderLeft( QColor(), KoBorder::SOLID, 0 ),
- m_borderRight( QColor(), KoBorder::SOLID, 0 ),
- m_borderTop( QColor(), KoBorder::SOLID, 0 ),
- m_borderBottom( QColor(), KoBorder::SOLID, 0 ),
+ m_backgroundColor( (fs && (fs->type() == FT_PICTURE || fs->type() == FT_PART)) ? TQBrush( TQColor(), TQt::NoBrush) : TQBrush( TQColor() ) ), // valid brush with invalid color ( default )
+ m_borderLeft( TQColor(), KoBorder::SOLID, 0 ),
+ m_borderRight( TQColor(), KoBorder::SOLID, 0 ),
+ m_borderTop( TQColor(), KoBorder::SOLID, 0 ),
+ m_borderBottom( TQColor(), KoBorder::SOLID, 0 ),
m_frameSet( fs )
{
//kdDebug(32001) << "KWFrame::KWFrame " << this << " left=" << left << " top=" << top << endl;
@@ -107,7 +107,7 @@ KWFrame::~KWFrame()
m_frameStack = 0;
}
-void KWFrame::setBackgroundColor( const QBrush &color )
+void KWFrame::setBackgroundColor( const TQBrush &color )
{
m_backgroundColor = color;
}
@@ -166,7 +166,7 @@ void KWFrame::copySettings(KWFrame *frm)
void KWFrame::frameBordersChanged() {
if (frameSet()->isFloating())
- frameSet()->anchorFrameset()->invalidate();
+ frameSet()->anchorFrameset()->tqinvalidate();
}
@@ -182,10 +182,10 @@ void KWFrame::updateRulerHandles(){
#endif
}
-QRect KWFrame::outerRect( KWViewMode* viewMode ) const
+TQRect KWFrame::outerRect( KWViewMode* viewMode ) const
{
KWDocument *doc = m_frameSet->kWordDocument();
- QRect outerRect( doc->zoomRect( *this ) );
+ TQRect outerRect( doc->zoomRect( *this ) );
if ( viewMode && !m_frameSet->groupmanager() ) {
int minBorder = viewMode->drawFrameBorders() ? 1 : 0;
KWFrame* settingsFrame = m_frameSet->settingsFrame( this );
@@ -219,16 +219,16 @@ KoRect KWFrame::runAroundRect() const
return raRect;
}
-void KWFrame::save( QDomElement &frameElem )
+void KWFrame::save( TQDomElement &frameElem )
{
// setAttribute( double ) uses a default precision of 6, and this seems
// to be 6 digits, even like '123.123' !
- frameElem.setAttribute( "left", QString::number( left(), 'g', DBL_DIG ) );
- frameElem.setAttribute( "top", QString::number( top(), 'g', DBL_DIG ) );
- frameElem.setAttribute( "right", QString::number( right(), 'g', DBL_DIG ) );
- frameElem.setAttribute( "bottom", QString::number( bottom(), 'g', DBL_DIG ) );
+ frameElem.setAttribute( "left", TQString::number( left(), 'g', DBL_DIG ) );
+ frameElem.setAttribute( "top", TQString::number( top(), 'g', DBL_DIG ) );
+ frameElem.setAttribute( "right", TQString::number( right(), 'g', DBL_DIG ) );
+ frameElem.setAttribute( "bottom", TQString::number( bottom(), 'g', DBL_DIG ) );
if ( minimumFrameHeight() > 0 )
- frameElem.setAttribute( "min-height", QString::number( minimumFrameHeight(), 'g', DBL_DIG ) );
+ frameElem.setAttribute( "min-height", TQString::number( minimumFrameHeight(), 'g', DBL_DIG ) );
if ( !m_frameSet->isHeaderOrFooter() && !m_frameSet->isMainFrameset() )
{
@@ -251,7 +251,7 @@ void KWFrame::save( QDomElement &frameElem )
frameElem.setAttribute( "runaroundTop", m_runAroundTop );
frameElem.setAttribute( "runaroundBottom", m_runAroundBottom );
// The old file format had only one value, keep compat
- double runAroundGap = QMAX( QMAX( m_runAroundLeft, m_runAroundRight ), QMAX( m_runAroundTop, m_runAroundBottom ) );
+ double runAroundGap = TQMAX( TQMAX( m_runAroundLeft, m_runAroundRight ), TQMAX( m_runAroundTop, m_runAroundBottom ) );
frameElem.setAttribute( "runaroundGap", runAroundGap );
}
}
@@ -337,11 +337,11 @@ void KWFrame::save( QDomElement &frameElem )
frameElem.setAttribute( "z-index", zOrder() );
}
-void KWFrame::load( QDomElement &frameElem, KWFrameSet* frameSet, int syntaxVersion )
+void KWFrame::load( TQDomElement &frameElem, KWFrameSet* frameSet, int syntaxVersion )
{
m_minFrameHeight = KWDocument::getAttribute( frameElem, "min-height", 0.0 );
m_runAround = static_cast<RunAround>( KWDocument::getAttribute( frameElem, "runaround", RA_NO ) );
- QString str = frameElem.attribute( "runaroundSide" );
+ TQString str = frameElem.attribute( "runaroundSide" );
if ( str == "left" )
m_runAroundSide = RA_LEFT;
else if ( str == "right" )
@@ -396,7 +396,7 @@ void KWFrame::load( QDomElement &frameElem, KWFrameSet* frameSet, int syntaxVers
r.setStyle(static_cast<KoBorder::BorderStyle>( KWDocument::getAttribute( frameElem, "rStyle", KoBorder::SOLID ) ));
t.setStyle(static_cast<KoBorder::BorderStyle>( KWDocument::getAttribute( frameElem, "tStyle", KoBorder::SOLID ) ));
b.setStyle( static_cast<KoBorder::BorderStyle>( KWDocument::getAttribute( frameElem, "bStyle", KoBorder::SOLID ) ));
- QColor c;
+ TQColor c;
if ( frameElem.hasAttribute("bkRed") )
c.setRgb(
KWDocument::getAttribute( frameElem, "bkRed", 0 ),
@@ -418,11 +418,11 @@ void KWFrame::load( QDomElement &frameElem, KWFrameSet* frameSet, int syntaxVers
m_borderRight = r;
m_borderTop = t;
m_borderBottom = b;
- m_backgroundColor = QBrush( c );
+ m_backgroundColor = TQBrush( c );
if( frameElem.hasAttribute("bkStyle"))
- m_backgroundColor.setStyle (static_cast<Qt::BrushStyle>(KWDocument::getAttribute( frameElem, "bkStyle", Qt::SolidPattern )));
+ m_backgroundColor.setStyle (static_cast<Qt::BrushStyle>(KWDocument::getAttribute( frameElem, "bkStyle", TQt::SolidPattern )));
m_paddingLeft = frameElem.attribute( "bleftpt" ).toDouble();
m_paddingRight = frameElem.attribute( "brightpt" ).toDouble();
@@ -444,17 +444,17 @@ void KWFrame::loadBorderProperties( KoStyleStack& styleStack )
// background color
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "background-color" ) ) {
- QString color = styleStack.attributeNS( KoXmlNS::fo, "background-color" );
+ TQString color = styleStack.attributeNS( KoXmlNS::fo, "background-color" );
if ( color == "transparent" )
- m_backgroundColor = QBrush( QColor(), Qt::NoBrush );
+ m_backgroundColor = TQBrush( TQColor(), TQt::NoBrush );
else
{
- m_backgroundColor = QBrush( QColor( color ) /*, brush style is a dead feature, ignored */ );
+ m_backgroundColor = TQBrush( TQColor( color ) /*, brush style is a dead feature, ignored */ );
}
}
// OOo compatibility: it uses background-transparency=100% instead of background-color="transparent"
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "background-transparency" ) ) {
- QString transp = styleStack.attributeNS( KoXmlNS::fo, "background-transparency" );
+ TQString transp = styleStack.attributeNS( KoXmlNS::fo, "background-transparency" );
if ( transp == "100%" )
m_backgroundColor.setStyle( Qt::NoBrush );
}
@@ -481,12 +481,12 @@ void KWFrame::loadCommonOasisProperties( KoOasisContext& context, KWFrameSet* fr
// loadBorderProperties loads fo:background-color for compatibility (and for table cells),
// but the correct way for text boxes is draw:fill-color
if ( styleStack.hasAttributeNS( KoXmlNS::draw, "fill-color" ) ) {
- QString color = styleStack.attributeNS( KoXmlNS::draw, "fill-color" );
+ TQString color = styleStack.attributeNS( KoXmlNS::draw, "fill-color" );
if ( color == "transparent" )
- m_backgroundColor = QBrush( QColor(), Qt::NoBrush );
+ m_backgroundColor = TQBrush( TQColor(), TQt::NoBrush );
else
{
- m_backgroundColor = QBrush( QColor( color ) /*, brush style is a dead feature, ignored */ );
+ m_backgroundColor = TQBrush( TQColor( color ) /*, brush style is a dead feature, ignored */ );
}
}
@@ -505,7 +505,7 @@ void KWFrame::loadCommonOasisProperties( KoOasisContext& context, KWFrameSet* fr
// This attribute isn't part of the OASIS spec. Doesn't matter since it doesn't affect rendering
// of existing documents, only editing (and only KWord has this kind of option until now).
- const QCString frameBehaviorOnNewPage = styleStack.attributeNS( KoXmlNS::koffice, "frame-behavior-on-new-page" ).latin1();
+ const TQCString frameBehaviorOnNewPage = styleStack.attributeNS( KoXmlNS::koffice, "frame-behavior-on-new-page" ).latin1();
if ( frameBehaviorOnNewPage == "followup" )
m_newFrameBehavior = Reconnect;
else if ( frameBehaviorOnNewPage == "copy" )
@@ -523,7 +523,7 @@ void KWFrame::loadCommonOasisProperties( KoOasisContext& context, KWFrameSet* fr
KWFrame::RunAround runAround = KWFrame::RA_BOUNDINGRECT;
KWFrame::RunAroundSide runAroundSide = KWFrame::RA_BIGGEST;
- const QCString oowrap = styleStack.attributeNS( KoXmlNS::style, "wrap" ).latin1();
+ const TQCString oowrap = styleStack.attributeNS( KoXmlNS::style, "wrap" ).latin1();
if ( oowrap == "none" ) // 'no wrap' means 'avoid horizontal space'
runAround = KWFrame::RA_SKIP;
else if ( oowrap == "left" )
@@ -541,7 +541,7 @@ void KWFrame::loadCommonOasisProperties( KoOasisContext& context, KWFrameSet* fr
setRunAroundSide( runAroundSide );
}
-void KWFrame::startOasisFrame( KoXmlWriter &writer, KoGenStyles& mainStyles, const QString& name, const QString& lastFrameName ) const
+void KWFrame::startOasisFrame( KoXmlWriter &writer, KoGenStyles& mainStyles, const TQString& name, const TQString& lastFrameName ) const
{
writer.startElement( "draw:frame" );
writer.addAttribute( "draw:name", name );
@@ -569,7 +569,7 @@ void KWFrame::saveBorderProperties( KoGenStyle& frameStyle ) const
{
// Background: color and transparency
// OOo seems to use style:background-transparency="100%", but the schema allows background-color=transparent
- if ( m_backgroundColor.style() == Qt::NoBrush )
+ if ( m_backgroundColor.style() == TQt::NoBrush )
frameStyle.addProperty( "fo:background-color", "transparent" );
else if ( m_backgroundColor.color().isValid() )
frameStyle.addProperty( "fo:background-color", m_backgroundColor.color().name() );
@@ -641,10 +641,10 @@ void KWFrame::saveMarginProperties( KoGenStyle& frameStyle ) const
#endif
}
-QString KWFrame::saveOasisFrameStyle( KoGenStyles& mainStyles ) const
+TQString KWFrame::saveOasisFrameStyle( KoGenStyles& mainStyles ) const
{
KoGenStyle frameStyle( KWDocument::STYLE_FRAME_AUTO, "graphic" );
- QString protect;
+ TQString protect;
if ( frameSet()->protectContent() )
protect = "content";
if ( frameSet()->isProtectSize() ) // ## should be moved for frame
@@ -666,7 +666,7 @@ QString KWFrame::saveOasisFrameStyle( KoGenStyles& mainStyles ) const
// Background (KWFrame::saveBorderProperties saves as fo:background-color, but OOo-2.0.x uses draw:fill-color)
// So now we use draw:fill-color too, the text background color is in fact a paragraph feature.
- if ( m_backgroundColor.style() == Qt::NoBrush )
+ if ( m_backgroundColor.style() == TQt::NoBrush )
frameStyle.addProperty( "draw:fill-color", "transparent" );
else if ( m_backgroundColor.color().isValid() )
frameStyle.addProperty( "draw:fill-color", m_backgroundColor.color().name() );
@@ -715,7 +715,7 @@ QString KWFrame::saveOasisFrameStyle( KoGenStyles& mainStyles ) const
return mainStyles.lookup( frameStyle, "fr" );
}
-bool KWFrame::frameAtPos( const QPoint& point, bool borderOfFrameOnly) const {
+bool KWFrame::frameAtPos( const TQPoint& point, bool borderOfFrameOnly) const {
// Forwarded to KWFrameSet to make it virtual
return frameSet()->isFrameAtPos( this, point, borderOfFrameOnly );
}
diff --git a/kword/KWFrame.h b/kword/KWFrame.h
index 37a3ff25..531c6f38 100644
--- a/kword/KWFrame.h
+++ b/kword/KWFrame.h
@@ -24,9 +24,9 @@
#include "defs.h"
#include <KoRect.h>
-#include <qbrush.h>
+#include <tqbrush.h>
#include "KoBorder.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
class KWCanvas;
class KWDocument;
@@ -41,21 +41,21 @@ class KoOasisContext;
class KoStyleStack;
class KoXmlWriter;
-class QDomElement;
+class TQDomElement;
/**
* small utility class representing a sortable (by z-order) list of frames
* you can use sort() and inSort(item)
*
- * Deprecated, use QValueVector<KWFrame*> from now on, and sort it with
+ * Deprecated, use TQValueVector<KWFrame*> from now on, and sort it with
* std::sort(frames.begin(),frames.end(),KWFrame::compareFrameZOrder);
*
- * With Qt4 we'll be able to use qSort for lists.
+ * With TQt4 we'll be able to use qSort for lists.
*/
-class ZOrderedFrameList : public QPtrList<KWFrame>
+class ZOrderedFrameList : public TQPtrList<KWFrame>
{
protected:
- virtual int compareItems(QPtrCollection::Item a, QPtrCollection::Item b);
+ virtual int compareItems(TQPtrCollection::Item a, TQPtrCollection::Item b);
};
@@ -82,7 +82,7 @@ public:
/**
* Constructor
- * @param fs parent frameset
+ * @param fs tqparent frameset
* @param left, top, width, height coordinates of the frame
* The page number will be automatically determined from the position of the frame.
* @param ra the "runaround" setting, i.e. whether text should flow below the frame,
@@ -183,7 +183,7 @@ public:
/** Return the _zoomed_ rectangle for this frame, including the border - for drawing
* @param viewMode needed to know if borders are visible or not
*/
- QRect outerRect( KWViewMode* viewMode ) const;
+ TQRect outerRect( KWViewMode* viewMode ) const;
/** Return the unzoomed rectangle, including the border, for the frames-on-top list.
* The default border of size 1-pixel that is drawn on screen is _not_ included here
@@ -208,9 +208,9 @@ public:
void frameBordersChanged();
void updateRulerHandles();
- QBrush backgroundColor() const { return m_backgroundColor; }
- void setBackgroundColor( const QBrush &_color );
- bool isTransparent() const { return m_backgroundColor.style() != Qt::SolidPattern; }
+ TQBrush backgroundColor() const { return m_backgroundColor; }
+ void setBackgroundColor( const TQBrush &_color );
+ bool isTransparent() const { return m_backgroundColor.style() != TQt::SolidPattern; }
KoRect innerRect() const;
@@ -221,7 +221,7 @@ public:
/** The "internal Y" is the offset (in pt) of the real frame showed in this one
* ("real" means "the last that isn't a copy")
* This offset in pt is the sum of the height of the frames before that one.
- * For text frames, this is equivalent to the layout units (after multiplication). */
+ * For text frames, this is equivalent to the tqlayout units (after multiplication). */
void setInternalY( double y ) { m_internalY = y; }
double internalY() const { return m_internalY; }
@@ -252,21 +252,21 @@ public:
/** create XML to describe yourself
*/
- void save( QDomElement &frameElem );
+ void save( TQDomElement &frameElem );
/** read attributes from XML. @p headerOrFooter if true some defaults are different
*/
- void load( QDomElement &frameElem, KWFrameSet* frameSet, int syntaxVersion );
+ void load( TQDomElement &frameElem, KWFrameSet* frameSet, int syntaxVersion );
void loadCommonOasisProperties( KoOasisContext& context, KWFrameSet* frameSet, const char* typeProperties );
void loadBorderProperties( KoStyleStack& styleStack );
- QString saveOasisFrameStyle( KoGenStyles& mainStyles ) const;
+ TQString saveOasisFrameStyle( KoGenStyles& mainStyles ) const;
/**
* Write out a draw:frame element and its style.
* The caller is responsible for creating the child element and closing the draw:frame element.
* @p lastFrameName is the name of the previous frame in the same frameset; this is only used for copy-frames
*/
- void startOasisFrame( KoXmlWriter &xmlWriter, KoGenStyles& mainStyles, const QString& name,
- const QString& lastFrameName = QString::null ) const;
+ void startOasisFrame( KoXmlWriter &xmlWriter, KoGenStyles& mainStyles, const TQString& name,
+ const TQString& lastFrameName = TQString() ) const;
void saveBorderProperties( KoGenStyle& frameStyle ) const;
void saveMarginProperties( KoGenStyle& frameStyle ) const;
void saveMarginAttributes( KoXmlWriter &writer ) const;
@@ -289,7 +289,7 @@ public:
@param nPoint the point in normal coordinates.
@param borderOfFrameOnly when true an additional check is done if the point
is on the border. */
- bool frameAtPos( const QPoint& nPoint, bool borderOfFrameOnly=false ) const;
+ bool frameAtPos( const TQPoint& nPoint, bool borderOfFrameOnly=false ) const;
/**
* Only applicable to frames of the main text frameset.
@@ -315,7 +315,7 @@ private:
double m_internalY;
int m_zOrder;
- QBrush m_backgroundColor;
+ TQBrush m_backgroundColor;
KoBorder m_borderLeft, m_borderRight, m_borderTop, m_borderBottom;
/** List of frames we have below and on top of us.
diff --git a/kword/KWFrameDia.cpp b/kword/KWFrameDia.cpp
index 0e4a2e98..cdc46ec8 100644
--- a/kword/KWFrameDia.cpp
+++ b/kword/KWFrameDia.cpp
@@ -39,18 +39,18 @@
#include <kcolorbutton.h>
#include <kdebug.h>
-#include <qwhatsthis.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qhbuttongroup.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qlistview.h>
-#include <qbuttongroup.h>
-#include <qhbox.h>
-#include <qheader.h>
-#include <qlayout.h>
+#include <tqwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqhbuttongroup.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqlistview.h>
+#include <tqbuttongroup.h>
+#include <tqhbox.h>
+#include <tqheader.h>
+#include <tqlayout.h>
#include <stdlib.h>
#include <limits.h>
@@ -58,16 +58,16 @@
/******************************************************************/
/* Class KWBrushStylePreview - only used by kwframestylemanager */
/******************************************************************/
-KWBrushStylePreview::KWBrushStylePreview( QWidget* parent )
- : QFrame(parent)
+KWBrushStylePreview::KWBrushStylePreview( TQWidget* tqparent )
+ : TQFrame(tqparent)
{
}
-void KWBrushStylePreview::drawContents( QPainter* painter )
+void KWBrushStylePreview::drawContents( TQPainter* painter )
{
painter->save();
painter->translate( contentsRect().x(), contentsRect().y() );
- painter->fillRect( contentsRect(), colorGroup().base() ); // in case of a transparent brush
+ painter->fillRect( contentsRect(), tqcolorGroup().base() ); // in case of a transparent brush
painter->fillRect( contentsRect(), brush );
painter->restore();
}
@@ -92,8 +92,8 @@ void KWBrushStylePreview::drawContents( QPainter* painter )
* position/size
******************************************************************/
-KWFrameDia::KWFrameDia( QWidget* parent, KWFrame *frame)
- : KDialogBase( Tabbed, QString::null, Ok | Apply| Cancel, Ok, parent, "framedialog", true)
+KWFrameDia::KWFrameDia( TQWidget* tqparent, KWFrame *frame)
+ : KDialogBase( Tabbed, TQString(), Ok | Apply| Cancel, Ok, tqparent, "framedialog", true)
{
m_noSignal=false;
m_frame = frame;
@@ -102,7 +102,7 @@ KWFrameDia::KWFrameDia( QWidget* parent, KWFrame *frame)
kdDebug() << "ERROR: KWFrameDia::constructor no frame.."<<endl;
return;
}
- setCaption( i18n( "Frame Properties for %1" ).arg( m_frame->frameSet()->name() ) );
+ setCaption( i18n( "Frame Properties for %1" ).tqarg( m_frame->frameSet()->name() ) );
KWFrameSet *fs = m_frame->frameSet()->groupmanager();
if(fs==0L) fs=m_frame->frameSet();
m_frameType = fs->type();
@@ -118,8 +118,8 @@ KWFrameDia::KWFrameDia( QWidget* parent, KWFrame *frame)
}
/* Contructor when the dialog is used on creation of frame */
-KWFrameDia::KWFrameDia( QWidget* parent, KWFrame *frame, KWDocument *doc, FrameSetType ft )
- : KDialogBase( Tabbed, i18n("Frame Properties for New Frame"), Ok | Cancel, Ok, parent, "framedialog", true)
+KWFrameDia::KWFrameDia( TQWidget* tqparent, KWFrame *frame, KWDocument *doc, FrameSetType ft )
+ : KDialogBase( Tabbed, i18n("Frame Properties for New Frame"), Ok | Cancel, Ok, tqparent, "framedialog", true)
{
m_noSignal=false;
m_frameType=ft;
@@ -137,7 +137,7 @@ KWFrameDia::KWFrameDia( QWidget* parent, KWFrame *frame, KWDocument *doc, FrameS
init();
}
-KWFrameDia::KWFrameDia( QWidget *parent, QPtrList<KWFrame> listOfFrames) : KDialogBase( Tabbed, i18n("Frames Properties"), Ok | Apply | Cancel, Ok, parent, "framedialog", true) , m_allFrames() {
+KWFrameDia::KWFrameDia( TQWidget *tqparent, TQPtrList<KWFrame> listOfFrames) : KDialogBase( Tabbed, i18n("Frames Properties"), Ok | Apply | Cancel, Ok, tqparent, "framedialog", true) , m_allFrames() {
m_noSignal=false;
m_mainFrame = m_frame = 0L;
@@ -149,7 +149,7 @@ KWFrameDia::KWFrameDia( QWidget *parent, QPtrList<KWFrame> listOfFrames) : KDial
return;
}
if ( listOfFrames.count() == 1 )
- setCaption( i18n( "Frame Settings for %1" ).arg( f->frameSet()->name() ) );
+ setCaption( i18n( "Frame Settings for %1" ).tqarg( f->frameSet()->name() ) );
KWFrameSet *fs = f->frameSet()->groupmanager();
if(fs==0L) fs=f->frameSet();
@@ -281,7 +281,7 @@ void KWFrameDia::init() {
setupTab5();
setupTab6();
}
- setInitialSize( QSize(550, 400) );
+ setInitialSize( TQSize(550, 400) );
}
void KWFrameDia::setupTab1(){ // TAB Frame Options
@@ -293,10 +293,10 @@ void KWFrameDia::setupTab1(){ // TAB Frame Options
else if(m_frameType == FT_TEXT)
columns = 2;
- m_grid1 = new QGridLayout( m_tab1, 0 /*auto create*/, columns, 0, KDialog::spacingHint() );
+ m_grid1 = new TQGridLayout( m_tab1, 0 /*auto create*/, columns, 0, KDialog::spacingHint() );
// Options for all types of frames
- m_cbCopy = new QCheckBox( i18n("Frame is a copy of the previous frame"),m_tab1 );
+ m_cbCopy = new TQCheckBox( i18n("Frame is a copy of the previous frame"),m_tab1 );
m_grid1->addWidget(m_cbCopy,1,0);
if(m_frame) {
@@ -331,9 +331,9 @@ void KWFrameDia::setupTab1(){ // TAB Frame Options
// Picture m_frame
if(m_frameType==FT_PICTURE)
{
- m_cbAspectRatio = new QCheckBox (i18n("Retain original aspect ratio"),m_tab1);
- connect( m_cbAspectRatio, SIGNAL(toggled(bool)),
- this, SLOT(slotKeepRatioToggled(bool)));
+ m_cbAspectRatio = new TQCheckBox (i18n("Retain original aspect ratio"),m_tab1);
+ connect( m_cbAspectRatio, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotKeepRatioToggled(bool)));
bool show=true;
bool on=true;
if(m_frame) {
@@ -370,35 +370,35 @@ void KWFrameDia::setupTab1(){ // TAB Frame Options
if(m_frameType==FT_TEXT)
{
// AutoCreateNewFrame policy.
- m_endOfFrame = new QGroupBox(i18n("If Text is Too Long for Frame"), m_tab1 );
+ m_endOfFrame = new TQGroupBox(i18n("If Text is Too Long for Frame"), m_tab1 );
m_grid1->addWidget( m_endOfFrame, row, 0 );
- m_eofGrid= new QGridLayout (m_endOfFrame, 4, 1, KDialog::marginHint(), KDialog::spacingHint());
- m_rAppendFrame = new QRadioButton( i18n( "Create a new page" ), m_endOfFrame );
- QWhatsThis::add( m_rAppendFrame, "<b>Create a new page:</b><br/> if there is too "
+ m_eofGrid= new TQGridLayout (m_endOfFrame, 4, 1, KDialog::marginHint(), KDialog::spacingHint());
+ m_rAppendFrame = new TQRadioButton( i18n( "Create a new page" ), m_endOfFrame );
+ TQWhatsThis::add( m_rAppendFrame, "<b>Create a new page:</b><br/> if there is too "
"much text for this text frame, a new page will be created and, "
"since \"Reconnect frame to current flow\" is the only possible "
"option together with this one, "
"the new page will have a frame for showing the additional text." );
m_eofGrid->addWidget( m_rAppendFrame, 1, 0 );
- m_rResizeFrame = new QRadioButton( i18n( "Resize last frame" ), m_endOfFrame );
- QWhatsThis::add( m_rResizeFrame, "<b>Resize last frame:</b><br/> "
+ m_rResizeFrame = new TQRadioButton( i18n( "Resize last frame" ), m_endOfFrame );
+ TQWhatsThis::add( m_rResizeFrame, "<b>Resize last frame:</b><br/> "
"if there is too much text for this text frame, "
"the frame will resize itself (increasing its height) as much as it needs, "
"to be able to contain all the text. More precisely, when the frameset has "
"multiple chained frames, it's always the last one which will be resized." );
m_eofGrid->addWidget( m_rResizeFrame, 2, 0 );
- m_rNoShow = new QRadioButton( i18n( "Don't show the extra text" ), m_endOfFrame );
- QWhatsThis::add( m_rNoShow, "<b>Don't show the extra text:</b><br/> "
+ m_rNoShow = new TQRadioButton( i18n( "Don't show the extra text" ), m_endOfFrame );
+ TQWhatsThis::add( m_rNoShow, "<b>Don't show the extra text:</b><br/> "
"if there is too much text for this text frame, nothing happens "
"automatically. Initially the extra text won't appear. One possibility "
"then is to resize the frame manually. The other possibility is, with the option "
"\"Reconnect frame to current flow\" selected, to create a new page "
"which will then have a followup frame with the extra text." );
m_eofGrid->addWidget( m_rNoShow, 3, 0 );
- QButtonGroup *grp = new QButtonGroup( m_endOfFrame );
+ TQButtonGroup *grp = new TQButtonGroup( m_endOfFrame );
grp->hide();
grp->setExclusive( true );
grp->insert( m_rAppendFrame );
@@ -439,42 +439,42 @@ void KWFrameDia::setupTab1(){ // TAB Frame Options
}
// NewFrameBehavior - now for all type of frames
- m_onNewPage = new QGroupBox(i18n("On New Page Creation"),m_tab1);
+ m_onNewPage = new TQGroupBox(i18n("On New Page Creation"),m_tab1);
m_grid1->addWidget( m_onNewPage, row, column );
- m_onpGrid = new QGridLayout( m_onNewPage, 4, 1, KDialog::marginHint(), KDialog::spacingHint() );
- m_reconnect = new QRadioButton (i18n ("Reconnect frame to current flow"), m_onNewPage);
- QWhatsThis::add(m_reconnect, i18n("<b>Reconnect frame to current flow:</b><br/>"
+ m_onpGrid = new TQGridLayout( m_onNewPage, 4, 1, KDialog::marginHint(), KDialog::spacingHint() );
+ m_reconnect = new TQRadioButton (i18n ("Reconnect frame to current flow"), m_onNewPage);
+ TQWhatsThis::add(m_reconnect, i18n("<b>Reconnect frame to current flow:</b><br/>"
"When a new page is created, a new frame will be created for this "
"frameset, so that the text can flow from one page to the next if necessary. "
"This is what happens for the \"main text frameset\", but this option makes it possible "
- "to choose the same behavior for other framesets, for instance in magazine layouts."));
+ "to choose the same behavior for other framesets, for instance in magazine tqlayouts."));
if ( m_rResizeFrame )
- connect( m_reconnect, SIGNAL( clicked() ), this, SLOT( setFrameBehaviorInputOn() ) );
+ connect( m_reconnect, TQT_SIGNAL( clicked() ), this, TQT_SLOT( setFrameBehaviorInputOn() ) );
m_onpGrid->addRowSpacing( 0, KDialog::marginHint() + 5 );
m_onpGrid->addWidget( m_reconnect, 1, 0 );
- m_noFollowup = new QRadioButton (i18n ("Do not create a followup frame"), m_onNewPage);
- QWhatsThis::add(m_noFollowup, i18n("<b>Do not create a followup frame:</b><br/>"
+ m_noFollowup = new TQRadioButton (i18n ("Do not create a followup frame"), m_onNewPage);
+ TQWhatsThis::add(m_noFollowup, i18n("<b>Do not create a followup frame:</b><br/>"
"When a new page is created, no frame will be created for this frameset."));
if ( m_rResizeFrame )
- connect( m_noFollowup, SIGNAL( clicked() ), this, SLOT( setFrameBehaviorInputOn() ) );
+ connect( m_noFollowup, TQT_SIGNAL( clicked() ), this, TQT_SLOT( setFrameBehaviorInputOn() ) );
m_onpGrid->addWidget( m_noFollowup, 2, 0 );
- m_copyRadio= new QRadioButton (i18n ("Place a copy of this frame"), m_onNewPage);
- QWhatsThis::add(m_copyRadio, i18n("<b>Place a copy of this frame:</b><br/>"
+ m_copyRadio= new TQRadioButton (i18n ("Place a copy of this frame"), m_onNewPage);
+ TQWhatsThis::add(m_copyRadio, i18n("<b>Place a copy of this frame:</b><br/>"
"When a new page is created, a frame will be created for this frameset, "
"which will always show the exact same thing as the frame on the previous "
"page. This is what happens for headers and footers, but this option "
"makes it possible to choose the same behavior for other framesets, for "
"instance a company logo and/or title that should appear exactly the same on every page."));
if ( m_rResizeFrame )
- connect( m_copyRadio, SIGNAL( clicked() ), this, SLOT( setFrameBehaviorInputOff() ) );
+ connect( m_copyRadio, TQT_SIGNAL( clicked() ), this, TQT_SLOT( setFrameBehaviorInputOff() ) );
m_onpGrid->addWidget( m_copyRadio, 3, 0);
enableOnNewPageOptions();
- QButtonGroup *grp2 = new QButtonGroup( m_onNewPage );
+ TQButtonGroup *grp2 = new TQButtonGroup( m_onNewPage );
grp2->hide();
grp2->setExclusive( true );
grp2->insert( m_reconnect );
@@ -513,30 +513,30 @@ void KWFrameDia::setupTab1(){ // TAB Frame Options
if( false && m_frameType == FT_TEXT ) // disabled in the GUI for now! (TZ June 2002)
{
row++;
- m_sideHeads = new QGroupBox(i18n("SideHead Definition"),m_tab1);
+ m_sideHeads = new TQGroupBox(i18n("SideHead Definition"),m_tab1);
m_sideHeads->setEnabled(false); //###
m_grid1->addWidget(m_sideHeads, row, 0);
- m_sideGrid = new QGridLayout( m_sideHeads, 4, 2, KDialog::marginHint(), KDialog::spacingHint() );
- sideTitle1 = new QLabel ( i18n("Size (%1):").arg(m_doc->unitName()),m_sideHeads);
- sideTitle1->resize(sideTitle1->sizeHint());
+ m_sideGrid = new TQGridLayout( m_sideHeads, 4, 2, KDialog::marginHint(), KDialog::spacingHint() );
+ sideTitle1 = new TQLabel ( i18n("Size (%1):").tqarg(m_doc->unitName()),m_sideHeads);
+ sideTitle1->resize(sideTitle1->tqsizeHint());
m_sideGrid->addWidget(sideTitle1,1,0);
- m_sideWidth= new QLineEdit(m_sideHeads,"");
+ m_sideWidth= new TQLineEdit(m_sideHeads,"");
m_sideWidth->setMaxLength(6);
m_sideGrid->addWidget(m_sideWidth,1,1);
- sideTitle2 = new QLabel( i18n("Gap size (%1):").arg(m_doc->unitName()),m_sideHeads);
- sideTitle2->resize(sideTitle2->sizeHint());
+ sideTitle2 = new TQLabel( i18n("Gap size (%1):").tqarg(m_doc->unitName()),m_sideHeads);
+ sideTitle2->resize(sideTitle2->tqsizeHint());
m_sideGrid->addWidget(sideTitle2,2,0);
- m_sideGap = new QLineEdit(m_sideHeads,"");
+ m_sideGap = new TQLineEdit(m_sideHeads,"");
m_sideGap->setMaxLength(6);
m_sideGrid->addWidget(m_sideGap,2,1);
- m_sideAlign = new QComboBox (false,m_sideHeads);
+ m_sideAlign = new TQComboBox (false,m_sideHeads);
m_sideAlign->setAutoResize(false);
m_sideAlign->insertItem ( i18n("Left"));
m_sideAlign->insertItem ( i18n("Right"));
m_sideAlign->insertItem ( i18n("Closest to Binding"));
m_sideAlign->insertItem ( i18n("Closest to Page Edge"));
- m_sideAlign->resize(m_sideAlign->sizeHint());
+ m_sideAlign->resize(m_sideAlign->tqsizeHint());
m_sideGrid->addMultiCellWidget(m_sideAlign,3,3,0,1);
m_sideGrid->addRowSpacing( 0, KDialog::marginHint() + 5 );
@@ -549,14 +549,14 @@ void KWFrameDia::setupTab1(){ // TAB Frame Options
// add rest of sidehead init..
}
- m_cbAllFrames = new QCheckBox (i18n("Changes will be applied to all frames in frameset"),m_tab1);
+ m_cbAllFrames = new TQCheckBox (i18n("Changes will be applied to all frames in frameset"),m_tab1);
m_cbAllFrames->setChecked(m_frame!=0L);
row++;
m_grid1->addMultiCellWidget(m_cbAllFrames,row,row, 0, 1);
- m_cbProtectContent = new QCheckBox( i18n("Protect content"), m_tab1);
- QWhatsThis::add(m_cbProtectContent, i18n("<b>Protect content:</b><br/>"
+ m_cbProtectContent = new TQCheckBox( i18n("Protect content"), m_tab1);
+ TQWhatsThis::add(m_cbProtectContent, i18n("<b>Protect content:</b><br/>"
"Disallow changes to be made to the contents of the frame(s)."));
- connect( m_cbProtectContent, SIGNAL(toggled ( bool ) ), this, SLOT(slotProtectContentChanged( bool )));
+ connect( m_cbProtectContent, TQT_SIGNAL(toggled ( bool ) ), this, TQT_SLOT(slotProtectContentChanged( bool )));
row++;
m_grid1->addMultiCellWidget(m_cbProtectContent,row,row, 0, 1);
if( m_frameType != FT_TEXT || m_frame!=0 && m_frame->frameSet()==0) {
@@ -609,38 +609,38 @@ void KWFrameDia::setupTab1(){ // TAB Frame Options
void KWFrameDia::setupTab2() { // TAB Text Runaround
m_tab2 = addPage( i18n( "Text Run Around" ) );
- QVBoxLayout *tabLayout = new QVBoxLayout( m_tab2, 0, KDialog::spacingHint(), "tabLayout");
+ TQVBoxLayout *tabLayout = new TQVBoxLayout( m_tab2, 0, KDialog::spacingHint(), "tabLayout");
// First groupbox
- m_runGroup = new QButtonGroup( i18n( "Layout of Text in Other Frames" ), m_tab2);
+ m_runGroup = new TQButtonGroup( i18n( "Layout of Text in Other Frames" ), m_tab2);
m_runGroup->setColumnLayout( 0, Qt::Vertical );
- m_runGroup->layout()->setSpacing( KDialog::spacingHint() );
- QGridLayout *groupBox1Layout = new QGridLayout( m_runGroup->layout() );
- groupBox1Layout->setAlignment( Qt::AlignTop );
+ m_runGroup->tqlayout()->setSpacing( KDialog::spacingHint() );
+ TQGridLayout *groupBox1Layout = new TQGridLayout( m_runGroup->tqlayout() );
+ groupBox1Layout->tqsetAlignment( TQt::AlignTop );
- m_rRunNo = new QRadioButton( i18n( "Text will run &through this frame" ), m_runGroup );
+ m_rRunNo = new TQRadioButton( i18n( "Text will run &through this frame" ), m_runGroup );
groupBox1Layout->addWidget( m_rRunNo, 0, 1 );
- m_rRunBounding = new QRadioButton( i18n( "Text will run &around the frame" ), m_runGroup );
+ m_rRunBounding = new TQRadioButton( i18n( "Text will run &around the frame" ), m_runGroup );
groupBox1Layout->addWidget( m_rRunBounding, 1, 1 );
- m_rRunSkip = new QRadioButton( i18n( "Text will &not run around this frame" ), m_runGroup );
+ m_rRunSkip = new TQRadioButton( i18n( "Text will &not run around this frame" ), m_runGroup );
groupBox1Layout->addWidget( m_rRunSkip, 2, 1 );
- QPixmap pixmap = KWBarIcon( "run_not" );
- QLabel *lRunNo = new QLabel( m_runGroup );
+ TQPixmap pixmap = KWBarIcon( "run_not" );
+ TQLabel *lRunNo = new TQLabel( m_runGroup );
lRunNo->setBackgroundPixmap( pixmap );
lRunNo->setFixedSize( pixmap.size() );
groupBox1Layout->addWidget( lRunNo, 0, 0 );
pixmap = KWBarIcon( "run_bounding" );
- QLabel *lRunBounding = new QLabel( m_runGroup );
+ TQLabel *lRunBounding = new TQLabel( m_runGroup );
lRunBounding->setBackgroundPixmap( pixmap );
lRunBounding->setFixedSize( pixmap.size() );
groupBox1Layout->addWidget( lRunBounding, 1, 0 );
pixmap = KWBarIcon( "run_skip" );
- QLabel *lRunSkip = new QLabel( m_runGroup );
+ TQLabel *lRunSkip = new TQLabel( m_runGroup );
lRunSkip->setBackgroundPixmap( pixmap );
lRunSkip->setFixedSize( pixmap.size() );
groupBox1Layout->addWidget( lRunSkip, 2, 0 );
@@ -648,37 +648,37 @@ void KWFrameDia::setupTab2() { // TAB Text Runaround
tabLayout->addWidget( m_runGroup );
// Second groupbox
- m_runSideGroup = new QButtonGroup( i18n( "Run Around Side" ), m_tab2);
+ m_runSideGroup = new TQButtonGroup( i18n( "Run Around Side" ), m_tab2);
m_runSideGroup->setColumnLayout( 0, Qt::Vertical );
- m_runSideGroup->layout()->setSpacing( KDialog::spacingHint() );
- m_runSideGroup->layout()->setMargin( KDialog::marginHint() );
- QGridLayout *runSideLayout = new QGridLayout( m_runSideGroup->layout() );
- runSideLayout->setAlignment( Qt::AlignTop );
+ m_runSideGroup->tqlayout()->setSpacing( KDialog::spacingHint() );
+ m_runSideGroup->tqlayout()->setMargin( KDialog::marginHint() );
+ TQGridLayout *runSideLayout = new TQGridLayout( m_runSideGroup->tqlayout() );
+ runSideLayout->tqsetAlignment( TQt::AlignTop );
- m_rRunLeft = new QRadioButton( i18n( "Run Around", "&Left" ), m_runSideGroup );
+ m_rRunLeft = new TQRadioButton( i18n( "Run Around", "&Left" ), m_runSideGroup );
runSideLayout->addWidget( m_rRunLeft, 0, 0 /*1*/ );
- m_rRunRight = new QRadioButton( i18n( "Run Around", "&Right" ), m_runSideGroup );
+ m_rRunRight = new TQRadioButton( i18n( "Run Around", "&Right" ), m_runSideGroup );
runSideLayout->addWidget( m_rRunRight, 1, 0 /*1*/ );
- m_rRunBiggest = new QRadioButton( i18n( "Run Around", "Lon&gest side" ), m_runSideGroup );
+ m_rRunBiggest = new TQRadioButton( i18n( "Run Around", "Lon&gest side" ), m_runSideGroup );
runSideLayout->addWidget( m_rRunBiggest, 2, 0 /*1*/ );
#if 0 // TODO icons!
- QPixmap pixmap = KWBarIcon( "run_left" );
- QLabel *label = new QLabel( m_runSideGroup );
+ TQPixmap pixmap = KWBarIcon( "run_left" );
+ TQLabel *label = new TQLabel( m_runSideGroup );
label->setBackgroundPixmap( pixmap );
label->setFixedSize( pixmap.size() );
runSideLayout->addWidget( label, 0, 0 );
pixmap = KWBarIcon( "run_right" );
- label = new QLabel( m_runSideGroup );
+ label = new TQLabel( m_runSideGroup );
label->setBackgroundPixmap( pixmap );
label->setFixedSize( pixmap.size() );
runSideLayout->addWidget( label, 1, 0 );
pixmap = KWBarIcon( "run_biggest" );
- label = new QLabel( m_runSideGroup );
+ label = new TQLabel( m_runSideGroup );
label->setBackgroundPixmap( pixmap );
label->setFixedSize( pixmap.size() );
runSideLayout->addWidget( label, 2, 0 );
@@ -688,10 +688,10 @@ void KWFrameDia::setupTab2() { // TAB Text Runaround
m_raDistConfigWidget = new KWFourSideConfigWidget( m_doc, i18n("Distance Between Frame && Text"), m_tab2 );
if ( m_frame )
- m_raDistConfigWidget->setValues( QMAX(0.00, m_frame->runAroundLeft()),
- QMAX(0.00, m_frame->runAroundRight()),
- QMAX(0.00, m_frame->runAroundTop()),
- QMAX(0.00, m_frame->runAroundBottom()) );
+ m_raDistConfigWidget->setValues( TQMAX(0.00, m_frame->runAroundLeft()),
+ TQMAX(0.00, m_frame->runAroundRight()),
+ TQMAX(0.00, m_frame->runAroundTop()),
+ TQMAX(0.00, m_frame->runAroundBottom()) );
tabLayout->addWidget( m_raDistConfigWidget );
@@ -778,7 +778,7 @@ void KWFrameDia::setupTab2() { // TAB Text Runaround
enableRunAround();
// Changing the type of runaround needs to enable/disable the runaround-side options
- connect( m_runGroup, SIGNAL( clicked(int) ), this, SLOT( enableRunAround() ) );
+ connect( m_runGroup, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( enableRunAround() ) );
}
void KWFrameDia::setupTab3(){ // TAB Frameset
@@ -792,51 +792,51 @@ void KWFrameDia::setupTab3(){ // TAB Frameset
//kdDebug() << "setup tab 3 frameSet"<<endl;
m_tab3 = addPage( i18n( "Connect Text Frames" ) );
- QVBoxLayout *tabLayout = new QVBoxLayout( m_tab3, 0, KDialog::spacingHint());
+ TQVBoxLayout *tabLayout = new TQVBoxLayout( m_tab3, 0, KDialog::spacingHint());
- QButtonGroup *myGroup = new QButtonGroup(this);
+ TQButtonGroup *myGroup = new TQButtonGroup(this);
myGroup->hide();
- m_rExistingFrameset = new QRadioButton( m_tab3, "m_rExistingFrameset" );
+ m_rExistingFrameset = new TQRadioButton( m_tab3, "m_rExistingFrameset" );
m_rExistingFrameset->setText( i18n("Select existing frameset to connect frame to:") );
tabLayout->addWidget( m_rExistingFrameset );
myGroup->insert(m_rExistingFrameset,1);
- connect (m_rExistingFrameset, SIGNAL( toggled(bool)), this, SLOT(ensureValidFramesetSelected()));
+ connect (m_rExistingFrameset, TQT_SIGNAL( toggled(bool)), this, TQT_SLOT(ensureValidFramesetSelected()));
- QHBoxLayout *layout2 = new QHBoxLayout( 0, 0, 6);
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
- layout2->addItem( spacer );
+ TQHBoxLayout *tqlayout2 = new TQHBoxLayout( 0, 0, 6);
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
+ tqlayout2->addItem( spacer );
- m_lFrameSList = new QListView( m_tab3, "m_lFrameSList" );
+ m_lFrameSList = new TQListView( m_tab3, "m_lFrameSList" );
m_lFrameSList->addColumn( i18n("No.") );
m_lFrameSList->addColumn( i18n("Frameset Name") );
m_lFrameSList->setAllColumnsShowFocus( true );
m_lFrameSList->header()->setMovingEnabled( false );
- connect( m_lFrameSList, SIGNAL(selectionChanged ()),this,SLOT(selectExistingFrameset ()) );
- connect (m_lFrameSList, SIGNAL( selectionChanged()), this, SLOT(ensureValidFramesetSelected()));
+ connect( m_lFrameSList, TQT_SIGNAL(selectionChanged ()),this,TQT_SLOT(selectExistingFrameset ()) );
+ connect (m_lFrameSList, TQT_SIGNAL( selectionChanged()), this, TQT_SLOT(ensureValidFramesetSelected()));
- layout2->addWidget( m_lFrameSList );
- tabLayout->addLayout( layout2 );
+ tqlayout2->addWidget( m_lFrameSList );
+ tabLayout->addLayout( tqlayout2 );
- m_rNewFrameset = new QRadioButton( m_tab3);
+ m_rNewFrameset = new TQRadioButton( m_tab3);
m_rNewFrameset->setText( i18n( "Create a new frameset" ) );
tabLayout->addWidget( m_rNewFrameset );
myGroup->insert(m_rNewFrameset,2);
- QFrame *line1 = new QFrame( m_tab3 );
- line1->setProperty( "frameShape", (int)QFrame::HLine );
- line1->setFrameShadow( QFrame::Plain );
- line1->setFrameShape( QFrame::HLine );
+ TQFrame *line1 = new TQFrame( m_tab3 );
+ line1->setProperty( "frameShape", (int)TQFrame::HLine );
+ line1->setFrameShadow( TQFrame::Plain );
+ line1->setFrameShape( TQFrame::HLine );
tabLayout->addWidget( line1 );
- QHBoxLayout *layout1 = new QHBoxLayout( 0, 0, 6 );
- QLabel *textLabel1 = new QLabel( m_tab3 );
+ TQHBoxLayout *tqlayout1 = new TQHBoxLayout( 0, 0, 6 );
+ TQLabel *textLabel1 = new TQLabel( m_tab3 );
textLabel1->setText( i18n( "Name of frameset:" ) );
- layout1->addWidget( textLabel1 );
+ tqlayout1->addWidget( textLabel1 );
- m_eFrameSetName = new QLineEdit( m_tab3 );
- layout1->addWidget( m_eFrameSetName );
- tabLayout->addLayout( layout1 );
+ m_eFrameSetName = new TQLineEdit( m_tab3 );
+ tqlayout1->addWidget( m_eFrameSetName );
+ tabLayout->addLayout( tqlayout1 );
int amount=0;
// now fill the gui.
@@ -852,8 +852,8 @@ void KWFrameDia::setupTab3(){ // TAB Frameset
continue;
if ( fs->isDeleted() )
continue;
- QListViewItem *item = new QListViewItem( m_lFrameSList );
- item->setText( 0, QString( "%1" ).arg( i + 1 ) );
+ TQListViewItem *item = new TQListViewItem( m_lFrameSList );
+ item->setText( 0, TQString( "%1" ).tqarg( i + 1 ) );
item->setText( 1, fs->name() );
amount++;
if( m_frame && m_frame->frameSet() == fs ) {
@@ -881,14 +881,14 @@ void KWFrameDia::setupTab3(){ // TAB Frameset
}
m_eFrameSetName->setText( m_oldFrameSetName );
- connect( m_lFrameSList, SIGNAL( currentChanged( QListViewItem * ) ),
- this, SLOT( connectListSelected( QListViewItem * ) ) );
- connect(m_eFrameSetName, SIGNAL(textChanged ( const QString & ) ),
- this,SLOT(textNameFrameChanged ( const QString & ) ) );
- connect(m_eFrameSetName, SIGNAL(textChanged ( const QString & )),
- this,SLOT(textNameFrameChanged ( const QString & ) ));
- connect( m_rNewFrameset, SIGNAL(toggled (bool)),
- this,SLOT(selectNewFrameset (bool)) );
+ connect( m_lFrameSList, TQT_SIGNAL( currentChanged( TQListViewItem * ) ),
+ this, TQT_SLOT( connectListSelected( TQListViewItem * ) ) );
+ connect(m_eFrameSetName, TQT_SIGNAL(textChanged ( const TQString & ) ),
+ this,TQT_SLOT(textNameFrameChanged ( const TQString & ) ) );
+ connect(m_eFrameSetName, TQT_SIGNAL(textChanged ( const TQString & )),
+ this,TQT_SLOT(textNameFrameChanged ( const TQString & ) ));
+ connect( m_rNewFrameset, TQT_SIGNAL(toggled (bool)),
+ this,TQT_SLOT(selectNewFrameset (bool)) );
}
void KWFrameDia::selectExistingFrameset() {
@@ -898,19 +898,19 @@ void KWFrameDia::selectExistingFrameset() {
void KWFrameDia::selectNewFrameset(bool on) {
if(!on) return;
- QListViewItem *frameSetItem = m_lFrameSList->selectedItem();
+ TQListViewItem *frameSetItem = m_lFrameSList->selectedItem();
if ( !frameSetItem)
return;
- QString str = frameSetItem->text( 0 );
+ TQString str = frameSetItem->text( 0 );
KWFrameSet *fs = m_doc->frameSet(str.toInt() - 1);
frameSetItem->setText(1, fs->name() );
}
-void KWFrameDia::textNameFrameChanged ( const QString &text )
+void KWFrameDia::textNameFrameChanged ( const TQString &text )
{
if(m_rExistingFrameset->isChecked()) {
- QListViewItem *item = m_lFrameSList->selectedItem();
+ TQListViewItem *item = m_lFrameSList->selectedItem();
if ( !item )
return;
item->setText(1, text );
@@ -925,18 +925,18 @@ void KWFrameDia::setupTab4() { // TAB Geometry
m_noSignal = true;
m_tab4 = addPage( i18n( "Geometry" ) );
- QGridLayout* grid4 = new QGridLayout( m_tab4, 5, 1, 0, KDialog::spacingHint() );
+ TQGridLayout* grid4 = new TQGridLayout( m_tab4, 5, 1, 0, KDialog::spacingHint() );
- m_floating = new QCheckBox( i18n("Frame is inline"), m_tab4 );
+ m_floating = new TQCheckBox( i18n("Frame is inline"), m_tab4 );
- connect( m_floating, SIGNAL( toggled(bool) ), this, SLOT( slotFloatingToggled(bool) ) );
+ connect( m_floating, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotFloatingToggled(bool) ) );
int row = 0;
grid4->addMultiCellWidget( m_floating, row, row, 0, 1 );
row++;
- m_protectSize = new QCheckBox( i18n("Protect size and position"), m_tab4);
+ m_protectSize = new TQCheckBox( i18n("Protect size and position"), m_tab4);
grid4->addMultiCellWidget( m_protectSize, row, row, 0, 1 );
- connect( m_protectSize, SIGNAL( toggled(bool) ), this, SLOT( slotProtectSizeToggled(bool) ) );
+ connect( m_protectSize, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotProtectSizeToggled(bool) ) );
/* ideally the following properties could be given to any floating frame:
Position: (y)
@@ -957,47 +957,47 @@ void KWFrameDia::setupTab4() { // TAB Geometry
Absolute
*/
- m_grp1 = new QGroupBox( i18n("Position"), m_tab4 );
- QGridLayout* pGrid = new QGridLayout( m_grp1, 3, 4, KDialog::marginHint(), KDialog::spacingHint() );
+ m_grp1 = new TQGroupBox( i18n("Position"), m_tab4 );
+ TQGridLayout* pGrid = new TQGridLayout( m_grp1, 3, 4, KDialog::marginHint(), KDialog::spacingHint() );
- m_lx = new QLabel( i18n( "Left:" ), m_grp1 );
- m_lx->resize( m_lx->sizeHint() );
+ m_lx = new TQLabel( i18n( "Left:" ), m_grp1 );
+ m_lx->resize( m_lx->tqsizeHint() );
pGrid->addWidget( m_lx, 1, 0 );
m_sx = new KoUnitDoubleSpinBox( m_grp1, 0, 9999, 1, 0.0, m_doc->unit() );
- m_sx->resize( m_sx->sizeHint() );
+ m_sx->resize( m_sx->tqsizeHint() );
pGrid->addWidget( m_sx, 1, 1 );
- m_ly = new QLabel( i18n( "Top:" ), m_grp1 );
- m_ly->resize( m_ly->sizeHint() );
+ m_ly = new TQLabel( i18n( "Top:" ), m_grp1 );
+ m_ly->resize( m_ly->tqsizeHint() );
pGrid->addWidget( m_ly, 1, 2 );
m_sy = new KoUnitDoubleSpinBox( m_grp1, 0, 9999, 1, 0.0, m_doc->unit() );
- m_sy->resize( m_sy->sizeHint() );
+ m_sy->resize( m_sy->tqsizeHint() );
pGrid->addWidget( m_sy, 1, 3 );
- m_lw = new QLabel( i18n( "Width:" ), m_grp1 );
- m_lw->resize( m_lw->sizeHint() );
+ m_lw = new TQLabel( i18n( "Width:" ), m_grp1 );
+ m_lw->resize( m_lw->tqsizeHint() );
pGrid->addWidget( m_lw, 2, 0 );
m_sw = new KoUnitDoubleSpinBox( m_grp1, 0, 9999, 1, 0.0, m_doc->unit() );
- m_sw->resize( m_sw->sizeHint() );
- connect( m_sw, SIGNAL(valueChanged(double)),
- this, SLOT(slotUpdateHeightForWidth(double)) );
+ m_sw->resize( m_sw->tqsizeHint() );
+ connect( m_sw, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(slotUpdateHeightForWidth(double)) );
pGrid->addWidget( m_sw, 2, 1 );
- m_lh = new QLabel( i18n( "Height:" ), m_grp1 );
- m_lh->resize( m_lh->sizeHint() );
+ m_lh = new TQLabel( i18n( "Height:" ), m_grp1 );
+ m_lh->resize( m_lh->tqsizeHint() );
pGrid->addWidget( m_lh, 2, 2 );
m_sh = new KoUnitDoubleSpinBox( m_grp1, 0, 9999, 1, 0.0, m_doc->unit() );
- connect( m_sh, SIGNAL(valueChanged(double)),
- this, SLOT(slotUpdateWidthForHeight(double)) );
+ connect( m_sh, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(slotUpdateWidthForHeight(double)) );
- m_sh->resize( m_sh->sizeHint() );
+ m_sh->resize( m_sh->tqsizeHint() );
pGrid->addWidget( m_sh, 2, 3 );
@@ -1008,10 +1008,10 @@ void KWFrameDia::setupTab4() { // TAB Geometry
if(m_frame) {
m_paddingConfigWidget = new KWFourSideConfigWidget( m_doc, i18n("Margins"), m_tab4 );
- m_paddingConfigWidget->setValues( QMAX(0.00, m_frame->paddingLeft()),
- QMAX(0.00, m_frame->paddingRight()),
- QMAX(0.00, m_frame->paddingTop()),
- QMAX(0.00, m_frame->paddingBottom()) );
+ m_paddingConfigWidget->setValues( TQMAX(0.00, m_frame->paddingLeft()),
+ TQMAX(0.00, m_frame->paddingRight()),
+ TQMAX(0.00, m_frame->paddingTop()),
+ TQMAX(0.00, m_frame->paddingBottom()) );
row++;
grid4->addMultiCellWidget( m_paddingConfigWidget, row, row, 0, 1 );
@@ -1154,40 +1154,40 @@ void KWFrameDia::initGeometrySettings()
void KWFrameDia::setupTab5() { // Tab Background fill/color
m_tab5 = addPage( i18n("Background") );
- QGridLayout* grid5 = new QGridLayout( m_tab5, 0 /*auto*/, 2, 0, KDialog::spacingHint() );
+ TQGridLayout* grid5 = new TQGridLayout( m_tab5, 0 /*auto*/, 2, 0, KDialog::spacingHint() );
int row = 0;
if (!m_frame ) {
- m_overwriteColor = new QCheckBox (i18n("Set new color on all selected frames"), m_tab5);
+ m_overwriteColor = new TQCheckBox (i18n("Set new color on all selected frames"), m_tab5);
grid5->addMultiCellWidget(m_overwriteColor,row,row,0,1);
row++;
}
//brushPreview=new KWBrushStylePreview(m_tab5);
//grid5->addMultiCellWidget(brushPreview,row,5,1,1);
- m_transparentCB = new QCheckBox( i18n( "Transparent background" ), m_tab5 );
+ m_transparentCB = new TQCheckBox( i18n( "Transparent background" ), m_tab5 );
grid5->addWidget(m_transparentCB,row++,0);
m_transparentCB->setEnabled( !m_mainFrameSetIncluded );
- QLabel *labelBgColor = new QLabel( i18n( "Background color:" ), m_tab5 );
+ TQLabel *labelBgColor = new TQLabel( i18n( "Background color:" ), m_tab5 );
grid5->addWidget(labelBgColor,row++,0);
- m_brushColor = new KColorButton( Qt::white, KWDocument::defaultBgColor(0), m_tab5 );
+ m_brushColor = new KColorButton( TQt::white, KWDocument::defaultBgColor(0), m_tab5 );
grid5->addWidget(m_brushColor,row++,0);
-// connect( m_brushColor, SIGNAL( changed( const QColor & ) ),
-// this, SLOT( updateBrushPreview() ) );
+// connect( m_brushColor, TQT_SIGNAL( changed( const TQColor & ) ),
+// this, TQT_SLOT( updateBrushPreview() ) );
// ###########################
// Fill styles are ugly and not WYSIWYG (due to being pixel-based)
// Feature not in OOo either (they have a configurable level of transparency instead, much nicer)
#if 0
- l = new QLabel( i18n( "Background style:" ), m_tab5 );
+ l = new TQLabel( i18n( "Background style:" ), m_tab5 );
grid5->addWidget(l,row++,0);
- brushStyle = new QComboBox( false,m_tab5, "BStyle" );
+ brushStyle = new TQComboBox( false,m_tab5, "BStyle" );
grid5->addWidget(brushStyle,row++,0);
brushStyle->insertItem( i18n( "No Background Fill" ) );
@@ -1213,17 +1213,17 @@ void KWFrameDia::setupTab5() { // Tab Background fill/color
brushStyle->insertItem( i18n( "Diagonal Lines ( / )" ) );
brushStyle->insertItem( i18n( "Diagonal Lines ( \\ )" ) );
brushStyle->insertItem( i18n( "Diagonal Crossing Lines" ) );
- connect( brushStyle, SIGNAL( activated( int ) ),
- this, SLOT( updateBrushPreview() ) );
+ connect( brushStyle, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( updateBrushPreview() ) );
updateBrushPreview();
#endif
- connect( m_transparentCB, SIGNAL( toggled( bool ) ), labelBgColor, SLOT( setDisabled( bool ) ) );
- connect( m_transparentCB, SIGNAL( toggled( bool ) ), m_brushColor, SLOT( setDisabled( bool ) ) );
+ connect( m_transparentCB, TQT_SIGNAL( toggled( bool ) ), labelBgColor, TQT_SLOT( setDisabled( bool ) ) );
+ connect( m_transparentCB, TQT_SIGNAL( toggled( bool ) ), m_brushColor, TQT_SLOT( setDisabled( bool ) ) );
initBrush();
- QSpacerItem* spacer = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQSpacerItem* spacer = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding);
grid5->addItem( spacer,row,0 );
}
@@ -1231,12 +1231,12 @@ void KWFrameDia::setupTab6() // Border style
{
m_tab6 = addPage( i18n("&Borders") );
- QGridLayout *grid = new QGridLayout( m_tab6, 8, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( m_tab6, 8, 2, 0, KDialog::spacingHint() );
- QLabel * lStyle = new QLabel( i18n( "St&yle:" ), m_tab6 );
+ TQLabel * lStyle = new TQLabel( i18n( "St&yle:" ), m_tab6 );
grid->addWidget( lStyle, 0, 0 );
- m_cStyle = new QComboBox( false, m_tab6 );
+ m_cStyle = new TQComboBox( false, m_tab6 );
m_cStyle->insertItem( KoBorder::getStyle( KoBorder::SOLID ) );
m_cStyle->insertItem( KoBorder::getStyle( KoBorder::DASH ) );
m_cStyle->insertItem( KoBorder::getStyle( KoBorder::DOT ) );
@@ -1246,16 +1246,16 @@ void KWFrameDia::setupTab6() // Border style
lStyle->setBuddy( m_cStyle );
grid->addWidget( m_cStyle, 1, 0 );
- QLabel * lWidth = new QLabel( i18n( "&Width:" ), m_tab6 );
+ TQLabel * lWidth = new TQLabel( i18n( "&Width:" ), m_tab6 );
grid->addWidget( lWidth, 2, 0 );
- m_cWidth = new QComboBox( false, m_tab6 );
+ m_cWidth = new TQComboBox( false, m_tab6 );
for( unsigned int i = 1; i <= 10; i++ )
- m_cWidth->insertItem(QString::number(i));
+ m_cWidth->insertItem(TQString::number(i));
lWidth->setBuddy( m_cWidth );
grid->addWidget( m_cWidth, 3, 0 );
- QLabel * lColor = new QLabel( i18n( "Co&lor:" ), m_tab6 );
+ TQLabel * lColor = new TQLabel( i18n( "Co&lor:" ), m_tab6 );
grid->addWidget( lColor, 4, 0 );
m_bColor = new KColorButton( black,
@@ -1265,39 +1265,39 @@ void KWFrameDia::setupTab6() // Border style
lColor->setBuddy( m_bColor );
grid->addWidget( m_bColor, 5, 0 );
- QButtonGroup * bb = new QHButtonGroup( m_tab6 );
- bb->setFrameStyle(QFrame::NoFrame);
- m_bLeft = new QPushButton(bb);
+ TQButtonGroup * bb = new TQHButtonGroup( m_tab6 );
+ bb->setFrameStyle(TQFrame::NoFrame);
+ m_bLeft = new TQPushButton(bb);
m_bLeft->setPixmap( BarIcon( "borderleft" ) );
m_bLeft->setToggleButton( true );
- m_bRight = new QPushButton(bb);
+ m_bRight = new TQPushButton(bb);
m_bRight->setPixmap( BarIcon( "borderright" ) );
m_bRight->setToggleButton( true );
- m_bTop = new QPushButton(bb);
+ m_bTop = new TQPushButton(bb);
m_bTop->setPixmap( BarIcon( "bordertop" ) );
m_bTop->setToggleButton( true );
- m_bBottom = new QPushButton(bb);
+ m_bBottom = new TQPushButton(bb);
m_bBottom->setPixmap( BarIcon( "borderbottom" ) );
m_bBottom->setToggleButton( true );
grid->addWidget( bb, 6, 0 );
- connect( m_bLeft, SIGNAL( toggled( bool ) ), this, SLOT( brdLeftToggled( bool ) ) );
- connect( m_bRight, SIGNAL( toggled( bool ) ), this, SLOT( brdRightToggled( bool ) ) );
- connect( m_bTop, SIGNAL( toggled( bool ) ), this, SLOT( brdTopToggled( bool ) ) );
- connect( m_bBottom, SIGNAL( toggled( bool ) ), this, SLOT( brdBottomToggled( bool ) ) );
+ connect( m_bLeft, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( brdLeftToggled( bool ) ) );
+ connect( m_bRight, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( brdRightToggled( bool ) ) );
+ connect( m_bTop, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( brdTopToggled( bool ) ) );
+ connect( m_bBottom, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( brdBottomToggled( bool ) ) );
initBorderSettings();
- QGroupBox *grp=new QGroupBox( 0, Qt::Vertical, i18n( "Preview" ), m_tab6, "previewgrp" );
+ TQGroupBox *grp=new TQGroupBox( 0, Qt::Vertical, i18n( "Preview" ), m_tab6, "previewgrp" );
grid->addMultiCellWidget( grp , 0, 7, 1, 1 );
- grp->layout()->setSpacing(KDialog::spacingHint());
- grp->layout()->setMargin(KDialog::marginHint());
+ grp->tqlayout()->setSpacing(KDialog::spacingHint());
+ grp->tqlayout()->setMargin(KDialog::marginHint());
m_prev3 = new KoBorderPreview( grp );
- QVBoxLayout *lay1 = new QVBoxLayout( grp->layout() );
+ TQVBoxLayout *lay1 = new TQVBoxLayout( grp->tqlayout() );
lay1->addWidget(m_prev3);
- connect( m_prev3, SIGNAL( choosearea(QMouseEvent * ) ),
- this, SLOT( slotPressEvent(QMouseEvent *) ) );
+ connect( m_prev3, TQT_SIGNAL( choosearea(TQMouseEvent * ) ),
+ this, TQT_SLOT( slotPressEvent(TQMouseEvent *) ) );
// update the bordet preview widget
m_prev3->setLeftBorder( m_leftBorder );
@@ -1321,17 +1321,17 @@ void KWFrameDia::initBorderSettings()
#define OFFSETX 15
#define OFFSETY 7
#define Ko_SPACE 30
-void KWFrameDia::slotPressEvent(QMouseEvent *ev)
+void KWFrameDia::slotPressEvent(TQMouseEvent *ev)
{
- QRect r = m_prev3->contentsRect();
- QRect rect(r.x()+OFFSETX,r.y()+OFFSETY,r.width()-OFFSETX,r.y()+OFFSETY+Ko_SPACE);
- if(rect.contains(QPoint(ev->x(),ev->y())))
+ TQRect r = m_prev3->contentsRect();
+ TQRect rect(r.x()+OFFSETX,r.y()+OFFSETY,r.width()-OFFSETX,r.y()+OFFSETY+Ko_SPACE);
+ if(rect.tqcontains(TQPoint(ev->x(),ev->y())))
{
if( ( ((int)m_topBorder.penWidth() != m_cWidth->currentText().toInt()) ||(m_topBorder.color != m_bColor->color() )
||(m_topBorder.getStyle()!=KoBorder::getStyle(m_cStyle->currentText()) )) && m_bTop->isOn() )
{
m_topBorder.setPenWidth( m_cWidth->currentText().toInt() );
- m_topBorder.color = QColor( m_bColor->color() );
+ m_topBorder.color = TQColor( m_bColor->color() );
m_topBorder.setStyle(KoBorder::getStyle(m_cStyle->currentText()));
m_prev3->setTopBorder( m_topBorder );
}
@@ -1339,13 +1339,13 @@ void KWFrameDia::slotPressEvent(QMouseEvent *ev)
m_bTop->setOn(!m_bTop->isOn());
}
rect.setCoords(r.x()+OFFSETX,r.height()-OFFSETY-Ko_SPACE,r.width()-OFFSETX,r.height()-OFFSETY);
- if(rect.contains(QPoint(ev->x(),ev->y())))
+ if(rect.tqcontains(TQPoint(ev->x(),ev->y())))
{
if( ( ((int)m_bottomBorder.penWidth() != m_cWidth->currentText().toInt()) ||(m_bottomBorder.color != m_bColor->color() )
||(m_bottomBorder.getStyle()!=KoBorder::getStyle(m_cStyle->currentText()) )) && m_bBottom->isOn() )
{
m_bottomBorder.setPenWidth(m_cWidth->currentText().toInt());
- m_bottomBorder.color = QColor( m_bColor->color() );
+ m_bottomBorder.color = TQColor( m_bColor->color() );
m_bottomBorder.setStyle(KoBorder::getStyle(m_cStyle->currentText()));
m_prev3->setBottomBorder( m_bottomBorder );
}
@@ -1354,14 +1354,14 @@ void KWFrameDia::slotPressEvent(QMouseEvent *ev)
}
rect.setCoords(r.x()+OFFSETX,r.y()+OFFSETY,r.x()+Ko_SPACE+OFFSETX,r.height()-OFFSETY);
- if(rect.contains(QPoint(ev->x(),ev->y())))
+ if(rect.tqcontains(TQPoint(ev->x(),ev->y())))
{
if( ( ((int)m_leftBorder.penWidth() != m_cWidth->currentText().toInt()) ||(m_leftBorder.color != m_bColor->color() )
||(m_leftBorder.getStyle()!=KoBorder::getStyle(m_cStyle->currentText()) )) && m_bLeft->isOn() )
{
m_leftBorder.setPenWidth( m_cWidth->currentText().toInt());
- m_leftBorder.color = QColor( m_bColor->color() );
+ m_leftBorder.color = TQColor( m_bColor->color() );
m_leftBorder.setStyle(KoBorder::getStyle(m_cStyle->currentText()));
m_prev3->setLeftBorder( m_leftBorder );
}
@@ -1369,7 +1369,7 @@ void KWFrameDia::slotPressEvent(QMouseEvent *ev)
m_bLeft->setOn(!m_bLeft->isOn());
}
rect.setCoords(r.width()-OFFSETX-Ko_SPACE,r.y()+OFFSETY,r.width()-OFFSETX,r.height()-OFFSETY);
- if(rect.contains(QPoint(ev->x(),ev->y())))
+ if(rect.tqcontains(TQPoint(ev->x(),ev->y())))
{
if( ( ((int)m_rightBorder.penWidth() != m_cWidth->currentText().toInt()) ||(m_rightBorder.color != m_bColor->color() )
@@ -1446,7 +1446,7 @@ void KWFrameDia::slotProtectContentChanged( bool b )
void KWFrameDia::slotUpdateWidthForHeight(double height)
{
- if ( !m_cbAspectRatio || m_cbAspectRatio->state() != QButton::NoChange)
+ if ( !m_cbAspectRatio || m_cbAspectRatio->state() != TQButton::NoChange)
return;
if ( m_heightByWidthRatio == 0 )
return; // avoid DBZ
@@ -1456,7 +1456,7 @@ void KWFrameDia::slotUpdateWidthForHeight(double height)
void KWFrameDia::slotUpdateHeightForWidth( double width )
{
- if ( !m_cbAspectRatio || m_cbAspectRatio->state() != QButton::NoChange)
+ if ( !m_cbAspectRatio || m_cbAspectRatio->state() != TQButton::NoChange)
return;
m_sh->setValue( width * m_heightByWidthRatio );
}
@@ -1553,15 +1553,15 @@ void KWFrameDia::initBrush()
}
#endif
- QColor col = KWDocument::resolveBgColor( m_newBrushStyle.color(), 0 );
+ TQColor col = KWDocument::resolveBgColor( m_newBrushStyle.color(), 0 );
m_brushColor->setColor( col );
}
-QBrush KWFrameDia::frameBrushStyle() const
+TQBrush KWFrameDia::frameBrushStyle() const
{
- QBrush brush;
+ TQBrush brush;
- brush.setStyle( m_transparentCB->isChecked() ? NoBrush : SolidPattern );
+ brush.setStyle( m_transparentCB->isChecked() ? Qt::NoBrush : Qt::SolidPattern );
#if 0
switch ( brushStyle->currentItem() )
@@ -1627,7 +1627,7 @@ void KWFrameDia::updateBrushPreview()
} else {
brushPreview->show();
brushPreview->setBrush(frameBrushStyle());
- brushPreview->repaint(true);
+ brushPreview->tqrepaint(true);
}
}
#endif
@@ -1675,13 +1675,13 @@ void KWFrameDia::setFrameBehaviorInputOff() {
void KWFrameDia::enableSizeAndPosition()
{
- bool canMove = ( m_floating->state() == QButton::Off ) // can move if no frame is floating
- && ( m_protectSize->state() == QButton::Off ) // protects size too
+ bool canMove = ( m_floating->state() == TQButton::Off ) // can move if no frame is floating
+ && ( m_protectSize->state() == TQButton::Off ) // protects size too
&& !m_defaultFrameSetIncluded // those can't be moved
&& m_frame; // can't move if multiple frames selected
m_sx->setEnabled( canMove );
m_sy->setEnabled( canMove );
- bool canResize = ( m_protectSize->state() == QButton::Off ) // can resize if no frame is protect-size'd
+ bool canResize = ( m_protectSize->state() == TQButton::Off ) // can resize if no frame is protect-size'd
&& !m_defaultFrameSetIncluded; // those can't be resized
m_sw->setEnabled( canResize );
m_sh->setEnabled( canResize );
@@ -1770,7 +1770,7 @@ bool KWFrameDia::applyChanges()
frameCopy = m_frame->getCopy(); // keep a copy of the original (for undo/redo)
isNewFrame = m_frame->frameSet() == 0L; // true if we are creating a newframe
}
- QString name=QString::null;
+ TQString name=TQString();
KMacroCommand * macroCmd=0L;
if ( m_tab3 ) { // TAB Frameset
@@ -1784,9 +1784,9 @@ bool KWFrameDia::applyChanges()
if ( name.isEmpty() ) // Don't allow empty names
name = m_doc->generateFramesetName( i18n( "Text Frameset %1" ) );
KWFrameSet *fs = 0L;
- QListViewItem *frameSetItem = m_lFrameSList->selectedItem();
+ TQListViewItem *frameSetItem = m_lFrameSList->selectedItem();
if(frameSetItem) {
- QString str = frameSetItem->text( 0 );
+ TQString str = frameSetItem->text( 0 );
fs = m_doc->frameSet(str.toInt() - 1);
}
if(m_rNewFrameset->isChecked()) { // create a new FS.
@@ -1809,7 +1809,7 @@ bool KWFrameDia::applyChanges()
if(!macroCmd)
macroCmd = new KMacroCommand( i18n("Rename Frameset") );
// Rename frameset
- typedef KoSetPropCommand<QString, KWFrameSet, &KWFrameSet::setName> FramesetNameCommand;
+ typedef KoSetPropCommand<TQString, KWFrameSet, &KWFrameSet::setName> FramesetNameCommand;
FramesetNameCommand* cmd = new FramesetNameCommand( fs, i18n( "Rename Frameset" ), fs->name(), frameSetItem->text( 1 ) );
macroCmd->addCommand(cmd);
cmd->execute();
@@ -1849,7 +1849,7 @@ bool KWFrameDia::applyChanges()
}
if(m_rNewFrameset->isChecked() || m_rExistingFrameset->isChecked()) {
// check if new name is unique
- for (QPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator(); fit.current() ; ++fit ) {
+ for (TQPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator(); fit.current() ; ++fit ) {
if ( !fit.current()->isDeleted() && // Allow to reuse a deleted frameset's name
fs != fit.current() && fit.current()->name() == name) {
if ( m_rNewFrameset->isChecked() )
@@ -1857,11 +1857,11 @@ bool KWFrameDia::applyChanges()
i18n( "A new frameset with the name '%1' "
"can not be made because a frameset with that name "
"already exists. Please enter another name or select "
- "an existing frameset from the list.").arg(name));
+ "an existing frameset from the list.").tqarg(name));
else
KMessageBox::sorry( this,
i18n( "A frameset with the name '%1' "
- "already exists. Please enter another name." ).arg(name) );
+ "already exists. Please enter another name." ).tqarg(name) );
m_eFrameSetName->setText(m_oldFrameSetName);
return false;
}
@@ -1872,7 +1872,7 @@ bool KWFrameDia::applyChanges()
// Copy
if(m_frame)
m_frame->setCopy( m_cbCopy->isChecked() );
- else if(m_cbCopy->state() != QButton::NoChange) {
+ else if(m_cbCopy->state() != TQButton::NoChange) {
for(KWFrame *f=m_allFrames.first();f; f=m_allFrames.next()) {
if(f == f->frameSet()->frame(0)) continue; // skip first frame of any frameset.
f->setCopy( m_cbCopy->isChecked() );
@@ -1919,7 +1919,7 @@ bool KWFrameDia::applyChanges()
}
else
{
- if ( m_cbProtectContent->state() != QButton::NoChange)
+ if ( m_cbProtectContent->state() != TQButton::NoChange)
{
for(KWFrame *f=m_allFrames.first();f; f=m_allFrames.next())
{
@@ -1975,13 +1975,13 @@ bool KWFrameDia::applyChanges()
{
if(!macroCmd)
macroCmd = new KMacroCommand( i18n("Frame Properties") );
- FramesetSetKeepAspectRatioCommand* cmd = new FramesetSetKeepAspectRatioCommand( frm, QString::null, frm->keepAspectRatio(), m_cbAspectRatio->isChecked() );
+ FramesetSetKeepAspectRatioCommand* cmd = new FramesetSetKeepAspectRatioCommand( frm, TQString(), frm->keepAspectRatio(), m_cbAspectRatio->isChecked() );
cmd->execute();
macroCmd->addCommand(cmd);
}
- } else if(m_cbAspectRatio->state() != QButton::NoChange) {
+ } else if(m_cbAspectRatio->state() != TQButton::NoChange) {
for(KWFrame *f=m_allFrames.first();f; f=m_allFrames.next()) {
KWPictureFrameSet *fs = dynamic_cast<KWPictureFrameSet *> (f->frameSet());
if(fs) {
@@ -1989,7 +1989,7 @@ bool KWFrameDia::applyChanges()
{
if(!macroCmd)
macroCmd = new KMacroCommand( i18n("Frame Properties") );
- FramesetSetKeepAspectRatioCommand* cmd = new FramesetSetKeepAspectRatioCommand( fs, QString::null, fs->keepAspectRatio(), m_cbAspectRatio->isChecked() );
+ FramesetSetKeepAspectRatioCommand* cmd = new FramesetSetKeepAspectRatioCommand( fs, TQString(), fs->keepAspectRatio(), m_cbAspectRatio->isChecked() );
cmd->execute();
@@ -2051,7 +2051,7 @@ bool KWFrameDia::applyChanges()
f->setRunAroundGap( runAroundLeft, runAroundRight, runAroundTop, runAroundBottom );
}
if(m_tab5) { // Tab Background fill/color
- QBrush tmpBrush=frameBrushStyle();
+ TQBrush tmpBrush=frameBrushStyle();
if(m_frame) {
if ( tmpBrush != KWDocument::resolveBgBrush( m_frame->backgroundColor() ) ) {
m_frame->setBackgroundColor(tmpBrush);
@@ -2073,12 +2073,12 @@ bool KWFrameDia::applyChanges()
double uRight = 0.0;
if(m_tab4) { // TAB Geometry
if ( m_frame ) {
- px = QMAX( 0, m_sx->value() );
+ px = TQMAX( 0, m_sx->value() );
int pageNum = m_doc->pageManager()->pageNumber(m_frame);
- py = QMAX( 0, m_sy->value() ) + m_doc->pageManager()->topOfPage(pageNum);
+ py = TQMAX( 0, m_sy->value() ) + m_doc->pageManager()->topOfPage(pageNum);
}
- pw = QMAX( m_sw->value(), 0 );
- ph = QMAX( m_sh->value(), 0 );
+ pw = TQMAX( m_sw->value(), 0 );
+ ph = TQMAX( m_sh->value(), 0 );
if ( m_paddingConfigWidget )
{
uLeft = m_paddingConfigWidget->leftValue();
@@ -2099,7 +2099,7 @@ bool KWFrameDia::applyChanges()
KWTextFrameSet *frameSet = new KWTextFrameSet( m_doc, name );
frameSet->addFrame( m_frame );
KWPage *page = m_doc->pageManager()->page(m_frame);
- if( page->rect().contains(rect) ) {
+ if( page->rect().tqcontains(rect) ) {
m_frame->setRect( px, py, pw, ph );
//don't change margins when frame is protected.
if ( m_paddingConfigWidget && ( !m_tab1 || (m_tab1 && m_cbProtectContent && !m_cbProtectContent->isChecked())) )
@@ -2129,7 +2129,7 @@ bool KWFrameDia::applyChanges()
if(!macroCmd)
macroCmd = new KMacroCommand( i18n("Frame Properties") );
- KWFramePropertiesCommand*cmd = new KWFramePropertiesCommand( QString::null, frameCopy, m_frame );
+ KWFramePropertiesCommand*cmd = new KWFramePropertiesCommand( TQString(), frameCopy, m_frame );
macroCmd->addCommand(cmd);
frameCopy = 0L;
} else
@@ -2142,51 +2142,51 @@ bool KWFrameDia::applyChanges()
while(f) {
// The floating attribute applies to the whole frameset...
KWFrameSet * fs = f->frameSet();
- KWFrameSet * parentFs = fs->groupmanager() ? fs->groupmanager() : fs;
+ KWFrameSet * tqparentFs = fs->groupmanager() ? fs->groupmanager() : fs;
// Floating
if ( m_floating->isChecked() &&
- m_floating->state() != QButton::NoChange &&
- !parentFs->isFloating() )
+ m_floating->state() != TQButton::NoChange &&
+ !tqparentFs->isFloating() )
{
if(!macroCmd)
macroCmd = new KMacroCommand( i18n("Make Frameset Inline") );
- QValueList<FrameIndex> frameindexList;
- QValueList<FrameMoveStruct> frameindexMove;
+ TQValueList<FrameIndex> frameindexList;
+ TQValueList<FrameMoveStruct> frameindexMove;
KoPoint oldPos = f->topLeft();
// turn non-floating frame into floating frame
- KWFrameSetInlineCommand *cmd = new KWFrameSetInlineCommand( QString::null, parentFs, true );
+ KWFrameSetInlineCommand *cmd = new KWFrameSetInlineCommand( TQString(), tqparentFs, true );
cmd->execute();
frameindexList.append( FrameIndex( f ) );
frameindexMove.append( FrameMoveStruct( oldPos, f->topLeft() ) );
- KWFrameMoveCommand *cmdMoveFrame = new KWFrameMoveCommand( QString::null, frameindexList, frameindexMove );
+ KWFrameMoveCommand *cmdMoveFrame = new KWFrameMoveCommand( TQString(), frameindexList, frameindexMove );
macroCmd->addCommand(cmdMoveFrame);
macroCmd->addCommand(cmd);
}
else if ( !m_floating->isChecked() &&
- m_floating->state() != QButton::NoChange &&
- parentFs->isFloating() )
+ m_floating->state() != TQButton::NoChange &&
+ tqparentFs->isFloating() )
{
if(!macroCmd)
macroCmd = new KMacroCommand( i18n("Make Frameset Non-Inline") );
// turn floating-frame into non-floating frame
- KWFrameSetInlineCommand *cmd = new KWFrameSetInlineCommand( QString::null, parentFs, false );
+ KWFrameSetInlineCommand *cmd = new KWFrameSetInlineCommand( TQString(), tqparentFs, false );
macroCmd->addCommand(cmd);
cmd->execute();
}
if ( fs->isProtectSize() != m_protectSize->isChecked()
- && m_protectSize->state() != QButton::NoChange )
+ && m_protectSize->state() != TQButton::NoChange )
{
if(!macroCmd)
macroCmd = new KMacroCommand( i18n("Protect Size") );
typedef KoSetBasicPropCommand<bool, KWFrameSet, &KWFrameSet::setProtectSize> FramesetSetProtectSizeCommand;
- FramesetSetProtectSizeCommand* cmd = new FramesetSetProtectSizeCommand( fs, QString::null, fs->isProtectSize(), m_protectSize->isChecked() );
+ FramesetSetProtectSizeCommand* cmd = new FramesetSetProtectSizeCommand( fs, TQString(), fs->isProtectSize(), m_protectSize->isChecked() );
macroCmd->addCommand(cmd);
cmd->execute();
m_frameSetProtectedSize = m_protectSize->isChecked();
@@ -2198,7 +2198,7 @@ bool KWFrameDia::applyChanges()
//kdDebug() << "New geom: " << m_sx->text().toDouble() << ", " << m_sy->text().toDouble()
// << " " << m_sw->text().toDouble() << "x" << m_sh->text().toDouble() << endl;
- if( m_doc->pageManager()->page(f)->rect().contains(rect) )
+ if( m_doc->pageManager()->page(f)->rect().tqcontains(rect) )
{
FrameIndex index( f );
KoRect initialRect = f->normalize();
@@ -2251,8 +2251,8 @@ bool KWFrameDia::applyChanges()
if ( f->leftBorder() != m_leftBorder )
{
kdDebug() << "Changing borders!" << endl;
- QPtrList<KWFrameBorderCommand::FrameBorderTypeStruct> tmpBorderList;
- QPtrList<FrameIndex> frameindexList;
+ TQPtrList<KWFrameBorderCommand::FrameBorderTypeStruct> tmpBorderList;
+ TQPtrList<FrameIndex> frameindexList;
f = KWFrameSet::settingsFrame( f );
FrameIndex *index = new FrameIndex( f );
KWFrameBorderCommand::FrameBorderTypeStruct *tmp =new KWFrameBorderCommand::FrameBorderTypeStruct;
@@ -2268,8 +2268,8 @@ bool KWFrameDia::applyChanges()
}
if ( f->rightBorder() != m_rightBorder )
{
- QPtrList<KWFrameBorderCommand::FrameBorderTypeStruct> tmpBorderList;
- QPtrList<FrameIndex> frameindexList;
+ TQPtrList<KWFrameBorderCommand::FrameBorderTypeStruct> tmpBorderList;
+ TQPtrList<FrameIndex> frameindexList;
f = KWFrameSet::settingsFrame( f );
FrameIndex *index = new FrameIndex( f );
KWFrameBorderCommand::FrameBorderTypeStruct *tmp =new KWFrameBorderCommand::FrameBorderTypeStruct;
@@ -2285,8 +2285,8 @@ bool KWFrameDia::applyChanges()
}
if ( f->topBorder() != m_topBorder )
{
- QPtrList<KWFrameBorderCommand::FrameBorderTypeStruct> tmpBorderList;
- QPtrList<FrameIndex> frameindexList;
+ TQPtrList<KWFrameBorderCommand::FrameBorderTypeStruct> tmpBorderList;
+ TQPtrList<FrameIndex> frameindexList;
f = KWFrameSet::settingsFrame( f );
FrameIndex *index = new FrameIndex( f );
KWFrameBorderCommand::FrameBorderTypeStruct *tmp =new KWFrameBorderCommand::FrameBorderTypeStruct;
@@ -2302,8 +2302,8 @@ bool KWFrameDia::applyChanges()
}
if ( f->bottomBorder() != m_bottomBorder )
{
- QPtrList<KWFrameBorderCommand::FrameBorderTypeStruct> tmpBorderList;
- QPtrList<FrameIndex> frameindexList;
+ TQPtrList<KWFrameBorderCommand::FrameBorderTypeStruct> tmpBorderList;
+ TQPtrList<FrameIndex> frameindexList;
f = KWFrameSet::settingsFrame( f );
FrameIndex *index = new FrameIndex( f );
KWFrameBorderCommand::FrameBorderTypeStruct *tmp =new KWFrameBorderCommand::FrameBorderTypeStruct;
@@ -2330,8 +2330,8 @@ bool KWFrameDia::applyChanges()
void KWFrameDia::updateFrames()
{
m_doc->updateAllFrames();
- m_doc->layout();
- m_doc->repaintAllViews();
+ m_doc->tqlayout();
+ m_doc->tqrepaintAllViews();
}
void KWFrameDia::slotApply()
@@ -2351,7 +2351,7 @@ void KWFrameDia::slotOk()
}
}
-void KWFrameDia::connectListSelected( QListViewItem *item )
+void KWFrameDia::connectListSelected( TQListViewItem *item )
{
/* belongs to TAB3, is activated when the user selects another frameset from the list */
if ( !item )
@@ -2374,7 +2374,7 @@ bool KWFrameDia::mayDeleteFrameSet(KWTextFrameSet *fs) {
i18n( "You are about to reconnect the last frame of the "
"frameset '%1'. "
"The contents of this frameset will be deleted.\n"
- "Are you sure you want to do that?").arg(fs->name()),
+ "Are you sure you want to do that?").tqarg(fs->name()),
i18n("Reconnect Frame"), i18n("&Reconnect"));
if (result != KMessageBox::Continue)
return false;
@@ -2382,61 +2382,61 @@ bool KWFrameDia::mayDeleteFrameSet(KWTextFrameSet *fs) {
return true;
}
-KWFourSideConfigWidget::KWFourSideConfigWidget( KWDocument* doc, const QString& title,
- QWidget* parent, const char* name )
- : QGroupBox( title, parent, name ),
+KWFourSideConfigWidget::KWFourSideConfigWidget( KWDocument* doc, const TQString& title,
+ TQWidget* tqparent, const char* name )
+ : TQGroupBox( title, tqparent, name ),
m_doc( doc ),
m_changed( false ), m_noSignal( false )
{
- QGroupBox *grp2 = this;
- QGridLayout* mGrid = new QGridLayout( grp2, 4, 4, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGroupBox *grp2 = this;
+ TQGridLayout* mGrid = new TQGridLayout( grp2, 4, 4, KDialog::marginHint(), KDialog::spacingHint() );
- m_synchronize=new QCheckBox( i18n("Synchronize changes"), grp2 );
- QWhatsThis::add(m_synchronize, i18n("<b>Synchronize changes:</b><br/>"
+ m_synchronize=new TQCheckBox( i18n("Synchronize changes"), grp2 );
+ TQWhatsThis::add(m_synchronize, i18n("<b>Synchronize changes:</b><br/>"
"When this is checked any change in margins will be used for all directions."));
mGrid->addMultiCellWidget( m_synchronize, 1, 1, 0, 1 );
- QLabel* lml = new QLabel( i18n( "Left:" ), grp2 );
- //lml->resize( lml->sizeHint() );
+ TQLabel* lml = new TQLabel( i18n( "Left:" ), grp2 );
+ //lml->resize( lml->tqsizeHint() );
mGrid->addWidget( lml, 2, 0 );
m_inputLeft = new KoUnitDoubleSpinBox( grp2, 0, 9999, 1, 0.0, m_doc->unit() );
mGrid->addWidget( m_inputLeft, 2, 1 );
- QLabel* lmt = new QLabel( i18n( "Top:" ), grp2 );
- //lmt->resize( lmt->sizeHint() );
+ TQLabel* lmt = new TQLabel( i18n( "Top:" ), grp2 );
+ //lmt->resize( lmt->tqsizeHint() );
mGrid->addWidget( lmt, 2, 2 );
m_inputTop = new KoUnitDoubleSpinBox( grp2, 0, 9999, 1, 0.0, m_doc->unit() );
- //m_inputTop->resize( m_inputTop->sizeHint() );
+ //m_inputTop->resize( m_inputTop->tqsizeHint() );
mGrid->addWidget( m_inputTop, 2, 3 );
- QLabel* lmr = new QLabel( i18n( "Right:" ), grp2 );
- //lmr->resize( lmr->sizeHint() );
+ TQLabel* lmr = new TQLabel( i18n( "Right:" ), grp2 );
+ //lmr->resize( lmr->tqsizeHint() );
mGrid->addWidget( lmr, 3, 0 );
m_inputRight = new KoUnitDoubleSpinBox( grp2, 0, 9999, 1, 0.0, m_doc->unit() );
- //m_inputRight->resize( m_inputRight->sizeHint() );
+ //m_inputRight->resize( m_inputRight->tqsizeHint() );
mGrid->addWidget( m_inputRight, 3, 1 );
- QLabel* lmb = new QLabel( i18n( "Bottom:" ), grp2 );
- //lmb->resize( lmb->sizeHint() );
+ TQLabel* lmb = new TQLabel( i18n( "Bottom:" ), grp2 );
+ //lmb->resize( lmb->tqsizeHint() );
mGrid->addWidget( lmb, 3, 2 );
m_inputBottom = new KoUnitDoubleSpinBox( grp2, 0, 9999, 1, 0.0, m_doc->unit() );
- //m_inputBottom->resize( m_inputBottom->sizeHint() );
+ //m_inputBottom->resize( m_inputBottom->tqsizeHint() );
mGrid->addWidget( m_inputBottom, 3, 3 );
mGrid->setRowSpacing( 0, KDialog::spacingHint() + 5 );
- connect( m_inputLeft, SIGNAL( valueChanged(double)), this, SLOT( slotValueChanged( double )));
- connect( m_inputRight, SIGNAL( valueChanged(double)), this, SLOT( slotValueChanged( double )));
- connect( m_inputTop, SIGNAL( valueChanged(double)), this, SLOT( slotValueChanged( double )));
- connect( m_inputBottom, SIGNAL( valueChanged(double)), this, SLOT( slotValueChanged( double )));
+ connect( m_inputLeft, TQT_SIGNAL( valueChanged(double)), this, TQT_SLOT( slotValueChanged( double )));
+ connect( m_inputRight, TQT_SIGNAL( valueChanged(double)), this, TQT_SLOT( slotValueChanged( double )));
+ connect( m_inputTop, TQT_SIGNAL( valueChanged(double)), this, TQT_SLOT( slotValueChanged( double )));
+ connect( m_inputBottom, TQT_SIGNAL( valueChanged(double)), this, TQT_SLOT( slotValueChanged( double )));
}
// Called right after the ctor, so m_synchronize can't be checked
diff --git a/kword/KWFrameDia.h b/kword/KWFrameDia.h
index a1e4886d..554960be 100644
--- a/kword/KWFrameDia.h
+++ b/kword/KWFrameDia.h
@@ -26,50 +26,52 @@
#include <kdialogbase.h>
#include <KoUnit.h>
#include <KoUnitWidgets.h>
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
class KoBorderPreview;
class KWFrame;
class KWDocument;
class KWPage;
-class QWidget;
-class QGridLayout;
-class QGroupBox;
-class QRadioButton;
-class QCheckBox;
-class QLabel;
-class QCloseEvent;
-class QListView;
-class QListViewItem;
-class QLineEdit;
+class TQWidget;
+class TQGridLayout;
+class TQGroupBox;
+class TQRadioButton;
+class TQCheckBox;
+class TQLabel;
+class TQCloseEvent;
+class TQListView;
+class TQListViewItem;
+class TQLineEdit;
class KColorButton;
class KDoubleNumInput;
/******************************************************************/
/* Class: KWBrushStylePreview */
/******************************************************************/
-class KWBrushStylePreview : public QFrame
+class KWBrushStylePreview : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWBrushStylePreview( QWidget* );
+ KWBrushStylePreview( TQWidget* );
~KWBrushStylePreview() {}
- void setBrush( const QBrush& _brush ) { brush = _brush; }
+ void setBrush( const TQBrush& _brush ) { brush = _brush; }
protected:
- void drawContents( QPainter* );
+ void drawContents( TQPainter* );
private:
- QBrush brush;
+ TQBrush brush;
};
/**
* A widget showing unitwidgets for 4 doubles (for left/right/top/bottom values)
* and a checkbox to synchronize changes to all values
*/
-class KWFourSideConfigWidget : public QGroupBox
+class KWFourSideConfigWidget : public TQGroupBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWFourSideConfigWidget( KWDocument* m_doc, const QString& title, QWidget*, const char* name = 0 );
+ KWFourSideConfigWidget( KWDocument* m_doc, const TQString& title, TQWidget*, const char* name = 0 );
bool changed() const { return m_changed; }
@@ -86,7 +88,7 @@ public slots:
private:
KoUnitDoubleSpinBox *m_inputLeft, *m_inputRight, *m_inputTop, *m_inputBottom;
- QCheckBox *m_synchronize;
+ TQCheckBox *m_synchronize;
KWDocument *m_doc;
bool m_changed;
bool m_noSignal;
@@ -98,12 +100,13 @@ private:
class KWFrameDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Contructor when the dialog is used on creation of m_frame */
- KWFrameDia( QWidget *parent, KWFrame *_frame,KWDocument *_doc,FrameSetType _ft);
- KWFrameDia( QWidget *parent, KWFrame *_frame);
- KWFrameDia( QWidget *parent, QPtrList<KWFrame> allFrames);
- //KWFrameDia( QWidget *parent, KWCanvas *_canvas);
+ KWFrameDia( TQWidget *tqparent, KWFrame *_frame,KWDocument *_doc,FrameSetType _ft);
+ KWFrameDia( TQWidget *tqparent, KWFrame *_frame);
+ KWFrameDia( TQWidget *tqparent, TQPtrList<KWFrame> allFrames);
+ //KWFrameDia( TQWidget *tqparent, KWCanvas *_canvas);
//void setCanvas(KWCanvas *_canvas) {canvas =_canvas;}
@@ -125,18 +128,18 @@ protected:
bool mayDeleteFrameSet(KWTextFrameSet *fs);
void enableSizeAndPosition();
- QBrush frameBrushStyle() const;
+ TQBrush frameBrushStyle() const;
void calcRatio();
protected slots:
virtual void slotApply();
virtual void slotOk();
- void connectListSelected( QListViewItem * );
+ void connectListSelected( TQListViewItem * );
void setFrameBehaviorInputOn();
void setFrameBehaviorInputOff();
void slotFloatingToggled(bool);
void slotProtectSizeToggled(bool);
- void textNameFrameChanged ( const QString & );
+ void textNameFrameChanged ( const TQString & );
//void updateBrushPreview();
void slotProtectContentChanged( bool );
void enableRunAround();
@@ -150,62 +153,62 @@ protected slots:
void brdRightToggled( bool );
void brdTopToggled( bool );
void brdBottomToggled( bool );
- void slotPressEvent(QMouseEvent *_ev);
+ void slotPressEvent(TQMouseEvent *_ev);
private:
// TAB 1:
- QWidget *m_tab1;
- QGridLayout *m_grid1, *m_eofGrid, *m_onpGrid, *m_sideGrid;
- QGroupBox *m_endOfFrame, *m_onNewPage, *m_sideHeads;
- QCheckBox *m_cbCopy, *m_cbAspectRatio, *m_cbAllFrames;
- QCheckBox *m_cbProtectContent;
- QRadioButton *m_rResizeFrame, *m_rAppendFrame, *m_rNoShow, *m_reconnect, *m_noFollowup, *m_copyRadio;
- QLabel *sideTitle1, *sideTitle2;
- QLineEdit *m_sideWidth, *m_sideGap;
- QComboBox *m_sideAlign;
+ TQWidget *m_tab1;
+ TQGridLayout *m_grid1, *m_eofGrid, *m_onpGrid, *m_sideGrid;
+ TQGroupBox *m_endOfFrame, *m_onNewPage, *m_sideHeads;
+ TQCheckBox *m_cbCopy, *m_cbAspectRatio, *m_cbAllFrames;
+ TQCheckBox *m_cbProtectContent;
+ TQRadioButton *m_rResizeFrame, *m_rAppendFrame, *m_rNoShow, *m_reconnect, *m_noFollowup, *m_copyRadio;
+ TQLabel *sideTitle1, *sideTitle2;
+ TQLineEdit *m_sideWidth, *m_sideGap;
+ TQComboBox *m_sideAlign;
// TAB 2:
- QWidget *m_tab2;
- QRadioButton *m_rRunNo, *m_rRunBounding, *m_rRunSkip;
- QRadioButton *m_rRunLeft, *m_rRunRight, *m_rRunBiggest;
- QGroupBox *m_runGroup, *m_runSideGroup;
+ TQWidget *m_tab2;
+ TQRadioButton *m_rRunNo, *m_rRunBounding, *m_rRunSkip;
+ TQRadioButton *m_rRunLeft, *m_rRunRight, *m_rRunBiggest;
+ TQGroupBox *m_runGroup, *m_runSideGroup;
KWFourSideConfigWidget* m_raDistConfigWidget;
// TAB 3:
- QWidget *m_tab3;
- QLineEdit *m_eFrameSetName;
- QListView *m_lFrameSList;
- QRadioButton *m_rExistingFrameset, *m_rNewFrameset;
+ TQWidget *m_tab3;
+ TQLineEdit *m_eFrameSetName;
+ TQListView *m_lFrameSList;
+ TQRadioButton *m_rExistingFrameset, *m_rNewFrameset;
// TAB 4:
- QWidget *m_tab4;
- QGroupBox *m_grp1;
- QLabel *m_lx, *m_ly, *m_lw, *m_lh;
+ TQWidget *m_tab4;
+ TQGroupBox *m_grp1;
+ TQLabel *m_lx, *m_ly, *m_lw, *m_lh;
KoUnitDoubleSpinBox *m_sx, *m_sy, *m_sw, *m_sh;
KWFourSideConfigWidget* m_paddingConfigWidget;
- QCheckBox *m_floating;
- QCheckBox *m_protectSize;
+ TQCheckBox *m_floating;
+ TQCheckBox *m_protectSize;
// TAB 5:
- QWidget *m_tab5;
+ TQWidget *m_tab5;
// TAB 6:
- QWidget *m_tab6;
- QComboBox *m_cWidth, *m_cStyle;
- QPushButton *m_bLeft, *m_bRight, *m_bTop, *m_bBottom;
+ TQWidget *m_tab6;
+ TQComboBox *m_cWidth, *m_cStyle;
+ TQPushButton *m_bLeft, *m_bRight, *m_bTop, *m_bBottom;
KColorButton *m_bColor;
KoBorder m_leftBorder, m_rightBorder, m_topBorder, m_bottomBorder;
KoBorderPreview *m_prev3;
- //QComboBox *brushStyle;
- QCheckBox* m_transparentCB;
+ //TQComboBox *brushStyle;
+ TQCheckBox* m_transparentCB;
KColorButton *m_brushColor;
//KWBrushStylePreview *brushPreview;
- QCheckBox *m_overwriteColor;
+ TQCheckBox *m_overwriteColor;
KWFrame *m_frame;
KWFrame *m_mainFrame;
- QPtrList<KWFrame> m_allFrames;
+ TQPtrList<KWFrame> m_allFrames;
KWDocument *m_doc;
FrameSetType m_frameType;
bool m_frameSetFloating;
@@ -216,8 +219,8 @@ private:
double m_heightByWidthRatio;
int /*FrameBehavior*/ m_frameBehavior;
KoUnit::Unit m_frameUnits;
- QString m_oldFrameSetName;
- QBrush m_newBrushStyle;
+ TQString m_oldFrameSetName;
+ TQBrush m_newBrushStyle;
bool m_noSignal;
};
diff --git a/kword/KWFrameLayout.cpp b/kword/KWFrameLayout.cpp
index 93c67e44..5c0fee78 100644
--- a/kword/KWFrameLayout.cpp
+++ b/kword/KWFrameLayout.cpp
@@ -22,7 +22,7 @@
#include "KWPage.h"
#include "KWTextFrameSet.h"
#include "KWDocument.h"
-#include <qtimer.h>
+#include <tqtimer.h>
// #define DEBUG_FRAMELAYOUT
@@ -38,7 +38,7 @@ KWFrameLayout::HeaderFooterFrameset::HeaderFooterFrameset( KWTextFrameSet* fs, i
if ( fs->frameCount() > 0 )
m_height = fs->frame(0)->height();
else
- m_height = 20; // whatever. The text layout will resize it.
+ m_height = 20; // whatever. The text tqlayout will resize it.
Q_ASSERT( m_height > 0 );
}
@@ -48,7 +48,7 @@ void KWFrameLayout::HeaderFooterFrameset::debug()
#ifdef DEBUG_FRAMELAYOUT
HeaderFooterFrameset* hff = this;
kdDebug(32002) << " * " << hff->m_frameset->name()
- << " pages:" << hff->m_startAtPage << "-" << (hff->m_endAtPage==-1?QString("(all)"):QString::number(hff->m_endAtPage))
+ << " pages:" << hff->m_startAtPage << "-" << (hff->m_endAtPage==-1?TQString("(all)"):TQString::number(hff->m_endAtPage))
<< " page-selection:" << (hff->m_oddEvenAll==HeaderFooterFrameset::Odd ? "Odd" :
hff->m_oddEvenAll==HeaderFooterFrameset::Even ? "Even" : "All")
<< " frames:" << hff->m_frameset->frameCount()
@@ -89,7 +89,7 @@ int KWFrameLayout::HeaderFooterFrameset::lastFrameNumber( int lastPage ) const {
return -1; // we need none
int pg = lastPage;
if ( m_endAtPage > -1 )
- pg = QMIN( m_endAtPage, pg );
+ pg = TQMIN( m_endAtPage, pg );
pg -= m_startAtPage; // always >=0
Q_ASSERT( pg >= 0 );
switch (m_oddEvenAll) {
@@ -129,21 +129,21 @@ int KWFrameLayout::HeaderFooterFrameset::frameNumberForPage( int page ) const
/////
-void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns,
+void KWFrameLayout::tqlayout( KWFrameSet* mainTextFrameSet, int numColumns,
int fromPage, int toPage, uint flags )
{
- //kdDebug(32002) << "KWFrameLayout::layout " << kdBacktrace() << endl;
+ //kdDebug(32002) << "KWFrameLayout::tqlayout " << kdBacktrace() << endl;
// Just debug stuff
#ifdef DEBUG_FRAMELAYOUT
- kdDebug(32002) << "KWFrameLayout::layout " << fromPage << " to " << toPage << endl;
+ kdDebug(32002) << "KWFrameLayout::tqlayout " << fromPage << " to " << toPage << endl;
Q_ASSERT( toPage >= fromPage );
- QPtrListIterator<HeaderFooterFrameset> itdbg( m_headersFooters );
+ TQPtrListIterator<HeaderFooterFrameset> itdbg( m_headersFooters );
for ( ; itdbg.current() ; ++itdbg )
itdbg.current()->debug();
- QPtrListIterator<HeaderFooterFrameset> itdbg2( m_footnotes );
+ TQPtrListIterator<HeaderFooterFrameset> itdbg2( m_footnotes );
for ( ; itdbg2.current() ; ++itdbg2 )
itdbg2.current()->debug();
- QPtrListIterator<HeaderFooterFrameset> itdbg3( m_endnotes );
+ TQPtrListIterator<HeaderFooterFrameset> itdbg3( m_endnotes );
for ( ; itdbg3.current() ; ++itdbg3 )
itdbg3.current()->debug();
#endif
@@ -157,13 +157,13 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns,
KoTextParag * lastParag = static_cast<KWTextFrameSet *>(mainTextFrameSet)->textDocument()->lastParag();
if ( lastParag->isValid() )
{
- QRect rect = lastParag->rect();
+ TQRect rect = lastParag->rect();
int bottom = rect.top() + rect.height() + 2; // cf kwtextframeset
#ifdef DEBUG_FRAMELAYOUT
kdDebug(32002) << "bottom LU=" << bottom << endl;
#endif
- if ( static_cast<KWTextFrameSet *>(mainTextFrameSet)->internalToDocument( QPoint(rect.left(), bottom), textBottomPoint ) )
+ if ( static_cast<KWTextFrameSet *>(mainTextFrameSet)->internalToDocument( TQPoint(rect.left(), bottom), textBottomPoint ) )
textBottom = textBottomPoint.y();
}
}
@@ -194,7 +194,7 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns,
#endif
// For each header/footer....
- for ( QPtrListIterator<HeaderFooterFrameset> it( m_headersFooters ); it.current() ; ++it )
+ for ( TQPtrListIterator<HeaderFooterFrameset> it( m_headersFooters ); it.current() ; ++it )
{
int frameNum = it.current()->frameNumberForPage( pageNum );
if ( frameNum != -1 )
@@ -241,7 +241,7 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns,
//// Then we'll reduce this height after every footnote being positionned, so it's always
//// the "height on top of us".
double totalFootNotesHeight = 0;
- for ( QPtrListIterator<HeaderFooterFrameset> it( m_footnotes ); it.current() ; ++it )
+ for ( TQPtrListIterator<HeaderFooterFrameset> it( m_footnotes ); it.current() ; ++it )
{
int frameNum = it.current()->frameNumberForPage( pageNum );
if ( frameNum != -1 )
@@ -249,7 +249,7 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns,
}
// For each footnote (caller sorted them from bottom to top)
- for ( QPtrListIterator<HeaderFooterFrameset> it( m_footnotes ); it.current() ; ++it )
+ for ( TQPtrListIterator<HeaderFooterFrameset> it( m_footnotes ); it.current() ; ++it )
{
int frameNum = it.current()->frameNumberForPage( pageNum );
if ( frameNum != -1 )
@@ -263,7 +263,7 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns,
KoRect rect;
// When two footnotes are in the same page there should be 0 spacing between them
- // Yeah, write a generic frame layouter and then realize it's not flexible enough :(
+ // Yeah, write a generic frame tqlayouter and then realize it's not flexible enough :(
if ( fs->isFootEndNote() && !firstFootNote )
{
// Undo "bottom -= spacing" (done below). This assumes equal spacing for all footnotes
@@ -342,7 +342,7 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns,
kdDebug(32002) << " Endnotes: textBottom=" << textBottom << "pt, endNoteTop=" << endNoteTop << "pt, bottom=" << bottom << "pt" << endl;
#endif
bool firstEndNote = true;
- for ( QPtrListIterator<HeaderFooterFrameset> it( m_endnotes ); it.current() ; ++it )
+ for ( TQPtrListIterator<HeaderFooterFrameset> it( m_endnotes ); it.current() ; ++it )
{
if ( ! it.current()->m_positioned )
{
@@ -440,11 +440,11 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns,
const int lastPage = m_doc->lastPage();
// Final cleanup: delete all frames after lastFrameNumber in each frameset
- QPtrListIterator<HeaderFooterFrameset> it( m_headersFooters );
+ TQPtrListIterator<HeaderFooterFrameset> it( m_headersFooters );
for ( ; it.current() ; ++it )
if ( it.current()->deleteFramesAfterLast( lastPage ) )
m_framesetsToUpdate.insert( it.current()->m_frameset, true );
- QPtrListIterator<HeaderFooterFrameset> it2( m_footnotes );
+ TQPtrListIterator<HeaderFooterFrameset> it2( m_footnotes );
for ( ; it2.current() ; ++it2 )
if ( it2.current()->deleteFramesAfterLast( lastPage ) )
m_framesetsToUpdate.insert( it2.current()->m_frameset, true );
@@ -478,7 +478,7 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns,
}
}
- QMap<KWFrameSet*, bool>::iterator fsit = m_framesetsToUpdate.begin();
+ TQMap<KWFrameSet*, bool>::iterator fsit = m_framesetsToUpdate.begin();
for ( ; fsit != m_framesetsToUpdate.end() ; ++fsit )
fsit.key()->updateFrames();
@@ -492,10 +492,10 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns,
KWTextFrameSet* fs = static_cast<KWTextFrameSet *>(mainTextFrameSet);
// Not right now, this could be called during formatting...
- //m_doc->invalidate();
- // ### This means the layout will be done during painting. Not good.
- // What about mainTextFrameSet->invalidate() or even layout()?
- //QTimer::singleShot( 0, m_doc, SLOT( invalidate() ) );
+ //m_doc->tqinvalidate();
+ // ### This means the tqlayout will be done during painting. Not good.
+ // What about mainTextFrameSet->tqinvalidate() or even tqlayout()?
+ //TQTimer::singleShot( 0, m_doc, TQT_SLOT( tqinvalidate() ) );
// Invalidate main textframeset only, and from top of page only.
// Otherwise loading a long document (with headers/footers) takes ages,
@@ -549,8 +549,8 @@ void KWFrameLayout::resizeOrCreateHeaderFooter( KWTextFrameSet* headerFooter, ui
m_framesetsToUpdate.insert( headerFooter, true );
}
-// Called at beginning and end of the layout for a given page,
-// to determine if the main-text-frame layout really changed or not.
+// Called at beginning and end of the tqlayout for a given page,
+// to determine if the main-text-frame tqlayout really changed or not.
// Testing in resizeMainTextFrame doesn't work, we call it several times,
// once for each footnote, so it can't detect the "no change" case.
KoRect KWFrameLayout::firstColumnRect( KWFrameSet* mainTextFrameSet, int pageNum, int numColumns ) const
@@ -616,7 +616,7 @@ void KWFrameLayout::checkFootNotes()
{
// We recalculate all footnotes pages, but we return true
// if those on pageNum have changed.
- QPtrListIterator<HeaderFooterFrameset> it( m_footnotes );
+ TQPtrListIterator<HeaderFooterFrameset> it( m_footnotes );
for ( ; it.current() ; ++it )
{
HeaderFooterFrameset* hff = it.current();
diff --git a/kword/KWFrameLayout.h b/kword/KWFrameLayout.h
index c13d18b8..140d1284 100644
--- a/kword/KWFrameLayout.h
+++ b/kword/KWFrameLayout.h
@@ -19,10 +19,10 @@
#ifndef KWFRAMELAYOUT_H
#define KWFRAMELAYOUT_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <KoRect.h>
-#include <qmap.h>
+#include <tqmap.h>
class KWDocument;
class KWFrameSet;
@@ -68,7 +68,7 @@ public:
// frame number for the given page.... -1 if no frame on that page
// The first frame is number 0.
int frameNumberForPage( int page ) const;
- // The last frame we need (0-based), layout() will delete any frame after that
+ // The last frame we need (0-based), tqlayout() will delete any frame after that
int lastFrameNumber( int lastPage ) const;
void debug();
@@ -77,26 +77,26 @@ public:
/**
* Constructor
- * @param doc the KWDocument we're layouting
+ * @param doc the KWDocument we're tqlayouting
* @param headersFooters list of header and footer HFFs (see definition of HeaderFooterFrameset)
* @param footnotes list of footnotes framesets HFFs
* @param endnotes list of endnotes framesets HFFs
*/
- KWFrameLayout( KWDocument* doc, QPtrList<HeaderFooterFrameset>& headersFooters,
- QPtrList<HeaderFooterFrameset>& footnotes, QPtrList<HeaderFooterFrameset>& endnotes )
+ KWFrameLayout( KWDocument* doc, TQPtrList<HeaderFooterFrameset>& headersFooters,
+ TQPtrList<HeaderFooterFrameset>& footnotes, TQPtrList<HeaderFooterFrameset>& endnotes )
: m_headersFooters( headersFooters ), m_footnotes( footnotes ), m_endnotes( endnotes ), m_doc( doc )
{}
enum { DontRemovePages = 1 };
/**
- * The main method of this file. Do the frame layout.
+ * The main method of this file. Do the frame tqlayout.
* @param mainTextFrameSet if set, its frames will be resized. Usually: set in WP mode, not set in DTP mode.
* @param numColumns number of columns to create for the main textframeset. Only relevant if mainTextFrameSet!=0.
- * @param fromPage first page to layout ( 0-based )
- * @param toPage last page to layout ( 0-based )
+ * @param fromPage first page to tqlayout ( 0-based )
+ * @param toPage last page to tqlayout ( 0-based )
* @param flags see enum above
*/
- void layout( KWFrameSet* mainTextFrameSet, int numColumns,
+ void tqlayout( KWFrameSet* mainTextFrameSet, int numColumns,
int fromPage, int toPage, uint flags );
protected:
@@ -108,10 +108,10 @@ protected:
private:
// A _ref_ to a list. Must remain alive as long as this object.
- QPtrList<HeaderFooterFrameset>& m_headersFooters;
- QPtrList<HeaderFooterFrameset>& m_footnotes;
- QPtrList<HeaderFooterFrameset>& m_endnotes;
- QMap<KWFrameSet *, bool> m_framesetsToUpdate;
+ TQPtrList<HeaderFooterFrameset>& m_headersFooters;
+ TQPtrList<HeaderFooterFrameset>& m_footnotes;
+ TQPtrList<HeaderFooterFrameset>& m_endnotes;
+ TQMap<KWFrameSet *, bool> m_framesetsToUpdate;
KWDocument* m_doc;
int m_lastMainFramePage;
};
diff --git a/kword/KWFrameList.cpp b/kword/KWFrameList.cpp
index 8df2da8d..10e6c467 100644
--- a/kword/KWFrameList.cpp
+++ b/kword/KWFrameList.cpp
@@ -33,25 +33,25 @@ KWFrameList::KWFrameList(KWDocument *doc, KWFrame *theFrame) {
update();
}
-QValueList<KWFrame *> KWFrameList::framesBelow() const {
- QValueList<KWFrame *> frames;
+TQValueList<KWFrame *> KWFrameList::framesBelow() const {
+ TQValueList<KWFrame *> frames;
//kdDebug() << "framesBelow " << endl;
// Copy until we find m_frame
- for ( QValueVector<KWFrame*>::const_iterator it = m_frames.begin(), end = m_frames.end(); it != end && *it != m_frame; ++it) {
+ for ( TQValueVector<KWFrame*>::const_iterator it = m_frames.begin(), end = m_frames.end(); it != end && *it != m_frame; ++it) {
frames.append( *it );
}
return frames;
}
-QValueList<KWFrame *> KWFrameList::framesOnTop() const {
+TQValueList<KWFrame *> KWFrameList::framesOnTop() const {
//kdDebug() << "framesOnTop " << endl;
- QValueList<KWFrame *> frames;
+ TQValueList<KWFrame *> frames;
// Copy from m_frame to the end
bool found = false;
- for ( QValueVector<KWFrame*>::const_iterator it = m_frames.begin(), end = m_frames.end(); it != end; ++it) {
+ for ( TQValueVector<KWFrame*>::const_iterator it = m_frames.begin(), end = m_frames.end(); it != end; ++it) {
KWFrame* frame = *it;
if ( found ) {
Q_ASSERT( !frame->frameSet()->isFloating() );
@@ -64,22 +64,22 @@ QValueList<KWFrame *> KWFrameList::framesOnTop() const {
return frames;
}
-void KWFrameList::setFrames(const QPtrList<KWFrame> &frames) {
+void KWFrameList::setFrames(const TQPtrList<KWFrame> &frames) {
// kdDebug(31001) << "KWFrameList::setFrames for " << m_frame->frameSet()->name() << endl;
m_frames.clear();
- if ( m_doc->layoutViewMode() && !m_doc->layoutViewMode()->hasFrames() )
+ if ( m_doc->tqlayoutViewMode() && !m_doc->tqlayoutViewMode()->hasFrames() )
return;
- QPtrList<KWFrameSet> parentFramesets;
+ TQPtrList<KWFrameSet> tqparentFramesets;
KWFrameSet *fs = m_frame->frameSet();
while(fs) {
- parentFramesets.append(fs);
+ tqparentFramesets.append(fs);
fs = (KWFrameSet*) fs->anchorFrameset();
}
// We now look at all other frames (in the same page)
// to check for intersections. This is o(n^2), but with n small.
- QPtrListIterator<KWFrame> it( frames );
+ TQPtrListIterator<KWFrame> it( frames );
for ( ; it.current() ; ++it )
{
KWFrame* daFrame = it.current();
@@ -92,15 +92,15 @@ void KWFrameList::setFrames(const QPtrList<KWFrame> &frames) {
// We trust that KWTableFrameSet will not make cells overlap ;)
if ( m_frame->frameSet()->groupmanager() || daFrame->frameSet()->groupmanager() )
continue;
- // Skip all frames from the parent frameset, if 'm_frame' is floating
+ // Skip all frames from the tqparent frameset, if 'm_frame' is floating
// ## might need a for loop for the case of inline-inside-inline,
// or maybe calling isPaintedBy instead [depending on what should happen for tables]
if ( daFrame->frameSet()->isFloating() &&
- (parentFramesets.contains(daFrame->frameSet()->anchorFrameset()) ||
+ (tqparentFramesets.tqcontains(daFrame->frameSet()->anchorFrameset()) ||
daFrame->frameSet()->isPaintedBy(m_frame->frameSet())) )
continue;
// Floating frames are not "on top", they are "inside".
- // They are not "below" anything either - the parent frameset is.
+ // They are not "below" anything either - the tqparent frameset is.
if ( m_frame->frameSet()->isFloating() )
continue;
KoRect intersect = m_frame->intersect( daFrame->outerKoRect() );
@@ -125,15 +125,15 @@ void KWFrameList::update() {
updateZOrderFor(m_doc->framesInPage( pageNumber, false ));
}
-void KWFrameList::updateZOrderFor(const QPtrList<KWFrame> &frames) {
+void KWFrameList::updateZOrderFor(const TQPtrList<KWFrame> &frames) {
#ifdef DEBUG_SPEED
kdDebug(32001) << "KWFrameList::updateZOrderFor " << frames.count() << " frames"<< endl;
- QTime dt;
+ TQTime dt;
dt.start();
int numberAdded = 0;
#endif
- QPtrListIterator<KWFrame> iter(frames);
+ TQPtrListIterator<KWFrame> iter(frames);
while( iter.current() ) {
KWFrame *frame = iter.current();
Q_ASSERT( frame->frameStack() );
@@ -152,7 +152,7 @@ void KWFrameList::updateZOrderFor(const QPtrList<KWFrame> &frames) {
// ****** statics ******
KWFrameList *KWFrameList::getFirstFrameList(KWDocument *doc) {
- for (QPtrListIterator<KWFrameSet> fsit = doc->framesetsIterator(); fsit.current() ; ++fsit ) {
+ for (TQPtrListIterator<KWFrameSet> fsit = doc->framesetsIterator(); fsit.current() ; ++fsit ) {
KWFrame *frame = fsit.current()->frame(0);
if (frame && frame->frameStack())
return frame->frameStack();
@@ -162,7 +162,7 @@ KWFrameList *KWFrameList::getFirstFrameList(KWDocument *doc) {
void KWFrameList::recalcFrames(KWDocument *doc, int pageFrom, int pageTo) {
for(int i=pageTo; i >= pageFrom; i--) {
- QPtrList<KWFrame> framesOnPage = doc->framesInPage( i, false );
+ TQPtrList<KWFrame> framesOnPage = doc->framesInPage( i, false );
KWFrame *f = framesOnPage.first();
while(f) {
Q_ASSERT(f->frameStack());
@@ -185,7 +185,7 @@ void KWFrameList::createFrameList(KWFrame *f, KWDocument *doc) {
}
void KWFrameList::createFrameList(KWFrameSet *fs, KWDocument *doc, bool forceUpdate) {
- QPtrListIterator<KWFrame> iter( fs->frameIterator() );
+ TQPtrListIterator<KWFrame> iter( fs->frameIterator() );
KWFrame *f = iter.current();
while(f) {
createFrameList(f, doc);
diff --git a/kword/KWFrameList.h b/kword/KWFrameList.h
index 998b2a0d..992ac388 100644
--- a/kword/KWFrameList.h
+++ b/kword/KWFrameList.h
@@ -20,8 +20,8 @@
#include "KWFrame.h"
-#include <qptrlist.h>
-#include <qvaluevector.h>
+#include <tqptrlist.h>
+#include <tqvaluevector.h>
class KWDocument;
@@ -41,12 +41,12 @@ public:
/**
* Fetches the frames below the frame this frameList is for.
*/
- QValueList<KWFrame *> framesBelow() const;
+ TQValueList<KWFrame *> framesBelow() const;
/**
* Fetches the frames on top of the frame this frameList is for.
*/
- QValueList<KWFrame *> framesOnTop() const;
+ TQValueList<KWFrame *> framesOnTop() const;
/**
* Update the z-ordering around the frame we host the framelist for.
@@ -100,10 +100,10 @@ public:
private:
static KWFrameList *getFirstFrameList(KWDocument *doc);
- void updateZOrderFor(const QPtrList<KWFrame> &frames);
- void setFrames(const QPtrList<KWFrame> &frames);
+ void updateZOrderFor(const TQPtrList<KWFrame> &frames);
+ void setFrames(const TQPtrList<KWFrame> &frames);
- QValueVector<KWFrame *> m_frames; // sorted by Z Order
+ TQValueVector<KWFrame *> m_frames; // sorted by Z Order
KWDocument *m_doc;
KWFrame *m_frame;
};
diff --git a/kword/KWFrameSet.cpp b/kword/KWFrameSet.cpp
index 154cd22b..0e72f168 100644
--- a/kword/KWFrameSet.cpp
+++ b/kword/KWFrameSet.cpp
@@ -37,8 +37,8 @@
#include <KoXmlNS.h>
#include <KoXmlWriter.h>
-#include <qpopupmenu.h>
-#include <qapplication.h>
+#include <tqpopupmenu.h>
+#include <tqapplication.h>
//#define DEBUG_DRAW
@@ -49,11 +49,11 @@ KWFrameSet::KWFrameSet( KWDocument *doc )
m_protectSize( false ),
m_anchorTextFs( 0L ), m_dcop( 0L ), m_pageManager( 0 )
{
- // Send our "repaintChanged" signals to the document.
+ // Send our "tqrepaintChanged" signals to the document.
setName("KWFrameSet");
if(m_doc) {
- connect( this, SIGNAL( repaintChanged( KWFrameSet * ) ),
- doc, SLOT( slotRepaintChanged( KWFrameSet * ) ) );
+ connect( this, TQT_SIGNAL( tqrepaintChanged( KWFrameSet * ) ),
+ doc, TQT_SLOT( slotRepaintChanged( KWFrameSet * ) ) );
m_pageManager = doc->pageManager();
}
m_frames.setAutoDelete( true );
@@ -76,7 +76,7 @@ KWFrameSet::~KWFrameSet()
void KWFrameSet::addFrame( KWFrame *frame, bool recalc )
{
- if ( m_frames.findRef( frame ) != -1 )
+ if ( m_frames.tqfindRef( frame ) != -1 )
return;
//kdDebug(32001) << k_funcinfo << name() << " adding frame" << frame << " recalc=" << recalc << endl;
@@ -96,11 +96,11 @@ void KWFrameSet::deleteFrame( unsigned int num, bool remove, bool recalc )
KWFrame *frm = m_frames.at( num );
Q_ASSERT( frm );
m_frames.take( num );
- Q_ASSERT( !m_frames.contains(frm) );
+ Q_ASSERT( !m_frames.tqcontains(frm) );
unsigned int index = frm->pageNumber() - m_firstPage;
if(m_framesInPage.count() >= index) {
- QPtrList<KWFrame> *lst = m_framesInPage.at(index);
+ TQPtrList<KWFrame> *lst = m_framesInPage.at(index);
lst->remove(frm);
}
@@ -127,7 +127,7 @@ void KWFrameSet::deleteFrame( unsigned int num, bool remove, bool recalc )
void KWFrameSet::deleteFrame( KWFrame *frm, bool remove, bool recalc )
{
//kdDebug(32001) << "KWFrameSet::deleteFrame " << frm << " remove=" << remove << endl;
- int num = m_frames.findRef( frm );
+ int num = m_frames.tqfindRef( frm );
Q_ASSERT( num != -1 );
if ( num == -1 )
return;
@@ -139,7 +139,7 @@ void KWFrameSet::deleteAllFrames()
{
if ( !m_frames.isEmpty() )
{
- for ( QPtrListIterator<KWFrame> frameIt( m_frames ); frameIt.current(); ++frameIt )
+ for ( TQPtrListIterator<KWFrame> frameIt( m_frames ); frameIt.current(); ++frameIt )
emit sigFrameRemoved( *frameIt );
m_frames.clear();
updateFrames();
@@ -157,7 +157,7 @@ void KWFrameSet::deleteAllCopies()
}
}
-void KWFrameSet::createEmptyRegion( const QRect & crect, QRegion & emptyRegion, KWViewMode *viewMode )
+void KWFrameSet::createEmptyRegion( const TQRect & crect, TQRegion & emptyRegion, KWViewMode *viewMode )
{
KWPage *page = m_doc->pageManager()->page( frame(0) );
if( !page ) {
@@ -166,11 +166,11 @@ void KWFrameSet::createEmptyRegion( const QRect & crect, QRegion & emptyRegion,
}
double paperHeight = page->height();
//kdDebug(32001) << "KWFrameSet::createEmptyRegion " << name() << endl;
- for (QPtrListIterator<KWFrame> frameIt = frameIterator(); frameIt.current(); ++frameIt )
+ for (TQPtrListIterator<KWFrame> frameIt = frameIterator(); frameIt.current(); ++frameIt )
{
if ( !frameIt.current()->isTransparent() )
{
- QRect outerRect( viewMode->normalToView( frameIt.current()->outerRect(viewMode) ) );
+ TQRect outerRect( viewMode->normalToView( frameIt.current()->outerRect(viewMode) ) );
//kdDebug(32001) << "KWFrameSet::createEmptyRegion outerRect=" << outerRect << " crect=" << crect << endl;
outerRect &= crect; // This is important, to avoid calling subtract with a Y difference > 65536
if ( !outerRect.isEmpty() )
@@ -184,9 +184,9 @@ void KWFrameSet::createEmptyRegion( const QRect & crect, QRegion & emptyRegion,
}
}
-void KWFrameSet::drawPadding( KWFrame *frame, QPainter *p, const QRect &crect, const QColorGroup &, KWViewMode *viewMode )
+void KWFrameSet::drawPadding( KWFrame *frame, TQPainter *p, const TQRect &crect, const TQColorGroup &, KWViewMode *viewMode )
{
- QRect outerRect( viewMode->normalToView( frame->outerRect(viewMode) ) );
+ TQRect outerRect( viewMode->normalToView( frame->outerRect(viewMode) ) );
//kdDebug(32001) << "KWFrameSet::drawPadding frame: " << frameFromPtr( frame )
// << " outerRect: " << outerRect
// << " crect: " << crect << endl;
@@ -198,9 +198,9 @@ void KWFrameSet::drawPadding( KWFrame *frame, QPainter *p, const QRect &crect, c
#endif
return;
}
- QRect frameRect( viewMode->normalToView( m_doc->zoomRect( *frame ) ) );
+ TQRect frameRect( viewMode->normalToView( m_doc->zoomRect( *frame ) ) );
p->save();
- QBrush bgBrush( frame->backgroundColor() );
+ TQBrush bgBrush( frame->backgroundColor() );
bgBrush.setColor( KWDocument::resolveBgColor( bgBrush.color(), p ) );
p->setBrush( bgBrush );
int leftMargin = m_doc->zoomItX(frame->paddingLeft());
@@ -211,22 +211,22 @@ void KWFrameSet::drawPadding( KWFrame *frame, QPainter *p, const QRect &crect, c
if ( topMargin != 0 )
{
- QRect r( frameRect.left(), frameRect.top(), frameRect.width(), topMargin );
+ TQRect r( frameRect.left(), frameRect.top(), frameRect.width(), topMargin );
p->fillRect( r, bgBrush );
}
if ( leftMargin != 0 )
{
- QRect r( frameRect.left(), frameRect.top(), leftMargin, frameRect.height() );
+ TQRect r( frameRect.left(), frameRect.top(), leftMargin, frameRect.height() );
p->fillRect( r, bgBrush );
}
if ( rightMargin != 0 )
{
- QRect r( frameRect.right()-rightMargin, frameRect.top(), rightMargin, frameRect.height() );
+ TQRect r( frameRect.right()-rightMargin, frameRect.top(), rightMargin, frameRect.height() );
p->fillRect( r, bgBrush );
}
if ( bottomMargin != 0 )
{
- QRect r( frameRect.left(), frameRect.bottom()-bottomMargin, frameRect.width(), bottomMargin );
+ TQRect r( frameRect.left(), frameRect.bottom()-bottomMargin, frameRect.width(), bottomMargin );
p->fillRect( r, bgBrush );
}
p->restore();
@@ -234,9 +234,9 @@ void KWFrameSet::drawPadding( KWFrame *frame, QPainter *p, const QRect &crect, c
}
-void KWFrameSet::drawFrameBorder( QPainter *painter, KWFrame *frame, KWFrame *settingsFrame, const QRect &crect, KWViewMode *viewMode )
+void KWFrameSet::drawFrameBorder( TQPainter *painter, KWFrame *frame, KWFrame *settingsFrame, const TQRect &crect, KWViewMode *viewMode )
{
- QRect outerRect( viewMode->normalToView( frame->outerRect( viewMode ) ) );
+ TQRect outerRect( viewMode->normalToView( frame->outerRect( viewMode ) ) );
//kdDebug(32001) << "KWFrameSet::drawFrameBorder frame: " << frameFromPtr( frame )
// << " outerRect: " << outerRect << endl;
@@ -246,21 +246,21 @@ void KWFrameSet::drawFrameBorder( QPainter *painter, KWFrame *frame, KWFrame *se
return;
}
- QRect frameRect( viewMode->normalToView( m_doc->zoomRect( *frame ) ) );
+ TQRect frameRect( viewMode->normalToView( m_doc->zoomRect( *frame ) ) );
painter->save();
- QBrush bgBrush( settingsFrame->backgroundColor() );
+ TQBrush bgBrush( settingsFrame->backgroundColor() );
//bool defaultColor = !bgBrush.color().isValid();
bgBrush.setColor( KWDocument::resolveBgColor( bgBrush.color(), painter ) );
painter->setBrush( bgBrush );
// Draw default borders using view settings...
- QPen viewSetting( QApplication::palette().color( QPalette::Active, QColorGroup::Mid ) );
+ TQPen viewSetting( TQApplication::palette().color( TQPalette::Active, TQColorGroup::Mid ) );
int minBorder = 1;
// ...except when printing, or embedded doc, or disabled.
if ( !viewMode || !viewMode->drawFrameBorders() )
{
- viewSetting = NoPen;
+ viewSetting = TQPen(Qt::NoPen);
minBorder = 0;
}
@@ -278,7 +278,7 @@ void KWFrameSet::drawFrameBorder( QPainter *painter, KWFrame *frame, KWFrame *se
void KWFrameSet::setFloating()
{
// Find main text frame
- QPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWTextFrameSet * frameSet = dynamic_cast<KWTextFrameSet *>( fit.current() );
@@ -292,7 +292,7 @@ void KWFrameSet::setFloating()
frameSet->findPosition( dPoint, parag, index );
// Create anchor. TODO: refcount the anchors!
setAnchored( frameSet, parag, index );
- frameSet->layout();
+ frameSet->tqlayout();
m_doc->frameChanged( m_frames.first() );
return;
}
@@ -303,15 +303,15 @@ void KWFrameSet::setProtectSize( bool b)
m_protectSize = b;
}
-void KWFrameSet::setAnchored( KWTextFrameSet* textfs, int paragId, int index, bool placeHolderExists /* = false */, bool repaint )
+void KWFrameSet::setAnchored( KWTextFrameSet* textfs, int paragId, int index, bool placeHolderExists /* = false */, bool tqrepaint )
{
KWTextParag * parag = static_cast<KWTextParag *>( textfs->textDocument()->paragAt( paragId ) );
Q_ASSERT( parag );
if ( parag )
- setAnchored( textfs, parag, index, placeHolderExists, repaint );
+ setAnchored( textfs, parag, index, placeHolderExists, tqrepaint );
}
-void KWFrameSet::setAnchored( KWTextFrameSet* textfs, KoTextParag* parag, int index, bool placeHolderExists /* = false */, bool repaint )
+void KWFrameSet::setAnchored( KWTextFrameSet* textfs, KoTextParag* parag, int index, bool placeHolderExists /* = false */, bool tqrepaint )
{
kdDebug(32001) << "KWFrameSet::setAnchored " << textfs << " " << parag->paragId() << " " << index << " " << placeHolderExists << endl;
Q_ASSERT( textfs );
@@ -321,7 +321,7 @@ void KWFrameSet::setAnchored( KWTextFrameSet* textfs, KoTextParag* parag, int in
m_anchorTextFs = textfs;
KWFrameList::createFrameList(textfs, m_doc); // remove ourselves from others list now we are inline
if ( parag )
- createAnchors( parag, index, placeHolderExists, repaint );
+ createAnchors( parag, index, placeHolderExists, tqrepaint );
if ( !placeHolderExists ) // i.e. not while loading
{
@@ -345,7 +345,7 @@ KWAnchor * KWFrameSet::findAnchor( int frameNum )
Q_ASSERT( m_anchorTextFs );
// Yes, a linear search, but only among all customitems of the correct textdoc,
// whose number is assumed to be quite small.
- QPtrListIterator<KoTextCustomItem> cit( m_anchorTextFs->textDocument()->allCustomItems() );
+ TQPtrListIterator<KoTextCustomItem> cit( m_anchorTextFs->textDocument()->allCustomItems() );
for ( ; cit.current() ; ++cit )
{
KWAnchor * anchor = dynamic_cast<KWAnchor *>( cit.current() );
@@ -366,11 +366,11 @@ void KWFrameSet::setFixed()
m_anchorTextFs = 0L;
// make sure the frames are on top
// (their z-order didn't matter when they were inline)
- QPtrListIterator<KWFrame> frameIt = frameIterator();
+ TQPtrListIterator<KWFrame> frameIt = frameIterator();
for ( ; frameIt.current(); ++frameIt )
frameIt.current()->setZOrder( m_doc->maxZOrder( frameIt.current()->pageNumber(m_doc) ) + 1 );
- m_doc->repaintAllViews();
+ m_doc->tqrepaintAllViews();
m_doc->updateRulerFrameStartEnd();
}
@@ -381,11 +381,11 @@ KWAnchor * KWFrameSet::createAnchor( KoTextDocument *txt, int frameNum )
}
void KWFrameSet::createAnchors( KoTextParag * parag, int index, bool placeHolderExists /*= false */ /*only used when loading*/,
- bool repaint )
+ bool tqrepaint )
{
kdDebug(32001) << "KWFrameSet::createAnchors" << endl;
Q_ASSERT( m_anchorTextFs );
- QPtrListIterator<KWFrame> frameIt = frameIterator();
+ TQPtrListIterator<KWFrame> frameIt = frameIterator();
for ( ; frameIt.current(); ++frameIt, ++index )
{
//if ( ! frameIt.current()->anchor() )
@@ -398,8 +398,8 @@ void KWFrameSet::createAnchors( KoTextParag * parag, int index, bool placeHolder
}
}
parag->setChanged( true );
- if ( repaint )
- emit repaintChanged( m_anchorTextFs );
+ if ( tqrepaint )
+ emit tqrepaintChanged( m_anchorTextFs );
}
void KWFrameSet::deleteAnchor( KWAnchor * anchor )
@@ -424,7 +424,7 @@ void KWFrameSet::deleteAnchors()
Q_ASSERT( textfs );
if ( !textfs )
return;
- //QPtrListIterator<KWFrame> frameIt = frameIterator();
+ //TQPtrListIterator<KWFrame> frameIt = frameIterator();
int frameNum = 0;
// At the moment there's only one anchor per frameset
// With tables the loop below will be wrong anyway...
@@ -437,7 +437,7 @@ void KWFrameSet::deleteAnchors()
KWAnchor * anchor = findAnchor( frameNum );
deleteAnchor( anchor );
}
- emit repaintChanged( textfs );
+ emit tqrepaintChanged( textfs );
}
void KWFrameSet::moveFloatingFrame( int frameNum, const KoPoint &position )
@@ -460,7 +460,7 @@ void KWFrameSet::moveFloatingFrame( int frameNum, const KoPoint &position )
if( frame->frameStack() )
frame->frameStack()->updateAfterMove( oldPageNum );
}
- invalidate();
+ tqinvalidate();
}
KoRect KWFrameSet::floatingFrameRect( int frameNum )
@@ -471,11 +471,11 @@ KoRect KWFrameSet::floatingFrameRect( int frameNum )
KWAnchor* anchor = findAnchor( frameNum );
Q_ASSERT( anchor );
- QRect paragRect = anchor->paragraph()->rect();
+ TQRect paragRect = anchor->paragraph()->rect();
int x = anchor->x() + paragRect.x(); // in LU
int y = anchor->y() + paragRect.y(); // in LU
- KoPoint topLeft( m_doc->layoutUnitToPixelX( x ), m_doc->layoutUnitToPixelY( y ) );
+ KoPoint topLeft( m_doc->tqlayoutUnitToPixelX( x ), m_doc->tqlayoutUnitToPixelY( y ) );
return KoRect( topLeft, frame->outerKoRect().size() );
}
@@ -490,35 +490,35 @@ KCommand * KWFrameSet::anchoredObjectCreateCommand( int frameNum )
{
KWFrame * frame = m_frames.at( frameNum );
Q_ASSERT( frame );
- return new KWCreateFrameCommand( QString::null, frame );
+ return new KWCreateFrameCommand( TQString(), frame );
}
KCommand * KWFrameSet::anchoredObjectDeleteCommand( int frameNum )
{
KWFrame * frame = m_frames.at( frameNum );
Q_ASSERT( frame );
- return new KWDeleteFrameCommand( QString::null, frame );
+ return new KWDeleteFrameCommand( TQString(), frame );
}
KWFrame * KWFrameSet::frameAtPos( double x, double y ) const
{
KoPoint docPoint( x, y );
- QPtrListIterator<KWFrame> frameIt = frameIterator();
+ TQPtrListIterator<KWFrame> frameIt = frameIterator();
for ( ; frameIt.current(); ++frameIt )
- if ( frameIt.current()->contains( docPoint ) )
+ if ( frameIt.current()->tqcontains( docPoint ) )
return frameIt.current();
return 0L;
}
KWFrame *KWFrameSet::frame( unsigned int num ) const
{
- // QPtrList sucks
+ // TQPtrList sucks
return const_cast<KWFrameSet*>( this )->m_frames.at( num );
}
int KWFrameSet::frameFromPtr( KWFrame *frame )
{
- return m_frames.findRef( frame );
+ return m_frames.tqfindRef( frame );
}
KWFrame * KWFrameSet::settingsFrame( const KWFrame* frame )
@@ -526,7 +526,7 @@ KWFrame * KWFrameSet::settingsFrame( const KWFrame* frame )
if ( !frame->isCopy() )
return const_cast<KWFrame *>( frame );
KWFrame* lastRealFrame=0L;
- QPtrListIterator<KWFrame> frameIt( frame->frameSet()->frameIterator() );
+ TQPtrListIterator<KWFrame> frameIt( frame->frameSet()->frameIterator() );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame *curFrame = frameIt.current();
@@ -553,7 +553,7 @@ void KWFrameSet::updateFrames( int flags )
// For each of our frames, clear old list of frames on top, and grab min/max page nums
m_firstPage = m_frames.first()->pageNumber(); // we know m_frames is not empty here
int lastPage = m_firstPage;
- QPtrListIterator<KWFrame> fIt( frameIterator() );
+ TQPtrListIterator<KWFrame> fIt( frameIterator() );
for ( ; fIt.current(); ++fIt ) {
int pg = fIt.current()->pageNumber();
m_firstPage = KMIN( m_firstPage, pg );
@@ -570,7 +570,7 @@ void KWFrameSet::updateFrames( int flags )
m_framesInPage[i]->clear();
// Initialize the new elements.
for ( int i = oldElements ; i < (int)m_framesInPage.size() ; ++i )
- m_framesInPage.insert( i, new QPtrList<KWFrame>() );
+ m_framesInPage.insert( i, new TQPtrList<KWFrame>() );
// Iterate over m_frames again, to fill the m_framesInPage array
fIt.toFirst();
@@ -584,7 +584,7 @@ void KWFrameSet::updateFrames( int flags )
if ( isFloating() )
{
//kdDebug(32001) << "KWFrameSet::updateFrames " << name() << " is floating" << endl;
- QPtrListIterator<KWFrame> frameIt = frameIterator();
+ TQPtrListIterator<KWFrame> frameIt = frameIterator();
int frameNum = 0;
// At the moment there's only one anchor per frameset
//for ( ; frameIt.current(); ++frameIt, ++frameNum )
@@ -603,8 +603,8 @@ bool KWFrameSet::isPaintedBy( KWFrameSet* fs ) const
return true;
if ( isFloating() )
{
- KWFrameSet* parentFs = anchorFrameset();
- if ( parentFs && parentFs->isPaintedBy( fs ) )
+ KWFrameSet* tqparentFs = anchorFrameset();
+ if ( tqparentFs && tqparentFs->isPaintedBy( fs ) )
return true;
}
if ( groupmanager() )
@@ -615,7 +615,7 @@ bool KWFrameSet::isPaintedBy( KWFrameSet* fs ) const
return false;
}
-const QPtrList<KWFrame> & KWFrameSet::framesInPage( int pageNum ) const
+const TQPtrList<KWFrame> & KWFrameSet::framesInPage( int pageNum ) const
{
if ( pageNum < m_firstPage || pageNum >= (int)m_framesInPage.size() + m_firstPage )
{
@@ -624,12 +624,12 @@ const QPtrList<KWFrame> & KWFrameSet::framesInPage( int pageNum ) const
<< " Min value: " << m_firstPage
<< " Max value: " << m_framesInPage.size() + m_firstPage - 1 << endl;
#endif
- return m_emptyList; // QPtrList<KWFrame>() doesn't work, it's a temporary
+ return m_emptyList; // TQPtrList<KWFrame>() doesn't work, it's a temporary
}
return * m_framesInPage[pageNum - m_firstPage];
}
-void KWFrameSet::drawContents( QPainter *p, const QRect & crect, const QColorGroup &cg,
+void KWFrameSet::drawContents( TQPainter *p, const TQRect & crect, const TQColorGroup &cg,
bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode,
KWFrameViewManager *frameViewManager )
@@ -642,7 +642,7 @@ void KWFrameSet::drawContents( QPainter *p, const QRect & crect, const QColorGro
#endif
if ( !viewMode->isTextModeFrameset( this ) )
{
- QPtrListIterator<KWFrame> frameIt( frameIterator() );
+ TQPtrListIterator<KWFrame> frameIt( frameIterator() );
KWFrame * lastRealFrame = 0L;
//double lastRealFrameTop = 0;
//double totalHeight = 0; // in pt, to avoid accumulating rounding errors
@@ -673,15 +673,15 @@ void KWFrameSet::drawContents( QPainter *p, const QRect & crect, const QColorGro
}
}
else { // Text view mode
- QRect normalRect = viewMode->viewToNormal(crect);
- drawFrame( 0L /*frame*/, p, normalRect, crect, QPoint(KWViewModeText::OFFSET, 0),
+ TQRect normalRect = viewMode->viewToNormal(crect);
+ drawFrame( 0L /*frame*/, p, normalRect, crect, TQPoint(KWViewModeText::OFFSET, 0),
0L /*settingsFrame*/, cg, onlyChanged, resetChanged, edit, viewMode, true );
}
}
void KWFrameSet::drawFrameAndBorders( KWFrame *frame,
- QPainter *painter, const QRect &crect,
- const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+ TQPainter *painter, const TQRect &crect,
+ const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode,
KWFrame *settingsFrame, bool drawUnderlyingFrames )
{
@@ -691,9 +691,9 @@ void KWFrameSet::drawFrameAndBorders( KWFrame *frame,
return;
}
- QRect normalOuterFrameRect( frame->outerRect( viewMode ) );
- QRect outerFrameRect( viewMode->normalToView( normalOuterFrameRect ) );
- QRect outerCRect = crect.intersect( outerFrameRect );
+ TQRect normalOuterFrameRect( frame->outerRect( viewMode ) );
+ TQRect outerFrameRect( viewMode->normalToView( normalOuterFrameRect ) );
+ TQRect outerCRect = crect.intersect( outerFrameRect );
#ifdef DEBUG_DRAW
kdDebug(32001) << "KWFrameSet::drawFrameAndBorders " << name() << " frame " << frameFromPtr( frame ) << " " << *frame << endl;
kdDebug(32001) << " (outer) normalFrameRect=" << normalOuterFrameRect << " frameRect=" << outerFrameRect << endl;
@@ -705,8 +705,8 @@ void KWFrameSet::drawFrameAndBorders( KWFrame *frame,
if ( !settingsFrame )
settingsFrame = this->settingsFrame( frame );
- QRect normalInnerFrameRect( m_doc->zoomRect( frame->innerRect() ) );
- QRect innerFrameRect( viewMode->normalToView( normalInnerFrameRect ) );
+ TQRect normalInnerFrameRect( m_doc->zoomRect( frame->innerRect() ) );
+ TQRect innerFrameRect( viewMode->normalToView( normalInnerFrameRect ) );
// This translates the coordinates in the document contents
// ( frame and r are up to here in this system )
@@ -714,10 +714,10 @@ void KWFrameSet::drawFrameAndBorders( KWFrame *frame,
int offsetX = normalInnerFrameRect.left();
int offsetY = normalInnerFrameRect.top() - m_doc->zoomItY( frame->internalY() );
- QRect innerCRect = outerCRect.intersect( innerFrameRect );
+ TQRect innerCRect = outerCRect.intersect( innerFrameRect );
if ( !innerCRect.isEmpty() )
{
- QRect fcrect = viewMode->viewToNormal( innerCRect );
+ TQRect fcrect = viewMode->viewToNormal( innerCRect );
#ifdef DEBUG_DRAW
kdDebug(32001) << " (inner) normalFrameRect=" << normalInnerFrameRect << " frameRect=" << innerFrameRect << endl;
//kdDebug(32001) << " crect after view-to-normal:" << fcrect << "." << " Will move by (" << -offsetX << ", -(" << normalInnerFrameRect.top() << "-" << m_doc->zoomItY(frame->internalY()) << ") == " << -offsetY << ")." << endl;
@@ -731,7 +731,7 @@ void KWFrameSet::drawFrameAndBorders( KWFrame *frame,
#ifdef DEBUG_DRAW
kdDebug(32001) << "KWFrameSet::drawFrameAndBorders in frame coords:" << fcrect << ". Will translate painter by intersec-fcrect: " << innerCRect.x()-fcrect.x() << "," << innerCRect.y()-fcrect.y() << "." << endl;
#endif
- QRegion reg;
+ TQRegion reg;
if ( drawUnderlyingFrames )
reg = frameClipRegion( painter, frame, outerCRect, viewMode );
else // false means we are being drawn _as_ an underlying frame, so no clipping!
@@ -754,9 +754,9 @@ void KWFrameSet::drawFrameAndBorders( KWFrame *frame,
}
}
-void KWFrameSet::drawFrame( KWFrame *frame, QPainter *painter, const QRect &fcrect, const QRect &outerCRect,
- const QPoint& translationOffset,
- KWFrame *settingsFrame, const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+void KWFrameSet::drawFrame( KWFrame *frame, TQPainter *painter, const TQRect &fcrect, const TQRect &outerCRect,
+ const TQPoint& translationOffset,
+ KWFrame *settingsFrame, const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode* viewMode, bool drawUnderlyingFrames )
{
// In this method the painter is NOT translated yet. It's still in view coordinates.
@@ -767,29 +767,29 @@ void KWFrameSet::drawFrame( KWFrame *frame, QPainter *painter, const QRect &fcre
#endif
Q_ASSERT( fcrect.isValid() );
- QColorGroup frameColorGroup( cg );
+ TQColorGroup frameColorGroup( cg );
if ( settingsFrame ) // 0L in text viewmode
{
- QBrush bgBrush( settingsFrame->backgroundColor() );
+ TQBrush bgBrush( settingsFrame->backgroundColor() );
bgBrush.setColor( KWDocument::resolveBgColor( bgBrush.color(), painter ) );
- frameColorGroup.setBrush( QColorGroup::Base, bgBrush );
+ frameColorGroup.setBrush( TQColorGroup::Base, bgBrush );
}
if ( drawUnderlyingFrames && frame && frame->frameStack()) {
- QValueList<KWFrame*> below = frame->frameStack()->framesBelow();
+ TQValueList<KWFrame*> below = frame->frameStack()->framesBelow();
if ( !below.isEmpty() )
{
// Double-buffering - not when printing
- QPainter* doubleBufPainter = painter;
- QPixmap* pix = 0L;
- if ( painter->device()->devType() != QInternal::Printer )
+ TQPainter* doubleBufPainter = painter;
+ TQPixmap* pix = 0L;
+ if ( painter->device()->devType() != TQInternal::Printer )
{
pix = m_doc->doubleBufferPixmap( outerCRect.size() );
- doubleBufPainter = new QPainter;
+ doubleBufPainter = new TQPainter;
doubleBufPainter->begin( pix );
// Initialize the pixmap to the page background color
// (if the frame is over the page margins, no underlying frame will paint anything there)
- doubleBufPainter->fillRect( 0, 0, outerCRect.width(), outerCRect.height(), QApplication::palette().active().brush( QColorGroup::Base ) );
+ doubleBufPainter->fillRect( 0, 0, outerCRect.width(), outerCRect.height(), TQApplication::tqpalette().active().brush( TQColorGroup::Base ) );
// The double-buffer pixmap has (0,0) at outerCRect.topLeft(), so we need to
// translate the double-buffer painter; drawFrameAndBorders will draw using view coordinates.
@@ -803,14 +803,14 @@ void KWFrameSet::drawFrame( KWFrame *frame, QPainter *painter, const QRect &fcre
#ifdef DEBUG_DRAW
kdDebug(32001) << " below: " << below.count() << endl;
#endif
- for (QValueListIterator<KWFrame*> it = below.begin(); it != below.end(); ++it )
+ for (TQValueListIterator<KWFrame*> it = below.begin(); it != below.end(); ++it )
{
KWFrame* f = (*it);
#ifdef DEBUG_DRAW
kdDebug(32001) << " looking at frame below us: " << f->frameSet()->name() << " frame " << frameFromPtr( frame ) << endl;
#endif
- QRect viewFrameCRect = outerCRect.intersect( viewMode->normalToView( f->outerRect( viewMode ) ) );
+ TQRect viewFrameCRect = outerCRect.intersect( viewMode->normalToView( f->outerRect( viewMode ) ) );
if ( !viewFrameCRect.isEmpty() )
{
#ifdef DEBUG_DRAW
@@ -828,11 +828,11 @@ void KWFrameSet::drawFrame( KWFrame *frame, QPainter *painter, const QRect &fcre
kdDebug(32001) << " translating by " << translationOffset.x() << ", " << translationOffset.y() << " before drawFrameContents" << endl;
#endif
doubleBufPainter->translate( translationOffset.x(), translationOffset.y() ); // This assume that viewToNormal() is only a translation
- // We can't "repaint changed parags only" if we just drew the underlying frames, hence the "false"
+ // We can't "tqrepaint changed parags only" if we just drew the underlying frames, hence the "false"
drawFrameContents( frame, doubleBufPainter, fcrect, frameColorGroup, false, resetChanged, edit, viewMode );
doubleBufPainter->restore();
- if ( painter->device()->devType() != QInternal::Printer )
+ if ( painter->device()->devType() != TQInternal::Printer )
{
doubleBufPainter->end();
#ifdef DEBUG_DRAW
@@ -846,7 +846,7 @@ void KWFrameSet::drawFrame( KWFrame *frame, QPainter *painter, const QRect &fcre
else
{
// nothing below? paint a bg color then
- frameColorGroup.setBrush( QColorGroup::Base, m_doc->defaultBgColor( painter ) );
+ frameColorGroup.setBrush( TQColorGroup::Base, m_doc->defaultBgColor( painter ) );
}
}
if ( frame && (frame->paddingLeft() || frame->paddingTop() ||
@@ -859,31 +859,31 @@ void KWFrameSet::drawFrame( KWFrame *frame, QPainter *painter, const QRect &fcre
painter->restore();
}
-void KWFrameSet::drawFrameContents( KWFrame *, QPainter *, const QRect &,
- const QColorGroup &, bool, bool, KWFrameSetEdit*, KWViewMode * )
+void KWFrameSet::drawFrameContents( KWFrame *, TQPainter *, const TQRect &,
+ const TQColorGroup &, bool, bool, KWFrameSetEdit*, KWViewMode * )
{
kdWarning() << "Default implementation of drawFrameContents called for " << className() << " " << this << " " << name() << kdBacktrace();
}
-void KWFrameSet::saveCommon( QDomElement &parentElem, bool saveFrames )
+void KWFrameSet::saveCommon( TQDomElement &tqparentElem, bool saveFrames )
{
if ( m_frames.isEmpty() ) // Deleted frameset -> don't save
return;
// Save all the common attributes for framesets.
- parentElem.setAttribute( "frameType", static_cast<int>( type() ) );
- parentElem.setAttribute( "frameInfo", static_cast<int>( m_info ) );
- parentElem.setAttribute( "name", m_name );
- parentElem.setAttribute( "visible", static_cast<int>( m_visible ) );
- parentElem.setAttribute( "protectSize", static_cast<int>( m_protectSize ) );
+ tqparentElem.setAttribute( "frameType", static_cast<int>( type() ) );
+ tqparentElem.setAttribute( "frameInfo", static_cast<int>( m_info ) );
+ tqparentElem.setAttribute( "name", m_name );
+ tqparentElem.setAttribute( "visible", static_cast<int>( m_visible ) );
+ tqparentElem.setAttribute( "protectSize", static_cast<int>( m_protectSize ) );
if ( saveFrames )
{
- QPtrListIterator<KWFrame> frameIt = frameIterator();
+ TQPtrListIterator<KWFrame> frameIt = frameIterator();
for ( ; frameIt.current(); ++frameIt )
{
KWFrame *frame = frameIt.current();
- QDomElement frameElem = parentElem.ownerDocument().createElement( "FRAME" );
- parentElem.appendChild( frameElem );
+ TQDomElement frameElem = tqparentElem.ownerDocument().createElement( "FRAME" );
+ tqparentElem.appendChild( frameElem );
frame->save( frameElem );
@@ -906,7 +906,7 @@ void KWFrameSet::saveCommon( QDomElement &parentElem, bool saveFrames )
// This function is intended as a helper for all the derived classes. It reads
// in all the attributes common to all framesets and loads all frames.
//
-void KWFrameSet::load( QDomElement &framesetElem, bool loadFrames )
+void KWFrameSet::load( TQDomElement &framesetElem, bool loadFrames )
{
m_info = static_cast<KWFrameSet::Info>( KWDocument::getAttribute( framesetElem, "frameInfo", KWFrameSet::FI_BODY ) );
m_visible = static_cast<bool>( KWDocument::getAttribute( framesetElem, "visible", true ) );
@@ -914,7 +914,7 @@ void KWFrameSet::load( QDomElement &framesetElem, bool loadFrames )
if ( loadFrames )
{
// <FRAME>
- QDomElement frameElem = framesetElem.firstChild().toElement();
+ TQDomElement frameElem = framesetElem.firstChild().toElement();
for ( ; !frameElem.isNull() ; frameElem = frameElem.nextSibling().toElement() )
{
if ( frameElem.tagName() == "FRAME" )
@@ -933,31 +933,31 @@ void KWFrameSet::load( QDomElement &framesetElem, bool loadFrames )
}
}
-KWFrame* KWFrameSet::loadOasisFrame( const QDomElement& tag, KoOasisContext& context )
+KWFrame* KWFrameSet::loadOasisFrame( const TQDomElement& tag, KoOasisContext& context )
{
double width = 100;
if ( tag.hasAttributeNS( KoXmlNS::svg, "width" ) ) { // fixed width
// TODO handle percentage (of enclosing table/frame/page)
- width = KoUnit::parseValue( tag.attributeNS( KoXmlNS::svg, "width", QString::null ) );
+ width = KoUnit::parseValue( tag.attributeNS( KoXmlNS::svg, "width", TQString() ) );
} else if ( tag.hasAttributeNS( KoXmlNS::fo, "min-width" ) ) {
// min-width is not supported in KWord. Let's use it as a fixed width.
- width = KoUnit::parseValue( tag.attributeNS( KoXmlNS::fo, "min-width", QString::null ) );
+ width = KoUnit::parseValue( tag.attributeNS( KoXmlNS::fo, "min-width", TQString() ) );
} else {
- kdWarning(32001) << "Error in frame " << tag.tagName() << " " << tag.attributeNS( KoXmlNS::draw, "name", QString::null ) << " : neither width nor min-width specified!" << endl;
+ kdWarning(32001) << "Error in frame " << tag.tagName() << " " << tag.attributeNS( KoXmlNS::draw, "name", TQString() ) << " : neither width nor min-width specified!" << endl;
}
double height = 100;
if ( tag.hasAttributeNS( KoXmlNS::svg, "height" ) ) { // fixed height
// TODO handle percentage (of enclosing table/frame/page)
- height = KoUnit::parseValue( tag.attributeNS( KoXmlNS::svg, "height", QString::null ) );
+ height = KoUnit::parseValue( tag.attributeNS( KoXmlNS::svg, "height", TQString() ) );
}
//kdDebug(32001) << k_funcinfo << "width=" << width << " height=" << height << " pt" << endl;
KWFrame * frame = new KWFrame(this,
- KoUnit::parseValue( tag.attributeNS( KoXmlNS::svg, "x", QString::null ) ),
- KoUnit::parseValue( tag.attributeNS( KoXmlNS::svg, "y", QString::null ) ),
+ KoUnit::parseValue( tag.attributeNS( KoXmlNS::svg, "x", TQString() ) ),
+ KoUnit::parseValue( tag.attributeNS( KoXmlNS::svg, "y", TQString() ) ),
width, height );
- frame->setZOrder( tag.attributeNS( KoXmlNS::draw, "z-index", QString::null ).toInt() );
+ frame->setZOrder( tag.attributeNS( KoXmlNS::draw, "z-index", TQString() ).toInt() );
// Copy-frames.
// We currently ignore the value of the copy-of attribute. It probably needs to
// be handled like chain-next-name (kwtextframeset.cc) but for all types of frameset.
@@ -970,10 +970,10 @@ KWFrame* KWFrameSet::loadOasisFrame( const QDomElement& tag, KoOasisContext& con
// A frame with protected contents means that the frameset is protected (makes sense)
// A frame with protected size means that the frameset is size-protected (hmm, kword did it that way)
// TODO implement position protection
- QString protectList = context.styleStack().attributeNS( KoXmlNS::style, "protect" );
- if ( protectList.contains( "content" ) )
+ TQString protectList = context.styleStack().attributeNS( KoXmlNS::style, "protect" );
+ if ( protectList.tqcontains( "content" ) )
setProtectContent( true );
- if ( protectList.contains( "size" ) )
+ if ( protectList.tqcontains( "size" ) )
m_protectSize = true;
// TODO m_visible ? User-toggeable or internal?
@@ -1077,11 +1077,11 @@ void KWFrameSet::finalize()
updateFrames();
}
-QRegion KWFrameSet::frameClipRegion( QPainter * painter, KWFrame *frame, const QRect & crect,
+TQRegion KWFrameSet::frameClipRegion( TQPainter * painter, KWFrame *frame, const TQRect & crect,
KWViewMode * viewMode )
{
// KWDocument * doc = kWordDocument();
- QRect rc = painter->xForm( crect );
+ TQRect rc = painter->xForm( crect );
#ifdef DEBUG_DRAW
//kdDebug(32002) << "KWFrameSet::frameClipRegion rc initially " << rc << endl;
#endif
@@ -1100,19 +1100,19 @@ QRegion KWFrameSet::frameClipRegion( QPainter * painter, KWFrame *frame, const Q
#endif
if ( !rc.isEmpty() )
{
- QRegion reg( rc );
+ TQRegion reg( rc );
// This breaks when a frame is under another one, it still appears if !onlyChanged.
// cvs log says this is about frame borders... hmm.
/// ### if ( onlyChanged )
Q_ASSERT( frame->frameStack() );
- QValueList<KWFrame *> onTop = frame->frameStack()->framesOnTop();
- for (QValueListIterator<KWFrame*> fIt = onTop.begin(); fIt != onTop.end(); ++fIt )
+ TQValueList<KWFrame *> onTop = frame->frameStack()->framesOnTop();
+ for (TQValueListIterator<KWFrame*> fIt = onTop.begin(); fIt != onTop.end(); ++fIt )
{
KWFrame* frameOnTop = (*fIt);
Q_ASSERT( frameOnTop->frameSet() );
- QRect r = painter->xForm( viewMode->normalToView( frameOnTop->outerRect( viewMode ) ) );
+ TQRect r = painter->xForm( viewMode->normalToView( frameOnTop->outerRect( viewMode ) ) );
#ifdef DEBUG_DRAW
//kdDebug(32002) << "frameClipRegion subtract rect "<< r << endl;
#endif
@@ -1123,12 +1123,12 @@ QRegion KWFrameSet::frameClipRegion( QPainter * painter, KWFrame *frame, const Q
#endif
return reg;
}
- return QRegion();
+ return TQRegion();
}
bool KWFrameSet::canRemovePage( int num )
{
- QPtrListIterator<KWFrame> frameIt( frameIterator() );
+ TQPtrListIterator<KWFrame> frameIt( frameIterator() );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame * frame = frameIt.current();
@@ -1156,22 +1156,22 @@ void KWFrameSet::setNewFrameBehavior( KWFrame::NewFrameBehavior nfb ) {
}
// ## this should pass the viewmode as argument, probably.
-bool KWFrameSet::isFrameAtPos( const KWFrame* frame, const QPoint& point, bool borderOfFrameOnly) const {
- QRect outerRect( frame->outerRect( m_doc->layoutViewMode() ) );
+bool KWFrameSet::isFrameAtPos( const KWFrame* frame, const TQPoint& point, bool borderOfFrameOnly) const {
+ TQRect outerRect( frame->outerRect( m_doc->tqlayoutViewMode() ) );
// Give the user a bit of margin for clicking on it :)
const int margin = 2;
outerRect.rLeft() -= margin;
outerRect.rTop() -= margin;
outerRect.rRight() += margin;
outerRect.rBottom() += margin;
- if ( outerRect.contains( point ) ) {
+ if ( outerRect.tqcontains( point ) ) {
if(borderOfFrameOnly) {
- QRect innerRect( m_doc->zoomRect( *frame ) );
+ TQRect innerRect( m_doc->zoomRect( *frame ) );
innerRect.rLeft() += margin;
innerRect.rTop() += margin;
innerRect.rRight() -= margin;
innerRect.rBottom() -= margin;
- return (!innerRect.contains(point) );
+ return (!innerRect.tqcontains(point) );
}
return true;
}
@@ -1181,12 +1181,12 @@ bool KWFrameSet::isFrameAtPos( const KWFrame* frame, const QPoint& point, bool b
void KWFrameSet::setZOrder()
{
//kdDebug(32001) << "KWFrameSet::setZOrder (to max) " << name() << endl;
- QPtrListIterator<KWFrame> fit = frameIterator();
+ TQPtrListIterator<KWFrame> fit = frameIterator();
for ( ; fit.current() ; ++fit )
fit.current()->setZOrder( m_doc->maxZOrder( fit.current()->pageNumber(m_doc) ) + 1 );
}
-void KWFrameSet::setName( const QString &name )
+void KWFrameSet::setName( const TQString &name )
{
m_name = name;
emit sigNameChanged(this);
@@ -1221,7 +1221,7 @@ void KWFrameSet::printDebug()
kdDebug() << " | Frames in page array: " << endl;
for ( uint i = 0 ; i < m_framesInPage.size() ; ++i )
{
- QPtrListIterator<KWFrame> it( *m_framesInPage[i] );
+ TQPtrListIterator<KWFrame> it( *m_framesInPage[i] );
int pgNum = i + m_firstPage;
for ( ; it.current() ; ++it )
kdDebug() << " | " << pgNum << ": " << it.current() << " " << *it.current()
@@ -1232,24 +1232,24 @@ void KWFrameSet::printDebug()
<< endl;
}
- QPtrListIterator<KWFrame> frameIt = frameIterator();
+ TQPtrListIterator<KWFrame> frameIt = frameIterator();
for ( unsigned int j = 0; frameIt.current(); ++frameIt, ++j ) {
KWFrame * frame = frameIt.current();
- QCString copy = frame->isCopy() ? "[copy]" : "";
+ TQCString copy = frame->isCopy() ? "[copy]" : "";
kdDebug() << " +-- Frame " << j << " of "<< frameCount() << " (" << frame << ") " << copy << endl;
printDebug( frame );
kdDebug() << " Rectangle : " << frame->x() << "," << frame->y() << " " << frame->width() << "x" << frame->height() << endl;
kdDebug() << " RunAround: "<< runaround[ frame->runAround() ] << " side:" << runaroundSide[ frame->runAroundSide() ]<< endl;
kdDebug() << " FrameBehavior: "<< frameBh[ frame->frameBehavior() ] << endl;
kdDebug() << " NewFrameBehavior: "<< newFrameBh[ frame->newFrameBehavior() ] << endl;
- QColor col = frame->backgroundColor().color();
+ TQColor col = frame->backgroundColor().color();
kdDebug() << " BackgroundColor: "<< ( col.isValid() ? col.name().latin1() : "(default)" ) << endl;
kdDebug() << " SheetSide "<< frame->sheetSide() << endl;
kdDebug() << " Z Order: " << frame->zOrder() << endl;
if( frame->frameStack() ) {
- QValueList<KWFrame*> onTop = frame->frameStack()->framesOnTop();
- QValueList<KWFrame*> below = frame->frameStack()->framesBelow();
+ TQValueList<KWFrame*> onTop = frame->frameStack()->framesOnTop();
+ TQValueList<KWFrame*> below = frame->frameStack()->framesBelow();
kdDebug() << " Frames below: " << below.count()
<< ", frames on top: " << onTop.count() << endl;
@@ -1257,7 +1257,7 @@ void KWFrameSet::printDebug()
else
kdDebug() << " no frameStack set." << endl;
kdDebug() << " minFrameHeight "<< frame->minimumFrameHeight() << endl;
- QString page = pageManager() && pageManager()->pageCount() > 0 ? QString::number(frame->pageNumber()) : " [waiting for pages to be created]";
+ TQString page = pageManager() && pageManager()->pageCount() > 0 ? TQString::number(frame->pageNumber()) : " [waiting for pages to be created]";
KWFrameView *fv = 0;
if(fvm) fv = fvm->view(frame);
diff --git a/kword/KWFrameSet.h b/kword/KWFrameSet.h
index 2bba5e54..d4c1bae9 100644
--- a/kword/KWFrameSet.h
+++ b/kword/KWFrameSet.h
@@ -22,9 +22,9 @@
#define frame_set_h
#include "KWFrame.h"
-#include <qptrvector.h>
-#include <qptrlist.h>
-#include "qdom.h"
+#include <tqptrvector.h>
+#include <tqptrlist.h>
+#include "tqdom.h"
class KWAnchor;
class KWFrame;
@@ -45,8 +45,8 @@ class KoTextParag;
class KoXmlWriter;
class KCommand;
-class QPoint;
-class QProgressDialog;
+class TQPoint;
+class TQProgressDialog;
/**
@@ -58,9 +58,10 @@ class QProgressDialog;
* @see KWTextFrameSet, KWPartFrameSet, KWPictureFrameSet,
* KWFormulaFrameSet, KWTableFrameSet
*/
-class KWFrameSet : public QObject
+class KWFrameSet : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/// constructor
KWFrameSet( KWDocument *doc );
@@ -74,7 +75,7 @@ public:
*/
virtual FrameSetType type() const { return FT_BASE; }
- virtual void addTextFrameSets( QPtrList<KWTextFrameSet> & /*lst*/, bool /*onlyReadWrite*/ = false ) {};
+ virtual void addTextFrameSets( TQPtrList<KWTextFrameSet> & /*lst*/, bool /*onlyReadWrite*/ = false ) {};
virtual bool ownLine() const { return FALSE;}
/** The different types of textFramesets (that TEXT is important here!)
@@ -139,7 +140,7 @@ public:
* is on the border.
* @param frame the frame to check inside of
*/
- bool isFrameAtPos( const KWFrame* frame, const QPoint& nPoint, bool borderOfFrameOnly=false ) const;
+ bool isFrameAtPos( const KWFrame* frame, const TQPoint& nPoint, bool borderOfFrameOnly=false ) const;
/** get a frame by number */
KWFrame *frame( unsigned int _num ) const;
@@ -155,7 +156,7 @@ public:
static KWFrame * settingsFrame( const KWFrame* frame );
/** Iterator over the child frames */
- const QPtrList<KWFrame> &frameIterator() const { return m_frames; }
+ const TQPtrList<KWFrame> &frameIterator() const { return m_frames; }
/** Get frame number */
int frameFromPtr( KWFrame *frame );
/** Get number of child frames */
@@ -172,7 +173,7 @@ public:
* free to paint on without interfering with later paints from us.
* For painting all frames of all framesets the painter needs to find out what area we
* will fill with a background color and possibly paint over.
- * What this method does is fill an QRegion with all the areas we are going to fill, which
+ * What this method does is fill an TQRegion with all the areas we are going to fill, which
* typically means we will paint the background of a frame there.
* @param emptyRegion The region is modified to subtract the areas painted, thus
* allowing the caller to determine which areas remain to be painted.
@@ -181,7 +182,7 @@ public:
* @param crect the cliprect; only parts inside this rect are of interrest to us
* @param viewMode For coordinate conversion, always set.
*/
- virtual void createEmptyRegion( const QRect & crect, QRegion & emptyRegion, KWViewMode *viewMode );
+ virtual void createEmptyRegion( const TQRect & crect, TQRegion & emptyRegion, KWViewMode *viewMode );
/**
* Paint this frameset
@@ -189,7 +190,7 @@ public:
* @param crect The rectangle (in scrollview "contents coordinates", i.e. "view coords")
* to be painted
* @param cg The colorgroup from which to get the colors
- * @param onlyChanged If true, only redraw what has changed (see KWCanvas::repaintChanged)
+ * @param onlyChanged If true, only redraw what has changed (see KWCanvas::tqrepaintChanged)
* @param resetChanged If true, set the changed flag to false after drawing.
* @param edit If set, this frameset is being edited, so a cursor is needed.
* @param viewMode For coordinate conversion, always set.
@@ -198,14 +199,14 @@ public:
* The way this "onlyChanged/resetChanged" works is: when something changes,
* all views are asked to redraw themselves with onlyChanged=true.
* But all views except the last one shouldn't reset the changed flag to false,
- * otherwise the other views wouldn't repaint anything.
+ * otherwise the other views wouldn't tqrepaint anything.
* So resetChanged is called with "false" for all views except the last one,
* and with "true" for the last one, so that it resets the flag.
*
* Framesets shouldn't reimplement this one in theory [but KWTableFrameSet has to].
*/
- virtual void drawContents( QPainter *painter, const QRect &crect,
- const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+ virtual void drawContents( TQPainter *painter, const TQRect &crect,
+ const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode,
KWFrameViewManager *frameViewManager );
@@ -223,11 +224,11 @@ public:
* @param cg The colorgroup from which to get the colors
* @param edit If set, this frameset is being edited, so a cursor is needed.
* @param viewMode For coordinate conversion, always set.
- * @param crect rectangle to be repainted, in view coordinates. Includes padding.
+ * @param crect rectangle to be tqrepainted, in view coordinates. Includes padding.
*/
void drawFrameAndBorders( KWFrame *frame,
- QPainter *painter, const QRect &crect,
- const QColorGroup &cg, bool, bool,
+ TQPainter *painter, const TQRect &crect,
+ const TQColorGroup &cg, bool, bool,
KWFrameSetEdit *edit, KWViewMode *viewMode,
KWFrame *settingsFrame, bool drawUnderlyingFrames );
@@ -239,31 +240,31 @@ public:
* @param crect The rectangle (in "contents coordinates") to be painted
* @param viewMode For coordinate conversion, always set.
*/
- void drawFrameBorder( QPainter *painter, KWFrame *frame, KWFrame *settingsFrame,
- const QRect &crect, KWViewMode *viewMode );
+ void drawFrameBorder( TQPainter *painter, KWFrame *frame, KWFrame *settingsFrame,
+ const TQRect &crect, KWViewMode *viewMode );
/**
* Draw a particular frame of this frameset.
* This is called by drawContents and is what framesets must reimplement.
- * @param fcrect rectangle to be repainted, in the _frame_'s coordinate system, in pixels.
+ * @param fcrect rectangle to be tqrepainted, in the _frame_'s coordinate system, in pixels.
* Doesn't include padding.
*
- * @param crect rectangle to be repainted, in view coordinates. Includes padding.
+ * @param crect rectangle to be tqrepainted, in view coordinates. Includes padding.
* Default implementation does double-buffering and calls drawFrameContents.
* @param frame the frame to draw
* @param painter the painter to draw to
* @param settingsFrame The frame from which we take the settings (usually @p frame, but not with Copy behaviour)
* @param cg The colorgroup from which to get the colors
- * @param onlyChanged If true, only redraw what has changed (see KWCanvas::repaintChanged)
+ * @param onlyChanged If true, only redraw what has changed (see KWCanvas::tqrepaintChanged)
* @param resetChanged If true, set the changed flag to false after drawing.
* @param edit If set, this frameset is being edited, so a cursor is needed.
* @param viewMode For coordinate conversion, always set.
* @param drawUnderlyingFrames if the frame implements it, then it should draw underlying frames.
* @param translationOffset offset this method will translate the paiter before doing its work.
*/
- virtual void drawFrame( KWFrame *frame, QPainter *painter, const QRect &fcrect, const QRect &crect,
- const QPoint& translationOffset,
- KWFrame *settingsFrame, const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+ virtual void drawFrame( KWFrame *frame, TQPainter *painter, const TQRect &fcrect, const TQRect &crect,
+ const TQPoint& translationOffset,
+ KWFrame *settingsFrame, const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode, bool drawUnderlyingFrames );
/**
@@ -272,24 +273,24 @@ public:
* You MUST reimplement one or the other, or you'll get infinite recursion ;)
*
* In this method, the painter has been translated to the frame's coordinate system
- * @param fcrect rectangle to be repainted, in the _frame_'s coordinate system, in pixels.
+ * @param fcrect rectangle to be tqrepainted, in the _frame_'s coordinate system, in pixels.
* Doesn't include padding.
* @param frame the frame to draw
* @param painter the painter to draw to
* @param cg The colorgroup from which to get the colors
- * @param onlyChanged If true, only redraw what has changed (see KWCanvas::repaintChanged)
+ * @param onlyChanged If true, only redraw what has changed (see KWCanvas::tqrepaintChanged)
* @param resetChanged If true, set the changed flag to false after drawing.
* @param edit If set, this frameset is being edited, so a cursor is needed.
* @param viewMode For coordinate conversion, always set.
*/
- virtual void drawFrameContents( KWFrame * frame, QPainter *painter, const QRect& fcrect,
- const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+ virtual void drawFrameContents( KWFrame * frame, TQPainter *painter, const TQRect& fcrect,
+ const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit * edit, KWViewMode *viewMode );
/**
* Draw the padding area inside of a specific frame of this frameSet
*/
- virtual void drawPadding( KWFrame *frame, QPainter *p, const QRect &fcrect, const QColorGroup &cg, KWViewMode *viewMode);
+ virtual void drawPadding( KWFrame *frame, TQPainter *p, const TQRect &fcrect, const TQColorGroup &cg, KWViewMode *viewMode);
enum UpdateFramesFlags {
UpdateFramesInPage = 1,
@@ -298,26 +299,26 @@ public:
};
/**
* Called when our frames change, or when another frameset's frames change.
- * Framesets can reimplement it, but should always call the parent method.
+ * Framesets can reimplement it, but should always call the tqparent method.
*/
virtual void updateFrames( int flags = 0xff );
/** Return list of frames in page @p pageNum.
* This is fast since it uses the m_framesInPage array.*/
- const QPtrList<KWFrame> & framesInPage( int pageNum ) const;
+ const TQPtrList<KWFrame> & framesInPage( int pageNum ) const;
/** Allows to detect that updateFrames() hasn't been called yet (e.g. on loading) */
bool hasFramesInPageArray() const { return !m_framesInPage.isEmpty(); }
- /** relayout text in frames, so that it flows correctly around other frames */
- virtual void layout() {}
- virtual void invalidate() {}
+ /** retqlayout text in frames, so that it flows correctly around other frames */
+ virtual void tqlayout() {}
+ virtual void tqinvalidate() {}
/// save to XML - when saving
- virtual QDomElement save( QDomElement &parentElem, bool saveFrames = true ) = 0;
+ virtual TQDomElement save( TQDomElement &tqparentElem, bool saveFrames = true ) = 0;
/// save to XML - when copying to clipboard
- virtual QDomElement toXML( QDomElement &parentElem, bool saveFrames = true )
- { return save( parentElem, saveFrames ); }
+ virtual TQDomElement toXML( TQDomElement &tqparentElem, bool saveFrames = true )
+ { return save( tqparentElem, saveFrames ); }
/// Save to OASIS format
virtual void saveOasis( KoXmlWriter& writer, KoSavingContext& context, bool saveFrames ) const = 0;
/// If the frameset is inline, is it ok to save it inside an oasis <text:p>?
@@ -325,23 +326,23 @@ public:
virtual bool canBeSavedAsInlineCharacter() const { return true; }
/// load from XML - when loading
- virtual void load( QDomElement &framesetElem, bool loadFrames = true );
- KWFrame* loadOasisFrame( const QDomElement& tag, KoOasisContext& context );
+ virtual void load( TQDomElement &framesetElem, bool loadFrames = true );
+ KWFrame* loadOasisFrame( const TQDomElement& tag, KoOasisContext& context );
/// load from XML - when pasting from clipboard
- virtual void fromXML( QDomElement &framesetElem, bool loadFrames = true, bool /*useNames*/ = true )
+ virtual void fromXML( TQDomElement &framesetElem, bool loadFrames = true, bool /*useNames*/ = true )
{ load( framesetElem, loadFrames ); }
- virtual QString toPlainText() const { return QString::null; }
+ virtual TQString toPlainText() const { return TQString(); }
- //virtual void preparePrinting( QPainter *, QProgressDialog *, int & ) { }
+ //virtual void preparePrinting( TQPainter *, TQProgressDialog *, int & ) { }
/** Called once the frameset has been completely loaded or constructed.
- * The default implementation calls updateFrames() and zoom(). Call the parent :) */
+ * The default implementation calls updateFrames() and zoom(). Call the tqparent :) */
virtual void finalize();
virtual int paragraphs() { return 0; }
virtual int paragraphsSelected() { return 0; }
- virtual bool statistics( QProgressDialog * /*progress*/, ulong & /*charsWithSpace*/, ulong & /*charsWithoutSpace*/, ulong & /*words*/,
+ virtual bool statistics( TQProgressDialog * /*progress*/, ulong & /*charsWithSpace*/, ulong & /*charsWithoutSpace*/, ulong & /*words*/,
ulong & /*sentences*/, ulong & /*syllables*/, ulong & /*lines*/, bool /*process only selected */ ) { return true; }
KWDocument* kWordDocument() const { return m_doc; }
@@ -358,11 +359,11 @@ public:
* Make this frameset anchored, with the anchor at @p paragId,@p index in the text frameset @p textfs.
* Also used during OASIS loading (placeHolderExists=true)
*/
- void setAnchored( KWTextFrameSet* textfs, KoTextParag* parag, int index, bool placeHolderExists = false, bool repaint = true );
+ void setAnchored( KWTextFrameSet* textfs, KoTextParag* parag, int index, bool placeHolderExists = false, bool tqrepaint = true );
/** Make this frameset floating, with the anchor at @p paragId,@p index in the text frameset @p textfs.
* \deprecated
*/
- void setAnchored( KWTextFrameSet* textfs, int paragId, int index, bool placeHolderExists = false, bool repaint = true );
+ void setAnchored( KWTextFrameSet* textfs, int paragId, int index, bool placeHolderExists = false, bool tqrepaint = true );
/** Note that this frameset has been made floating already, and store anchor position */
void setAnchored( KWTextFrameSet* textfs );
/// Make this frameset fixed, i.e. not anchored
@@ -389,7 +390,7 @@ public:
virtual KoSize floatingFrameSize( int frameNum = 0 );
/** Get the rect of the "floating frame" identified by frameNum,
in coordinates RELATIVE TO THE PARENT FRAMESET.
- This is especially important for multi-parent inline frames. */
+ This is especially important for multi-tqparent inline frames. */
KoRect floatingFrameRect( int frameNum = 0 );
/** Get the 'baseline' to use for the "floating frame" identified by frameNum.
-1 means same as the height (usual case) */
@@ -424,8 +425,8 @@ public:
virtual void setVisible( bool v );
/// get/set frameset name. For tables in particular, this _must_ be unique
- QString name() const { return m_name; }
- void setName( const QString &name );
+ TQString name() const { return m_name; }
+ void setName( const TQString &name );
/// set frameBehavior on all frames, see KWFrame for specifics
void setFrameBehavior( KWFrame::FrameBehavior fb );
@@ -454,9 +455,9 @@ public:
signals:
/// Emitted when something has changed in this frameset,
- /// so that all views repaint it. KWDocument connects to it,
+ /// so that all views tqrepaint it. KWDocument connects to it,
/// and KWCanvas connects to KWDocument.
- void repaintChanged( KWFrameSet * frameset );
+ void tqrepaintChanged( KWFrameSet * frameset );
void sigFrameAdded(KWFrame*);
void sigFrameRemoved(KWFrame*);
@@ -466,36 +467,36 @@ signals:
protected:
/// save the common attributes for the frameset
- void saveCommon( QDomElement &parentElem, bool saveFrames );
+ void saveCommon( TQDomElement &tqparentElem, bool saveFrames );
/**Determine the clipping rectangle for drawing the contents of @p frame with @p painter
* in the rectangle delimited by @p crect.
* This determines where to clip the painter to draw the contents of a given frame
*/
- QRegion frameClipRegion( QPainter * painter, KWFrame *frame, const QRect & crect,
+ TQRegion frameClipRegion( TQPainter * painter, KWFrame *frame, const TQRect & crect,
KWViewMode * viewMode );
void deleteAnchor( KWAnchor * anchor );
virtual void deleteAnchors();
- virtual void createAnchors( KoTextParag * parag, int index, bool placeHolderExists = false, bool repaint = true );
+ virtual void createAnchors( KoTextParag * parag, int index, bool placeHolderExists = false, bool tqrepaint = true );
KWDocument *m_doc; // Document
- QPtrList<KWFrame> m_frames; // Our frames
+ TQPtrList<KWFrame> m_frames; // Our frames
// Cached info for optimization
/// This array provides a direct access to the frames on page N
- QPtrVector< QPtrList<KWFrame> > m_framesInPage;
+ TQPtrVector< TQPtrList<KWFrame> > m_framesInPage;
/// always equal to m_framesInPage[0].first()->pageNumber() :)
int m_firstPage;
/// always empty, for convenience in @ref framesInPage
- QPtrList<KWFrame> m_emptyList; // ## make static pointer to save memory ?
+ TQPtrList<KWFrame> m_emptyList; // ## make static pointer to save memory ?
Info m_info;
KWTableFrameSet *m_groupmanager;
bool m_visible;
bool m_protectSize;
- QString m_name;
+ TQString m_name;
KWTextFrameSet * m_anchorTextFs;
KWordFrameSetIface *m_dcop;
KWPageManager *m_pageManager;
diff --git a/kword/KWFrameSetEdit.cpp b/kword/KWFrameSetEdit.cpp
index 0a917638..9c075d56 100644
--- a/kword/KWFrameSetEdit.cpp
+++ b/kword/KWFrameSetEdit.cpp
@@ -33,8 +33,8 @@ KWFrameSetEdit::KWFrameSetEdit( KWFrameSet * fs, KWCanvas * canvas )
{
}
-void KWFrameSetEdit::drawContents( QPainter *p, const QRect &crect,
- const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+void KWFrameSetEdit::drawContents( TQPainter *p, const TQRect &crect,
+ const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWViewMode *viewMode, KWFrameViewManager *fvm )
{
//kdDebug(32001) << "KWFrameSetEdit::drawContents " << frameSet()->name() << endl;
diff --git a/kword/KWFrameSetEdit.h b/kword/KWFrameSetEdit.h
index edfe8756..f0d883d2 100644
--- a/kword/KWFrameSetEdit.h
+++ b/kword/KWFrameSetEdit.h
@@ -21,7 +21,7 @@
#ifndef frame_set_edit_h
#define frame_set_edit_h
-#include <qrect.h>
+#include <tqrect.h>
#include <KoPoint.h>
#include <KoRect.h>
@@ -32,16 +32,16 @@ class KWView;
class KWViewMode;
class KWFrameViewManager;
-class QDragEnterEvent;
-class QDragLeaveEvent;
-class QDragMoveEvent;
-class QDropEvent;
-class QIMEvent;
-class QKeyEvent;
-class QMimeSource;
-class QMouseEvent;
-class QPainter;
-class QPoint;
+class TQDragEnterEvent;
+class TQDragLeaveEvent;
+class TQDragMoveEvent;
+class TQDropEvent;
+class TQIMEvent;
+class TQKeyEvent;
+class TQMimeSource;
+class TQMouseEvent;
+class TQPainter;
+class TQPoint;
/**
* This object is created to edit a particular frameset in a particular view
@@ -72,32 +72,32 @@ public:
* See KWFrameSet for explanation about the arguments.
* Most framesets don't need to reimplement that (the KWFrameSetEdit gets passed to drawFrame)
*/
- virtual void drawContents( QPainter *, const QRect &,
- const QColorGroup &, bool onlyChanged, bool resetChanged,
+ virtual void drawContents( TQPainter *, const TQRect &,
+ const TQColorGroup &, bool onlyChanged, bool resetChanged,
KWViewMode *viewMode,
KWFrameViewManager *frameViewManager );
// Events forwarded by the canvas (when being in "edit" mode)
- virtual void keyPressEvent( QKeyEvent * ) {}
- virtual void keyReleaseEvent( QKeyEvent * ) {}
- virtual void imStartEvent( QIMEvent * ) {}
- virtual void imComposeEvent( QIMEvent * ) {}
- virtual void imEndEvent( QIMEvent * ) {}
- virtual void mousePressEvent( QMouseEvent *, const QPoint &, const KoPoint & ) {}
- virtual void mouseMoveEvent( QMouseEvent *, const QPoint &, const KoPoint & ) {} // only called if button is pressed
- virtual void mouseReleaseEvent( QMouseEvent *, const QPoint &, const KoPoint & ) {}
- virtual void mouseDoubleClickEvent( QMouseEvent *, const QPoint &, const KoPoint & ) {}
- virtual void dragEnterEvent( QDragEnterEvent * ) {}
- virtual void dragMoveEvent( QDragMoveEvent *, const QPoint &, const KoPoint & ) {}
- virtual void dragLeaveEvent( QDragLeaveEvent * ) {}
- virtual void dropEvent( QDropEvent *, const QPoint &, const KoPoint &, KWView* ) {}
+ virtual void keyPressEvent( TQKeyEvent * ) {}
+ virtual void keyReleaseEvent( TQKeyEvent * ) {}
+ virtual void imStartEvent( TQIMEvent * ) {}
+ virtual void imComposeEvent( TQIMEvent * ) {}
+ virtual void imEndEvent( TQIMEvent * ) {}
+ virtual void mousePressEvent( TQMouseEvent *, const TQPoint &, const KoPoint & ) {}
+ virtual void mouseMoveEvent( TQMouseEvent *, const TQPoint &, const KoPoint & ) {} // only called if button is pressed
+ virtual void mouseReleaseEvent( TQMouseEvent *, const TQPoint &, const KoPoint & ) {}
+ virtual void mouseDoubleClickEvent( TQMouseEvent *, const TQPoint &, const KoPoint & ) {}
+ virtual void dragEnterEvent( TQDragEnterEvent * ) {}
+ virtual void dragMoveEvent( TQDragMoveEvent *, const TQPoint &, const KoPoint & ) {}
+ virtual void dragLeaveEvent( TQDragLeaveEvent * ) {}
+ virtual void dropEvent( TQDropEvent *, const TQPoint &, const KoPoint &, KWView* ) {}
virtual void focusInEvent() {}
virtual void focusOutEvent() {}
virtual void copy() {}
virtual void cut() {}
virtual void paste() {}
virtual void selectAll() {}
- virtual void pasteData( QMimeSource* /*data*/, int /*provides*/, bool /*drop*/ ) {}
+ virtual void pasteData( TQMimeSource* /*data*/, int /*provides*/, bool /*drop*/ ) {}
/// Called if the cursor tries to leave the frameset at its beginning.
diff --git a/kword/KWFrameStyle.cpp b/kword/KWFrameStyle.cpp
index 5889bc62..44b83c56 100644
--- a/kword/KWFrameStyle.cpp
+++ b/kword/KWFrameStyle.cpp
@@ -29,17 +29,17 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qdom.h>
+#include <tqdom.h>
KWFrameStyleCollection::KWFrameStyleCollection()
- : KoUserStyleCollection( QString::fromLatin1( "frame" ) )
+ : KoUserStyleCollection( TQString::tqfromLatin1( "frame" ) )
{
}
void KWFrameStyleCollection::saveOasis( KoGenStyles& mainStyles, KoSavingContext& savingContext ) const
{
if ( !isDefault() ) {
- for ( QValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt )
+ for ( TQValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt )
{
KWFrameStyle* style = static_cast<KWFrameStyle *>( *styleIt );
style->saveOasis( mainStyles, savingContext );
@@ -49,14 +49,14 @@ void KWFrameStyleCollection::saveOasis( KoGenStyles& mainStyles, KoSavingContext
int KWFrameStyleCollection::loadOasisStyles( KoOasisContext& context )
{
- QValueVector<QDomElement> userStyles = context.oasisStyles().userStyles();
+ TQValueVector<TQDomElement> userStyles = context.oasisStyles().userStyles();
bool defaultStyleDeleted = false;
int stylesLoaded = 0;
for (unsigned int item = 0; item < userStyles.count(); item++) {
- QDomElement styleElem = userStyles[item];
+ TQDomElement styleElem = userStyles[item];
Q_ASSERT( !styleElem.isNull() );
- if ( styleElem.attributeNS( KoXmlNS::style, "family", QString::null ) != "graphic" )
+ if ( styleElem.attributeNS( KoXmlNS::style, "family", TQString() ) != "graphic" )
continue;
if ( !defaultStyleDeleted ) {
@@ -67,7 +67,7 @@ int KWFrameStyleCollection::loadOasisStyles( KoOasisContext& context )
defaultStyleDeleted = true;
}
- KWFrameStyle *sty = new KWFrameStyle( QString::null );
+ KWFrameStyle *sty = new KWFrameStyle( TQString() );
// Load the style
sty->loadOasis( styleElem, context );
// Style created, now let's try to add it
@@ -83,13 +83,13 @@ int KWFrameStyleCollection::loadOasisStyles( KoOasisContext& context )
/* Class: KWFrameStyle */
/******************************************************************/
-KWFrameStyle::KWFrameStyle( const QString & name )
+KWFrameStyle::KWFrameStyle( const TQString & name )
: KoUserStyle( name )
{
- m_backgroundColor.setColor( Qt::white );
+ m_backgroundColor.setColor( TQt::white );
}
-KWFrameStyle::KWFrameStyle( const QString & name, KWFrame * frame )
+KWFrameStyle::KWFrameStyle( const TQString & name, KWFrame * frame )
: KoUserStyle( name )
{
m_backgroundColor = frame->backgroundColor();
@@ -99,52 +99,52 @@ KWFrameStyle::KWFrameStyle( const QString & name, KWFrame * frame )
m_borderBottom = frame->bottomBorder();
}
-KWFrameStyle::KWFrameStyle( QDomElement & parentElem, int /*docVersion=2*/ )
- : KoUserStyle( QString::null )
+KWFrameStyle::KWFrameStyle( TQDomElement & tqparentElem, int /*docVersion=2*/ )
+ : KoUserStyle( TQString() )
{
- QDomElement element = parentElem.namedItem( "NAME" ).toElement();
+ TQDomElement element = tqparentElem.namedItem( "NAME" ).toElement();
if ( ( !element.isNull() ) && ( element.hasAttribute("value") ) ) {
m_name = element.attribute( "value" );
m_displayName = i18n( "Style name", m_name.utf8() );
} else
kdWarning() << "No NAME tag in frame style!" << endl;
- element = parentElem.namedItem( "LEFTBORDER" ).toElement();
+ element = tqparentElem.namedItem( "LEFTBORDER" ).toElement();
if ( !element.isNull() )
m_borderLeft = KoBorder::loadBorder( element );
else
m_borderLeft.setPenWidth( 0 );
- element = parentElem.namedItem( "RIGHTBORDER" ).toElement();
+ element = tqparentElem.namedItem( "RIGHTBORDER" ).toElement();
if ( !element.isNull() )
m_borderRight = KoBorder::loadBorder( element );
else
m_borderRight.setPenWidth( 0 );
- element = parentElem.namedItem( "TOPBORDER" ).toElement();
+ element = tqparentElem.namedItem( "TOPBORDER" ).toElement();
if ( !element.isNull() )
m_borderTop = KoBorder::loadBorder( element );
else
m_borderTop.setPenWidth( 0 );
- element = parentElem.namedItem( "BOTTOMBORDER" ).toElement();
+ element = tqparentElem.namedItem( "BOTTOMBORDER" ).toElement();
if ( !element.isNull() )
m_borderBottom = KoBorder::loadBorder( element );
else
m_borderBottom.setPenWidth( 0 );
- QColor c("white");
- if ( parentElem.hasAttribute("red") )
+ TQColor c("white");
+ if ( tqparentElem.hasAttribute("red") )
c.setRgb(
- KWDocument::getAttribute( parentElem, "red", 0 ),
- KWDocument::getAttribute( parentElem, "green", 0 ),
- KWDocument::getAttribute( parentElem, "blue", 0 ) );
+ KWDocument::getAttribute( tqparentElem, "red", 0 ),
+ KWDocument::getAttribute( tqparentElem, "green", 0 ),
+ KWDocument::getAttribute( tqparentElem, "blue", 0 ) );
- m_backgroundColor = QBrush( c );
+ m_backgroundColor = TQBrush( c );
}
KWFrameStyle::KWFrameStyle( const KWFrameStyle &rhs )
- : KoUserStyle( QString::null )
+ : KoUserStyle( TQString() )
{
operator=( rhs );
}
@@ -174,49 +174,49 @@ int KWFrameStyle::compare( const KWFrameStyle & frameStyle ) const
}
-void KWFrameStyle::saveFrameStyle( QDomElement & parentElem )
+void KWFrameStyle::saveFrameStyle( TQDomElement & tqparentElem )
{
- QDomDocument doc = parentElem.ownerDocument();
- QDomElement element = doc.createElement( "NAME" );
- parentElem.appendChild( element );
+ TQDomDocument doc = tqparentElem.ownerDocument();
+ TQDomElement element = doc.createElement( "NAME" );
+ tqparentElem.appendChild( element );
element.setAttribute( "value", displayName() );
if ( m_borderLeft.width() > 0 )
{
element = doc.createElement( "LEFTBORDER" );
- parentElem.appendChild( element );
+ tqparentElem.appendChild( element );
m_borderLeft.save( element );
}
if ( m_borderRight.width() > 0 )
{
element = doc.createElement( "RIGHTBORDER" );
- parentElem.appendChild( element );
+ tqparentElem.appendChild( element );
m_borderRight.save( element );
}
if ( m_borderTop.width() > 0 )
{
element = doc.createElement( "TOPBORDER" );
- parentElem.appendChild( element );
+ tqparentElem.appendChild( element );
m_borderTop.save( element );
}
if ( m_borderBottom.width() > 0 )
{
element = doc.createElement( "BOTTOMBORDER" );
- parentElem.appendChild( element );
+ tqparentElem.appendChild( element );
m_borderBottom.save( element );
}
if(m_backgroundColor.color().isValid())
{
- parentElem.setAttribute( "red", m_backgroundColor.color().red() );
- parentElem.setAttribute( "green", m_backgroundColor.color().green() );
- parentElem.setAttribute( "blue", m_backgroundColor.color().blue() );
+ tqparentElem.setAttribute( "red", m_backgroundColor.color().red() );
+ tqparentElem.setAttribute( "green", m_backgroundColor.color().green() );
+ tqparentElem.setAttribute( "blue", m_backgroundColor.color().blue() );
}
}
-KWFrameStyle *KWFrameStyle::loadStyle( QDomElement & parentElem, int docVersion )
+KWFrameStyle *KWFrameStyle::loadStyle( TQDomElement & tqparentElem, int docVersion )
{
- return new KWFrameStyle( parentElem, docVersion );
+ return new KWFrameStyle( tqparentElem, docVersion );
}
void KWFrameStyle::saveOasis( KoGenStyles& mainStyles, KoSavingContext& savingContext ) const
@@ -242,15 +242,15 @@ void KWFrameStyle::saveOasis( KoGenStyles& mainStyles, KoSavingContext& savingCo
}
// Background (taken from KWFrame::saveBorderProperties)
- if ( m_backgroundColor.style() == Qt::NoBrush )
+ if ( m_backgroundColor.style() == TQt::NoBrush )
frameStyle.addProperty( "fo:background-color", "transparent" );
else if ( m_backgroundColor.color().isValid() )
frameStyle.addProperty( "fo:background-color", m_backgroundColor.color().name() );
// try to preserve existing internal name, if it looks adequate (no spaces)
// ## TODO: check XML-Schemacs NCName conformity
- const bool nameIsConform = !m_name.isEmpty() && m_name.find( ' ' ) == -1;
- QString newName = m_name;
+ const bool nameIsConform = !m_name.isEmpty() && m_name.tqfind( ' ' ) == -1;
+ TQString newName = m_name;
if ( nameIsConform )
newName = mainStyles.lookup( frameStyle, m_name, KoGenStyles::DontForceNumbering );
else
@@ -258,11 +258,11 @@ void KWFrameStyle::saveOasis( KoGenStyles& mainStyles, KoSavingContext& savingCo
const_cast<KWFrameStyle*>( this )->m_name = newName;
}
-void KWFrameStyle::loadOasis( QDomElement & styleElem, KoOasisContext& context )
+void KWFrameStyle::loadOasis( TQDomElement & styleElem, KoOasisContext& context )
{
// Load name
- m_name = styleElem.attributeNS( KoXmlNS::style, "name", QString::null );
- m_displayName = styleElem.attributeNS( KoXmlNS::style, "display-name", QString::null );
+ m_name = styleElem.attributeNS( KoXmlNS::style, "name", TQString() );
+ m_displayName = styleElem.attributeNS( KoXmlNS::style, "display-name", TQString() );
if ( m_displayName.isEmpty() )
m_displayName = m_name;
@@ -270,14 +270,14 @@ void KWFrameStyle::loadOasis( QDomElement & styleElem, KoOasisContext& context )
styleStack.setTypeProperties( "graphic" );
styleStack.save();
- context.addStyles( &styleElem, "graphic" ); // Load all parents - only because we don't support inheritance.
+ context.addStyles( &styleElem, "graphic" ); // Load all tqparents - only because we don't support inheritance.
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "background-color" ) ) {
- QString color = styleStack.attributeNS( KoXmlNS::fo, "background-color" );
+ TQString color = styleStack.attributeNS( KoXmlNS::fo, "background-color" );
if ( color == "transparent" )
- m_backgroundColor = QBrush( QColor(), Qt::NoBrush );
+ m_backgroundColor = TQBrush( TQColor(), TQt::NoBrush );
else
- m_backgroundColor = QBrush( QColor( color ) /*, brush style is a dead feature, ignored */ );
+ m_backgroundColor = TQBrush( TQColor( color ) /*, brush style is a dead feature, ignored */ );
}
m_borderLeft.loadFoBorder( styleStack.attributeNS( KoXmlNS::fo, "border", "left") );
diff --git a/kword/KWFrameStyle.h b/kword/KWFrameStyle.h
index b699cd32..7b398c29 100644
--- a/kword/KWFrameStyle.h
+++ b/kword/KWFrameStyle.h
@@ -25,9 +25,9 @@
#include <KoUserStyleCollection.h>
#include "KoBorder.h"
-#include <qbrush.h>
+#include <tqbrush.h>
-class QDomElement;
+class TQDomElement;
class KoOasisContext;
class KoSavingContext;
class KoGenStyles;
@@ -42,10 +42,10 @@ class KWFrameStyle : public KoUserStyle
{
public:
/** Create a blank framestyle (with default attributes) */
- KWFrameStyle( const QString & name );
+ KWFrameStyle( const TQString & name );
- KWFrameStyle( const QString & name, KWFrame * frame );
- KWFrameStyle( QDomElement & parentElem, int docVersion=2 );
+ KWFrameStyle( const TQString & name, KWFrame * frame );
+ KWFrameStyle( TQDomElement & tqparentElem, int docVersion=2 );
/** Copy another framestyle */
KWFrameStyle( const KWFrameStyle & rhs );
@@ -60,8 +60,8 @@ public:
int compare( const KWFrameStyle & frameStyle ) const;
// ATTRIBUTES
- QBrush backgroundColor() const { return m_backgroundColor; }
- void setBackgroundColor( const QBrush &_color ) { m_backgroundColor = _color; }
+ TQBrush backgroundColor() const { return m_backgroundColor; }
+ void setBackgroundColor( const TQBrush &_color ) { m_backgroundColor = _color; }
const KoBorder & leftBorder() const { return m_borderLeft; }
void setLeftBorder( KoBorder _left ) { m_borderLeft = _left; }
@@ -76,17 +76,17 @@ public:
void setBottomBorder( KoBorder _bottom ) { m_borderBottom = _bottom; }
/// save (old xml format)
- void saveFrameStyle( QDomElement & parentElem );
+ void saveFrameStyle( TQDomElement & tqparentElem );
/// save (new oasis xml format)
void saveOasis( KoGenStyles& mainStyles, KoSavingContext& savingContext ) const;
/// load (old xml format)
- static KWFrameStyle *loadStyle( QDomElement & parentElem, int docVersion=2 );
+ static KWFrameStyle *loadStyle( TQDomElement & tqparentElem, int docVersion=2 );
/// load (new oasis xml format)
- void loadOasis( QDomElement & styleElem, KoOasisContext& context );
+ void loadOasis( TQDomElement & styleElem, KoOasisContext& context );
private:
- QBrush m_backgroundColor;
+ TQBrush m_backgroundColor;
KoBorder m_borderLeft, m_borderRight, m_borderTop, m_borderBottom;
};
@@ -98,13 +98,13 @@ class KWFrameStyleCollection : public KoUserStyleCollection
public:
KWFrameStyleCollection();
- static QString defaultStyleName() { return QString::fromLatin1( "Plain" ); }
+ static TQString defaultStyleName() { return TQString::tqfromLatin1( "Plain" ); }
/**
* Find style based on the untranslated name @p name.
* Overloaded for convenience
*/
- KWFrameStyle* findStyle( const QString & name ) const {
+ KWFrameStyle* findStyle( const TQString & name ) const {
return static_cast<KWFrameStyle*>( KoUserStyleCollection::findStyle( name, defaultStyleName() ) );
}
@@ -113,7 +113,7 @@ public:
* This is only for the old XML loading.
* Overloaded for convenience
*/
- KWFrameStyle* findStyleByDisplayName( const QString & name ) const {
+ KWFrameStyle* findStyleByDisplayName( const TQString & name ) const {
return static_cast<KWFrameStyle*>( KoUserStyleCollection::findStyleByDisplayName( name ) );
}
diff --git a/kword/KWFrameStyleManager.cpp b/kword/KWFrameStyleManager.cpp
index bf9be484..b0395d24 100644
--- a/kword/KWFrameStyleManager.cpp
+++ b/kword/KWFrameStyleManager.cpp
@@ -30,27 +30,27 @@
#include <klocale.h>
#include <kiconloader.h>
-#include <qtabwidget.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qbrush.h>
-#include <qgroupbox.h>
-#include <qpainter.h>
-#include <qlayout.h>
+#include <tqtabwidget.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqbrush.h>
+#include <tqgroupbox.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
/******************************************************************/
/* Class: KWTableStylePreview */
/******************************************************************/
#undef ptToPx
-#define ptToPx qRound
+#define ptToPx tqRound
-void KWFrameStylePreview::paintEvent( QPaintEvent * )
+void KWFrameStylePreview::paintEvent( TQPaintEvent * )
{
int wid = ( width() - 20 );
int hei = ( height() - 20 );
- QPainter p;
+ TQPainter p;
p.begin( this );
// 1: create borders
@@ -77,8 +77,8 @@ void KWFrameStylePreview::paintEvent( QPaintEvent * )
// 2.1: create background
- p.fillRect( QRect( QPoint(10 + int(ceil(frameStyle->leftBorder().width()/2)), 10 + int(ceil(frameStyle->topBorder().width()/2))),
- QPoint(10 + wid - int(floor(frameStyle->rightBorder().width()/2)+1), 10 + hei - int(floor(frameStyle->bottomBorder().width()/2)+1)) ),
+ p.fillRect( TQRect( TQPoint(10 + int(ceil(frameStyle->leftBorder().width()/2)), 10 + int(ceil(frameStyle->topBorder().width()/2))),
+ TQPoint(10 + wid - int(floor(frameStyle->rightBorder().width()/2)+1), 10 + hei - int(floor(frameStyle->bottomBorder().width()/2)+1)) ),
frameStyle->backgroundColor() );
p.end();
@@ -90,7 +90,7 @@ void KWFrameStylePreview::setFrameStyle( KWFrameStyle *_frameStyle )
frameStyle = _frameStyle;
- repaint( true );
+ tqrepaint( true );
}
/******************************************************************/
@@ -127,8 +127,8 @@ void KWFrameStyleListItem::apply()
/* Class: KWFrameStyleManager */
/******************************************************************/
-KWFrameStyleManager::KWFrameStyleManager( QWidget *_parent, KWDocument *_doc,
- const QString & activeStyleName )
+KWFrameStyleManager::KWFrameStyleManager( TQWidget *_parent, KWDocument *_doc,
+ const TQString & activeStyleName )
: KDialogBase( _parent, "", true,
i18n("Frame Style Manager"),
KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Apply| KDialogBase::User1 )
@@ -151,14 +151,14 @@ KWFrameStyleManager::KWFrameStyleManager( QWidget *_parent, KWDocument *_doc,
KWFrameStyleBackgroundTab *bgTab = new KWFrameStyleBackgroundTab( m_tabs );
addTab( bgTab );
- QListBoxItem * item = m_stylesList->findItem( activeStyleName );
+ TQListBoxItem * item = m_stylesList->tqfindItem( activeStyleName );
m_stylesList->setCurrentItem( item ? m_stylesList->index(item) : 0 );
noSignals=false;
switchStyle();
- setInitialSize( QSize( 600, 370 ) );
+ setInitialSize( TQSize( 600, 370 ) );
setButtonText( KDialogBase::User1, i18n("Import From File...") );
- connect(this, SIGNAL(user1Clicked()), this, SLOT(importFromFile()));
+ connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(importFromFile()));
}
KWFrameStyleManager::~KWFrameStyleManager()
@@ -175,15 +175,15 @@ void KWFrameStyleManager::addTab( KWFrameStyleManagerTab * tab )
void KWFrameStyleManager::setupWidget()
{
- QFrame * frame1 = makeMainWidget();
- QGridLayout *frame1Layout = new QGridLayout( frame1, 0, 0, // auto
+ TQFrame * frame1 = makeMainWidget();
+ TQGridLayout *frame1Layout = new TQGridLayout( frame1, 0, 0, // auto
0, KDialog::spacingHint() );
KWFrameStyleCollection* collection = m_doc->frameStyleCollection();
numFrameStyles = collection->count();
- m_stylesList = new QListBox( frame1, "stylesList" );
+ m_stylesList = new TQListBox( frame1, "stylesList" );
m_stylesList->insertStringList( collection->displayNameList() );
- const QValueList<KoUserStyle*> styleList = collection->styleList();
- for ( QValueList<KoUserStyle *>::const_iterator it = styleList.begin(), end = styleList.end();
+ const TQValueList<KoUserStyle*> styleList = collection->styleList();
+ for ( TQValueList<KoUserStyle *>::const_iterator it = styleList.begin(), end = styleList.end();
it != end ; ++it )
{
KWFrameStyle* style = static_cast<KWFrameStyle *>( *it );
@@ -196,66 +196,66 @@ void KWFrameStyleManager::setupWidget()
frame1Layout->addMultiCellWidget( m_stylesList, 0, 0, 0, 1 );
- m_moveUpButton = new QPushButton( frame1, "moveUpButton" );
+ m_moveUpButton = new TQPushButton( frame1, "moveUpButton" );
m_moveUpButton->setIconSet( SmallIconSet( "up" ) );
- connect( m_moveUpButton, SIGNAL( clicked() ), this, SLOT( moveUpStyle() ) );
+ connect( m_moveUpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( moveUpStyle() ) );
frame1Layout->addWidget( m_moveUpButton, 1, 1 );
- m_moveDownButton = new QPushButton( frame1, "moveDownButton" );
+ m_moveDownButton = new TQPushButton( frame1, "moveDownButton" );
m_moveDownButton->setIconSet( SmallIconSet( "down" ) );
- connect( m_moveDownButton, SIGNAL( clicked() ), this, SLOT( moveDownStyle() ) );
+ connect( m_moveDownButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( moveDownStyle() ) );
frame1Layout->addWidget( m_moveDownButton, 1, 0 );
- m_deleteButton = new QPushButton( frame1, "deleteButton" );
+ m_deleteButton = new TQPushButton( frame1, "deleteButton" );
m_deleteButton->setText( i18n( "&Delete" ) );
- connect( m_deleteButton, SIGNAL( clicked() ), this, SLOT( deleteStyle() ) );
+ connect( m_deleteButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deleteStyle() ) );
frame1Layout->addWidget( m_deleteButton, 2, 1 );
- m_newButton = new QPushButton( frame1, "newButton" );
+ m_newButton = new TQPushButton( frame1, "newButton" );
m_newButton->setText( i18n( "New" ) );
- connect( m_newButton, SIGNAL( clicked() ), this, SLOT( addStyle() ) );
+ connect( m_newButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addStyle() ) );
frame1Layout->addWidget( m_newButton, 2, 0 );
- m_tabs = new QTabWidget( frame1 );
+ m_tabs = new TQTabWidget( frame1 );
frame1Layout->addMultiCellWidget( m_tabs, 0, 2, 2, 2 );
- connect( m_stylesList, SIGNAL( selectionChanged() ), this, SLOT( switchStyle() ) );
- connect( m_tabs, SIGNAL( currentChanged ( QWidget * ) ), this, SLOT( switchTabs() ) );
+ connect( m_stylesList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( switchStyle() ) );
+ connect( m_tabs, TQT_SIGNAL( currentChanged ( TQWidget * ) ), this, TQT_SLOT( switchTabs() ) );
}
void KWFrameStyleManager::addGeneralTab()
{
- QWidget *tab = new QWidget( m_tabs );
+ TQWidget *tab = new TQWidget( m_tabs );
- QGridLayout *tabLayout = new QGridLayout( tab );
+ TQGridLayout *tabLayout = new TQGridLayout( tab );
tabLayout->setSpacing( KDialog::spacingHint() );
tabLayout->setMargin( KDialog::marginHint() );
- previewBox = new QGroupBox( 0, Qt::Vertical, i18n( "Preview" ), tab );
- previewBox->layout()->setSpacing(KDialog::spacingHint());
- previewBox->layout()->setMargin(KDialog::marginHint());
- QGridLayout *previewLayout = new QGridLayout( previewBox->layout() );
+ previewBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Preview" ), tab );
+ previewBox->tqlayout()->setSpacing(KDialog::spacingHint());
+ previewBox->tqlayout()->setMargin(KDialog::marginHint());
+ TQGridLayout *previewLayout = new TQGridLayout( previewBox->tqlayout() );
preview = new KWFrameStylePreview( previewBox );
- preview->resize(preview->sizeHint());
+ preview->resize(preview->tqsizeHint());
previewLayout->addWidget( preview, 0, 0 );
tabLayout->addMultiCellWidget( previewBox, 1, 1, 0, 1 );
- m_nameString = new QLineEdit( tab );
- m_nameString->resize(m_nameString->sizeHint() );
- connect( m_nameString, SIGNAL( textChanged( const QString &) ), this, SLOT( renameStyle(const QString &) ) );
+ m_nameString = new TQLineEdit( tab );
+ m_nameString->resize(m_nameString->tqsizeHint() );
+ connect( m_nameString, TQT_SIGNAL( textChanged( const TQString &) ), this, TQT_SLOT( renameStyle(const TQString &) ) );
tabLayout->addWidget( m_nameString, 0, 1 );
- QLabel *nameLabel = new QLabel( tab );
+ TQLabel *nameLabel = new TQLabel( tab );
nameLabel->setText( i18n( "Name:" ) );
- nameLabel->resize(nameLabel->sizeHint());
- nameLabel->setAlignment( AlignRight | AlignVCenter );
+ nameLabel->resize(nameLabel->tqsizeHint());
+ nameLabel->tqsetAlignment( AlignRight | AlignVCenter );
tabLayout->addWidget( nameLabel, 0, 0 );
@@ -313,7 +313,7 @@ int KWFrameStyleManager::frameStyleIndex( int pos ) {
void KWFrameStyleManager::updateGUI()
{
kdDebug() << "KWFrameStyleManager::updateGUI m_currentFrameStyle=" << m_currentFrameStyle << " " << m_currentFrameStyle->name() << endl;
- QPtrListIterator<KWFrameStyleManagerTab> it( m_tabsList );
+ TQPtrListIterator<KWFrameStyleManagerTab> it( m_tabsList );
for ( ; it.current() ; ++it )
{
it.current()->setStyle( m_currentFrameStyle );
@@ -339,7 +339,7 @@ void KWFrameStyleManager::updatePreview()
void KWFrameStyleManager::save() {
if(m_currentFrameStyle) {
// save changes from UI to object.
- QPtrListIterator<KWFrameStyleManagerTab> it( m_tabsList );
+ TQPtrListIterator<KWFrameStyleManagerTab> it( m_tabsList );
for ( ; it.current() ; ++it )
it.current()->save();
@@ -350,7 +350,7 @@ void KWFrameStyleManager::save() {
void KWFrameStyleManager::importFromFile()
{
// ## why not just use collection->displayNameList()?
- QStringList lst;
+ TQStringList lst;
for ( int i = 0; i<(int)m_stylesList->count();i++)
{
lst << m_stylesList->text(i);
@@ -362,11 +362,11 @@ void KWFrameStyleManager::importFromFile()
}
}
-void KWFrameStyleManager::addStyles( const QPtrList<KWFrameStyle> &listStyle )
+void KWFrameStyleManager::addStyles( const TQPtrList<KWFrameStyle> &listStyle )
{
save();
- QPtrListIterator<KWFrameStyle> style( listStyle );
+ TQPtrListIterator<KWFrameStyle> style( listStyle );
for ( ; style.current() ; ++style )
{
noSignals=true;
@@ -383,7 +383,7 @@ void KWFrameStyleManager::addStyle()
{
save();
- QString str = i18n( "New Framestyle Template (%1)" ).arg(numFrameStyles++);
+ TQString str = i18n( "New Framestyle Template (%1)" ).tqarg(numFrameStyles++);
if ( m_currentFrameStyle )
{
m_currentFrameStyle = new KWFrameStyle( *m_currentFrameStyle ); // Create a new style, initializing from the current one
@@ -425,10 +425,10 @@ void KWFrameStyleManager::moveUpStyle()
if(m_currentFrameStyle !=0L)
save();
unsigned int pos = 0;
- QString currentStyleName = m_stylesList->currentText();
+ TQString currentStyleName = m_stylesList->currentText();
if ( currentStyleName.isEmpty() )
return;
- int pos2 = m_styleOrder.findIndex( currentStyleName );
+ int pos2 = m_styleOrder.tqfindIndex( currentStyleName );
if ( pos2 > 0 ) // neither -1 nor 0
{
m_styleOrder.remove( m_styleOrder.at(pos2));
@@ -453,11 +453,11 @@ void KWFrameStyleManager::moveDownStyle()
if(m_currentFrameStyle !=0L)
save();
unsigned int pos = 0;
- QString currentStyleName=m_stylesList->currentText ();
+ TQString currentStyleName=m_stylesList->currentText ();
if ( currentStyleName.isEmpty() )
return;
- int pos2 = m_styleOrder.findIndex( currentStyleName );
+ int pos2 = m_styleOrder.tqfindIndex( currentStyleName );
if ( pos2 != -1 )
{
m_styleOrder.remove( m_styleOrder.at(pos2));
@@ -520,7 +520,7 @@ void KWFrameStyleManager::apply()
noSignals=false;
}
-void KWFrameStyleManager::renameStyle(const QString &theText) {
+void KWFrameStyleManager::renameStyle(const TQString &theText) {
if(noSignals) return;
noSignals=true;
@@ -564,44 +564,44 @@ void KWFrameStyleManager::renameStyle(const QString &theText) {
/* Class: KWFrameStyleBackgroundTab */
/******************************************************************/
-KWFrameStyleBackgroundTab::KWFrameStyleBackgroundTab( QWidget * parent )
- : KWFrameStyleManagerTab( parent )
+KWFrameStyleBackgroundTab::KWFrameStyleBackgroundTab( TQWidget * tqparent )
+ : KWFrameStyleManagerTab( tqparent )
{
bgwidget = this;
- m_backgroundColor.setStyle( SolidPattern );
+ m_backgroundColor.setStyle( Qt::SolidPattern );
- grid = new QGridLayout( bgwidget, 7, 2, KDialog::marginHint(), KDialog::spacingHint() );
+ grid = new TQGridLayout( bgwidget, 7, 2, KDialog::marginHint(), KDialog::spacingHint() );
int row=0;
brushPreview = new KWBrushStylePreview( bgwidget );
grid->addMultiCellWidget(brushPreview,row,5,1,1);
- QLabel *l = new QLabel( i18n( "Frame background color:" ), bgwidget );
+ TQLabel *l = new TQLabel( i18n( "Frame background color:" ), bgwidget );
grid->addWidget(l,row++,0);
- brushColor = new KColorButton( Qt::white, bgwidget );
+ brushColor = new KColorButton( TQt::white, bgwidget );
grid->addWidget(brushColor,row++,0);
- connect( brushColor, SIGNAL( changed( const QColor & ) ),
- this, SLOT( updateBrushConfiguration( const QColor & ) ) );
+ connect( brushColor, TQT_SIGNAL( changed( const TQColor & ) ),
+ this, TQT_SLOT( updateBrushConfiguration( const TQColor & ) ) );
- QSpacerItem* spacer = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQSpacerItem* spacer = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding);
grid->addItem( spacer,row,0 );
- updateBrushConfiguration( Qt::white );
+ updateBrushConfiguration( TQt::white );
}
-void KWFrameStyleBackgroundTab::updateBrushConfiguration( const QColor & _color )
+void KWFrameStyleBackgroundTab::updateBrushConfiguration( const TQColor & _color )
{
m_backgroundColor.setColor( _color );
brushPreview->show();
brushPreview->setBrush( m_backgroundColor );
- brushPreview->repaint(true);
+ brushPreview->tqrepaint(true);
}
-QString KWFrameStyleBackgroundTab::tabName()
+TQString KWFrameStyleBackgroundTab::tabName()
{
return i18n("Background");
}
@@ -621,8 +621,8 @@ void KWFrameStyleBackgroundTab::save()
/* Class: KWFrameStyleBordersTab */
/******************************************************************/
-KWFrameStyleBordersTab::KWFrameStyleBordersTab( QWidget * parent )
- : KWFrameStyleManagerTab( parent )
+KWFrameStyleBordersTab::KWFrameStyleBordersTab( TQWidget * tqparent )
+ : KWFrameStyleManagerTab( tqparent )
{
m_widget = 0L;
m_borders = new KoParagLayout();
@@ -633,7 +633,7 @@ KWFrameStyleBordersTab::~KWFrameStyleBordersTab()
delete m_borders;
}
-QString KWFrameStyleBordersTab::tabName()
+TQString KWFrameStyleBordersTab::tabName()
{
return m_widget->tabName();
}
@@ -663,9 +663,9 @@ void KWFrameStyleBordersTab::setWidget( KoParagLayoutWidget * widget )
m_widget = widget;
}
-void KWFrameStyleBordersTab::resizeEvent( QResizeEvent *e )
+void KWFrameStyleBordersTab::resizeEvent( TQResizeEvent *e )
{
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
if ( m_widget ) m_widget->resize( size() );
}
diff --git a/kword/KWFrameStyleManager.h b/kword/KWFrameStyleManager.h
index 4e73acc3..c44adb82 100644
--- a/kword/KWFrameStyleManager.h
+++ b/kword/KWFrameStyleManager.h
@@ -23,16 +23,16 @@
#include "KWFrameStyle.h"
#include <kdialogbase.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
-class QGroupBox;
-class QGridLayout;
-class QLineEdit;
-class QListBox;
-class QPushButton;
-class QTabWidget;
-class QWidget;
+class TQGroupBox;
+class TQGridLayout;
+class TQLineEdit;
+class TQListBox;
+class TQPushButton;
+class TQTabWidget;
+class TQWidget;
class KWDocument;
class KWFrameStyleManagerTab;
class KoParagLayoutWidget;
@@ -44,26 +44,27 @@ class KWBrushStylePreview;
/* Class: KWFrameStylePreview */
/******************************************************************/
-class KWFrameStylePreview : public QWidget
+class KWFrameStylePreview : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWFrameStylePreview( QWidget *parent )
- : QWidget( parent ), frameStyle( 0 ) {
+ KWFrameStylePreview( TQWidget *tqparent )
+ : TQWidget( tqparent ), frameStyle( 0 ) {
setBackgroundColor( white );
}
void setFrameStyle(KWFrameStyle *_frameStyle);
protected:
- void paintEvent( QPaintEvent *e );
+ void paintEvent( TQPaintEvent *e );
- void setTopBorder(KoBorder _bTop) { frameStyle->setTopBorder( _bTop ); repaint( true ); }
- void setBottomBorder(KoBorder _bBottom) { frameStyle->setBottomBorder( _bBottom ); repaint( true ); }
- void setRightBorder(KoBorder _bRight) { frameStyle->setRightBorder( _bRight ); repaint( true ); }
- void setLeftBorder(KoBorder _bLeft) { frameStyle->setLeftBorder( _bLeft ); repaint( true ); }
- void setBackground( const QColor & col ) { frameStyle->setBackgroundColor( col ); repaint( true ); }
+ void setTopBorder(KoBorder _bTop) { frameStyle->setTopBorder( _bTop ); tqrepaint( true ); }
+ void setBottomBorder(KoBorder _bBottom) { frameStyle->setBottomBorder( _bBottom ); tqrepaint( true ); }
+ void setRightBorder(KoBorder _bRight) { frameStyle->setRightBorder( _bRight ); tqrepaint( true ); }
+ void setLeftBorder(KoBorder _bLeft) { frameStyle->setLeftBorder( _bLeft ); tqrepaint( true ); }
+ void setBackground( const TQColor & col ) { frameStyle->setBackgroundColor( col ); tqrepaint( true ); }
KWFrameStyle *frameStyle;
};
@@ -101,14 +102,15 @@ class KWFrameStyleListItem
class KWFrameStyleManager : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWFrameStyleManager( QWidget *_parent, KWDocument *_doc,
- const QString & activeStyleName );
+ KWFrameStyleManager( TQWidget *_parent, KWDocument *_doc,
+ const TQString & activeStyleName );
~KWFrameStyleManager();
protected:
- void addStyles(const QPtrList<KWFrameStyle> & style );
+ void addStyles(const TQPtrList<KWFrameStyle> & style );
void setupWidget();
void addGeneralTab();
void apply();
@@ -117,21 +119,21 @@ protected:
void save();
int frameStyleIndex( int pos );
- QTabWidget *m_tabs;
- QListBox *m_stylesList;
- QLineEdit *m_nameString;
- QPushButton *m_deleteButton;
- QPushButton *m_newButton;
- QPushButton *m_moveUpButton;
- QPushButton *m_moveDownButton;
+ TQTabWidget *m_tabs;
+ TQListBox *m_stylesList;
+ TQLineEdit *m_nameString;
+ TQPushButton *m_deleteButton;
+ TQPushButton *m_newButton;
+ TQPushButton *m_moveUpButton;
+ TQPushButton *m_moveDownButton;
- QGroupBox *previewBox;
+ TQGroupBox *previewBox;
KWFrameStylePreview *preview;
KWFrameStyle *m_currentFrameStyle;
- QStringList m_styleOrder;
- QPtrList<KWFrameStyleListItem> m_frameStyles;
- QPtrList<KWFrameStyleManagerTab> m_tabsList;
+ TQStringList m_styleOrder;
+ TQPtrList<KWFrameStyleListItem> m_frameStyles;
+ TQPtrList<KWFrameStyleManagerTab> m_tabsList;
int numFrameStyles;
bool noSignals;
@@ -146,23 +148,24 @@ protected slots:
void deleteStyle();
void moveUpStyle();
void moveDownStyle();
- void renameStyle(const QString &);
+ void renameStyle(const TQString &);
void importFromFile();
protected:
void addTab( KWFrameStyleManagerTab * tab );
};
-class KWFrameStyleManagerTab : public QWidget {
+class KWFrameStyleManagerTab : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- KWFrameStyleManagerTab(QWidget *parent) : QWidget(parent) {};
+ KWFrameStyleManagerTab(TQWidget *tqparent) : TQWidget(tqparent) {};
/** the new style which is to be displayed */
void setStyle(KWFrameStyle *style) { m_style = style; }
/** update the GUI from the current Style*/
virtual void update() = 0;
/** return the (i18n-ed) name of the tab */
- virtual QString tabName() = 0;
+ virtual TQString tabName() = 0;
/** save the GUI to the style */
virtual void save() = 0;
protected:
@@ -172,18 +175,19 @@ protected:
class KWFrameStyleBackgroundTab : public KWFrameStyleManagerTab
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWFrameStyleBackgroundTab( QWidget * parent );
+ KWFrameStyleBackgroundTab( TQWidget * tqparent );
virtual void update();
virtual void save();
- virtual QString tabName();
+ virtual TQString tabName();
protected slots:
- void updateBrushConfiguration( const QColor & );
+ void updateBrushConfiguration( const TQColor & );
protected:
- QBrush m_backgroundColor;
- QWidget *bgwidget;
- QGridLayout *grid;
+ TQBrush m_backgroundColor;
+ TQWidget *bgwidget;
+ TQGridLayout *grid;
KColorButton *brushColor;
KWBrushStylePreview *brushPreview;
};
@@ -191,16 +195,17 @@ protected:
class KWFrameStyleBordersTab : public KWFrameStyleManagerTab
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWFrameStyleBordersTab( QWidget * parent );
+ KWFrameStyleBordersTab( TQWidget * tqparent );
~KWFrameStyleBordersTab();
void setWidget( KoParagLayoutWidget * widget );
virtual void update();
virtual void save();
- virtual QString tabName();
+ virtual TQString tabName();
protected:
- virtual void resizeEvent( QResizeEvent *e );
+ virtual void resizeEvent( TQResizeEvent *e );
KoParagLayoutWidget * m_widget;
KoParagLayout *m_borders; // Pity that I'm using such an overdosis for just borders :-(
diff --git a/kword/KWFrameView.cpp b/kword/KWFrameView.cpp
index d12a6b2d..38e7658a 100644
--- a/kword/KWFrameView.cpp
+++ b/kword/KWFrameView.cpp
@@ -33,14 +33,14 @@
#include <klocale.h>
#include <kactionclasses.h>
-#include <qapplication.h>
-#include <qpopupmenu.h>
+#include <tqapplication.h>
+#include <tqpopupmenu.h>
static const double HORIZONTAL_SNAP = 6; // horizontal snap zone (in pt)
static const double VERTICAL_SNAP = 6; // vertical snap zone (in pt)
-KWFrameView::KWFrameView(KWFrameViewManager *parent, KWFrame *frame) {
- m_manager = parent;
+KWFrameView::KWFrameView(KWFrameViewManager *tqparent, KWFrame *frame) {
+ m_manager = tqparent;
Q_ASSERT(frame);
Q_ASSERT(frame->frameSet());
m_frame = frame;
@@ -67,7 +67,7 @@ bool KWFrameView::isBorderHit(const KoPoint &point) const {
return hit(point, true, true);
}
-bool KWFrameView::contains(const KoPoint &point, bool fuzzy) const {
+bool KWFrameView::tqcontains(const KoPoint &point, bool fuzzy) const {
return hit(point, fuzzy, false);
}
@@ -120,15 +120,15 @@ void KWFrameView::setSelected(bool selected, MouseMeaning selectPolicy) {
m_selected = selected;
}
-void KWFrameView::showPopup( const KoPoint &point, KWView *view, const QPoint &popupPoint) const {
+void KWFrameView::showPopup( const KoPoint &point, KWView *view, const TQPoint &popupPoint) const {
view->unplugActionList( "tableactions" );
view->unplugActionList( "frameset_type_action" );
- QPopupMenu *popup = m_policy->createPopup(point, view);
+ TQPopupMenu *popup = m_policy->createPopup(point, view);
Q_ASSERT(popup);
popup->popup(popupPoint);
}
-void KWFrameView::paintFrameAttributes(QPainter *painter, const QRect &crect, KWViewMode *vm, KoZoomHandler *zh) {
+void KWFrameView::paintFrameAttributes(TQPainter *painter, const TQRect &crect, KWViewMode *vm, KoZoomHandler *zh) {
if( !m_selected )
return;
@@ -142,18 +142,18 @@ void KWFrameView::paintFrameAttributes(QPainter *painter, const QRect &crect, KW
readOnly = fs->isProtectSize() || fs->isMainFrameset() ||
fs->isAHeader() || fs->isAFooter() || fs->isFloating();
}
- void paint(QPainter *p, int x, int y) {
- p->setPen( QPen( Qt::black, 1, QPen::SolidLine ) );
- p->setBrush( QApplication::palette().color( QPalette::Active, QColorGroup::Highlight ) );
+ void paint(TQPainter *p, int x, int y) {
+ p->setPen( TQPen( TQt::black, 1, TQPen::SolidLine ) );
+ p->setBrush( TQApplication::palette().color( TQPalette::Active, TQColorGroup::Highlight ) );
p->drawRect( x, y, GRIP_SIZE, GRIP_SIZE );
if( readOnly ) { //protected frame
- QBrush brush = QApplication::palette().color( QPalette::Active,QColorGroup::Base );
+ TQBrush brush = TQApplication::palette().color( TQPalette::Active,TQColorGroup::Base );
p->fillRect( x+1, y+1, GRIP_SIZE-2, GRIP_SIZE-2, brush );
}
}
};
- const QRect frameRect = vm->normalToView( zh->zoomRect( *frame() ) );
+ const TQRect frameRect = vm->normalToView( zh->zoomRect( *frame() ) );
if ( crect.intersects( frameRect ) )
{
ResizeHandle handle(this);
@@ -178,16 +178,16 @@ FramePolicy::FramePolicy(KWFrameView *view) {
m_separator = new KActionSeparator();
m_view = view;
}
-void FramePolicy::addFloatingAction(KWView *view, QPtrList<KAction> &actionList) {
+void FramePolicy::addFloatingAction(KWView *view, TQPtrList<KAction> &actionList) {
if(m_view->frame()->frameSet()->isMainFrameset())
return;
actionList.append(m_separator);
KToggleAction *action = dynamic_cast<KToggleAction*> (view->actionCollection()->
action("inline_frame"));
Q_ASSERT(action);
- KWFrameSet *parentFs = m_view->frame()->frameSet()->groupmanager() ?
+ KWFrameSet *tqparentFs = m_view->frame()->frameSet()->groupmanager() ?
m_view->frame()->frameSet()->groupmanager() : m_view->frame()->frameSet();
- action->setChecked(parentFs->isFloating());
+ action->setChecked(tqparentFs->isFloating());
actionList.append(action);
}
MouseMeaning FramePolicy::mouseMeaningOnBorder( const KoPoint &point, int keyState ) {
@@ -206,7 +206,7 @@ MouseMeaning FramePolicy::mouseMeaningOnBorder( const KoPoint &point, int keySta
return MEANING_TOPLEFT;
if(point.y() >= frame->bottom() - vs)
return MEANING_BOTTOMLEFT;
- if( QABS(frame->y() + frame->height() / 2 - point.y()) <= vs )
+ if( TQABS(frame->y() + frame->height() / 2 - point.y()) <= vs )
return MEANING_LEFT;
return MEANING_MOUSE_MOVE;
}
@@ -215,18 +215,18 @@ MouseMeaning FramePolicy::mouseMeaningOnBorder( const KoPoint &point, int keySta
return MEANING_TOPRIGHT;
if(point.y() >= frame->bottom() - vs)
return MEANING_BOTTOMRIGHT;
- if( QABS(frame->y() + frame->height() / 2 - point.y()) <= vs )
+ if( TQABS(frame->y() + frame->height() / 2 - point.y()) <= vs )
return MEANING_RIGHT;
return MEANING_MOUSE_MOVE;
}
if( frame->y() + vs >= point.y() ) { // top edge
- if( QABS(frame->x() + frame->width() / 2 - point.x() ) <= hs )
+ if( TQABS(frame->x() + frame->width() / 2 - point.x() ) <= hs )
return MEANING_TOP;
return MEANING_MOUSE_MOVE;
}
if( frame->bottom() - vs <= point.y() ) { // bottom edge
- if( QABS(frame->x() + frame->width() / 2 - point.x() ) <= hs )
+ if( TQABS(frame->x() + frame->width() / 2 - point.x() ) <= hs )
return MEANING_BOTTOM;
return MEANING_MOUSE_MOVE;
}
@@ -239,16 +239,16 @@ MouseMeaning TableFramePolicy::mouseMeaning( const KoPoint &point, int keyState
Q_UNUSED(point);
// Found a frame under the cursor
// Ctrl -> select
- if ( keyState & Qt::ControlButton )
+ if ( keyState & TQt::ControlButton )
return MEANING_MOUSE_SELECT;
// Shift _and_ at least a frame is selected already
// (shift + no frame selected is used to select text)
- if ( (keyState & Qt::ShiftButton) && m_view->parent()->selectedFrame() != 0 )
+ if ( (keyState & TQt::ShiftButton) && m_view->tqparent()->selectedFrame() != 0 )
return MEANING_MOUSE_SELECT;
return MEANING_MOUSE_INSIDE_TEXT;
}
-QPopupMenu* TableFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
+TQPopupMenu* TableFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
view->plugActionList( "tableactions", view->tableActions() );
if( m_view->isBorderHit(point) )
return view->popupMenu("frame_popup_table");
@@ -258,16 +258,16 @@ MouseMeaning TableFramePolicy::mouseMeaningOnBorder(const KoPoint &point, int ke
KWFrame *frame = m_view->frame();
double hs = HORIZONTAL_SNAP; // horizontal snap zone (in pt)
double vs = VERTICAL_SNAP; // vertical snap zone (in pt)
- bool ctrl = keyState & Qt::ControlButton;
+ bool ctrl = keyState & TQt::ControlButton;
- if ( QABS( frame->x() - point.x() ) < hs
+ if ( TQABS( frame->x() - point.x() ) < hs
&& point.y() >= frame->y() && point.y() <= frame->bottom() ) {
if( static_cast<KWTableFrameSet::Cell *>(frame->frameSet())->firstColumn() == 0 )
return MEANING_SELECT_ROW;
if(!ctrl)
return MEANING_RESIZE_COLUMN;
}
- if ( QABS( frame->y() - point.y() ) < vs
+ if ( TQABS( frame->y() - point.y() ) < vs
&& point.x() >= frame->x() && point.x() <= frame->right() ) {
if( static_cast<KWTableFrameSet::Cell *>(frame->frameSet())->firstRow() == 0 )
return MEANING_SELECT_COLUMN;
@@ -277,10 +277,10 @@ MouseMeaning TableFramePolicy::mouseMeaningOnBorder(const KoPoint &point, int ke
if (ctrl)
return MEANING_MOUSE_SELECT;
- if ( QABS( frame->right() - point.x() ) < hs
+ if ( TQABS( frame->right() - point.x() ) < hs
&& point.y() >= frame->y() && point.y() <= frame->bottom() )
return MEANING_RESIZE_COLUMN;
- if ( QABS( frame->bottom() - point.y() ) < vs
+ if ( TQABS( frame->bottom() - point.y() ) < vs
&& point.x() >= frame->x() && point.x() <= frame->right() )
return MEANING_MOUSE_SELECT;
return MEANING_NONE;
@@ -291,7 +291,7 @@ void TableFramePolicy::setSelected(MouseMeaning selectPolicy) {
unsigned int column = static_cast<KWTableFrameSet::Cell *>(fs)->firstColumn();
for (KWTableFrameSet::TableIter cells(fs->groupmanager()); cells; ++cells) {
if(cells->firstColumn() >= column && cells->lastColumn() <= column) {
- KWFrameView *fv = m_view->parent()->view(cells->frame(0));
+ KWFrameView *fv = m_view->tqparent()->view(cells->frame(0));
if(fv)
fv->setSelected(true);
}
@@ -301,7 +301,7 @@ void TableFramePolicy::setSelected(MouseMeaning selectPolicy) {
unsigned int row = static_cast<KWTableFrameSet::Cell *>(fs)->firstRow();
for (KWTableFrameSet::TableIter cells(fs->groupmanager()); cells; ++cells) {
if(cells->firstRow() >= row && cells->lastRow() <= row) {
- KWFrameView *fv = m_view->parent()->view(cells->frame(0));
+ KWFrameView *fv = m_view->tqparent()->view(cells->frame(0));
if(fv)
fv->setSelected(true);
}
@@ -317,19 +317,19 @@ PartFramePolicy::PartFramePolicy(KWFrameView *view) : FramePolicy (view) {
MouseMeaning PartFramePolicy::mouseMeaning( const KoPoint &point, int keyState ) {
Q_UNUSED(point);
// Clicking on a selected part frame, but not on its border -> either resize or "activate part"
- if( keyState & Qt::ControlButton ) {
+ if( keyState & TQt::ControlButton ) {
return m_view->selected() ? MEANING_MOUSE_MOVE : MEANING_MOUSE_SELECT;
}
if ( m_view->selected() )
return MEANING_ACTIVATE_PART;
return MEANING_MOUSE_SELECT;
}
-QPopupMenu* PartFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
+TQPopupMenu* PartFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
Q_UNUSED(point);
KWPartFrameSet *part = static_cast<KWPartFrameSet *>(m_view->frame()->frameSet());
KActionSeparator *separator=new KActionSeparator();
KActionCollection *actionCollection = view->actionCollection();
- QPtrList<KAction> actionList;
+ TQPtrList<KAction> actionList;
actionList.append(separator);
if( !part->protectContent() ) {
KToggleAction *action = dynamic_cast<KToggleAction*>(actionCollection->action("embedded_store_internal"));
@@ -347,7 +347,7 @@ QPopupMenu* PartFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
TextFramePolicy::TextFramePolicy(KWFrameView *view) : FramePolicy (view) {
}
MouseMeaning TextFramePolicy::mouseMeaning( const KoPoint &point, int keyState ) {
- if( (keyState & Qt::ControlButton) == Qt::ControlButton )
+ if( (keyState & TQt::ControlButton) == TQt::ControlButton )
return MEANING_MOUSE_SELECT;
KWTextFrameSet *fs = dynamic_cast<KWTextFrameSet*>(m_view->frame()->frameSet());
if(fs == 0 || fs->kWordDocument() == 0)
@@ -364,12 +364,12 @@ MouseMeaning TextFramePolicy::mouseMeaning( const KoPoint &point, int keyState )
}
return MEANING_MOUSE_INSIDE_TEXT;
}
-QPopupMenu* TextFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
+TQPopupMenu* TextFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
if( m_view->isBorderHit(point) ) {
KWFrameSet *fs = m_view->frame()->frameSet();
KActionSeparator *separator=new KActionSeparator();
KActionCollection *actionCollection = view->actionCollection();
- QPtrList<KAction> actionList;
+ TQPtrList<KAction> actionList;
if(fs->isHeaderOrFooter()) {
actionList.append(separator);
actionList.append(actionCollection->action("configure_headerfooter"));
@@ -393,7 +393,7 @@ QPopupMenu* TextFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
KWTextFrameSetEdit *fse = static_cast<KWTextFrameSetEdit*> (view->getGUI()->
canvasWidget()->currentFrameSetEdit());
- QString word = fse->wordUnderCursor( *fse->cursor() );
+ TQString word = fse->wordUnderCursor( *fse->cursor() );
// Remove previous stuff
view->unplugActionList( "datatools" );
@@ -402,8 +402,8 @@ QPopupMenu* TextFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
view->unplugActionList( "datatools_link" );
// Those lists are stored in the KWView. Grab a ref to them.
- QPtrList<KAction> &actionList = view->dataToolActionList();
- QPtrList<KAction> &variableList = view->variableActionList();
+ TQPtrList<KAction> &actionList = view->dataToolActionList();
+ TQPtrList<KAction> &variableList = view->variableActionList();
actionList.clear();
variableList.clear();
@@ -443,7 +443,7 @@ QPopupMenu* TextFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
return view->popupMenu("footnote_popup");
}
if ( singleWord ) {
- QPtrList<KAction> actionCheckSpellList = view->listOfResultOfCheckWord( word );
+ TQPtrList<KAction> actionCheckSpellList = view->listOfResultOfCheckWord( word );
if ( !actionCheckSpellList.isEmpty() ) {
view->plugActionList( "spell_result_action", actionCheckSpellList );
return view->popupMenu("text_popup_spell_with_result");
@@ -462,11 +462,11 @@ MouseMeaning ImageFramePolicy::mouseMeaning( const KoPoint &point, int keyState
Q_UNUSED(keyState);
return m_view->selected() ? MEANING_MOUSE_MOVE: MEANING_MOUSE_SELECT;
}
-QPopupMenu* ImageFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
+TQPopupMenu* ImageFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
Q_UNUSED(point);
KActionSeparator *separator=new KActionSeparator();
KActionCollection *actionCollection = view->actionCollection();
- QPtrList<KAction> actionList;
+ TQPtrList<KAction> actionList;
actionList.append(separator);
KAction *action = actionCollection->action("change_picture");
Q_ASSERT(action);
diff --git a/kword/KWFrameView.h b/kword/KWFrameView.h
index 85e6981d..d4dcabde 100644
--- a/kword/KWFrameView.h
+++ b/kword/KWFrameView.h
@@ -28,7 +28,7 @@ class KoZoomHandler;
class KoPoint;
class KActionSeparator;
class KAction;
-class QPopupMenu;
+class TQPopupMenu;
/**
* This base class is an interface for Policies used in the KWFrameView.
@@ -38,19 +38,19 @@ public:
/** Constructor */
FramePolicy(KWFrameView *view);
/**
- * Return the MouseMeaning enum value for the parent view.
+ * Return the MouseMeaning enum value for the tqparent view.
* @param point the point where the mouse is hovering.
- * @param keyState the bitmask of keys that are pressed. Same as Event::state();
+ * @param keyState the bittqmask of keys that are pressed. Same as Event::state();
*/
virtual MouseMeaning mouseMeaning( const KoPoint &point, int keyState ) = 0;
/**
* Return a fully initialized popup for the context of frame at @p point
* @param point the point where the mouse is hovering.
- * @param view the parent view widget
+ * @param view the tqparent view widget
*/
- virtual QPopupMenu* createPopup( const KoPoint &point, KWView *view ) = 0;
+ virtual TQPopupMenu* createPopup( const KoPoint &point, KWView *view ) = 0;
/**
- * Override this method to do more than select the parent frame-view
+ * Override this method to do more than select the tqparent frame-view
*/
virtual void setSelected(MouseMeaning) { }
@@ -58,15 +58,15 @@ protected:
/**
* Shared method for all policies called when the border of the frame is clicked.
* @param point the point where the mouse is hovering.
- * @param keyState the bitmask of keys that are pressed. Same as Event::state();
+ * @param keyState the bittqmask of keys that are pressed. Same as Event::state();
*/
virtual MouseMeaning mouseMeaningOnBorder(const KoPoint &point, int keyState);
/**
* Shared method for all policies to add the 'set floating' action to a popup menu.
- * @param view the parent view widget
+ * @param view the tqparent view widget
* @param actionList the list of actions where the floating action should be added to
*/
- void addFloatingAction(KWView *view, QPtrList<KAction> &actionList);
+ void addFloatingAction(KWView *view, TQPtrList<KAction> &actionList);
KWFrameView *m_view;
KActionSeparator *m_separator;
@@ -83,10 +83,10 @@ class KWFrameView {
public:
/**
* Constructor
- * @param parent the parent
+ * @param tqparent the tqparent
* @param frame the frame this view represents.
*/
- KWFrameView(KWFrameViewManager *parent, KWFrame *frame);
+ KWFrameView(KWFrameViewManager *tqparent, KWFrame *frame);
virtual ~KWFrameView();
/// returns if this frameView is selected. A selected frame is shown differently on screen.
@@ -105,27 +105,27 @@ public:
/// returns if the @p point is on the border
bool isBorderHit(const KoPoint &point) const;
/// returns if the @p point is anywhere in te frame, if fuzzy is true; also a little outside
- bool contains(const KoPoint &point, bool fuzzy = true) const;
+ bool tqcontains(const KoPoint &point, bool fuzzy = true) const;
/**
- * Return the MouseMeaning enum value for the parent view.
+ * Return the MouseMeaning enum value for the tqparent view.
* @param point the point where the mouse is hovering.
- * @param keyState the bitmask of keys that are pressed. Same as Event::state();
+ * @param keyState the bittqmask of keys that are pressed. Same as Event::state();
*/
MouseMeaning mouseMeaning( const KoPoint &point, int keyState );
- /// Return the parent KWFrameViewManager this frameView belongs to
- KWFrameViewManager *parent() const { return m_manager; }
+ /// Return the tqparent KWFrameViewManager this frameView belongs to
+ KWFrameViewManager *tqparent() const { return m_manager; }
/**
* Show a context-sensitive popup menu based on the location of 'point'.
* @param point the point at which the mouse was clicked. The context is based on
* what is present at that location.
- * @param popupPoint the point in the same coordinate system as the parent widget of
+ * @param popupPoint the point in the same coordinate system as the tqparent widget of
* where the popup menu should be located.
- * @param view the parent widget for the popup.
+ * @param view the tqparent widget for the popup.
*/
- void showPopup( const KoPoint &point, KWView *view, const QPoint &popupPoint) const;
+ void showPopup( const KoPoint &point, KWView *view, const TQPoint &popupPoint) const;
/**
* Paint view based items of the frameView, like selected state
@@ -134,11 +134,11 @@ public:
* @param zh the zoomHandler to convert from internal coordinates to view coordinates
* @param vm the current Viewmode.
*/
- void paintFrameAttributes(QPainter *painter, const QRect &crect, KWViewMode *vm, KoZoomHandler *zh);
+ void paintFrameAttributes(TQPainter *painter, const TQRect &crect, KWViewMode *vm, KoZoomHandler *zh);
private:
/**
- * Helper method for isBorderHit() and contains()
+ * Helper method for isBorderHit() and tqcontains()
* @param point the point
* @param borderOnly if true; exclude the range inside the frame
* @param fuzzy don't take all the coordinates too strict, allow for some margin
@@ -157,7 +157,7 @@ class TableFramePolicy : public FramePolicy {
public:
TableFramePolicy(KWFrameView *view);
MouseMeaning mouseMeaning( const KoPoint &point, int keyState );
- QPopupMenu* createPopup( const KoPoint &point, KWView *view );
+ TQPopupMenu* createPopup( const KoPoint &point, KWView *view );
void setSelected(MouseMeaning selectPolicy);
protected:
@@ -169,7 +169,7 @@ class PartFramePolicy : public FramePolicy {
public:
PartFramePolicy(KWFrameView *view);
MouseMeaning mouseMeaning( const KoPoint &point, int keyState );
- QPopupMenu* createPopup( const KoPoint &point, KWView *view );
+ TQPopupMenu* createPopup( const KoPoint &point, KWView *view );
};
/** A policy for Text Frames */
@@ -177,7 +177,7 @@ class TextFramePolicy : public FramePolicy {
public:
TextFramePolicy(KWFrameView *view);
MouseMeaning mouseMeaning( const KoPoint &point, int keyState );
- QPopupMenu* createPopup( const KoPoint &point, KWView *view );
+ TQPopupMenu* createPopup( const KoPoint &point, KWView *view );
};
/** A policy for Image (aka Picture) Frames */
@@ -185,6 +185,6 @@ class ImageFramePolicy : public FramePolicy {
public:
ImageFramePolicy(KWFrameView *view);
MouseMeaning mouseMeaning( const KoPoint &point, int keyState );
- QPopupMenu* createPopup( const KoPoint &point, KWView *view );
+ TQPopupMenu* createPopup( const KoPoint &point, KWView *view );
};
#endif
diff --git a/kword/KWFrameViewManager.cpp b/kword/KWFrameViewManager.cpp
index 2e09ff5f..168a5d7c 100644
--- a/kword/KWFrameViewManager.cpp
+++ b/kword/KWFrameViewManager.cpp
@@ -23,12 +23,12 @@
#include <kdebug.h>
#include <kcursor.h>
-#include <qcursor.h>
-#include <qtimer.h>
-#include "qpopupmenu.h"
+#include <tqcursor.h>
+#include <tqtimer.h>
+#include "tqpopupmenu.h"
#include <algorithm>
-KWFrameViewManager::KWFrameViewManager() : QObject() {
+KWFrameViewManager::KWFrameViewManager() : TQObject() {
setName("KWFrameViewManager");
m_queueRequested = false;
m_blockEvents = false;
@@ -37,19 +37,19 @@ KWFrameViewManager::KWFrameViewManager() : QObject() {
KWFrameViewManager::KWFrameViewManager(KWDocument *doc) {
m_queueRequested = false;
m_blockEvents = true;
- QPtrListIterator<KWFrameSet> frameSets = doc->framesetsIterator();
+ TQPtrListIterator<KWFrameSet> frameSets = doc->framesetsIterator();
while(frameSets.current()) {
slotFrameSetAdded(*frameSets);
++frameSets;
}
m_blockEvents = false;
- connect(doc, SIGNAL( sigFrameSetAdded(KWFrameSet*)), SLOT( slotFrameSetAdded(KWFrameSet*)));
- connect(doc, SIGNAL( sigFrameSetRemoved(KWFrameSet*)), SLOT( slotFrameSetRemoved(KWFrameSet*)));
+ connect(doc, TQT_SIGNAL( sigFrameSetAdded(KWFrameSet*)), TQT_SLOT( slotFrameSetAdded(KWFrameSet*)));
+ connect(doc, TQT_SIGNAL( sigFrameSetRemoved(KWFrameSet*)), TQT_SLOT( slotFrameSetRemoved(KWFrameSet*)));
recalculateFrameCache();
}
KWFrameViewManager::~KWFrameViewManager() {
- QValueListIterator<FrameEvent *> events = m_frameEvents.begin();
+ TQValueListIterator<FrameEvent *> events = m_frameEvents.begin();
while(events != m_frameEvents.end()) {
delete (*events);
++events;
@@ -66,10 +66,10 @@ void KWFrameViewManager::removeKWFramesListener(KWFramesListener *listener) {
void KWFrameViewManager::slotFrameSetAdded(KWFrameSet *fs) {
if(! m_blockEvents)
m_frameEvents.append(new FrameEvent(FrameEvent::FrameSetAdded, fs));
- connect(fs, SIGNAL( sigFrameAdded(KWFrame*)), SLOT( slotFrameAdded(KWFrame *)));
- connect(fs, SIGNAL( sigFrameRemoved(KWFrame*)), SLOT( slotFrameRemoved(KWFrame *)));
- connect(fs, SIGNAL( sigNameChanged(KWFrameSet*)), SLOT( slotFrameSetRenamed(KWFrameSet *)));
- QPtrListIterator<KWFrame> frames = fs->frameIterator();
+ connect(fs, TQT_SIGNAL( sigFrameAdded(KWFrame*)), TQT_SLOT( slotFrameAdded(KWFrame *)));
+ connect(fs, TQT_SIGNAL( sigFrameRemoved(KWFrame*)), TQT_SLOT( slotFrameRemoved(KWFrame *)));
+ connect(fs, TQT_SIGNAL( sigNameChanged(KWFrameSet*)), TQT_SLOT( slotFrameSetRenamed(KWFrameSet *)));
+ TQPtrListIterator<KWFrame> frames = fs->frameIterator();
while(frames.current()) {
KWFrame *f = frames.current();
slotFrameAdded(f);
@@ -80,10 +80,10 @@ void KWFrameViewManager::slotFrameSetAdded(KWFrameSet *fs) {
void KWFrameViewManager::slotFrameSetRemoved(KWFrameSet *fs) {
if(! m_blockEvents)
m_frameEvents.append(new FrameEvent(FrameEvent::FrameSetRemoved, fs));
- disconnect(fs, SIGNAL( sigFrameAdded(KWFrame*)), this, SLOT( slotFrameAdded(KWFrame *)));
- disconnect(fs, SIGNAL( sigFrameRemoved(KWFrame*)), this, SLOT( slotFrameRemoved(KWFrame *)));
- disconnect(fs, SIGNAL( sigNameChanged(KWFrameSet*)), this, SLOT( slotFrameSetRenamed(KWFrameSet *)));
- QPtrListIterator<KWFrame> frames = fs->frameIterator();
+ disconnect(fs, TQT_SIGNAL( sigFrameAdded(KWFrame*)), this, TQT_SLOT( slotFrameAdded(KWFrame *)));
+ disconnect(fs, TQT_SIGNAL( sigFrameRemoved(KWFrame*)), this, TQT_SLOT( slotFrameRemoved(KWFrame *)));
+ disconnect(fs, TQT_SIGNAL( sigNameChanged(KWFrameSet*)), this, TQT_SLOT( slotFrameSetRenamed(KWFrameSet *)));
+ TQPtrListIterator<KWFrame> frames = fs->frameIterator();
while(frames.current()) {
KWFrame *f = frames.current();
slotFrameRemoved(f);
@@ -100,7 +100,7 @@ void KWFrameViewManager::slotFrameAdded(KWFrame *f) {
void KWFrameViewManager::slotFrameRemoved(KWFrame *f) {
if(! m_blockEvents)
m_frameEvents.append(new FrameEvent(FrameEvent::FrameRemoved, f));
- QValueListIterator<KWFrameView *> frames = m_frames.begin();
+ TQValueListIterator<KWFrameView *> frames = m_frames.begin();
while(frames != m_frames.end()) {
KWFrameView *fv = *frames;
if(fv->frame() == f) {
@@ -145,7 +145,7 @@ void KWFrameViewManager::requestFireEvents() {
if(m_queueRequested && !m_blockEvents)
return;
m_queueRequested = true;
- QTimer::singleShot ( 0, this, SLOT(fireEvents()) );
+ TQTimer::singleShot ( 0, this, TQT_SLOT(fireEvents()) );
}
void KWFrameViewManager::fireEvents() {
@@ -154,15 +154,15 @@ void KWFrameViewManager::fireEvents() {
return;
recalculateFrameCache();
- QValueList<FrameEvent *> copy(m_frameEvents);
+ TQValueList<FrameEvent *> copy(m_frameEvents);
m_frameEvents.clear();
- QValueList<KWFrame*> resizedFrames;
- QValueList<KWFrame*> movedFrames;
- QValueList<KWFramesListener *> listenersCopy(m_framesListener);
+ TQValueList<KWFrame*> resizedFrames;
+ TQValueList<KWFrame*> movedFrames;
+ TQValueList<KWFramesListener *> listenersCopy(m_framesListener);
bool selectionChangedFired=false;
- QValueListIterator<FrameEvent *> events = copy.begin();
+ TQValueListIterator<FrameEvent *> events = copy.begin();
while(events != copy.end()) {
FrameEvent *event = *events;
@@ -171,7 +171,7 @@ void KWFrameViewManager::fireEvents() {
emit sigFrameSelectionChanged();
selectionChangedFired = true; // only fire ones.
} else if(event->m_action == FrameEvent::FrameSetRenamed) {
- QPtrListIterator<KWFrame> frames = event->m_frameSet->frameIterator();
+ TQPtrListIterator<KWFrame> frames = event->m_frameSet->frameIterator();
for(;frames.current();++frames) {
if(view(frames.current())->selected()) {
emit sigFrameSetRenamed();
@@ -185,7 +185,7 @@ void KWFrameViewManager::fireEvents() {
}
// listener based
- QValueListIterator<KWFramesListener *> listeners = listenersCopy.begin();
+ TQValueListIterator<KWFramesListener *> listeners = listenersCopy.begin();
while(listeners != listenersCopy.end()) {
if(event->m_action == FrameEvent::FrameRemoved)
(*listeners)->frameRemoved(event->m_frame);
@@ -214,9 +214,9 @@ void KWFrameViewManager::recalculateFrameCache() {
}
KWFrameView *KWFrameViewManager::view(const KoPoint &point, SelectionType selected, bool borderOnly) const {
- QValueVector<KWFrameView*> framesThatAreHit = framesAt(point, borderOnly);
+ TQValueVector<KWFrameView*> framesThatAreHit = framesAt(point, borderOnly);
bool foundCycleFrame = false;
- QValueVector<KWFrameView*>::iterator sortedFrames = framesThatAreHit.begin();
+ TQValueVector<KWFrameView*>::iterator sortedFrames = framesThatAreHit.begin();
while(sortedFrames != framesThatAreHit.end()) {
if(selected == nextUnselected) {
if((*sortedFrames)->selected() )
@@ -237,15 +237,15 @@ KWFrameView *KWFrameViewManager::view(const KoPoint &point, SelectionType select
return 0;
}
-QValueVector<KWFrameView*> KWFrameViewManager::framesAt(const KoPoint &point, bool borderOnly) const {
- QValueVector<KWFrameView*> framesThatAreHit;
+TQValueVector<KWFrameView*> KWFrameViewManager::framesAt(const KoPoint &point, bool borderOnly) const {
+ TQValueVector<KWFrameView*> framesThatAreHit;
// This is probably the slowest and worst way to do it, mark this for optimalisation!
- for(QValueListConstIterator<KWFrameView*> frames = m_frames.begin();
+ for(TQValueListConstIterator<KWFrameView*> frames = m_frames.begin();
frames != m_frames.end(); ++frames) {
if(! (*frames)->frame()->frameSet()->isVisible())
continue;
if(borderOnly && (*frames)->isBorderHit(point) ||
- !borderOnly && (*frames)->contains(point))
+ !borderOnly && (*frames)->tqcontains(point))
framesThatAreHit.append(*frames);
}
// sort on z-ordering; top on first
@@ -255,7 +255,7 @@ QValueVector<KWFrameView*> KWFrameViewManager::framesAt(const KoPoint &point, bo
KWFrameView *KWFrameViewManager::view(const KWFrame *frame) const {
// This is probably the slowest and worst way to do it, mark this for optimalisation!
- QValueListConstIterator<KWFrameView*> frames = m_frames.begin();
+ TQValueListConstIterator<KWFrameView*> frames = m_frames.begin();
while(frames != m_frames.end()) {
if((*frames)->frame() == frame)
return *frames;
@@ -268,10 +268,10 @@ bool KWFrameViewManager::compareFrameViewZOrder(KWFrameView *f1, KWFrameView *f2
return f1->frame()->zOrder() >= f2->frame()->zOrder();
}
-QCursor KWFrameViewManager::mouseCursor( const KoPoint &point, int keyState ) const {
+TQCursor KWFrameViewManager::mouseCursor( const KoPoint &point, int keyState ) const {
KWFrameView *view = 0;
- QValueVector<KWFrameView*> framesThatAreHit = framesAt(point);
- QValueVector<KWFrameView*>::iterator sortedFrames = framesThatAreHit.begin();
+ TQValueVector<KWFrameView*> framesThatAreHit = framesAt(point);
+ TQValueVector<KWFrameView*>::iterator sortedFrames = framesThatAreHit.begin();
MouseMeaning meaning;
while(sortedFrames != framesThatAreHit.end()) {
meaning = (*sortedFrames)->mouseMeaning(point, keyState);
@@ -283,65 +283,56 @@ QCursor KWFrameViewManager::mouseCursor( const KoPoint &point, int keyState ) co
}
if(view == 0)
- return QCursor(); // default arrow shape
+ return TQCursor(); // default arrow tqshape
KWFrameSet*frameSet = view->frame()->frameSet();
switch ( meaning ) {
case MEANING_NONE:
- return Qt::ibeamCursor; // default cursor in margins
+ return TQt::ibeamCursor; // default cursor in margins
case MEANING_MOUSE_INSIDE:
- return QCursor(); // default arrow shape
+ return TQCursor(); // default arrow tqshape
case MEANING_MOUSE_INSIDE_TEXT:
- return Qt::ibeamCursor;
+ return TQt::ibeamCursor;
case MEANING_MOUSE_OVER_LINK:
- return Qt::PointingHandCursor;
+ return TQt::PointingHandCursor;
case MEANING_MOUSE_OVER_FOOTNOTE:
- return Qt::PointingHandCursor;
+ return TQt::PointingHandCursor;
case MEANING_MOUSE_MOVE:
- return Qt::sizeAllCursor;
+ return TQt::sizeAllCursor;
case MEANING_MOUSE_SELECT:
return KCursor::handCursor();
case MEANING_ACTIVATE_PART:
return KCursor::handCursor();
case MEANING_TOPLEFT:
case MEANING_BOTTOMRIGHT:
- return Qt::sizeFDiagCursor;
+ return TQt::sizeFDiagCursor;
case MEANING_LEFT:
case MEANING_RIGHT:
- return Qt::sizeHorCursor;
+ return TQt::sizeHorCursor;
case MEANING_BOTTOMLEFT:
case MEANING_TOPRIGHT:
- return Qt::sizeBDiagCursor;
+ return TQt::sizeBDiagCursor;
case MEANING_TOP:
case MEANING_BOTTOM:
if ( frameSet->isProtectSize() || frameSet->isMainFrameset())
- return Qt::forbiddenCursor;
- return Qt::sizeVerCursor;
+ return TQt::forbiddenCursor;
+ return TQt::sizeVerCursor;
case MEANING_RESIZE_COLUMN:
- // Bug in Qt up to Qt-3.1.1 : Qt::splitVCursor and Qt::splitHCursor are swapped!
-#if QT_VERSION <= 0x030101
- return Qt::splitVCursor;
-#else
- return Qt::splitHCursor;
-#endif
+ return TQt::splitHCursor;
case MEANING_RESIZE_ROW:
-#if QT_VERSION <= 0x030101
- return Qt::splitHCursor;
-#else
- return Qt::splitVCursor;
-#endif
+ return TQt::splitVCursor;
case MEANING_SELECT_RANGE:
case MEANING_SELECT_COLUMN:
case MEANING_SELECT_ROW:
case MEANING_FORBIDDEN:
return KCursor::handCursor();
}
- return QCursor(); // default arrow shape
+ return TQCursor(); // default arrow tqshape
}
MouseMeaning KWFrameViewManager::mouseMeaning( const KoPoint &point, int keyState) const {
- QValueVector<KWFrameView*> framesThatAreHit = framesAt(point);
- QValueVector<KWFrameView*>::iterator sortedFrames = framesThatAreHit.begin();
+ TQValueVector<KWFrameView*> framesThatAreHit = framesAt(point);
+ TQValueVector<KWFrameView*>::iterator sortedFrames = framesThatAreHit.begin();
while(sortedFrames != framesThatAreHit.end()) {
MouseMeaning answer = (*sortedFrames)->mouseMeaning(point, keyState);
if(answer != MEANING_NONE) {
@@ -353,10 +344,10 @@ MouseMeaning KWFrameViewManager::mouseMeaning( const KoPoint &point, int keyStat
return MEANING_NONE;
}
-QValueList<KWFrameView*> KWFrameViewManager::selectedFrames() const {
- QValueList<KWFrameView*> selectedFrames;
+TQValueList<KWFrameView*> KWFrameViewManager::selectedFrames() const {
+ TQValueList<KWFrameView*> selectedFrames;
- QValueList<KWFrameView*>::const_iterator frames = m_frames.begin();
+ TQValueList<KWFrameView*>::const_iterator frames = m_frames.begin();
for(; frames != m_frames.end(); ++frames )
if( (*frames)->selected() )
selectedFrames.append( *frames );
@@ -364,27 +355,27 @@ QValueList<KWFrameView*> KWFrameViewManager::selectedFrames() const {
}
KWFrameView* KWFrameViewManager::selectedFrame() const {
- QValueList<KWFrameView*>::const_iterator frames = m_frames.begin();
+ TQValueList<KWFrameView*>::const_iterator frames = m_frames.begin();
for(; frames != m_frames.end(); ++frames )
if( (*frames)->selected() )
return *frames;
return 0;
}
-void KWFrameViewManager::showPopup( const KoPoint &point, KWView *view, int keyState, const QPoint &popupPoint) const {
- QValueVector<KWFrameView*> framesThatAreHit = framesAt(point);
+void KWFrameViewManager::showPopup( const KoPoint &point, KWView *view, int keyState, const TQPoint &popupPoint) const {
+ TQValueVector<KWFrameView*> framesThatAreHit = framesAt(point);
if(framesThatAreHit.count() == 0) {
view->popupMenu("action_popup")->popup(popupPoint);
return;
}
- if(keyState == Qt::ControlButton) {
+ if(keyState == TQt::ControlButton) {
// show the border popup of the top most frame.
framesThatAreHit[0]->showPopup(framesThatAreHit[0]->frame()->topLeft(), view, popupPoint);
return;
}
- QValueVector<KWFrameView*>::iterator iter = framesThatAreHit.begin();
+ TQValueVector<KWFrameView*>::iterator iter = framesThatAreHit.begin();
while(iter != framesThatAreHit.end()) {
- if( (*iter)->selected() && keyState == Qt::ControlButton ) {
+ if( (*iter)->selected() && keyState == TQt::ControlButton ) {
(*iter)->showPopup(point, view, popupPoint);
return;
}
@@ -395,18 +386,18 @@ void KWFrameViewManager::showPopup( const KoPoint &point, KWView *view, int keyS
void KWFrameViewManager::selectFrames(const KoPoint &point, int keyState, bool leftClick) {
MouseMeaning mm = mouseMeaning(point, keyState);
- bool multiSelect = mm == MEANING_MOUSE_SELECT || ( keyState & Qt::ControlButton );
+ bool multiSelect = mm == MEANING_MOUSE_SELECT || ( keyState & TQt::ControlButton );
SelectionType se = frameOnTop;
if(leftClick && multiSelect)
se = nextUnselected;
KWFrameView *toBeSelected = view(point, se, !multiSelect);
//kdDebug() << "KWFrameViewManager::selectFrames" << point << " got: " << toBeSelected << endl;
- if(toBeSelected == 0 || (keyState & Qt::ControlButton) == 0 || ( keyState & Qt::ShiftButton ) &&
+ if(toBeSelected == 0 || (keyState & TQt::ControlButton) == 0 || ( keyState & TQt::ShiftButton ) &&
!(leftClick && (mm == MEANING_TOPLEFT || mm == MEANING_TOPRIGHT || mm == MEANING_TOP ||
mm == MEANING_LEFT || mm == MEANING_RIGHT || mm == MEANING_MOUSE_MOVE ||
mm == MEANING_BOTTOMLEFT || mm == MEANING_BOTTOM || mm == MEANING_BOTTOMRIGHT))) {
// unselect all
- for(QValueListConstIterator<KWFrameView*> frames = m_frames.begin();
+ for(TQValueListConstIterator<KWFrameView*> frames = m_frames.begin();
frames != m_frames.end(); ++frames) {
(*frames)->setSelected(false);
}
diff --git a/kword/KWFrameViewManager.h b/kword/KWFrameViewManager.h
index 765b8688..43ec918e 100644
--- a/kword/KWFrameViewManager.h
+++ b/kword/KWFrameViewManager.h
@@ -17,10 +17,10 @@
*/
#ifndef kwframeviewmanager_h
#define kwframeviewmanager_h
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
#include <defs.h>
class KWDocument;
@@ -35,8 +35,8 @@ class KWFrameView;
class KoPoint;
class KoRect;
-class QPointer;
-class QRegion;
+class TQPointer;
+class TQRegion;
/**
* Class that knows about all the (visible) frames in the document and will act as
@@ -48,8 +48,9 @@ class QRegion;
* coordinates in pixels should first be converted in the KoZoomHandler (in KWord
* that's the KWDocument)
*/
-class KWFrameViewManager : public QObject {
+class KWFrameViewManager : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
KWFrameViewManager();
@@ -89,42 +90,42 @@ public:
/**
* Return all currently selected frames.
*/
- QValueList<KWFrameView*> selectedFrames() const;
+ TQValueList<KWFrameView*> selectedFrames() const;
/**
* Returns the first selected frame.
* Is the same as selectedFrames()[0]
*/
KWFrameView* selectedFrame() const;
- // this should be changed to a real iterator when Qt4 is used.
- const QValueList<KWFrameView*> frameViewsIterator() const { return m_frames; }
+ // this should be changed to a real iterator when TQt4 is used.
+ const TQValueList<KWFrameView*> frameViewsIterator() const { return m_frames; }
/**
* Return the MouseMeaning of what a click of the mouse would do at the @p point.
* All the frames that have a presence at the point are considered and depending on
* what kind of frame and where in the frame the mouse is the meaning is calculated.
* @param point the point where the mouse is hovering.
- * @param keyState the bitmask of keys that are pressed. Same as Event::state();
+ * @param keyState the bittqmask of keys that are pressed. Same as Event::state();
*/
MouseMeaning mouseMeaning( const KoPoint &point, int keyState) const;
/**
* Similar to mouseMeaning(), but instead of returning the meaning this will return
* a mouse cursor to represent the action.
* @param point the point where the mouse is hovering.
- * @param keyState the bitmask of keys that are pressed. Same as Event::state();
+ * @param keyState the bittqmask of keys that are pressed. Same as Event::state();
*/
- QCursor mouseCursor( const KoPoint &point, int keyState ) const;
+ TQCursor mouseCursor( const KoPoint &point, int keyState ) const;
/**
* Show a context-sensitive popup menu based on the location of 'point'.
* @param point the point at which the mouse was clicked. The context is based on
* what is present at that location.
- * @param keyState the bitmask of keys that are pressed. Same as Event::state();
- * @param popupPoint the point in the same coordinate system as the parent widget of
+ * @param keyState the bittqmask of keys that are pressed. Same as Event::state();
+ * @param popupPoint the point in the same coordinate system as the tqparent widget of
* where the popup menu should be located.
- * @param view the parent widget for the popup.
+ * @param view the tqparent widget for the popup.
*/
- void showPopup( const KoPoint &point, KWView *view, int keyState, const QPoint &popupPoint) const;
+ void showPopup( const KoPoint &point, KWView *view, int keyState, const TQPoint &popupPoint) const;
// listeners; see the fireEvents method signature for more info.
void addKWFramesListener(KWFramesListener *listener);
@@ -136,7 +137,7 @@ public:
* / or unselecting any frames based on this information.
* @param leftClick true if this select is due to the main button being clicked.
* @param point the point clicked.
- * @param keyState the bitmask of keys that are pressed. Same as Event::state();
+ * @param keyState the bittqmask of keys that are pressed. Same as Event::state();
*/
void selectFrames(const KoPoint &point, int keyState, bool leftClick);
@@ -169,9 +170,9 @@ signals:
/// emitted after a frameset that had at least one selected frame was renamed.
void sigFrameSetRenamed();
/// emitted after frames were resized
- void sigFrameResized(const QValueList<KWFrame*>&);
+ void sigFrameResized(const TQValueList<KWFrame*>&);
/// emitted after frames were moved
- void sigFrameMoved(const QValueList<KWFrame*>&);
+ void sigFrameMoved(const TQValueList<KWFrame*>&);
protected slots:
/**
@@ -212,7 +213,7 @@ private:
* @param point the location the frame should occupy
* @param borderOnly if true, only return frames that are hit in the border by point.
*/
- QValueVector<KWFrameView*> framesAt(const KoPoint &point, bool borderOnly = false) const;
+ TQValueVector<KWFrameView*> framesAt(const KoPoint &point, bool borderOnly = false) const;
/**
* This is a method used to sort a list using the STL sorting methods.
* @param f1 the first object
@@ -221,9 +222,9 @@ private:
static bool compareFrameViewZOrder(KWFrameView *f1, KWFrameView *f2);
private:
- QValueList<KWFrameView*> m_frames; // TODO QHash<KWFrame*,KWFrameView*>
- QValueList<KWFramesListener*> m_framesListener;
- QValueList<FrameEvent*> m_frameEvents;
+ TQValueList<KWFrameView*> m_frames; // TODO TQHash<KWFrame*,KWFrameView*>
+ TQValueList<KWFramesListener*> m_framesListener;
+ TQValueList<FrameEvent*> m_frameEvents;
bool m_queueRequested, m_blockEvents;
};
diff --git a/kword/KWImportStyleDia.cpp b/kword/KWImportStyleDia.cpp
index b49a8bb4..b8341d20 100644
--- a/kword/KWImportStyleDia.cpp
+++ b/kword/KWImportStyleDia.cpp
@@ -20,24 +20,24 @@
#include <klocale.h>
#include "KWDocument.h"
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
#include <kmessagebox.h>
#include "KWImportStyleDia.h"
#include <KoStore.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kfiledialog.h>
#include <kdebug.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include "KWTextParag.h"
-KWImportStyleDia::KWImportStyleDia( KWDocument *_doc, KoStyleCollection* currentCollection, QWidget *parent, const char *name )
- :KoImportStyleDia( currentCollection, parent, name ),
+KWImportStyleDia::KWImportStyleDia( KWDocument *_doc, KoStyleCollection* currentCollection, TQWidget *tqparent, const char *name )
+ :KoImportStyleDia( currentCollection, tqparent, name ),
m_doc(_doc)
{
@@ -50,15 +50,15 @@ KWImportStyleDia::~KWImportStyleDia()
void KWImportStyleDia::loadFile()
{
- KFileDialog fd( QString::null, QString::null, 0, 0, TRUE );
- QStringList lst = "application/x-kword";
+ KFileDialog fd( TQString(), TQString(), 0, 0, TRUE );
+ TQStringList lst = "application/x-kword";
#if 0
lst << "application/vnd.oasis.opendocument.text";
#endif
fd.setMimeFilter( lst );
fd.setCaption(i18n("Import Style"));
KURL url;
- if ( fd.exec() != QDialog::Accepted )
+ if ( fd.exec() != TQDialog::Accepted )
return;
url = fd.selectedURL();
if( url.isEmpty() )
@@ -68,7 +68,7 @@ void KWImportStyleDia::loadFile()
i18n("Import Style"));
return;
}
- QMap<QString, QString>insertStyle;
+ TQMap<TQString, TQString>insertStyle;
KoStore* store=KoStore::createStore( this, url, KoStore::Read );
if (store )
@@ -78,10 +78,10 @@ void KWImportStyleDia::loadFile()
clear();
m_listStyleName->clear();
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( store->device() );
- QDomElement word = doc.documentElement();
- QDomElement stylesElem = word.namedItem( "STYLES" ).toElement();
+ TQDomElement word = doc.documentElement();
+ TQDomElement stylesElem = word.namedItem( "STYLES" ).toElement();
if ( !stylesElem.isNull() )
{
//todo
@@ -92,17 +92,17 @@ void KWImportStyleDia::loadFile()
// I guess we'll have to keep this old loading code forever though,
// so we can't really get rid of the subclasses.
- QValueList<QString> followingStyles;
- QDomNodeList listStyles = stylesElem.elementsByTagName( "STYLE" );
+ TQValueList<TQString> followingStyles;
+ TQDomNodeList listStyles = stylesElem.elementsByTagName( "STYLE" );
for (unsigned int item = 0; item < listStyles.count(); item++)
{
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
- KoParagStyle *sty = new KoParagStyle( QString::null );
- // Load the paraglayout from the <STYLE> element
+ KoParagStyle *sty = new KoParagStyle( TQString() );
+ // Load the paragtqlayout from the <STYLE> element
sty->loadStyle( styleElem, m_doc->syntaxVersion() ); //#### wrong syntaxVersion!
- QString name = sty->displayName();
+ TQString name = sty->displayName();
if ( currentCollection()->findStyle( name ) )
sty->setName(generateStyleName(sty->name() + "-%1"));
// ### TODO: we should offer the option of updating the
@@ -111,7 +111,7 @@ void KWImportStyleDia::loadFile()
sty->setDisplayName(generateStyleDisplayName(sty->displayName() + "-%1"));
insertStyle.insert( name, sty->name() ); // old name -> new name
- QDomElement formatElem = styleElem.namedItem( "FORMAT" ).toElement();
+ TQDomElement formatElem = styleElem.namedItem( "FORMAT" ).toElement();
if ( !formatElem.isNull() )
sty->format() = KWTextParag::loadFormat( formatElem, 0L, m_doc->defaultFont(), m_doc->globalLanguage(), m_doc->globalHyphenation() );
else
@@ -122,7 +122,7 @@ void KWImportStyleDia::loadFile()
if( m_styleList.count() >= 0 && uint( m_styleList.count() ) > followingStyles.count() )
{
- QString following = styleElem.namedItem("FOLLOWING").toElement().attribute("name");
+ TQString following = styleElem.namedItem("FOLLOWING").toElement().attribute("name");
followingStyles.append( following );
}
else
@@ -132,9 +132,9 @@ void KWImportStyleDia::loadFile()
Q_ASSERT( m_styleList.count() >= 0 && followingStyles.count() == uint( m_styleList.count() ) );
unsigned int i=0;
- for( QValueList<QString>::Iterator it = followingStyles.begin(); it != followingStyles.end(); ++it ) {
- QString newName =*it;
- if ( insertStyle.contains( *it ) )
+ for( TQValueList<TQString>::Iterator it = followingStyles.begin(); it != followingStyles.end(); ++it ) {
+ TQString newName =*it;
+ if ( insertStyle.tqcontains( *it ) )
newName = (insertStyle)[ *it ];
KoParagStyle * style = m_styleList.findStyle(newName);
@@ -166,17 +166,17 @@ void KWImportStyleDia::loadFile()
delete store;
}
-KWImportFrameTableStyleDia::KWImportFrameTableStyleDia( KWDocument *_doc, const QStringList &_list, StyleType _type, QWidget *parent, const char *name )
- : KDialogBase( parent, name , true, "", Ok|Cancel, Ok, true )
+KWImportFrameTableStyleDia::KWImportFrameTableStyleDia( KWDocument *_doc, const TQStringList &_list, StyleType _type, TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name , true, "", Ok|Cancel, Ok, true )
{
setCaption( i18n("Import Style") );
m_doc=_doc;
m_typeStyle = _type;
m_list =_list;
- QVBox *page = makeVBoxMainWidget();
- new QLabel(i18n("Select style to import:"), page);
- m_listStyleName = new QListBox( page );
- m_listStyleName->setSelectionMode( QListBox::Multi );
+ TQVBox *page = makeVBoxMainWidget();
+ new TQLabel(i18n("Select style to import:"), page);
+ m_listStyleName = new TQListBox( page );
+ m_listStyleName->setSelectionMode( TQListBox::Multi );
loadFile();
resize (300, 400);
setFocus();
@@ -190,14 +190,14 @@ KWImportFrameTableStyleDia::~KWImportFrameTableStyleDia()
m_tableStyleList.clear();
}
-QString KWImportFrameTableStyleDia::generateStyleName( const QString & templateName )
+TQString KWImportFrameTableStyleDia::generateStyleName( const TQString & templateName )
{
- QString name;
+ TQString name;
int num = 1;
bool exists;
do {
- name = templateName.arg( num );
- exists = (m_list.findIndex( name )!=-1);
+ name = templateName.tqarg( num );
+ exists = (m_list.tqfindIndex( name )!=-1);
++num;
} while ( exists );
return name;
@@ -206,15 +206,15 @@ QString KWImportFrameTableStyleDia::generateStyleName( const QString & templateN
void KWImportFrameTableStyleDia::loadFile()
{
- KFileDialog fd( QString::null, QString::null, 0, 0, TRUE );
- QStringList lst = "application/x-kword";
+ KFileDialog fd( TQString(), TQString(), 0, 0, TRUE );
+ TQStringList lst = "application/x-kword";
#if 0
lst << "application/vnd.oasis.opendocument.text";
#endif
fd.setMimeFilter( lst );
fd.setCaption(i18n("Import Style"));
KURL url;
- if ( fd.exec() != QDialog::Accepted )
+ if ( fd.exec() != TQDialog::Accepted )
return;
url = fd.selectedURL();
if( url.isEmpty() )
@@ -229,31 +229,31 @@ void KWImportFrameTableStyleDia::loadFile()
{
if (store->open("maindoc.xml") )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( store->device() );
- QDomElement word = doc.documentElement();
+ TQDomElement word = doc.documentElement();
if ( m_typeStyle ==frameStyle )
{
- QDomNodeList listStyles = word.elementsByTagName( "FRAMESTYLE" );
+ TQDomNodeList listStyles = word.elementsByTagName( "FRAMESTYLE" );
for (unsigned int item = 0; item < listStyles.count(); item++) {
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
KWFrameStyle *sty = new KWFrameStyle( styleElem );
- QString name =sty->name();
- if ( m_list.findIndex( name )!=-1 )
- sty->setDisplayName(generateStyleName( sty->displayName() + QString( "-%1")));
+ TQString name =sty->name();
+ if ( m_list.tqfindIndex( name )!=-1 )
+ sty->setDisplayName(generateStyleName( sty->displayName() + TQString( "-%1")));
m_frameStyleList.append( sty);
}
}
else
{
- QDomNodeList listStyles = word.elementsByTagName( "TABLESTYLE" );
+ TQDomNodeList listStyles = word.elementsByTagName( "TABLESTYLE" );
for (unsigned int item = 0; item < listStyles.count(); item++) {
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
KWTableStyle *sty = new KWTableStyle( styleElem,m_doc,2 );
- QString name =sty->name();
- if ( m_list.findIndex( name )!=-1 )
- sty->setName(generateStyleName( sty->displayName() + QString( "-%1")));
+ TQString name =sty->name();
+ if ( m_list.tqfindIndex( name )!=-1 )
+ sty->setName(generateStyleName( sty->displayName() + TQString( "-%1")));
m_tableStyleList.append( sty);
}
}
@@ -284,7 +284,7 @@ void KWImportFrameTableStyleDia::loadFile()
void KWImportFrameTableStyleDia::initList()
{
- QStringList lst;
+ TQStringList lst;
if ( m_typeStyle ==frameStyle )
{
for ( KWFrameStyle * p = m_frameStyleList.first(); p != 0L; p = m_frameStyleList.next() )
@@ -309,11 +309,11 @@ void KWImportFrameTableStyleDia::slotOk()
{
if ( !m_listStyleName->isSelected( i ))
{
- QString name = m_listStyleName->text(i );
+ TQString name = m_listStyleName->text(i );
if ( m_typeStyle ==frameStyle ) // frame styles
{
//remove this style from list
- QPtrListIterator<KWFrameStyle> styleIt( m_frameStyleList );
+ TQPtrListIterator<KWFrameStyle> styleIt( m_frameStyleList );
for ( ; styleIt.current(); ++styleIt )
{
if ( styleIt.current()->displayName() == name )
@@ -326,7 +326,7 @@ void KWImportFrameTableStyleDia::slotOk()
else // then it will have to be table styles
{
//remove this style from list
- QPtrListIterator<KWTableStyle> styleIt( m_tableStyleList );
+ TQPtrListIterator<KWTableStyle> styleIt( m_tableStyleList );
for ( ; styleIt.current(); ++styleIt )
{
if ( styleIt.current()->displayName() == name )
diff --git a/kword/KWImportStyleDia.h b/kword/KWImportStyleDia.h
index 2b27c5b6..075a83fd 100644
--- a/kword/KWImportStyleDia.h
+++ b/kword/KWImportStyleDia.h
@@ -22,22 +22,23 @@
#include <kdialogbase.h>
#include <KoImportStyleDia.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "KWFrameStyle.h"
#include "KWTableStyle.h"
-class QLineEdit;
-class QListBox;
+class TQLineEdit;
+class TQListBox;
class KWDocument;
-class QPushButton;
+class TQPushButton;
class KoParagStyle;
class KWImportStyleDia : public KoImportStyleDia
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWImportStyleDia( KWDocument *_doc, KoStyleCollection* currentCollection, QWidget *parent, const char *name = 0 );
+ KWImportStyleDia( KWDocument *_doc, KoStyleCollection* currentCollection, TQWidget *tqparent, const char *name = 0 );
~KWImportStyleDia();
protected:
@@ -51,25 +52,26 @@ private:
class KWImportFrameTableStyleDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum StyleType { frameStyle, TableStyle};
- KWImportFrameTableStyleDia( KWDocument *_doc, const QStringList & _list, StyleType _type , QWidget *parent, const char *name );
+ KWImportFrameTableStyleDia( KWDocument *_doc, const TQStringList & _list, StyleType _type , TQWidget *tqparent, const char *name );
~KWImportFrameTableStyleDia();
- QPtrList<KWFrameStyle> listOfFrameStyleImported() const { return m_frameStyleList;}
- QPtrList<KWTableStyle> listOfTableStyleImported() const { return m_tableStyleList;}
+ TQPtrList<KWFrameStyle> listOfFrameStyleImported() const { return m_frameStyleList;}
+ TQPtrList<KWTableStyle> listOfTableStyleImported() const { return m_tableStyleList;}
protected slots:
virtual void slotOk();
protected:
- QString generateStyleName( const QString & templateName );
+ TQString generateStyleName( const TQString & templateName );
void loadFile();
void initList();
- QListBox *m_listStyleName;
+ TQListBox *m_listStyleName;
KWDocument *m_doc;
- QPtrList<KWFrameStyle> m_frameStyleList;
- QPtrList<KWTableStyle> m_tableStyleList;
- QStringList m_list;
+ TQPtrList<KWFrameStyle> m_frameStyleList;
+ TQPtrList<KWTableStyle> m_tableStyleList;
+ TQStringList m_list;
StyleType m_typeStyle;
};
diff --git a/kword/KWInsertDia.cpp b/kword/KWInsertDia.cpp
index cabae8a1..883332bd 100644
--- a/kword/KWInsertDia.cpp
+++ b/kword/KWInsertDia.cpp
@@ -24,36 +24,36 @@
#include <klocale.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qlayout.h>
-
-KWInsertDia::KWInsertDia( KWView *parent, KWTableFrameSet *table, InsertType type, int insertHint)
- : KDialogBase( Plain, (type==insertRow?i18n("Insert Row") : i18n("Insert Column")), Ok | Cancel, Ok, parent, "Insert Table items dialog", true )
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
+
+KWInsertDia::KWInsertDia( KWView *tqparent, KWTableFrameSet *table, InsertType type, int insertHint)
+ : KDialogBase( Plain, (type==insertRow?i18n("Insert Row") : i18n("Insert Column")), Ok | Cancel, Ok, tqparent, "Insert Table items dialog", true )
{
m_type = type;
m_table = table;
- m_view = parent;
+ m_view = tqparent;
setupTab1(insertHint);
}
void KWInsertDia::setupTab1(int insertHint)
{
- QWidget *tab1 = plainPage();
- QGridLayout *grid1 = new QGridLayout( tab1, 2, 2, 0, KDialog::spacingHint() );
+ TQWidget *tab1 = plainPage();
+ TQGridLayout *grid1 = new TQGridLayout( tab1, 2, 2, 0, KDialog::spacingHint() );
- QButtonGroup *grp = new QButtonGroup( m_type == insertRow ? i18n( "Insert New Row" ) : i18n( "Insert New Column" ), tab1 );
+ TQButtonGroup *grp = new TQButtonGroup( m_type == insertRow ? i18n( "Insert New Row" ) : i18n( "Insert New Column" ), tab1 );
- QGridLayout *grid2 = new QGridLayout( grp, 3, 1, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGridLayout *grid2 = new TQGridLayout( grp, 3, 1, KDialog::marginHint(), KDialog::spacingHint() );
- m_rBefore = new QRadioButton( i18n( "Before" ), grp, "before_radio_button" );
+ m_rBefore = new TQRadioButton( i18n( "Before" ), grp, "before_radio_button" );
grp->insert( m_rBefore );
grid2->addWidget( m_rBefore, 1, 0 );
- QRadioButton *rAfter = new QRadioButton( i18n( "After" ), grp, "after_radio_button");
+ TQRadioButton *rAfter = new TQRadioButton( i18n( "After" ), grp, "after_radio_button");
grp->insert( rAfter );
grid2->addWidget( rAfter, 2, 0 );
rAfter->setChecked( true );
@@ -62,10 +62,10 @@ void KWInsertDia::setupTab1(int insertHint)
grid1->addMultiCellWidget ( grp, 0, 0, 0, 1 );
- QLabel *rc = new QLabel( m_type == insertRow ? i18n( "Row:" ) : i18n( "Column:" ), tab1 );
+ TQLabel *rc = new TQLabel( m_type == insertRow ? i18n( "Row:" ) : i18n( "Column:" ), tab1 );
grid1->addWidget( rc, 1, 0 );
- m_value = new QSpinBox( 1, m_type == insertRow ? m_table->getRows() : m_table->getColumns(),
+ m_value = new TQSpinBox( 1, m_type == insertRow ? m_table->getRows() : m_table->getColumns(),
1, tab1, "row_col_spinbox" );
m_value->setValue( insertHint + 1 ); // +1 due to the fact that humans count starting at 1
diff --git a/kword/KWInsertDia.h b/kword/KWInsertDia.h
index 163917de..bb3b30ca 100644
--- a/kword/KWInsertDia.h
+++ b/kword/KWInsertDia.h
@@ -24,23 +24,24 @@
#include <kdialogbase.h>
class KWTableFrameSet;
-class QRadioButton;
-class QSpinBox;
+class TQRadioButton;
+class TQSpinBox;
class KWView;
class KWInsertDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum InsertType {insertRow, insertColumn};
- KWInsertDia( KWView *parent, KWTableFrameSet *table, InsertType type, int insertHint);
+ KWInsertDia( KWView *tqparent, KWTableFrameSet *table, InsertType type, int insertHint);
protected:
void setupTab1(int insertHint);
- QRadioButton *m_rBefore;
- QSpinBox *m_value;
+ TQRadioButton *m_rBefore;
+ TQSpinBox *m_value;
KWTableFrameSet *m_table;
InsertType m_type;
diff --git a/kword/KWInsertPageDia.cpp b/kword/KWInsertPageDia.cpp
index d44713fa..f8b6ace0 100644
--- a/kword/KWInsertPageDia.cpp
+++ b/kword/KWInsertPageDia.cpp
@@ -21,22 +21,22 @@
#include "KWInsertPageDia.h"
#include <klocale.h>
-#include <qradiobutton.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qvbox.h>
-
-KWInsertPageDia::KWInsertPageDia( QWidget *parent, const char* name )
- : KDialogBase( parent, name,TRUE,i18n("Insert Page"),Ok|Cancel )
+#include <tqradiobutton.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqvbox.h>
+
+KWInsertPageDia::KWInsertPageDia( TQWidget *tqparent, const char* name )
+ : KDialogBase( tqparent, name,TRUE,i18n("Insert Page"),Ok|Cancel )
{
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- QButtonGroup *grp = new QButtonGroup( 1, QGroupBox::Horizontal, i18n( "Insert Page" ),page );
+ TQButtonGroup *grp = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Insert Page" ),page );
grp->setRadioButtonExclusive( TRUE );
- grp->layout();
- m_after = new QRadioButton( i18n("After"), grp );
- m_before = new QRadioButton( i18n("Before"), grp );
+ grp->tqlayout();
+ m_after = new TQRadioButton( i18n("After"), grp );
+ m_before = new TQRadioButton( i18n("Before"), grp );
grp->setRadioButtonExclusive( TRUE );
m_after->setChecked( true );
diff --git a/kword/KWInsertPageDia.h b/kword/KWInsertPageDia.h
index f7ac341e..daa145c7 100644
--- a/kword/KWInsertPageDia.h
+++ b/kword/KWInsertPageDia.h
@@ -21,18 +21,19 @@
#include <kdialogbase.h>
#include "defs.h"
-class QRadioButton;
+class TQRadioButton;
class KWInsertPageDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWInsertPageDia( QWidget *parent, const char* name );
+ KWInsertPageDia( TQWidget *tqparent, const char* name );
InsertPagePos insertPagePos() const;
private:
- QRadioButton *m_before;
- QRadioButton *m_after;
+ TQRadioButton *m_before;
+ TQRadioButton *m_after;
};
#endif
diff --git a/kword/KWInsertPicDia.cpp b/kword/KWInsertPicDia.cpp
index df29e330..a8b6ee49 100644
--- a/kword/KWInsertPicDia.cpp
+++ b/kword/KWInsertPicDia.cpp
@@ -18,12 +18,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qpushbutton.h>
-#include <qbitmap.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qscrollview.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
+#include <tqbitmap.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqscrollview.h>
#include <kdebug.h>
#include <klocale.h>
@@ -36,18 +36,18 @@
#include "KWDocument.h"
#include "KWInsertPicDia.h"
-#include <qtimer.h>
+#include <tqtimer.h>
/**
* This is the preview that appears on the right of the "Insert picture" dialog.
* Not to be confused with KoPictureFilePreview, the one inside the file dialog!
* (Note: this one has to remain separate, for the day we add options like flipping, rotating, etc.)
*/
-class KWInsertPicPreview : public QScrollView
+class KWInsertPicPreview : public TQScrollView
{
public:
- KWInsertPicPreview( QWidget *parent )
- : QScrollView( parent )
+ KWInsertPicPreview( TQWidget *tqparent )
+ : TQScrollView( tqparent )
{
viewport()->setBackgroundMode( PaletteBase );
setMinimumSize( 300, 200 );
@@ -62,44 +62,44 @@ public:
m_size = picture.getOriginalSize();
m_picture = picture;
resizeContents( m_size.width(), m_size.height() );
- repaint( false );
+ tqrepaint( false );
return true;
}
else
return false;
}
- void drawContents( QPainter *p, int, int, int, int )
+ void drawContents( TQPainter *p, int, int, int, int )
{
- p->setBackgroundColor( Qt::white );
+ p->setBackgroundColor( TQt::white );
// Be sure that the background is white (for transparency)
- p->fillRect(0, 0, m_size.width(), m_size.height(), QBrush( Qt::white ));
+ p->fillRect(0, 0, m_size.width(), m_size.height(), TQBrush( TQt::white ));
m_picture.draw( *p, 0 ,0, m_size.width(), m_size.height());
}
private:
KoPicture m_picture;
- QSize m_size;
+ TQSize m_size;
};
//////////////
-KWInsertPicDia::KWInsertPicDia( QWidget *parent, bool _inline, bool _keepRatio, KWDocument *_doc, const char *name )
- : KDialogBase( Plain, i18n("Insert Picture"), Ok|Cancel, Ok, parent, name, true ),
+KWInsertPicDia::KWInsertPicDia( TQWidget *tqparent, bool _inline, bool _keepRatio, KWDocument *_doc, const char *name )
+ : KDialogBase( Plain, i18n("Insert Picture"), Ok|Cancel, Ok, tqparent, name, true ),
m_bFirst ( true ), m_doc ( _doc )
{
- setInitialSize( QSize(400, 300) );
- QWidget *page = plainPage();
- QGridLayout *grid = new QGridLayout( page, 4, 2, KDialog::marginHint(), KDialog::spacingHint() );
+ setInitialSize( TQSize(400, 300) );
+ TQWidget *page = plainPage();
+ TQGridLayout *grid = new TQGridLayout( page, 4, 2, KDialog::marginHint(), KDialog::spacingHint() );
- QPushButton *pbImage = new QPushButton( i18n( "Choose &Picture..." ), page );
+ TQPushButton *pbImage = new TQPushButton( i18n( "Choose &Picture..." ), page );
grid->addWidget( pbImage, 0, 0 );
- connect( pbImage, SIGNAL( clicked() ), SLOT( slotChooseImage() ) );
+ connect( pbImage, TQT_SIGNAL( clicked() ), TQT_SLOT( slotChooseImage() ) );
- m_cbInline = new QCheckBox( i18n( "Insert picture inline" ), page );
+ m_cbInline = new TQCheckBox( i18n( "Insert picture inline" ), page );
grid->addWidget( m_cbInline, 1, 0 );
- m_cbKeepRatio= new QCheckBox( i18n("Retain original aspect ratio"),page);
+ m_cbKeepRatio= new TQCheckBox( i18n("Retain original aspect ratio"),page);
grid->addWidget( m_cbKeepRatio, 2, 0);
m_preview = new KWInsertPicPreview( page );
@@ -138,35 +138,35 @@ void KWInsertPicDia::slotChooseImage()
{
kdDebug() << "KWInsertPicDia::slotChooseImage cancelled by user." << endl;
// Close, but delayed, otherwise it won't work (we only return from the ctor)
- QTimer::singleShot( 0, this, SLOT( cancel() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( cancel() ) );
return;
}
enableButtonOK ( m_preview->setPicture( m_picture ) );
m_bFirst = false;
}
-KoPicture KWInsertPicDia::selectPictureDia( const QString & _path, QWidget* parent )
+KoPicture KWInsertPicDia::selectPictureDia( const TQString & _path, TQWidget* tqparent )
{
- QStringList mimetypes ( KImageIO::mimeTypes( KImageIO::Reading ) );
+ TQStringList mimetypes ( KImageIO::mimeTypes( KImageIO::Reading ) );
mimetypes += KoPictureFilePreview::clipartMimeTypes();
- KFileDialog fd( _path, QString::null, parent, 0, TRUE );
+ KFileDialog fd( _path, TQString(), tqparent, 0, TRUE );
fd.setMimeFilter( mimetypes );
fd.setCaption(i18n("Choose Picture"));
- return selectPicture( fd, parent );
+ return selectPicture( fd, tqparent );
}
-KoPicture KWInsertPicDia::selectPicture( KFileDialog & fd, QWidget *parent )
+KoPicture KWInsertPicDia::selectPicture( KFileDialog & fd, TQWidget *tqparent )
{
KoPicture picture;
fd.setPreviewWidget( new KoPictureFilePreview( &fd ) );
KURL url;
- if ( fd.exec() == QDialog::Accepted )
+ if ( fd.exec() == TQDialog::Accepted )
url = fd.selectedURL();
if( !url.isEmpty() )
- picture.setKeyAndDownloadPicture( url, parent );
+ picture.setKeyAndDownloadPicture( url, tqparent );
return picture;
}
diff --git a/kword/KWInsertPicDia.h b/kword/KWInsertPicDia.h
index b7e949b4..e9acaf75 100644
--- a/kword/KWInsertPicDia.h
+++ b/kword/KWInsertPicDia.h
@@ -21,7 +21,7 @@
#define kwinsertpicdia_h
#include <kdialogbase.h>
-class QCheckBox;
+class TQCheckBox;
class KWInsertPicPreview;
class KFileDialog;
class KWDocument;
@@ -29,8 +29,9 @@ class KWDocument;
class KWInsertPicDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWInsertPicDia( QWidget *parent, bool _inline, bool _keepRatio, KWDocument *_doc, const char *name = 0 );
+ KWInsertPicDia( TQWidget *tqparent, bool _inline, bool _keepRatio, KWDocument *_doc, const char *name = 0 );
bool makeInline() const;
@@ -40,7 +41,7 @@ public:
* @param _path the name of the old file
* @return the loaded picture (Picture is null if cancelled.)
*/
- static KoPicture selectPictureDia( const QString & _path, QWidget* parent );
+ static KoPicture selectPictureDia( const TQString & _path, TQWidget* tqparent );
KoPicture picture ( void ) const;
@@ -48,12 +49,12 @@ protected slots:
void slotChooseImage();
protected:
- static KoPicture selectPicture( KFileDialog & fd, QWidget *parent );
+ static KoPicture selectPicture( KFileDialog & fd, TQWidget *tqparent );
private:
bool m_bFirst;
- QCheckBox *m_cbInline, *m_cbKeepRatio;
+ TQCheckBox *m_cbInline, *m_cbKeepRatio;
KWInsertPicPreview *m_preview;
KWDocument *m_doc;
KoPicture m_picture;
diff --git a/kword/KWInsertTOCCommand.cpp b/kword/KWInsertTOCCommand.cpp
index 5740e125..03c6a501 100644
--- a/kword/KWInsertTOCCommand.cpp
+++ b/kword/KWInsertTOCCommand.cpp
@@ -60,14 +60,14 @@ KoTextCursor * KWInsertTOCCommand::execute( KoTextCursor *c )
KWTextParag *p = static_cast<KWTextParag *>(textdoc->firstParag()/*parag->next()*/);
//ASSERT( p == body );
KWTextParag *prevTOCParag = parag;
- QMap<KWTextParag *, KWTextParag *> paragMap; // Associate a paragraph form the TOC with the real one from the body
+ TQMap<KWTextParag *, KWTextParag *> paragMap; // Associate a paragraph form the TOC with the real one from the body
while ( p ) {
// Include this paragraph in the TOC depending on the isOutline flag of the style
if ( p->style() && p->style()->isOutline() )
{
parag = static_cast<KWTextParag *>(textdoc->createParag( textdoc, prevTOCParag /*prev*/, body /*next*/, true ));
parag->setPartOfTableOfContents( true );
- QString txt = p->toString(); // includes the heading number, if any
+ TQString txt = p->toString(); // includes the heading number, if any
parag->append( txt );
prevTOCParag = parag;
@@ -80,13 +80,13 @@ KoTextCursor * KWInsertTOCCommand::execute( KoTextCursor *c )
prevTOCParag->setPageBreaking( prevTOCParag->pageBreaking() | KWParagLayout::HardFrameBreakAfter );
// Format paragraphs, to take this page break into account and update page numbers
- fs->layout();
+ fs->tqlayout();
fs->updateFrames();
- //kdDebug() << "KWInsertTOCCommand::execute layouting done, setting page numbers" << endl;
+ //kdDebug() << "KWInsertTOCCommand::execute tqlayouting done, setting page numbers" << endl;
// Now add the page numbers, and apply the style
- QMap<KWTextParag *, KWTextParag *>::Iterator mapIt = paragMap.begin();
+ TQMap<KWTextParag *, KWTextParag *>::Iterator mapIt = paragMap.begin();
for ( ; mapIt != paragMap.end() ; ++mapIt )
{
KWTextParag * parag = mapIt.key(); // Parag in the TOC
@@ -94,11 +94,11 @@ KoTextCursor * KWInsertTOCCommand::execute( KoTextCursor *c )
// Find page number for paragraph
KoPoint pt;
- KWFrame * frame = fs->internalToDocument( QPoint(0, p->rect().top()), pt );
+ KWFrame * frame = fs->internalToDocument( TQPoint(0, p->rect().top()), pt );
if ( frame ) // let's be safe
{
parag->append( "\t" );
- parag->append( QString::number( frame->pageNumber() ) );
+ parag->append( TQString::number( frame->pageNumber() ) );
}
// Apply style
@@ -199,7 +199,7 @@ KoTextCursor * KWInsertTOCCommand::removeTOC( KWTextFrameSet *fs, KoTextCursor *
}
p = p->prev();
}
- textdoc->invalidate();
+ textdoc->tqinvalidate();
if(posOfToc)
{
posOfTable=new KoTextCursor( textdoc );
@@ -213,12 +213,12 @@ KoTextCursor * KWInsertTOCCommand::removeTOC( KWTextFrameSet *fs, KoTextCursor *
KoParagStyle * KWInsertTOCCommand::findOrCreateTOCStyle( KWTextFrameSet *fs, int depth )
{
// Determine style name.
- QString name;
- QString displayName;
+ TQString name;
+ TQString displayName;
if ( depth >= 0 ) {
// Don't add i18n to this one, those are internal names and must have no spaces.
- name = QString( "Contents_Head_%1" ).arg( depth+1 );
- displayName = i18n( "Contents Head %1" ).arg( depth+1 );
+ name = TQString( "Contents_Head_%1" ).tqarg( depth+1 );
+ displayName = i18n( "Contents Head %1" ).tqarg( depth+1 );
} else {
name = "Contents_Title";
displayName = i18n( "Contents Title" );
@@ -232,13 +232,13 @@ KoParagStyle * KWInsertTOCCommand::findOrCreateTOCStyle( KWTextFrameSet *fs, int
style->format().setPointSize( depth==-1 ? 20 : 12 );
if ( depth == -1 )
{
- style->paragLayout().topBorder = KoBorder( Qt::black, KoBorder::SOLID, 1 );
- style->paragLayout().bottomBorder = KoBorder( Qt::black, KoBorder::SOLID, 1 );
+ style->paragLayout().topBorder = KoBorder( TQt::black, KoBorder::SOLID, 1 );
+ style->paragLayout().bottomBorder = KoBorder( TQt::black, KoBorder::SOLID, 1 );
// Old kword had only top and bottom. But borders are drawn differently now
// (not the whole line anymore), so we need the 4 borders.
- style->paragLayout().leftBorder = KoBorder( Qt::black, KoBorder::SOLID, 1 );
- style->paragLayout().rightBorder = KoBorder( Qt::black, KoBorder::SOLID, 1 );
- style->paragLayout().alignment = Qt::AlignHCenter;
+ style->paragLayout().leftBorder = KoBorder( TQt::black, KoBorder::SOLID, 1 );
+ style->paragLayout().rightBorder = KoBorder( TQt::black, KoBorder::SOLID, 1 );
+ style->paragLayout().tqalignment = TQt::AlignHCenter;
}
else
{
@@ -252,7 +252,7 @@ KoParagStyle * KWInsertTOCCommand::findOrCreateTOCStyle( KWTextFrameSet *fs, int
tab.ptWidth = 0.5;
tabList.append( tab );
style->paragLayout().setTabList( tabList );
- style->paragLayout().margins[QStyleSheetItem::MarginLeft] = KoUnit::fromUserValue( (depth*4.5), KoUnit::unit("mm") );
+ style->paragLayout().margins[TQStyleSheetItem::MarginLeft] = KoUnit::fromUserValue( (depth*4.5), KoUnit::unit("mm") );
}
style = fs->kWordDocument()->styleCollection()->addStyle( style ); // register the new style
fs->kWordDocument()->updateAllStyleLists(); // show it in the UI
diff --git a/kword/KWLoadingInfo.h b/kword/KWLoadingInfo.h
index fd0645a8..81c91477 100644
--- a/kword/KWLoadingInfo.h
+++ b/kword/KWLoadingInfo.h
@@ -20,9 +20,9 @@
#ifndef KWLOADINGINFO_H
#define KWLOADINGINFO_H
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqdict.h>
#include <KoPageLayout.h>
class KoTextParag;
@@ -37,47 +37,47 @@ public:
~KWLoadingInfo() {}
/// Current master-page name (OASIS loading)
- QString m_currentMasterPage;
+ TQString m_currentMasterPage;
/// Bookmarks (kword-1.3 XML: they need all framesets to be loaded first)
struct BookMark
{
- QString bookname;
+ TQString bookname;
int paragStartIndex;
int paragEndIndex;
- QString frameSetName;
+ TQString frameSetName;
int cursorStartIndex;
int cursorEndIndex;
};
- typedef QValueList<BookMark> BookMarkList;
+ typedef TQValueList<BookMark> BookMarkList;
BookMarkList bookMarkList;
/// Bookmarks (OASIS XML). Only need to store bookmark starts, until hitting bookmark ends
struct BookmarkStart {
- BookmarkStart() {} // for stupid QValueList
+ BookmarkStart() {} // for stupid TQValueList
BookmarkStart( KWTextDocument* _doc, KoTextParag* par, int ind )
: doc( _doc ), parag( par ), pos( ind ) {}
KWTextDocument* doc;
KoTextParag* parag;
int pos;
};
- typedef QMap<QString, BookmarkStart> BookmarkStartsMap;
+ typedef TQMap<TQString, BookmarkStart> BookmarkStartsMap;
BookmarkStartsMap m_bookmarkStarts;
// Text frame chains; see KWTextFrameSet::loadOasisText
- void storeNextFrame( KWFrame* thisFrame, const QString& chainNextName ) {
+ void storeNextFrame( KWFrame* thisFrame, const TQString& chainNextName ) {
m_nextFrameDict.insert( chainNextName, thisFrame );
}
- KWFrame* chainPrevFrame( const QString& frameName ) const {
+ KWFrame* chainPrevFrame( const TQString& frameName ) const {
return m_nextFrameDict[frameName]; // returns 0 if not found
}
- void storeFrameName( KWFrame* frame, const QString& name ) {
+ void storeFrameName( KWFrame* frame, const TQString& name ) {
m_frameNameDict.insert( name, frame );
}
- KWFrame* frameByName( const QString& name ) const {
+ KWFrame* frameByName( const TQString& name ) const {
return m_frameNameDict[name]; // returns 0 if not found
}
@@ -86,8 +86,8 @@ public:
private:
// Ignore warnings about operator delete from those dicts; we don't use it here...
- QDict<KWFrame> m_nextFrameDict;
- QDict<KWFrame> m_frameNameDict;
+ TQDict<KWFrame> m_nextFrameDict;
+ TQDict<KWFrame> m_frameNameDict;
};
#endif /* KWLOADINGINFO_H */
diff --git a/kword/KWMailMergeDataBase.cpp b/kword/KWMailMergeDataBase.cpp
index 77c4b815..1a637e16 100644
--- a/kword/KWMailMergeDataBase.cpp
+++ b/kword/KWMailMergeDataBase.cpp
@@ -34,12 +34,12 @@
#include <kservice.h>
#include <kmainwindow.h>
-#include <qfile.h>
-#include <qvbox.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqfile.h>
+#include <tqvbox.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
/******************************************************************
*
@@ -48,8 +48,8 @@
******************************************************************/
KWMailMergeDataBase::KWMailMergeDataBase( KWDocument *doc_ )
- : QObject(doc_,doc_->dcopObject()->objId()+".MailMergeDataBase"),
- KWordMailMergeDatabaseIface(QCString(doc_->dcopObject()->objId()+".MailMergeDataBase")),
+ : TQObject(doc_,doc_->dcopObject()->objId()+".MailMergeDataBase"),
+ KWordMailMergeDatabaseIface(TQCString(doc_->dcopObject()->objId()+".MailMergeDataBase")),
m_version(0),
doc( doc_ )
{
@@ -57,10 +57,10 @@ KWMailMergeDataBase::KWMailMergeDataBase( KWDocument *doc_ )
rejectdcopcall=false;
}
-QStringList KWMailMergeDataBase::availablePlugins()
+TQStringList KWMailMergeDataBase::availablePlugins()
{
- QStringList tmp;
- KTrader::OfferList pluginOffers=KTrader::self()->query(QString::fromLatin1("KWord/MailMergePlugin"),QString::null);
+ TQStringList tmp;
+ KTrader::OfferList pluginOffers=KTrader::self()->query(TQString::tqfromLatin1("KWord/MailMergePlugin"),TQString());
for (KTrader::OfferList::Iterator it=pluginOffers.begin();*it;++it)
{
tmp.append((*it)->property("X-KDE-InternalName").toString());
@@ -74,15 +74,15 @@ bool KWMailMergeDataBase::isConfigDialogShown()
return rejectdcopcall;
}
-bool KWMailMergeDataBase::loadPlugin(const QString &name,const QString &command)
+bool KWMailMergeDataBase::loadPlugin(const TQString &name,const TQString &command)
{
if (rejectdcopcall)return false;
- QString constrain=QString("[X-KDE-InternalName] =='"+name+"'");
+ TQString constrain=TQString("[X-KDE-InternalName] =='"+name+"'");
kdDebug()<<constrain<<endl;
- KTrader::OfferList pluginOffers=KTrader::self()->query(QString::fromLatin1("KWord/MailMergePlugin"),constrain);
+ KTrader::OfferList pluginOffers=KTrader::self()->query(TQString::tqfromLatin1("KWord/MailMergePlugin"),constrain);
KService::Ptr it=pluginOffers.first();
- QVariant verProp=it->property("X-KDE-PluginVersion");
+ TQVariant verProp=it->property("X-KDE-PluginVersion");
int version=verProp.toInt();
if (it)
@@ -116,9 +116,9 @@ KWMailMergeDataSource *KWMailMergeDataBase::openPluginFor(int type,int &version)
{
version=0;
KWMailMergeDataSource *ret=0;
- QString constrain=QString("'%1' in [X-KDE-Capabilities]").arg(((type==KWSLCreate)?KWSLCreate_text:KWSLOpen_text));
+ TQString constrain=TQString("'%1' in [X-KDE-Capabilities]").tqarg(((type==KWSLCreate)?KWSLCreate_text:KWSLOpen_text));
kdDebug()<<constrain<<endl;
- KTrader::OfferList pluginOffers=KTrader::self()->query(QString::fromLatin1("KWord/MailMergePlugin"),constrain);
+ KTrader::OfferList pluginOffers=KTrader::self()->query(TQString::tqfromLatin1("KWord/MailMergePlugin"),constrain);
//Only for debugging
for (KTrader::OfferList::Iterator it=pluginOffers.begin();*it;++it)
@@ -136,9 +136,9 @@ KWMailMergeDataSource *KWMailMergeDataBase::openPluginFor(int type,int &version)
{
KWMailMergeChoosePluginDialog *dia=new KWMailMergeChoosePluginDialog(pluginOffers);
- if (dia->exec()==QDialog::Accepted)
+ if (dia->exec()==TQDialog::Accepted)
{
- QVariant verProp=(*(pluginOffers.at(dia->currentPlugin())))->property("X-KDE-PluginVersion");
+ TQVariant verProp=(*(pluginOffers.at(dia->currentPlugin())))->property("X-KDE-PluginVersion");
version=verProp.toInt();
ret=loadPlugin((*(pluginOffers.at(dia->currentPlugin())))->library());
@@ -148,7 +148,7 @@ KWMailMergeDataSource *KWMailMergeDataBase::openPluginFor(int type,int &version)
return ret;
}
-KWMailMergeDataSource *KWMailMergeDataBase::loadPlugin(const QString& name)
+KWMailMergeDataSource *KWMailMergeDataBase::loadPlugin(const TQString& name)
{
if (!name.isEmpty())
{
@@ -157,23 +157,23 @@ KWMailMergeDataSource *KWMailMergeDataBase::loadPlugin(const QString& name)
KLibLoader *loader = KLibLoader::self();
// try to load the library
- QString libname=name;
-// QString libname("lib%1");
- KLibrary *lib = loader->library(QFile::encodeName(libname));
+ TQString libname=name;
+// TQString libname("lib%1");
+ KLibrary *lib = loader->library(TQFile::encodeName(libname));
if (lib) {
// get the create_ function
- QString factory=QString("create_%1").arg(name);
- void *create = lib->symbol(QFile::encodeName(factory));
+ TQString factory=TQString("create_%1").tqarg(name);
+ void *create = lib->symbol(TQFile::encodeName(factory));
if (create)
{
// create the module
- KWMailMergeDataSource * (*func)(KInstance*,QObject*);
- func = (KWMailMergeDataSource* (*)(KInstance*,QObject*)) create;
+ KWMailMergeDataSource * (*func)(KInstance*,TQObject*);
+ func = (KWMailMergeDataSource* (*)(KInstance*,TQObject*)) create;
KWMailMergeDataSource *tmpsource =func(KWFactory::instance(),this);
if (tmpsource)
{
- QDataStream tmpstream(tmpsource->info,IO_WriteOnly);
+ TQDataStream tmpstream(tmpsource->info,IO_WriteOnly);
tmpstream<<name;
}
return tmpsource;
@@ -190,7 +190,7 @@ bool KWMailMergeDataBase::isSampleRecord() {
return (0>doc->mailMergeRecord());
}
-QString KWMailMergeDataBase::getValue( const QString &name, int record ) const
+TQString KWMailMergeDataBase::getValue( const TQString &name, int record ) const
{
if (plugin)
{
@@ -198,7 +198,7 @@ QString KWMailMergeDataBase::getValue( const QString &name, int record ) const
return plugin->getValue(name,record);
}
else
- return QString("");
+ return TQString("");
}
@@ -207,7 +207,7 @@ void KWMailMergeDataBase::refresh(bool force)
if (plugin) plugin->refresh(force);
}
-const QMap< QString, QString > &KWMailMergeDataBase::getRecordEntries() const
+const TQMap< TQString, TQString > &KWMailMergeDataBase::getRecordEntries() const
{
if (plugin)
return plugin->getRecordEntries();
@@ -225,7 +225,7 @@ int KWMailMergeDataBase::getNumRecords() const
}
-void KWMailMergeDataBase::showConfigDialog(QWidget *par)
+void KWMailMergeDataBase::showConfigDialog(TQWidget *par)
{
rejectdcopcall=true;
KWMailMergeConfigDialog *dia=new KWMailMergeConfigDialog(par,this);
@@ -235,7 +235,7 @@ void KWMailMergeDataBase::showConfigDialog(QWidget *par)
}
-bool KWMailMergeDataBase::askUserForConfirmationAndConfig(KWMailMergeDataSource *tmpPlugin,bool config,QWidget *par,int version)
+bool KWMailMergeDataBase::askUserForConfirmationAndConfig(KWMailMergeDataSource *tmpPlugin,bool config,TQWidget *par,int version)
{
if (tmpPlugin)
{
@@ -249,7 +249,7 @@ bool KWMailMergeDataBase::askUserForConfirmationAndConfig(KWMailMergeDataSource
{
if (KMessageBox::warningContinueCancel(par,
i18n("Do you really want to replace the current datasource?"),
- QString::null,QString::null,QString::null,true)== KMessageBox::Cancel)
+ TQString(),TQString(),TQString(),true)== KMessageBox::Cancel)
{
delete tmpPlugin;
tmpPlugin=0;
@@ -267,45 +267,45 @@ bool KWMailMergeDataBase::askUserForConfirmationAndConfig(KWMailMergeDataSource
return false;
}
}
- tmpPlugin->setObjId(QCString(objId()+".MailMergePlugin"));
+ tmpPlugin->setObjId(TQCString(objId()+".MailMergePlugin"));
return true;
}
-QDomElement KWMailMergeDataBase::save(QDomDocument &doc) const
+TQDomElement KWMailMergeDataBase::save(TQDomDocument &doc) const
{
kdDebug()<<"KWMailMergeDataBase::save()"<<endl;
- QDomElement parentElem=doc.createElement("MAILMERGE");
+ TQDomElement tqparentElem=doc.createElement("MAILMERGE");
if (plugin)
{
kdDebug()<<"KWMailMergeDataBase::save() There is really something to save"<<endl;
- QDomElement el=doc.createElement(QString::fromLatin1("PLUGIN"));
+ TQDomElement el=doc.createElement(TQString::tqfromLatin1("PLUGIN"));
- QDataStream ds(plugin->info,IO_ReadOnly);
- QString libname;
+ TQDataStream ds(plugin->info,IO_ReadOnly);
+ TQString libname;
ds>>libname;
el.setAttribute("library",libname);
- parentElem.appendChild(el);
+ tqparentElem.appendChild(el);
kdDebug()<<"KWMailMergeDataBase::save() Calling datasource save()"<<endl;
- QDomElement el2=doc.createElement(QString::fromLatin1("DATASOURCE"));
+ TQDomElement el2=doc.createElement(TQString::tqfromLatin1("DATASOURCE"));
plugin->save(doc,el2);
- parentElem.appendChild(el2);
+ tqparentElem.appendChild(el2);
}
kdDebug()<<"KWMailMergeDataBase::save() leaving now"<<endl;
- return parentElem;
- // if (plugin) plugin->save(parentElem); // Not completely sure, perhaps the database itself has to save something too (JoWenn)
+ return tqparentElem;
+ // if (plugin) plugin->save(tqparentElem); // Not completely sure, perhaps the database itself has to save something too (JoWenn)
}
-void KWMailMergeDataBase::load( const QDomElement& parentElem )
+void KWMailMergeDataBase::load( const TQDomElement& tqparentElem )
{
- QDomNode dn=parentElem.namedItem("PLUGIN");
+ TQDomNode dn=tqparentElem.namedItem("PLUGIN");
if (dn.isNull()) return;
- QDomElement el=dn.toElement();
+ TQDomElement el=dn.toElement();
plugin=loadPlugin(el.attribute("library"));
- dn=parentElem.namedItem("DATASOURCE");
+ dn=tqparentElem.namedItem("DATASOURCE");
if (dn.isNull()) return;
el=dn.toElement();
if (plugin) plugin->load(el);
@@ -326,38 +326,38 @@ int KWMailMergeDataBase::version() {
KWMailMergeChoosePluginDialog::KWMailMergeChoosePluginDialog( KTrader::OfferList offers )
: KDialogBase( Plain, i18n( "Mail Merge Setup" ), Ok | Cancel, Ok,
- /*parent*/ 0, "", true ), pluginOffers( offers )
+ /*tqparent*/ 0, "", true ), pluginOffers( offers )
{
- QWidget *back = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( back, 0, spacingHint() );
+ TQWidget *back = plainPage();
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( back, 0, spacingHint() );
- QLabel *label = new QLabel( i18n( "&Available sources:" ), back );
- chooser = new QComboBox( false, back );
+ TQLabel *label = new TQLabel( i18n( "&Available sources:" ), back );
+ chooser = new TQComboBox( false, back );
label->setBuddy( chooser );
- descriptionLabel = new QLabel( back );
+ descriptionLabel = new TQLabel( back );
descriptionLabel->hide();
- descriptionLabel->setAlignment( WordBreak );
- descriptionLabel->setFrameShape( QFrame::Box );
- descriptionLabel->setFrameShadow( QFrame::Sunken );
+ descriptionLabel->tqsetAlignment( WordBreak );
+ descriptionLabel->setFrameShape( TQFrame::Box );
+ descriptionLabel->setFrameShadow( TQFrame::Sunken );
- QSize old_sizeHint;
+ TQSize old_tqsizeHint;
for ( KTrader::OfferList::Iterator it = pluginOffers.begin(); *it; ++it )
{
chooser->insertItem( (*it)->name() );
- old_sizeHint = descriptionLabel->sizeHint();
+ old_tqsizeHint = descriptionLabel->tqsizeHint();
descriptionLabel->setText( (*it)->comment() );
- if (descriptionLabel->sizeHint().width()*descriptionLabel->sizeHint().height() > old_sizeHint.width()*old_sizeHint.height())
- descriptionLabel->setMinimumSize(descriptionLabel->sizeHint() );
+ if (descriptionLabel->tqsizeHint().width()*descriptionLabel->tqsizeHint().height() > old_tqsizeHint.width()*old_tqsizeHint.height())
+ descriptionLabel->setMinimumSize(descriptionLabel->tqsizeHint() );
}
descriptionLabel->show();
- connect( chooser, SIGNAL( activated( int ) ),
- this, SLOT( pluginChanged( int ) ) );
+ connect( chooser, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( pluginChanged( int ) ) );
- layout->addWidget( label );
- layout->addWidget( chooser );
- layout->addWidget( descriptionLabel );
- layout->addStretch( 1 );
+ tqlayout->addWidget( label );
+ tqlayout->addWidget( chooser );
+ tqlayout->addWidget( descriptionLabel );
+ tqlayout->addStretch( 1 );
pluginChanged( 0 );
}
@@ -382,54 +382,54 @@ void KWMailMergeChoosePluginDialog::pluginChanged( int pos )
*
******************************************************************/
-KWMailMergeConfigDialog::KWMailMergeConfigDialog(QWidget *parent,KWMailMergeDataBase *db)
- : KDialogBase(Plain, i18n( "Mail Merge Setup" ), Close, Close, parent, "", true )
+KWMailMergeConfigDialog::KWMailMergeConfigDialog(TQWidget *tqparent,KWMailMergeDataBase *db)
+ : KDialogBase(Plain, i18n( "Mail Merge Setup" ), Close, Close, tqparent, "", true )
{
db_=db;
- QWidget *back = plainPage();
- QVBoxLayout *layout=new QVBoxLayout(back);
-// QVBox *back = new QVBox( page );
- layout->setSpacing( KDialog::spacingHint() );
+ TQWidget *back = plainPage();
+ TQVBoxLayout *tqlayout=new TQVBoxLayout(back);
+// TQVBox *back = new TQVBox( page );
+ tqlayout->setSpacing( KDialog::spacingHint() );
-// QVBox *row1 = new QVBox( back );
+// TQVBox *row1 = new TQVBox( back );
// row1->setSpacing( KDialog::spacingHint() );
- QLabel *l = new QLabel( i18n( "Datasource:" ),back );
-// l->setMaximumHeight( l->sizeHint().height() );
- layout->addWidget(l);
+ TQLabel *l = new TQLabel( i18n( "Datasource:" ),back );
+// l->setMaximumHeight( l->tqsizeHint().height() );
+ tqlayout->addWidget(l);
- QHBox *row1=new QHBox(back);
- layout->addWidget(row1);
+ TQHBox *row1=new TQHBox(back);
+ tqlayout->addWidget(row1);
row1->setSpacing( KDialog::spacingHint() );
- edit=new QPushButton(i18n("Edit Current..."),row1);
- create=new QPushButton(i18n("Create New..."),row1);
- open=new QPushButton(i18n("Open Existing..."),row1);
+ edit=new TQPushButton(i18n("Edit Current..."),row1);
+ create=new TQPushButton(i18n("Create New..."),row1);
+ open=new TQPushButton(i18n("Open Existing..."),row1);
KSeparator *separator1 = new KSeparator(back);
- layout->addWidget(separator1);
+ tqlayout->addWidget(separator1);
- l = new QLabel( i18n( "Merging:" ),back );
- layout->addWidget(l);
-// l->setMaximumHeight( l->sizeHint().height() );
- QHBox *row2=new QHBox(back);
- layout->addWidget(row2);
+ l = new TQLabel( i18n( "Merging:" ),back );
+ tqlayout->addWidget(l);
+// l->setMaximumHeight( l->tqsizeHint().height() );
+ TQHBox *row2=new TQHBox(back);
+ tqlayout->addWidget(row2);
row2->setSpacing( KDialog::spacingHint() );
- preview=new QPushButton(i18n("Print Preview..."),row2);
- document=new QPushButton(i18n("Create New Document"),row2);
+ preview=new TQPushButton(i18n("Print Preview..."),row2);
+ document=new TQPushButton(i18n("Create New Document"),row2);
document->hide();
- (void) new QWidget(row2);
- layout->addStretch();
+ (void) new TQWidget(row2);
+ tqlayout->addStretch();
KSeparator *separator2 = new KSeparator(back);
- layout->addWidget(separator2);
+ tqlayout->addWidget(separator2);
enableDisableEdit();
- connect(edit,SIGNAL(clicked()), this, SLOT(slotEditClicked()));
- connect(create,SIGNAL(clicked()),this,SLOT(slotCreateClicked()));
- connect(open,SIGNAL(clicked()),this,SLOT(slotOpenClicked()));
- connect(preview,SIGNAL(clicked()),this,SLOT(slotPreviewClicked()));
- connect(document,SIGNAL(clicked()),this,SLOT(slotDocumentClicked()));
+ connect(edit,TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditClicked()));
+ connect(create,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotCreateClicked()));
+ connect(open,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotOpenClicked()));
+ connect(preview,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotPreviewClicked()));
+ connect(document,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotDocumentClicked()));
}
void KWMailMergeConfigDialog::enableDisableEdit()
@@ -450,14 +450,14 @@ void KWMailMergeConfigDialog::enableDisableEdit()
void KWMailMergeConfigDialog::slotEditClicked()
{db_->action=KWSLEdit;
- if (db_->plugin) db_->plugin->showConfigDialog((QWidget*)parent(),KWSLEdit);
+ if (db_->plugin) db_->plugin->showConfigDialog((TQWidget*)tqparent(),KWSLEdit);
}
void KWMailMergeConfigDialog::slotCreateClicked()
{
db_->action=KWSLCreate;
doNewActions();
-//done(QDialog::Accepted);
+//done(TQDialog::Accepted);
}
void KWMailMergeConfigDialog::doNewActions()
@@ -482,7 +482,7 @@ void KWMailMergeConfigDialog::slotOpenClicked()
void KWMailMergeConfigDialog::slotPreviewClicked()
{
db_->action=KWSLMergePreview;
- KMainWindow *mw=dynamic_cast<KMainWindow*>(((QWidget *)parent())->topLevelWidget());
+ KMainWindow *mw=dynamic_cast<KMainWindow*>(((TQWidget *)tqparent())->tqtopLevelWidget());
if (mw)
{
KAction *ac=mw->actionCollection()->action(KStdAction::stdName(KStdAction::PrintPreview));
@@ -496,7 +496,7 @@ void KWMailMergeConfigDialog::slotPreviewClicked()
void KWMailMergeConfigDialog::slotDocumentClicked()
{
db_->action=KWSLMergeDocument;
- done(QDialog::Accepted);
+ done(TQDialog::Accepted);
}
KWMailMergeConfigDialog::~KWMailMergeConfigDialog()
@@ -509,29 +509,29 @@ KWMailMergeConfigDialog::~KWMailMergeConfigDialog()
*
******************************************************************/
-KWMailMergeVariableInsertDia::KWMailMergeVariableInsertDia( QWidget *parent, KWMailMergeDataBase *db )
+KWMailMergeVariableInsertDia::KWMailMergeVariableInsertDia( TQWidget *tqparent, KWMailMergeDataBase *db )
: KDialogBase( Plain, i18n( "Mail Merge - Variable Name" ),
- Ok | Cancel, Ok, parent, "", true )
+ Ok | Cancel, Ok, tqparent, "", true )
{
m_db=db;
- QWidget *page = plainPage();
+ TQWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() );
- layout->setAutoAdd( true );
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( page, marginHint(), spacingHint() );
+ tqlayout->setAutoAdd( true );
- QLabel *l = new QLabel( i18n( "Name:" ), page );
- l->setMaximumHeight( l->sizeHint().height() );
- names = new QListBox( page );
+ TQLabel *l = new TQLabel( i18n( "Name:" ), page );
+ l->setMaximumHeight( l->tqsizeHint().height() );
+ names = new TQListBox( page );
- QMap< QString, QString >::ConstIterator it = db->getRecordEntries().begin();
+ TQMap< TQString, TQString >::ConstIterator it = db->getRecordEntries().begin();
for ( ; it != db->getRecordEntries().end(); ++it )
names->insertItem( m_db->version() ?it.data():it.key(), -1 );
- setInitialSize( QSize( 350, 400 ) );
- connect( names, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
- connect( names, SIGNAL( doubleClicked( QListBoxItem* ) ),
- this, SLOT( slotOk() ) );
+ setInitialSize( TQSize( 350, 400 ) );
+ connect( names, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
+ connect( names, TQT_SIGNAL( doubleClicked( TQListBoxItem* ) ),
+ this, TQT_SLOT( slotOk() ) );
setFocus();
enableButtonOK( names->currentItem() != -1 );
@@ -542,11 +542,11 @@ void KWMailMergeVariableInsertDia::slotSelectionChanged()
enableButtonOK( names->currentItem() != -1 );
}
-QString KWMailMergeVariableInsertDia::getName() const
+TQString KWMailMergeVariableInsertDia::getName() const
{
if (m_db->version()>=1) {
- QString description=names->text(names->currentItem());
- QMap< QString, QString >::ConstIterator it = m_db->getRecordEntries().begin();
+ TQString description=names->text(names->currentItem());
+ TQMap< TQString, TQString >::ConstIterator it = m_db->getRecordEntries().begin();
for ( ; it != m_db->getRecordEntries().end(); ++it )
if (description==it.data()) {
return it.key();
diff --git a/kword/KWMailMergeDataBase.h b/kword/KWMailMergeDataBase.h
index 4b20e3e9..2906ebe8 100644
--- a/kword/KWMailMergeDataBase.h
+++ b/kword/KWMailMergeDataBase.h
@@ -26,22 +26,22 @@
#include <ktrader.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdom.h>
-#include <qtextstream.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
#include "KWMailMergeDataSource.h"
#include "KWordMailMergeDatabaseIface.h"
#include <koffice_export.h>
-class QListBox;
-class QPushButton;
-class QLineEdit;
-class QSpinBox;
+class TQListBox;
+class TQPushButton;
+class TQLineEdit;
+class TQSpinBox;
class KWDocument;
-class QVBox;
+class TQVBox;
//class KWMailMergeDataBase;
@@ -54,29 +54,30 @@ class QVBox;
*
******************************************************************/
-class KWORD_EXPORT KWMailMergeDataBase: public QObject,KWordMailMergeDatabaseIface
+class KWORD_EXPORT KWMailMergeDataBase: public TQObject,KWordMailMergeDatabaseIface
{
Q_OBJECT
+ TQ_OBJECT
public:
KWMailMergeDataBase( KWDocument *doc_ );
- void showConfigDialog(QWidget *); // Select datasource type and / or configure datasource
+ void showConfigDialog(TQWidget *); // Select datasource type and / or configure datasource
- QString getValue( const QString &name, int record = -1 ) const; //accesses the plugin
+ TQString getValue( const TQString &name, int record = -1 ) const; //accesses the plugin
bool isSampleRecord();
- const QMap< QString, QString > &getRecordEntries() const; //accesses the plugin
+ const TQMap< TQString, TQString > &getRecordEntries() const; //accesses the plugin
int getNumRecords() const; //accesses the plugin
- QDomElement save(QDomDocument &doc) const; // save some global config + plugin config
- void load( const QDomElement& elem ); // save some global config + plugin config
+ TQDomElement save(TQDomDocument &doc) const; // save some global config + plugin config
+ void load( const TQDomElement& elem ); // save some global config + plugin config
- KWMailMergeDataSource *loadPlugin(const QString& name);
+ KWMailMergeDataSource *loadPlugin(const TQString& name);
KWMailMergeDataSource *openPluginFor(int type,int &version);
virtual void refresh(bool force);
- virtual QStringList availablePlugins();
- virtual bool loadPlugin(const QString &name,const QString &command);
+ virtual TQStringList availablePlugins();
+ virtual bool loadPlugin(const TQString &name,const TQString &command);
virtual bool isConfigDialogShown();
int version();
@@ -87,8 +88,8 @@ protected:
KWDocument *doc;
int action;
class KWMailMergeDataSource *plugin;
- QMap<QString, QString> emptyMap;
- bool askUserForConfirmationAndConfig(KWMailMergeDataSource *tmpPlugin,bool config,QWidget *par,int version);
+ TQMap<TQString, TQString> emptyMap;
+ bool askUserForConfirmationAndConfig(KWMailMergeDataSource *tmpPlugin,bool config,TQWidget *par,int version);
bool rejectdcopcall;
};
@@ -96,6 +97,7 @@ protected:
class KWMailMergeChoosePluginDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
KWMailMergeChoosePluginDialog( KTrader::OfferList );
@@ -107,24 +109,25 @@ class KWMailMergeChoosePluginDialog : public KDialogBase
void pluginChanged( int pos );
private:
- class QComboBox *chooser;
- class QLabel *descriptionLabel;
+ class TQComboBox *chooser;
+ class TQLabel *descriptionLabel;
KTrader::OfferList pluginOffers;
};
class KWMailMergeConfigDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWMailMergeConfigDialog ( QWidget *parent, KWMailMergeDataBase *db );
+ KWMailMergeConfigDialog ( TQWidget *tqparent, KWMailMergeDataBase *db );
~KWMailMergeConfigDialog();
protected:
- QPushButton *edit;
- QPushButton *create;
- QPushButton *open;
- QPushButton *preview;
- QPushButton *document;
+ TQPushButton *edit;
+ TQPushButton *create;
+ TQPushButton *open;
+ TQPushButton *preview;
+ TQPushButton *document;
KWMailMergeDataBase *db_;
void enableDisableEdit();
void doNewActions();
@@ -146,10 +149,11 @@ protected slots:
class KWMailMergeVariableInsertDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWMailMergeVariableInsertDia( QWidget *parent, KWMailMergeDataBase *db );
- QString getName() const; // ### unused, can we remove this?
+ KWMailMergeVariableInsertDia( TQWidget *tqparent, KWMailMergeDataBase *db );
+ TQString getName() const; // ### unused, can we remove this?
protected slots:
void slotSelectionChanged();
@@ -158,7 +162,7 @@ class KWMailMergeVariableInsertDia : public KDialogBase
KWMailMergeDataBase *m_db;
protected:
- QListBox *names;
+ TQListBox *names;
};
#endif
diff --git a/kword/KWMailMergeDataSource.cpp b/kword/KWMailMergeDataSource.cpp
index abb17501..e95085e7 100644
--- a/kword/KWMailMergeDataSource.cpp
+++ b/kword/KWMailMergeDataSource.cpp
@@ -1,8 +1,8 @@
#include "KWMailMergeDataSource.h"
#include "KWMailMergeDataSource.moc"
-KWMailMergeDataSource::KWMailMergeDataSource(KInstance* inst,QObject *parent): QObject(parent),
-DCOPObject(QCString(parent->name())+".plugin_loading"),m_instance(inst)
+KWMailMergeDataSource::KWMailMergeDataSource(KInstance* inst,TQObject *tqparent): TQObject(tqparent),
+DCOPObject(TQCString(tqparent->name())+".plugin_loading"),m_instance(inst)
{
}
-const QMap< QString, QString > &KWMailMergeDataSource::getRecordEntries() const {return sampleRecord;}
+const TQMap< TQString, TQString > &KWMailMergeDataSource::getRecordEntries() const {return sampleRecord;}
diff --git a/kword/KWMailMergeDataSource.h b/kword/KWMailMergeDataSource.h
index 9d1fc076..b773c7a8 100644
--- a/kword/KWMailMergeDataSource.h
+++ b/kword/KWMailMergeDataSource.h
@@ -20,14 +20,14 @@
#ifndef _SERIALLETTER_INTERFACE_H_
#define _SERIALLETTER_INTERFACE_H_
-#include <qcstring.h>
-#include <qdom.h>
+#include <tqcstring.h>
+#include <tqdom.h>
#include <kinstance.h>
-#include <qmap.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqobject.h>
#include <dcopobject.h>
#include <koffice_export.h>
-typedef QMap<QString,QString> DbRecord;
+typedef TQMap<TQString,TQString> DbRecord;
#define KWSLUnspecified 0
#define KWSLEdit 1
#define KWSLCreate 2
@@ -43,25 +43,26 @@ typedef QMap<QString,QString> DbRecord;
*
******************************************************************/
-class KWORD_EXPORT KWMailMergeDataSource: public QObject, public DCOPObject
+class KWORD_EXPORT KWMailMergeDataSource: public TQObject, public DCOPObject
{
Q_OBJECT
+// TQ_OBJECT
K_DCOP
public:
- KWMailMergeDataSource(KInstance* inst,QObject *parent);
+ KWMailMergeDataSource(KInstance* inst,TQObject *tqparent);
virtual ~KWMailMergeDataSource(){;}
- virtual class QString getValue( const class QString &name, int record = -1 ) const=0;
+ virtual class TQString getValue( const class TQString &name, int record = -1 ) const=0;
- const QMap< QString, QString > &getRecordEntries() const;
+ const TQMap< TQString, TQString > &getRecordEntries() const;
KInstance *KWInstance(){return m_instance;}
- virtual bool showConfigDialog(class QWidget*,int) =0;
+ virtual bool showConfigDialog(class TQWidget*,int) =0;
- virtual void save(QDomDocument&, QDomElement&)=0;
- virtual void load( class QDomElement& elem )=0;
+ virtual void save(TQDomDocument&, TQDomElement&)=0;
+ virtual void load( class TQDomElement& elem )=0;
virtual void refresh(bool force)=0;
- QByteArray info;
+ TQByteArray info;
protected:
DbRecord sampleRecord;
private:
diff --git a/kword/KWMailMergeLabelAction.cpp b/kword/KWMailMergeLabelAction.cpp
index 79d06378..7adce7f3 100644
--- a/kword/KWMailMergeLabelAction.cpp
+++ b/kword/KWMailMergeLabelAction.cpp
@@ -27,25 +27,25 @@
#include <kstyle.h>
#include <kpopupmenu.h>
-class MailMergeDraggableLabel : public QToolButton
+class MailMergeDraggableLabel : public TQToolButton
{
public:
- MailMergeDraggableLabel( KoMainWindow * mw, const QString & text, QWidget * parent = 0, const char * name = 0 )
- : QToolButton( parent, name ), m_mw(mw)
+ MailMergeDraggableLabel( KoMainWindow * mw, const TQString & text, TQWidget * tqparent = 0, const char * name = 0 )
+ : TQToolButton( tqparent, name ), m_mw(mw)
{
setText(text);
setAcceptDrops(true);
validDrag = false;
}
protected:
- void mousePressEvent( QMouseEvent * ev )
+ void mousePressEvent( TQMouseEvent * ev )
{
validDrag = true;
startDragPos = ev->pos();
}
- void mouseMoveEvent( QMouseEvent * ev )
+ void mouseMoveEvent( TQMouseEvent * ev )
{
- if ((startDragPos - ev->pos()).manhattanLength() > QApplication::startDragDistance())
+ if ((startDragPos - ev->pos()).manhattanLength() > TQApplication::startDragDistance())
{
validDrag = false;
@@ -59,33 +59,33 @@ protected:
#endif
}
}
- void mouseReleaseEvent( QMouseEvent * )
+ void mouseReleaseEvent( TQMouseEvent * )
{
validDrag = false;
}
- QSize sizeHint() const
+ TQSize tqsizeHint() const
{
int w = fontMetrics().width( text() );
int h = fontMetrics().height();
- return QSize( w, h );
+ return TQSize( w, h );
}
- void drawButton( QPainter * p )
+ void drawButton( TQPainter * p )
{
// Draw the background
- style().drawComplexControl( QStyle::CC_ToolButton, p, this, rect(), colorGroup(),
- QStyle::Style_Enabled, QStyle::SC_ToolButton );
+ tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, p, this, rect(), tqcolorGroup(),
+ TQStyle::Style_Enabled, TQStyle::SC_ToolButton );
// Draw the label
- style().drawControl( QStyle::CE_ToolButtonLabel, p, this, rect(), colorGroup(),
- QStyle::Style_Enabled );
+ tqstyle().tqdrawControl( TQStyle::CE_ToolButtonLabel, p, this, rect(), tqcolorGroup(),
+ TQStyle::Style_Enabled );
}
- void enterEvent( QEvent* ) {};
- void leaveEvent( QEvent* ) {};
+ void enterEvent( TQEvent* ) {};
+ void leaveEvent( TQEvent* ) {};
#if 0
- void dragEnterEvent( QDragEnterEvent *ev ) {
+ void dragEnterEvent( TQDragEnterEvent *ev ) {
if ( KURLDrag::canDecode( ev ) )
ev->acceptAction();
}
- void dropEvent( QDropEvent* ev ) {
+ void dropEvent( TQDropEvent* ev ) {
KURL::List lst;
if ( KURLDrag::decode( ev, lst ) ) {
m_mw->openURL( 0L, lst.first() );
@@ -93,7 +93,7 @@ protected:
}
#endif
private:
- QPoint startDragPos;
+ TQPoint startDragPos;
bool validDrag;
KoMainWindow * m_mw;
};
@@ -102,13 +102,13 @@ private:
-KWMailMergeLabelAction::KWMailMergeLabelAction( const QString &text, int accel,
- QObject* receiver, const char* slot, QObject *parent, const char *name )
- : KAction( text, accel, receiver, slot, parent, name ), m_label( 0L )
+KWMailMergeLabelAction::KWMailMergeLabelAction( const TQString &text, int accel,
+ TQObject* receiver, const char* slot, TQObject *tqparent, const char *name )
+ : KAction( text, accel, receiver, slot, tqparent, name ), m_label( 0L )
{
}
-int KWMailMergeLabelAction::plug( QWidget *widget, int index )
+int KWMailMergeLabelAction::plug( TQWidget *widget, int index )
{
//do not call the previous implementation here
@@ -123,7 +123,7 @@ int KWMailMergeLabelAction::plug( QWidget *widget, int index )
addContainer( tb, id );
- connect( tb, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( tb, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -131,7 +131,7 @@ int KWMailMergeLabelAction::plug( QWidget *widget, int index )
return -1;
}
-void KWMailMergeLabelAction::unplug( QWidget *widget )
+void KWMailMergeLabelAction::unplug( TQWidget *widget )
{
if ( widget->inherits( "KToolBar" ) )
{
diff --git a/kword/KWMailMergeLabelAction.h b/kword/KWMailMergeLabelAction.h
index a0aacfed..da523864 100644
--- a/kword/KWMailMergeLabelAction.h
+++ b/kword/KWMailMergeLabelAction.h
@@ -25,20 +25,21 @@
#define _MAILMERGE_ACTIONS_
#include <kaction.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
class KWMailMergeLabelAction : public KAction
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWMailMergeLabelAction( const QString &text, int accel,
- QObject* receiver, const char* slot, QObject *parent = 0, const char *name = 0 );
+ KWMailMergeLabelAction( const TQString &text, int accel,
+ TQObject* receiver, const char* slot, TQObject *tqparent = 0, const char *name = 0 );
- virtual int plug( QWidget *widget, int index = -1 );
- virtual void unplug( QWidget *widget );
- QToolButton * label() { return m_label; }
+ virtual int plug( TQWidget *widget, int index = -1 );
+ virtual void unplug( TQWidget *widget );
+ TQToolButton * label() { return m_label; }
private:
- QToolButton * m_label;
+ TQToolButton * m_label;
};
#endif
diff --git a/kword/KWOasisLoader.cpp b/kword/KWOasisLoader.cpp
index 27cdcf54..99f5ee62 100644
--- a/kword/KWOasisLoader.cpp
+++ b/kword/KWOasisLoader.cpp
@@ -40,8 +40,8 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qvaluelist.h>
-#include <qdom.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
KWOasisLoader::KWOasisLoader( KWDocument* doc )
: m_doc( doc )
@@ -50,9 +50,9 @@ KWOasisLoader::KWOasisLoader( KWDocument* doc )
// Warning, this method has no undo/redo support, it is *called* by the undo/redo commands.
// cursor is set when pasting into a textframesetedit (kwcommand), 0 otherwise.
-QValueList<KWFrame *> KWOasisLoader::insertOasisData( KoStore* store, KoTextCursor* cursor )
+TQValueList<KWFrame *> KWOasisLoader::insertOasisData( KoStore* store, KoTextCursor* cursor )
{
- QValueList<KWFrame *> frames;
+ TQValueList<KWFrame *> frames;
if ( store->bad() || !store->hasFile( "content.xml" ) )
{
kdError(32001) << "Invalid ZIP store in memory" << endl;
@@ -63,8 +63,8 @@ QValueList<KWFrame *> KWOasisLoader::insertOasisData( KoStore* store, KoTextCurs
store->disallowNameExpansion();
KoOasisStore oasisStore( store );
- QDomDocument contentDoc;
- QString errorMessage;
+ TQDomDocument contentDoc;
+ TQString errorMessage;
bool ok = oasisStore.loadAndParse( "content.xml", contentDoc, errorMessage );
if ( !ok ) {
kdError(32001) << "Error parsing content.xml: " << errorMessage << endl;
@@ -72,7 +72,7 @@ QValueList<KWFrame *> KWOasisLoader::insertOasisData( KoStore* store, KoTextCurs
}
KoOasisStyles oasisStyles;
- QDomDocument stylesDoc;
+ TQDomDocument stylesDoc;
(void)oasisStore.loadAndParse( "styles.xml", stylesDoc, errorMessage );
// Load styles from style.xml
oasisStyles.createStyleMap( stylesDoc, true );
@@ -81,16 +81,16 @@ QValueList<KWFrame *> KWOasisLoader::insertOasisData( KoStore* store, KoTextCurs
m_doc->createLoadingInfo();
- QDomElement content = contentDoc.documentElement();
+ TQDomElement content = contentDoc.documentElement();
- QDomElement body( KoDom::namedItemNS( content, KoXmlNS::office, "body" ) );
+ TQDomElement body( KoDom::namedItemNS( content, KoXmlNS::office, "body" ) );
if ( body.isNull() ) {
kdError(32001) << "No office:body found!" << endl;
return frames;
}
// We then want to use whichever element is the child of <office:body>,
// whether that's <office:text> or <office:presentation> or whatever.
- QDomElement iter, realBody;
+ TQDomElement iter, realBody;
forEachElement( iter, body ) {
realBody = iter;
}
@@ -113,11 +113,11 @@ QValueList<KWFrame *> KWOasisLoader::insertOasisData( KoStore* store, KoTextCurs
{
// The main loop from KoTextDocument::loadOasisText but for frames only
// (can't paste text if there is no text-frameset being edited, where would it go?)
- QDomElement tag;
+ TQDomElement tag;
forEachElement( tag, realBody )
{
context.styleStack().save();
- const QString bodyTagLocalName = tag.localName();
+ const TQString bodyTagLocalName = tag.localName();
kdDebug() << k_funcinfo << bodyTagLocalName << endl;
if ( bodyTagLocalName == "frame" && tag.namespaceURI() == KoXmlNS::draw )
{
@@ -140,7 +140,7 @@ QValueList<KWFrame *> KWOasisLoader::insertOasisData( KoStore* store, KoTextCurs
return frames;
}
-void KWOasisLoader::loadOasisSettings( const QDomDocument& settingsDoc )
+void KWOasisLoader::loadOasisSettings( const TQDomDocument& settingsDoc )
{
KoOasisSettings settings( settingsDoc );
KoOasisSettings::Items viewSettings = settings.itemSet( "view-settings" );
@@ -152,7 +152,7 @@ void KWOasisLoader::loadOasisSettings( const QDomDocument& settingsDoc )
m_doc->variableCollection()->variableSetting()->loadOasis( settings );
}
-static QString headerTypeToFramesetName( const QString& localName, bool hasEvenOdd )
+static TQString headerTypeToFramesetName( const TQString& localName, bool hasEvenOdd )
{
if ( localName == "header" )
return hasEvenOdd ? i18n("Odd Pages Header") : i18n( "Header" );
@@ -167,10 +167,10 @@ static QString headerTypeToFramesetName( const QString& localName, bool hasEvenO
if ( localName == "footer-first" ) // NOT OASIS COMPLIANT
return i18n("First Page Footer");
kdWarning(32001) << "Unknown tag in headerTypeToFramesetName: " << localName << endl;
- return QString::null;
+ return TQString();
}
-static KWFrameSet::Info headerTypeToFrameInfo( const QString& localName, bool /*hasEvenOdd*/ )
+static KWFrameSet::Info headerTypeToFrameInfo( const TQString& localName, bool /*hasEvenOdd*/ )
{
if ( localName == "header" )
return KWFrameSet::FI_ODD_HEADER;
@@ -182,7 +182,7 @@ static KWFrameSet::Info headerTypeToFrameInfo( const QString& localName, bool /*
return KWFrameSet::FI_EVEN_FOOTER;
// ######## KWord extension, because I'm too lazy.
- // TODO: the real solution is a separate page layout for the first page.
+ // TODO: the real solution is a separate page tqlayout for the first page.
if ( localName == "header-first" ) // NOT OASIS COMPLIANT
return KWFrameSet::FI_FIRST_HEADER;
if ( localName == "footer-first" ) // NOT OASIS COMPLIANT
@@ -190,9 +190,9 @@ static KWFrameSet::Info headerTypeToFrameInfo( const QString& localName, bool /*
return KWFrameSet::FI_BODY;
}
-void KWOasisLoader::loadOasisHeaderFooter( const QDomElement& headerFooter, bool hasEvenOdd, QDomElement& style, KoOasisContext& context )
+void KWOasisLoader::loadOasisHeaderFooter( const TQDomElement& headerFooter, bool hasEvenOdd, TQDomElement& style, KoOasisContext& context )
{
- const QString localName = headerFooter.localName();
+ const TQString localName = headerFooter.localName();
bool isHeader = localName.startsWith( "header" );
KWTextFrameSet *fs = new KWTextFrameSet( m_doc, headerTypeToFramesetName( localName, hasEvenOdd ) );
@@ -203,7 +203,7 @@ void KWOasisLoader::loadOasisHeaderFooter( const QDomElement& headerFooter, bool
context.styleStack().push( style );
KWFrame* frame = new KWFrame( fs, 29, isHeader?0:567, 798-29, 41 );
frame->loadCommonOasisProperties( context, fs, "header-footer" );
- const QString minHeight = context.styleStack().attributeNS( KoXmlNS::fo, "min-height" );
+ const TQString minHeight = context.styleStack().attributeNS( KoXmlNS::fo, "min-height" );
if ( !minHeight.isEmpty() )
frame->setMinimumFrameHeight( KoUnit::parseValue( minHeight ) );
@@ -228,21 +228,21 @@ void KWOasisLoader::loadOasisIgnoreList( const KoOasisSettings& settings )
KoOasisSettings::Items configurationSettings = settings.itemSet( "configuration-settings" );
if ( !configurationSettings.isNull() )
{
- const QString ignorelist = configurationSettings.parseConfigItemString( "SpellCheckerIgnoreList" );
+ const TQString ignorelist = configurationSettings.parseConfigItemString( "SpellCheckerIgnoreList" );
kdDebug()<<" ignorelist :"<<ignorelist<<endl;
- m_doc->setSpellCheckIgnoreList( QStringList::split( ',', ignorelist ) );
+ m_doc->setSpellCheckIgnoreList( TQStringList::split( ',', ignorelist ) );
}
}
-KWFrame* KWOasisLoader::loadFrame( const QDomElement& frameTag, KoOasisContext& context, const KoPoint& offset )
+KWFrame* KWOasisLoader::loadFrame( const TQDomElement& frameTag, KoOasisContext& context, const KoPoint& offset )
{
KWFrame* frame = 0;
- QDomElement elem;
+ TQDomElement elem;
forEachElement( elem, frameTag )
{
if ( elem.namespaceURI() != KoXmlNS::draw )
continue;
- const QString localName = elem.localName();
+ const TQString localName = elem.localName();
if ( localName == "text-box" )
{
//kdDebug()<<" append text-box\n";
@@ -257,8 +257,8 @@ KWFrame* KWOasisLoader::loadFrame( const QDomElement& frameTag, KoOasisContext&
break;
} else if ( localName == "object" )
{
- QDomElement mathElem; // will be set if we find <math:math>
- QDomElement childElem;
+ TQDomElement mathElem; // will be set if we tqfind <math:math>
+ TQDomElement childElem;
forEachElement( childElem, elem )
{
if ( childElem.localName() == "math"
@@ -279,11 +279,11 @@ KWFrame* KWOasisLoader::loadFrame( const QDomElement& frameTag, KoOasisContext&
}
}
if ( frame ) {
- const QString anchorType = frameTag.attributeNS( KoXmlNS::text, "anchor-type", QString::null );
+ const TQString anchorType = frameTag.attributeNS( KoXmlNS::text, "anchor-type", TQString() );
if ( anchorType == "page" ) {
- double x = KoUnit::parseValue( frameTag.attributeNS( KoXmlNS::svg, "x", QString::null ) );
- double y = KoUnit::parseValue( frameTag.attributeNS( KoXmlNS::svg, "y", QString::null ) );
- int pageNum = frameTag.attributeNS( KoXmlNS::text, "anchor-page-number", QString::null ).toInt();
+ double x = KoUnit::parseValue( frameTag.attributeNS( KoXmlNS::svg, "x", TQString() ) );
+ double y = KoUnit::parseValue( frameTag.attributeNS( KoXmlNS::svg, "y", TQString() ) );
+ int pageNum = frameTag.attributeNS( KoXmlNS::text, "anchor-page-number", TQString() ).toInt();
// Ensure that we have enough pages
KWPageManager* pageManager = m_doc->pageManager();
while ( pageNum > pageManager->lastPageNumber() )
@@ -295,7 +295,7 @@ KWFrame* KWOasisLoader::loadFrame( const QDomElement& frameTag, KoOasisContext&
return frame;
}
-KWFrame* KWOasisLoader::loadOasisTextBox( const QDomElement& frameTag, const QDomElement& tag,
+KWFrame* KWOasisLoader::loadOasisTextBox( const TQDomElement& frameTag, const TQDomElement& tag,
KoOasisContext& context )
{
// Text frame chains. When seeing frame 'B' is chained to this frame A when loading,
@@ -307,16 +307,16 @@ KWFrame* KWOasisLoader::loadOasisTextBox( const QDomElement& frameTag, const QDo
KWLoadingInfo* loadingInfo = m_doc->loadingInfo();
KWTextFrameSet* fs = 0;
- QString frameName = frameTag.attributeNS( KoXmlNS::draw, "name", QString::null );
- QString chainNextName = tag.attributeNS( KoXmlNS::draw, "chain-next-name", QString::null );
+ TQString frameName = frameTag.attributeNS( KoXmlNS::draw, "name", TQString() );
+ TQString chainNextName = tag.attributeNS( KoXmlNS::draw, "chain-next-name", TQString() );
if ( !chainNextName.isEmpty() && loadingInfo ) { // 'B' in the above example
kdDebug(32001) << "Loading " << frameName << " : next-in-chain=" << chainNextName << endl;
// Check if we already loaded that frame (then we need to go 'before' it)
KWFrame* nextFrame = loadingInfo->frameByName( chainNextName );
if ( nextFrame ) {
fs = dynamic_cast<KWTextFrameSet *>( nextFrame->frameSet() );
- chainNextName = QString::null; // already found, no need to store it
- kdDebug(32001) << " found " << nextFrame << " -> frameset " << ( fs ? fs->name() : QString::null ) << endl;
+ chainNextName = TQString(); // already found, no need to store it
+ kdDebug(32001) << " found " << nextFrame << " -> frameset " << ( fs ? fs->name() : TQString() ) << endl;
}
}
KWFrame* prevFrame = loadingInfo->chainPrevFrame( frameName );
@@ -347,10 +347,10 @@ KWFrame* KWOasisLoader::loadOasisTextBox( const QDomElement& frameTag, const QDo
return frame;
}
-KWTableFrameSet* KWOasisLoader::loadOasisTable( const QDomElement& tag,
+KWTableFrameSet* KWOasisLoader::loadOasisTable( const TQDomElement& tag,
KoOasisContext& context )
{
- const QString name = tag.attributeNS( KoXmlNS::table, "name", i18n( "Unnamed Table" ) ); // ### check for unicity?
+ const TQString name = tag.attributeNS( KoXmlNS::table, "name", i18n( "Unnamed Table" ) ); // ### check for unicity?
KWTableFrameSet* table = new KWTableFrameSet( m_doc, name );
table->loadOasis( tag, context );
m_doc->addFrameSet(table, false);
diff --git a/kword/KWOasisLoader.h b/kword/KWOasisLoader.h
index 36f76dde..5035396c 100644
--- a/kword/KWOasisLoader.h
+++ b/kword/KWOasisLoader.h
@@ -23,14 +23,14 @@ class KoPoint;
class KWTableFrameSet;
class KWLoadingInfo;
class KoOasisContext;
-class QDomDocument;
+class TQDomDocument;
class KoOasisSettings;
-class QDomElement;
+class TQDomElement;
class KWFrame;
class KoStore;
class KoTextCursor;
class KWDocument;
-template <class T> class QValueList;
+template <class T> class TQValueList;
// KWDocument delegates to this class the loading of OASIS documents or fragments
class KWOasisLoader
@@ -41,16 +41,16 @@ public:
/// Insert everything from an oasis store - used when pasting
/// (either text or entire frames)
/// TODO: dontCreateFootNote
- QValueList<KWFrame *> insertOasisData( KoStore* store, KoTextCursor* cursor );
+ TQValueList<KWFrame *> insertOasisData( KoStore* store, KoTextCursor* cursor );
- void loadOasisSettings( const QDomDocument&settingsDoc );
- void loadOasisHeaderFooter( const QDomElement& headerFooter, bool hasEvenOdd,
- QDomElement& style, KoOasisContext& context );
+ void loadOasisSettings( const TQDomDocument&settingsDoc );
+ void loadOasisHeaderFooter( const TQDomElement& headerFooter, bool hasEvenOdd,
+ TQDomElement& style, KoOasisContext& context );
- KWFrame* loadFrame( const QDomElement& frameTag, KoOasisContext& context, const KoPoint& offset );
- KWFrame* loadOasisTextBox( const QDomElement& frame, const QDomElement& tag,
+ KWFrame* loadFrame( const TQDomElement& frameTag, KoOasisContext& context, const KoPoint& offset );
+ KWFrame* loadOasisTextBox( const TQDomElement& frame, const TQDomElement& tag,
KoOasisContext& context );
- KWTableFrameSet* loadOasisTable( const QDomElement& tag,
+ KWTableFrameSet* loadOasisTable( const TQDomElement& tag,
KoOasisContext& context );
private:
diff --git a/kword/KWOasisSaver.cpp b/kword/KWOasisSaver.cpp
index b4f3fd54..2d1ed6cb 100644
--- a/kword/KWOasisSaver.cpp
+++ b/kword/KWOasisSaver.cpp
@@ -26,8 +26,8 @@
KWOasisSaver::KWOasisSaver( KWDocument* doc )
: m_doc( doc )
{
- const QCString mimeType = selectionMimeType();
- m_store = KoStore::createStore( &m_buffer, KoStore::Write, mimeType );
+ const TQCString mimeType = selectionMimeType();
+ m_store = KoStore::createStore( TQT_TQIODEVICE(&m_buffer), KoStore::Write, mimeType );
Q_ASSERT( m_store );
Q_ASSERT( !m_store->bad() );
@@ -42,9 +42,9 @@ KWOasisSaver::KWOasisSaver( KWDocument* doc )
bodyWriter->startElement( "office:text" );
}
-void KWOasisSaver::saveParagraphs( const QValueList<const KoTextParag *>& paragraphs )
+void KWOasisSaver::saveParagraphs( const TQValueList<const KoTextParag *>& paragraphs )
{
- for ( QValueList<const KoTextParag *>::const_iterator it = paragraphs.begin(),
+ for ( TQValueList<const KoTextParag *>::const_iterator it = paragraphs.begin(),
end = paragraphs.end();
it != end ; ++it ) {
saveParagraph( *it );
@@ -58,10 +58,10 @@ void KWOasisSaver::saveParagraph( const KoTextParag* parag )
parag->saveOasis( *bodyWriter, *m_savingContext, 0, parag->length()-2, true );
}
-QByteArray KWOasisSaver::data() const
+TQByteArray KWOasisSaver::data() const
{
Q_ASSERT( !m_store ); // forgot to call finish() (or to check its return value) ?
- return m_buffer.buffer();
+ return const_cast<TQBuffer&>(m_buffer).buffer();
}
KWOasisSaver::~KWOasisSaver()
@@ -92,7 +92,7 @@ bool KWOasisSaver::finish()
//manifestWriter->addManifestEntry( "styles.xml", "text/xml" );
m_doc->saveOasisDocumentStyles( m_store, m_mainStyles, *m_savingContext,
KWDocument::SaveSelected /* simply means not SaveAll */,
- QByteArray() /* no headers/footers */ );
+ TQByteArray() /* no headers/footers */ );
if ( !m_store->close() ) // done with styles.xml
return false;
@@ -104,8 +104,8 @@ bool KWOasisSaver::finish()
void KWOasisSaver::writeAutomaticStyles( KoXmlWriter& contentWriter, KoGenStyles& mainStyles, bool stylesDotXml )
{
- QValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_AUTO, stylesDotXml );
- QValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
+ TQValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_AUTO, stylesDotXml );
+ TQValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
for ( ; it != styles.end() ; ++it ) {
(*it).style->writeStyle( &contentWriter, mainStyles, "style:style", (*it).name, "style:paragraph-properties" );
}
diff --git a/kword/KWOasisSaver.h b/kword/KWOasisSaver.h
index fe5e6ca7..18559044 100644
--- a/kword/KWOasisSaver.h
+++ b/kword/KWOasisSaver.h
@@ -19,7 +19,7 @@
#ifndef KWOASISSAVER_H
#define KWOASISSAVER_H
-#include <qbuffer.h>
+#include <tqbuffer.h>
#include <KoGenStyles.h>
#include <KoOasisStore.h>
@@ -28,7 +28,7 @@ class KoSavingContext;
class KoXmlWriter;
class KoTextParag;
class KoStore;
-template <class T> class QValueList;
+template <class T> class TQValueList;
/**
* This is used to save a bunch of paragraphs into a oasis store in memory,
@@ -44,7 +44,7 @@ public:
~KWOasisSaver();
/// Save a list of paragraphs
- void saveParagraphs( const QValueList<const KoTextParag *>& paragraphs );
+ void saveParagraphs( const TQValueList<const KoTextParag *>& paragraphs );
/// Save a paragraph
void saveParagraph( const KoTextParag* parag );
@@ -59,7 +59,7 @@ public:
bool finish();
/// Return the entire ZIP store as a byte array
- QByteArray data() const;
+ TQByteArray data() const;
/// Helper function, also used by KWDocument.
static void writeAutomaticStyles( KoXmlWriter& contentWriter, KoGenStyles& mainStyles, bool stylesDotXml );
@@ -67,7 +67,7 @@ public:
static const char* selectionMimeType();
private:
- QBuffer m_buffer;
+ TQBuffer m_buffer;
KoStore* m_store;
KoOasisStore* m_oasisStore;
KoGenStyles m_mainStyles;
diff --git a/kword/KWPage.cpp b/kword/KWPage.cpp
index b2645980..3518d673 100644
--- a/kword/KWPage.cpp
+++ b/kword/KWPage.cpp
@@ -19,10 +19,10 @@
#include "KWPage.h"
#include "KoZoomHandler.h"
-#include <qrect.h>
+#include <tqrect.h>
-KWPage::KWPage(KWPageManager *parent, int pageNum) {
- m_parent = parent;
+KWPage::KWPage(KWPageManager *tqparent, int pageNum) {
+ m_parent = tqparent;
m_pageNum = pageNum;
m_pageLayout.ptWidth = -1.0;
m_pageLayout.ptHeight = -1.0;
@@ -129,8 +129,8 @@ double KWPage::offsetInDocument() const { // the y coordinate
return m_parent->topOfPage(m_pageNum);
}
-QRect KWPage::zoomedRect(KoZoomHandler *zoomHandler) {
- return QRect(0, zoomHandler->zoomItY(offsetInDocument()),
+TQRect KWPage::zoomedRect(KoZoomHandler *zoomHandler) {
+ return TQRect(0, zoomHandler->zoomItY(offsetInDocument()),
zoomHandler->zoomItX(width()), zoomHandler->zoomItY(height()));
}
diff --git a/kword/KWPage.h b/kword/KWPage.h
index b650a383..b30a2ff9 100644
--- a/kword/KWPage.h
+++ b/kword/KWPage.h
@@ -102,20 +102,20 @@ public:
int pageNumber() const { return m_pageNum; }
/**
- * return a QRect with the size of this page in pixels.
+ * return a TQRect with the size of this page in pixels.
* @param zoomHandler the zoomhandler knows the current zoom levels. The KWDocument currently
* implements that interface.
*/
- QRect zoomedRect(KoZoomHandler *zoomHandler);
+ TQRect zoomedRect(KoZoomHandler *zoomHandler);
/// return a KoRect with the (pt) sizes of this page. Margins are ignored for this function.
const KoRect rect() const;
private:
/** private constructor, only for our friends
- * @param parent the KWPageManager that we belong to.
+ * @param tqparent the KWPageManager that we belong to.
* @param pageNum the number of the page as the user will see it.
*/
- KWPage(KWPageManager *parent, int pageNum);
+ KWPage(KWPageManager *tqparent, int pageNum);
int m_pageNum;
PageSideEnum m_pageSide;
KoPageLayout m_pageLayout;
diff --git a/kword/KWPageManager.cpp b/kword/KWPageManager.cpp
index 2e1c81fd..7058e5ac 100644
--- a/kword/KWPageManager.cpp
+++ b/kword/KWPageManager.cpp
@@ -31,7 +31,7 @@ KWPageManager::KWPageManager() {
int KWPageManager::pageNumber(const KoRect &frame) const {
int page=m_firstPage;
double startOfpage = 0.0;
- QPtrListIterator<KWPage> pages(m_pageList);
+ TQPtrListIterator<KWPage> pages(m_pageList);
while(pages.current() && startOfpage < frame.top()) {
startOfpage += pages.current()->height();
if(startOfpage >= frame.top())
@@ -78,7 +78,7 @@ int KWPageManager::pageCount() const {
}
KWPage* KWPageManager::page(int pageNum) const {
- QPtrListIterator<KWPage> pages(m_pageList);
+ TQPtrListIterator<KWPage> pages(m_pageList);
while(pages.current()) {
if(pages.current()->pageNumber() == pageNum)
return pages.current();
@@ -107,7 +107,7 @@ KWPage* KWPageManager::page(const KoRect *rect) const {
void KWPageManager::setStartPage(int startPage) {
int offset = startPage - m_firstPage;
bool switchSides = startPage % 2 != m_firstPage % 2;
- for(QPtrListIterator<KWPage> pages(m_pageList); pages.current(); ++pages) {
+ for(TQPtrListIterator<KWPage> pages(m_pageList); pages.current(); ++pages) {
KWPage *page = pages.current();
page->m_pageNum = page->m_pageNum + offset;
if(switchSides)
@@ -123,8 +123,8 @@ int KWPageManager::lastPageNumber() const {
KWPage* KWPageManager::insertPage(int index) {
if(m_onlyAllowAppend)
return appendPage();
- KWPage *page = new KWPage(this, QMIN( QMAX(index, m_firstPage), lastPageNumber()+1 ));
- QPtrListIterator<KWPage> pages(m_pageList);
+ KWPage *page = new KWPage(this, TQMIN( TQMAX(index, m_firstPage), lastPageNumber()+1 ));
+ TQPtrListIterator<KWPage> pages(m_pageList);
while(pages.current() && pages.current()->pageNumber() < index)
++pages;
while(pages.current()) {
@@ -165,7 +165,7 @@ double KWPageManager::bottomOfPage(int pageNum) const {
double KWPageManager::pageOffset(int pageNum, bool bottom) const {
if(pageNum < m_firstPage)
return 0;
- QPtrListIterator<KWPage> pages(m_pageList);
+ TQPtrListIterator<KWPage> pages(m_pageList);
double offset = 0.0;
while(pages.current()) {
if(pages.current()->pageNumber() == pageNum) {
@@ -185,7 +185,7 @@ void KWPageManager::removePage(int pageNumber) {
void KWPageManager::removePage(KWPage *page) {
if(!page)
return;
- QPtrListIterator<KWPage> pages(m_pageList);
+ TQPtrListIterator<KWPage> pages(m_pageList);
while(pages.current() && pages.current()->pageNumber() <= page->pageNumber())
++pages;
while(pages.current()) {
@@ -196,8 +196,8 @@ void KWPageManager::removePage(KWPage *page) {
m_pageList.remove(page);
}
-void KWPageManager::setDefaultPage(const KoPageLayout &layout) {
- m_defaultPageLayout = layout;
+void KWPageManager::setDefaultPage(const KoPageLayout &tqlayout) {
+ m_defaultPageLayout = tqlayout;
// make sure we have 1 default, either pageBound or left/right bound.
if(m_defaultPageLayout.ptLeft < 0 || m_defaultPageLayout.ptRight < 0) {
m_defaultPageLayout.ptLeft = -1;
@@ -205,8 +205,8 @@ void KWPageManager::setDefaultPage(const KoPageLayout &layout) {
} else {
m_defaultPageLayout.ptPageEdge = -1;
m_defaultPageLayout.ptBindingSide = -1;
- m_defaultPageLayout.ptLeft = QMAX(m_defaultPageLayout.ptLeft, 0);
- m_defaultPageLayout.ptRight = QMAX(m_defaultPageLayout.ptRight, 0);
+ m_defaultPageLayout.ptLeft = TQMAX(m_defaultPageLayout.ptLeft, 0);
+ m_defaultPageLayout.ptRight = TQMAX(m_defaultPageLayout.ptRight, 0);
}
//kdDebug() << "setDefaultPage l:" << m_defaultPageLayout.ptLeft << ", r: " << m_defaultPageLayout.ptRight << ", a: " << m_defaultPageLayout.ptPageEdge << ", b: " << m_defaultPageLayout.ptBindingSide << endl;
}
@@ -214,7 +214,7 @@ void KWPageManager::setDefaultPage(const KoPageLayout &layout) {
KoPoint KWPageManager::clipToDocument(const KoPoint &point) {
int page=m_firstPage;
double startOfpage = 0.0;
- QPtrListIterator<KWPage> pages(m_pageList);
+ TQPtrListIterator<KWPage> pages(m_pageList);
while(pages.current()) {
startOfpage += pages.current()->height();
if(startOfpage >= point.y())
@@ -222,9 +222,9 @@ KoPoint KWPageManager::clipToDocument(const KoPoint &point) {
page++;
++pages;
}
- page = QMIN(page, lastPageNumber());
+ page = TQMIN(page, lastPageNumber());
KoRect rect = this->page(page)->rect();
- if(rect.contains(point))
+ if(rect.tqcontains(point))
return point;
KoPoint rc(point);
@@ -241,7 +241,7 @@ KoPoint KWPageManager::clipToDocument(const KoPoint &point) {
}
// **** PageList ****
-int KWPageManager::PageList::compareItems(QPtrCollection::Item a, QPtrCollection::Item b)
+int KWPageManager::PageList::compareItems(TQPtrCollection::Item a, TQPtrCollection::Item b)
{
int pa = ((KWPage *)a)->pageNumber();
int pb = ((KWPage *)b)->pageNumber();
diff --git a/kword/KWPageManager.h b/kword/KWPageManager.h
index 300bef99..869a68f3 100644
--- a/kword/KWPageManager.h
+++ b/kword/KWPageManager.h
@@ -20,7 +20,7 @@
#include "KoPageLayout.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
class KWPage;
class KoPoint;
@@ -111,7 +111,7 @@ public:
/// return the effective pageLayout of @p pageNumber combining the default and the page specific ones
const KoPageLayout pageLayout(int pageNumber) const;
- void setDefaultPage(const KoPageLayout &layout);
+ void setDefaultPage(const KoPageLayout &tqlayout);
/**
* Returns the argument point, with altered coordinats if the point happens to be
@@ -125,9 +125,9 @@ private:
/// helper method for the topOfPage and bottomOfPage
double pageOffset(int pageNumber, bool bottom) const;
/// sorter for numbered pages.
- class PageList : public QPtrList<KWPage> {
+ class PageList : public TQPtrList<KWPage> {
protected:
- virtual int compareItems(QPtrCollection::Item a, QPtrCollection::Item b);
+ virtual int compareItems(TQPtrCollection::Item a, TQPtrCollection::Item b);
};
PageList m_pageList;
diff --git a/kword/KWPartFrameSet.cpp b/kword/KWPartFrameSet.cpp
index 88367743..9aa65e63 100644
--- a/kword/KWPartFrameSet.cpp
+++ b/kword/KWPartFrameSet.cpp
@@ -35,7 +35,7 @@
#include <assert.h>
-KWPartFrameSet::KWPartFrameSet( KWDocument *_doc, KWDocumentChild *_child, const QString & name )
+KWPartFrameSet::KWPartFrameSet( KWDocument *_doc, KWDocumentChild *_child, const TQString & name )
: KWFrameSet( _doc ), m_child( 0 ), m_cmdMoveChild( 0 ), m_protectContent( false )
{
if ( _child )
@@ -48,11 +48,11 @@ KWPartFrameSet::KWPartFrameSet( KWDocument *_doc, KWDocumentChild *_child, const
m_name = name;
}
-KWPartFrameSet::KWPartFrameSet( KWDocument* doc, const QDomElement& frameTag,
- const QDomElement& objectTag, KoOasisContext& context )
+KWPartFrameSet::KWPartFrameSet( KWDocument* doc, const TQDomElement& frameTag,
+ const TQDomElement& objectTag, KoOasisContext& context )
: KWFrameSet( doc ), m_child( 0 ), m_cmdMoveChild( 0 ), m_protectContent( false )
{
- m_name = frameTag.attributeNS( KoXmlNS::draw, "name", QString::null );
+ m_name = frameTag.attributeNS( KoXmlNS::draw, "name", TQString() );
if ( doc->frameSetByName( m_name ) ) // already exists!
m_name = doc->generateFramesetName( m_name + " %1" );
@@ -76,8 +76,8 @@ void KWPartFrameSet::setChild( KWDocumentChild* child )
assert( !m_child );
m_child = child;
m_child->setPartFrameSet( this );
- QObject::connect( m_child, SIGNAL( changed( KoChild * ) ),
- this, SLOT( slotChildChanged() ) );
+ TQObject::connect( m_child, TQT_SIGNAL( changed( KoChild * ) ),
+ this, TQT_SLOT( slotChildChanged() ) );
}
KWPartFrameSet::~KWPartFrameSet()
@@ -93,8 +93,8 @@ KWordFrameSetIface* KWPartFrameSet::dcopObject()
}
-void KWPartFrameSet::drawFrameContents( KWFrame* frame, QPainter * painter, const QRect & /*crect TODO*/,
- const QColorGroup &, bool onlyChanged, bool,
+void KWPartFrameSet::drawFrameContents( KWFrame* frame, TQPainter * painter, const TQRect & /*crect TODO*/,
+ const TQColorGroup &, bool onlyChanged, bool,
KWFrameSetEdit *, KWViewMode * )
{
if (!onlyChanged)
@@ -109,9 +109,9 @@ void KWPartFrameSet::drawFrameContents( KWFrame* frame, QPainter * painter, cons
KoTextZoomHandler* zh = kWordDocument();
// We have to define better the merning of the rect that we pass. Does it include zooming ? (yes I think)
- // Does it define the area to be repainted only? (no, that's the painter clip rect)
+ // Does it define the area to be tqrepainted only? (no, that's the painter clip rect)
// So it defines the whole area covered by the embedded document, in pixels.
- QRect rframe( 0, 0,
+ TQRect rframe( 0, 0,
zh->zoomItX( frame->innerWidth() ),
zh->zoomItY( frame->innerHeight() ) );
//kdDebug(32001) << "rframe=" << rframe << endl;
@@ -127,19 +127,19 @@ void KWPartFrameSet::updateChildGeometry()
{
if( m_frames.isEmpty() ) // Deleted frameset
return;
- m_child->setGeometry( m_frames.first()->toQRect() );
+ m_child->setGeometry( m_frames.first()->toTQRect() );
}
void KWPartFrameSet::slotChildChanged()
{
// This is called when the KoDocumentChild is resized (using the KoFrame)
- QPtrListIterator<KWFrame> listFrame = frameIterator();
+ TQPtrListIterator<KWFrame> listFrame = frameIterator();
KWFrame *frame = listFrame.current();
if ( frame )
{
- frame->setRect( KoRect::fromQRect( getChild()->geometry() ) );
+ frame->setRect( KoRect::fromTQRect( getChild()->tqgeometry() ) );
- //kdDebug(32001) << "KWPartFrameSet::slotChildChanged child's geometry " << getChild()->geometry()
+ //kdDebug(32001) << "KWPartFrameSet::slotChildChanged child's tqgeometry " << getChild()->tqgeometry()
// << " frame set to " << *frame << endl;
m_doc->frameChanged( frame );
//there is just a frame
@@ -150,15 +150,15 @@ void KWPartFrameSet::slotChildChanged()
kdDebug(32001) << "Frame not found!" << endl;
}
-QDomElement KWPartFrameSet::save( QDomElement &parentElem, bool saveFrames )
+TQDomElement KWPartFrameSet::save( TQDomElement &tqparentElem, bool saveFrames )
{
if ( m_frames.isEmpty() ) // Deleted frameset -> don't save
- return QDomElement();
- KWFrameSet::saveCommon( parentElem, saveFrames );
+ return TQDomElement();
+ KWFrameSet::saveCommon( tqparentElem, saveFrames );
// Ok, this one is a bit hackish. KWDocument calls us for saving our stuff into
// the SETTINGS element, which it creates for us. So our save() doesn't really have
// the same behaviour as a normal KWFrameSet::save()....
- return QDomElement();
+ return TQDomElement();
}
void KWPartFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context, bool ) const
@@ -177,7 +177,7 @@ void KWPartFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context, b
writer.endElement(); // draw:frame
}
-void KWPartFrameSet::load( QDomElement &attributes, bool loadFrames )
+void KWPartFrameSet::load( TQDomElement &attributes, bool loadFrames )
{
KWFrameSet::load( attributes, loadFrames );
}
@@ -217,7 +217,7 @@ void KWPartFrameSet::moveFloatingFrame( int frameNum, const KoPoint &position )
if ( frame )
{
KWFrameSet::moveFloatingFrame( frameNum, position );
- m_child->setGeometry( frame->toQRect(), true /* avoid circular events */ );
+ m_child->setGeometry( frame->toTQRect(), true /* avoid circular events */ );
}
}
@@ -237,7 +237,7 @@ void KWPartFrameSet::printDebug()
kdDebug() << " Url : " << getChild()->document()->url().url()<<endl;
else
kdWarning() << "NO DOCUMENT" << endl;
- kdDebug() << " Rectangle : " << getChild()->geometry().x() << "," << getChild()->geometry().y() << " " << getChild()->geometry().width() << "x" << getChild()->geometry().height() << endl;
+ kdDebug() << " Rectangle : " << getChild()->tqgeometry().x() << "," << getChild()->tqgeometry().y() << " " << getChild()->tqgeometry().width() << "x" << getChild()->tqgeometry().height() << endl;
} else
kdWarning() << "NO CHILD" << endl;
}
@@ -256,7 +256,7 @@ void KWPartFrameSet::deleteFrame( unsigned int _num, bool remove, bool recalc )
m_child->setDeleted();
}
-void KWPartFrameSet::KWPartFrameSet::createEmptyRegion( const QRect &crect, QRegion &emptyRegion, KWViewMode *viewMode ) {
+void KWPartFrameSet::KWPartFrameSet::createEmptyRegion( const TQRect &crect, TQRegion &emptyRegion, KWViewMode *viewMode ) {
Q_UNUSED(crect);
Q_UNUSED(emptyRegion);
Q_UNUSED(viewMode);
@@ -271,8 +271,8 @@ KWPartFrameSetEdit::KWPartFrameSetEdit( KWPartFrameSet * fs, KWCanvas * canvas )
kdDebug(32001) << "KWPartFrameSetEdit::KWPartFrameSetEdit " << endl;
m_dcop=0L;
fs->startEditing();
- QObject::connect( m_canvas->gui()->getView(), SIGNAL( activated( bool ) ),
- this, SLOT( slotChildActivated( bool ) ) );
+ TQObject::connect( m_canvas->gui()->getView(), TQT_SIGNAL( activated( bool ) ),
+ this, TQT_SLOT( slotChildActivated( bool ) ) );
}
KWPartFrameSetEdit::~KWPartFrameSetEdit()
@@ -321,7 +321,7 @@ void KWPartFrameSet::storeInternal()
/* Class: KWDocumentChild */
/******************************************************************/
-KWDocumentChild::KWDocumentChild( KWDocument *_wdoc, const QRect& _rect, KoDocument *_doc )
+KWDocumentChild::KWDocumentChild( KWDocument *_wdoc, const TQRect& _rect, KoDocument *_doc )
: KoDocumentChild( _wdoc, _doc, _rect ), m_partFrameSet( 0 )
{
}
@@ -335,15 +335,15 @@ KWDocumentChild::~KWDocumentChild()
{
}
-void KWDocumentChild::setDocument( KoDocument *doc, const QRect &geometry )
+void KWDocumentChild::setDocument( KoDocument *doc, const TQRect &tqgeometry )
{
// When hitTest returns true, we want to activate the part right away.
// PartManager supports selecting parts, but not in a doc/view separated way.
doc->setSelectable( false );
- KoDocumentChild::setDocument( doc, geometry );
+ KoDocumentChild::setDocument( doc, tqgeometry );
}
-KoDocument* KWDocumentChild::hitTest( const QPoint& p, const QWMatrix& _matrix )
+KoDocument* KWDocumentChild::hitTest( const TQPoint& p, const TQWMatrix& _matrix )
{
Q_ASSERT( m_partFrameSet );
if ( isDeleted() || !document() ) {
@@ -355,12 +355,12 @@ KoDocument* KWDocumentChild::hitTest( const QPoint& p, const QWMatrix& _matrix )
#else
int keyState = 0;
if ( kapp->keyboardModifiers() & KApplication::ControlModifier )
- keyState = Qt::ControlButton;
+ keyState = TQt::ControlButton;
#endif
// Only activate when it's already selected, and when not clicking on the border.
// KWFrameView and the part frame policy have that logic already.
- KWView* kwView = ::qt_cast<KWView *>( parentDocument()->hitTestView() );
+ KWView* kwView = ::tqqt_cast<KWView *>( tqparentDocument()->hitTestView() );
Q_ASSERT( kwView );
if ( kwView ) {
KWFrame* frame = m_partFrameSet->frame(0);
diff --git a/kword/KWPartFrameSet.h b/kword/KWPartFrameSet.h
index 43150089..e6f052db 100644
--- a/kword/KWPartFrameSet.h
+++ b/kword/KWPartFrameSet.h
@@ -29,12 +29,13 @@ class KWFramePartMoveCommand;
class KWPartFrameSet : public KWFrameSet
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWPartFrameSet( KWDocument *_doc, KWDocumentChild *_child, const QString & name );
+ KWPartFrameSet( KWDocument *_doc, KWDocumentChild *_child, const TQString & name );
/// Used for OASIS loading
- KWPartFrameSet( KWDocument* doc, const QDomElement& frameTag,
- const QDomElement& objectTag, KoOasisContext& context );
+ KWPartFrameSet( KWDocument* doc, const TQDomElement& frameTag,
+ const TQDomElement& objectTag, KoOasisContext& context );
virtual ~KWPartFrameSet();
@@ -52,18 +53,18 @@ public:
void setChild( KWDocumentChild* child );
/**
- * Update the geometry of m_child based on the geometry of the frame.
+ * Update the tqgeometry of m_child based on the tqgeometry of the frame.
*/
void updateChildGeometry();
- virtual void drawFrameContents( KWFrame * frame, QPainter *painter, const QRect & fcrect,
- const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+ virtual void drawFrameContents( KWFrame * frame, TQPainter *painter, const TQRect & fcrect,
+ const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit * edit, KWViewMode *viewMode );
- virtual void createEmptyRegion( const QRect &crect, QRegion &emptyRegion, KWViewMode *viewMode );
+ virtual void createEmptyRegion( const TQRect &crect, TQRegion &emptyRegion, KWViewMode *viewMode );
- virtual QDomElement save( QDomElement &parentElem, bool saveFrames = true );
- virtual void load( QDomElement &attributes, bool loadFrames = true );
+ virtual TQDomElement save( TQDomElement &tqparentElem, bool saveFrames = true );
+ virtual void load( TQDomElement &attributes, bool loadFrames = true );
virtual void saveOasis( KoXmlWriter& writer, KoSavingContext& context, bool saveFrames ) const;
@@ -114,9 +115,10 @@ private:
};
#if 0
-class KWPartFrameSetEdit : public QObject, public KWFrameSetEdit
+class KWPartFrameSetEdit : public TQObject, public KWFrameSetEdit
{
//Q_OBJECT
+ TQ_OBJECT
public:
KWPartFrameSetEdit( KWPartFrameSet * fs, KWCanvas * canvas );
virtual ~KWPartFrameSetEdit();
@@ -130,8 +132,8 @@ public:
}
// Events forwarded by the canvas (when being in "edit" mode)
- //virtual void mousePressEvent( QMouseEvent *, const QPoint &, const KoPoint & );
- //virtual void mouseDoubleClickEvent( QMouseEvent *, const QPoint &, const KoPoint & );
+ //virtual void mousePressEvent( TQMouseEvent *, const TQPoint &, const KoPoint & );
+ //virtual void mouseDoubleClickEvent( TQMouseEvent *, const TQPoint &, const KoPoint & );
//private slots:
void slotChildActivated(bool);
private:
@@ -148,18 +150,18 @@ class KWDocument;
class KWDocumentChild : public KoDocumentChild
{
public:
- KWDocumentChild( KWDocument *_wdoc, const QRect& _rect, KoDocument *_doc );
+ KWDocumentChild( KWDocument *_wdoc, const TQRect& _rect, KoDocument *_doc );
KWDocumentChild( KWDocument *_wdoc );
~KWDocumentChild();
- KWDocument* parent()const
+ KWDocument* tqparent()const
{ return m_pKWordDoc; }
- virtual void setDocument( KoDocument *doc, const QRect &geometry );
+ virtual void setDocument( KoDocument *doc, const TQRect &tqgeometry );
void setPartFrameSet( KWPartFrameSet* fs ) { m_partFrameSet = fs; }
KWPartFrameSet * partFrameSet() const { return m_partFrameSet; }
- virtual KoDocument* hitTest( const QPoint& p, const QWMatrix& _matrix = QWMatrix() );
+ virtual KoDocument* hitTest( const TQPoint& p, const TQWMatrix& _matrix = TQWMatrix() );
private:
KWDocument *m_pKWordDoc;
diff --git a/kword/KWPictureFrameSet.cpp b/kword/KWPictureFrameSet.cpp
index dcaf69bf..3237bc37 100644
--- a/kword/KWPictureFrameSet.cpp
+++ b/kword/KWPictureFrameSet.cpp
@@ -32,7 +32,7 @@
//#define DEBUG_DRAW
-KWPictureFrameSet::KWPictureFrameSet( KWDocument *_doc, const QString & name )
+KWPictureFrameSet::KWPictureFrameSet( KWDocument *_doc, const TQString & name )
: KWFrameSet( _doc ), m_keepAspectRatio( true ), m_finalSize( false )
{
if ( name.isEmpty() )
@@ -41,10 +41,10 @@ KWPictureFrameSet::KWPictureFrameSet( KWDocument *_doc, const QString & name )
m_name = name;
}
-KWPictureFrameSet::KWPictureFrameSet( KWDocument* doc, const QDomElement& frame, const QDomElement& imageTag, KoOasisContext& context )
+KWPictureFrameSet::KWPictureFrameSet( KWDocument* doc, const TQDomElement& frame, const TQDomElement& imageTag, KoOasisContext& context )
: KWFrameSet( doc ), m_keepAspectRatio( true ), m_finalSize( false )
{
- m_name = frame.attributeNS( KoXmlNS::draw, "name", QString::null );
+ m_name = frame.attributeNS( KoXmlNS::draw, "name", TQString() );
if ( doc->frameSetByName( m_name ) ) // already exists!
m_name = doc->generateFramesetName( m_name + " %1" );
loadOasis( frame, imageTag, context );
@@ -61,7 +61,7 @@ KWordFrameSetIface* KWPictureFrameSet::dcopObject()
return m_dcop;
}
-void KWPictureFrameSet::loadPicture( const QString & fileName )
+void KWPictureFrameSet::loadPicture( const TQString & fileName )
{
KoPictureCollection *collection = m_doc->pictureCollection();
@@ -82,32 +82,32 @@ void KWPictureFrameSet::reloadPicture( const KoPictureKey& key )
m_picture = collection->insertPicture( key, KoPicture() );
}
-QDomElement KWPictureFrameSet::save( QDomElement & parentElem, bool saveFrames )
+TQDomElement KWPictureFrameSet::save( TQDomElement & tqparentElem, bool saveFrames )
{
if ( m_frames.isEmpty() ) // Deleted frameset -> don't save
- return QDomElement();
- QDomElement framesetElem = parentElem.ownerDocument().createElement( "FRAMESET" );
- parentElem.appendChild( framesetElem );
+ return TQDomElement();
+ TQDomElement framesetElem = tqparentElem.ownerDocument().createElement( "FRAMESET" );
+ tqparentElem.appendChild( framesetElem );
KWFrameSet::saveCommon( framesetElem, saveFrames );
- QDomElement imageElem = parentElem.ownerDocument().createElement( "PICTURE" );
+ TQDomElement imageElem = tqparentElem.ownerDocument().createElement( "PICTURE" );
framesetElem.appendChild( imageElem );
imageElem.setAttribute( "keepAspectRatio", m_keepAspectRatio ? "true" : "false" );
- QDomElement elem = parentElem.ownerDocument().createElement( "KEY" );
+ TQDomElement elem = tqparentElem.ownerDocument().createElement( "KEY" );
imageElem.appendChild( elem );
m_picture.getKey().saveAttributes( elem );
return framesetElem;
}
-void KWPictureFrameSet::load( QDomElement &attributes, bool loadFrames )
+void KWPictureFrameSet::load( TQDomElement &attributes, bool loadFrames )
{
KWFrameSet::load( attributes, loadFrames );
- QString defaultRatio="true";
+ TQString defaultRatio="true";
// <PICTURE>
- QDomNode node=attributes.namedItem( "PICTURE" );
+ TQDomNode node=attributes.namedItem( "PICTURE" );
if ( node.isNull() )
{
node=attributes.namedItem( "IMAGE" );
@@ -118,11 +118,11 @@ void KWPictureFrameSet::load( QDomElement &attributes, bool loadFrames )
}
}
- QDomElement image = node.toElement();
+ TQDomElement image = node.toElement();
if ( !image.isNull() ) {
m_keepAspectRatio = image.attribute( "keepAspectRatio", defaultRatio ) == "true";
// <KEY>
- QDomElement keyElement = image.namedItem( "KEY" ).toElement();
+ TQDomElement keyElement = image.namedItem( "KEY" ).toElement();
if ( !keyElement.isNull() )
{
KoPictureKey key;
@@ -134,10 +134,10 @@ void KWPictureFrameSet::load( QDomElement &attributes, bool loadFrames )
else
{
// <FILENAME> (old format, up to KWord-1.1-beta2)
- QDomElement filenameElement = image.namedItem( "FILENAME" ).toElement();
+ TQDomElement filenameElement = image.namedItem( "FILENAME" ).toElement();
if ( !filenameElement.isNull() )
{
- QString filename = filenameElement.attribute( "value" );
+ TQString filename = filenameElement.attribute( "value" );
m_picture.clear();
m_picture.setKey( KoPictureKey( filename ) );
m_doc->addPictureRequest( this );
@@ -175,31 +175,31 @@ void KWPictureFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context
}
-void KWPictureFrameSet::loadOasis( const QDomElement& frame, const QDomElement& tag, KoOasisContext& context )
+void KWPictureFrameSet::loadOasis( const TQDomElement& frame, const TQDomElement& tag, KoOasisContext& context )
{
kdDebug() << k_funcinfo << endl;
KoPictureKey key;
- QDomNode binaryData = KoDom::namedItemNS( tag, KoXmlNS::office, "binary-data" );
+ TQDomNode binaryData = KoDom::namedItemNS( tag, KoXmlNS::office, "binary-data" );
if ( !binaryData.isNull() )
{
- QCString data = binaryData.toElement().text().latin1();
+ TQCString data = binaryData.toElement().text().latin1();
m_picture.loadFromBase64( data );
- key = KoPictureKey("nofile", QDateTime::currentDateTime(Qt::UTC));
+ key = KoPictureKey("nofile", TQDateTime::tqcurrentDateTime(Qt::UTC));
m_picture.setKey(key);
}
else
{
- const QString href( tag.attributeNS( KoXmlNS::xlink, "href", QString::null) );
+ const TQString href( tag.attributeNS( KoXmlNS::xlink, "href", TQString()) );
if ( !href.isEmpty() /*&& href[0] == '#'*/ )
{
- QString strExtension;
- const int result=href.findRev(".");
+ TQString strExtension;
+ const int result=href.tqfindRev(".");
if (result>=0)
{
strExtension=href.mid(result+1); // As we are using KoPicture, the extension should be without the dot.
}
- QString filename(href/*.mid(1)*/);
- key = KoPictureKey(filename, QDateTime::currentDateTime(Qt::UTC));
+ TQString filename(href/*.mid(1)*/);
+ key = KoPictureKey(filename, TQDateTime::tqcurrentDateTime(Qt::UTC));
m_picture.setKey(key);
KoStore* store = context.store();
@@ -221,8 +221,8 @@ void KWPictureFrameSet::loadOasis( const QDomElement& frame, const QDomElement&
context.styleStack().restore();
}
-void KWPictureFrameSet::drawFrameContents( KWFrame *frame, QPainter *painter, const QRect &crect,
- const QColorGroup &, bool, bool, KWFrameSetEdit *, KWViewMode * )
+void KWPictureFrameSet::drawFrameContents( KWFrame *frame, TQPainter *painter, const TQRect &crect,
+ const TQColorGroup &, bool, bool, KWFrameSetEdit *, KWViewMode * )
{
#ifdef DEBUG_DRAW
kdDebug(32001) << "KWPictureFrameSet::drawFrameContents crect=" << crect << " size=" << kWordDocument()->zoomItX( frame->innerWidth() ) << "x" << kWordDocument()->zoomItY( frame->innerHeight() ) << endl;
diff --git a/kword/KWPictureFrameSet.h b/kword/KWPictureFrameSet.h
index e5bd58e1..ef59aee9 100644
--- a/kword/KWPictureFrameSet.h
+++ b/kword/KWPictureFrameSet.h
@@ -27,9 +27,9 @@
class KWPictureFrameSet : public KWFrameSet
{
public:
- KWPictureFrameSet( KWDocument *_doc, const QString & name );
+ KWPictureFrameSet( KWDocument *_doc, const TQString & name );
/// Used for OASIS loading
- KWPictureFrameSet( KWDocument* doc, const QDomElement& frame, const QDomElement& imageTag, KoOasisContext& context );
+ KWPictureFrameSet( KWDocument* doc, const TQDomElement& frame, const TQDomElement& imageTag, KoOasisContext& context );
virtual ~KWPictureFrameSet();
virtual KWordFrameSetIface* dcopObject();
@@ -45,7 +45,7 @@ public:
KoPictureKey key() const { return m_picture.getKey(); }
- void loadPicture( const QString &fileName );
+ void loadPicture( const TQString &fileName );
void insertPicture( const KoPicture& picture );
/**
@@ -54,16 +54,16 @@ public:
*/
void reloadPicture( const KoPictureKey& key );
- virtual QDomElement save( QDomElement &parentElem, bool saveFrames = true );
- virtual void load( QDomElement &attributes, bool loadFrames = true );
+ virtual TQDomElement save( TQDomElement &tqparentElem, bool saveFrames = true );
+ virtual void load( TQDomElement &attributes, bool loadFrames = true );
virtual void saveOasis( KoXmlWriter& writer, KoSavingContext& context, bool saveFrames ) const;
- virtual void drawFrameContents( KWFrame * frame, QPainter *painter, const QRect & crect,
- const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+ virtual void drawFrameContents( KWFrame * frame, TQPainter *painter, const TQRect & crect,
+ const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit * edit, KWViewMode *viewMode );
/// Pixmaps can be transparent
- virtual void createEmptyRegion( const QRect &, QRegion &, KWViewMode * ) { }
+ virtual void createEmptyRegion( const TQRect &, TQRegion &, KWViewMode * ) { }
#ifndef NDEBUG
virtual void printDebug( KWFrame* frame );
@@ -84,7 +84,7 @@ public:
virtual bool protectContent() const { return false; }
protected:
- void loadOasis( const QDomElement& frame, const QDomElement& imageTag, KoOasisContext& context );
+ void loadOasis( const TQDomElement& frame, const TQDomElement& imageTag, KoOasisContext& context );
/// The picture
KoPicture m_picture;
diff --git a/kword/KWResizeTableDia.cpp b/kword/KWResizeTableDia.cpp
index ab81d52b..ec77394a 100644
--- a/kword/KWResizeTableDia.cpp
+++ b/kword/KWResizeTableDia.cpp
@@ -25,11 +25,11 @@
#include <KoUnitWidgets.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
-KWResizeTableDia::KWResizeTableDia( QWidget *parent, KWTableFrameSet *table, KWDocument *doc, int resizeColumn )
- : KDialogBase( parent, "resize column dialog" , true, "", Ok | Cancel | User1 | Apply )
+KWResizeTableDia::KWResizeTableDia( TQWidget *tqparent, KWTableFrameSet *table, KWDocument *doc, int resizeColumn )
+ : KDialogBase( tqparent, "resize column dialog" , true, "", Ok | Cancel | User1 | Apply )
{
setButtonText( KDialogBase::User1, i18n("Reset") );
setCaption( i18n( "Resize Column" ) );
@@ -41,18 +41,18 @@ KWResizeTableDia::KWResizeTableDia( QWidget *parent, KWTableFrameSet *table, KWD
}
void KWResizeTableDia::setupTab1(int resizeColumn) {
- QVBox *page = makeVBoxMainWidget();
- QLabel *rc = new QLabel( i18n( "Column:" ), page );
- rc->resize( rc->sizeHint() );
- rc->setAlignment( AlignLeft | AlignBottom );
- m_value = new QSpinBox( 1, m_table->getColumns(), 1, page );
- m_value->resize( m_value->sizeHint() );
+ TQVBox *page = makeVBoxMainWidget();
+ TQLabel *rc = new TQLabel( i18n( "Column:" ), page );
+ rc->resize( rc->tqsizeHint() );
+ rc->tqsetAlignment( AlignLeft | AlignBottom );
+ m_value = new TQSpinBox( 1, m_table->getColumns(), 1, page );
+ m_value->resize( m_value->tqsizeHint() );
m_value->setValue( resizeColumn );
- rc = new QLabel( i18n( "Width:" ), page );
+ rc = new TQLabel( i18n( "Width:" ), page );
m_position= new KoUnitDoubleSpinBox( page, 0.01, m_table->anchorFrameset()->isFloating() ? m_table->anchorFrameset()->frame(0)->width(): 9999, 1, 0.0, m_doc->unit(), m_doc->unit() );
slotValueChanged( m_value->value());
- connect( m_value, SIGNAL( valueChanged ( int )), this, SLOT( slotValueChanged( int )));
+ connect( m_value, TQT_SIGNAL( valueChanged ( int )), this, TQT_SLOT( slotValueChanged( int )));
}
bool KWResizeTableDia::doResize()
@@ -75,7 +75,7 @@ void KWResizeTableDia::slotValueChanged( int pos)
{
KWFrame *frm = m_table->cell( 0, pos-1 )->frame(0);
if (frm) {
- m_position->setValue( KoUnit::toUserValue( QMAX(0.00, frm->normalize().width()), m_doc->unit() ) );
+ m_position->setValue( KoUnit::toUserValue( TQMAX(0.00, frm->normalize().width()), m_doc->unit() ) );
m_resetValue = m_position->value();
}
}
diff --git a/kword/KWResizeTableDia.h b/kword/KWResizeTableDia.h
index 162afb77..f1512269 100644
--- a/kword/KWResizeTableDia.h
+++ b/kword/KWResizeTableDia.h
@@ -25,8 +25,8 @@
class KWTableFrameSet;
class KWDocument;
-class QWidget;
-class QSpinBox;
+class TQWidget;
+class TQSpinBox;
class KoUnitDoubleSpinBox;
/**
@@ -35,20 +35,21 @@ class KoUnitDoubleSpinBox;
class KWResizeTableDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
- * @param parent parent widget for dialog
+ * @param tqparent tqparent widget for dialog
* @param table the table to do the resizes on
* @param doc the document this table belongs to, for undo information
* @param resizeColumn the initial column that the user can resize.
*/
- KWResizeTableDia( QWidget *parent, KWTableFrameSet *table, KWDocument *doc, int resizeColumn);
+ KWResizeTableDia( TQWidget *tqparent, KWTableFrameSet *table, KWDocument *doc, int resizeColumn);
protected:
void setupTab1( int resizeColumn);
bool doResize();
- QSpinBox *m_value;
+ TQSpinBox *m_value;
KWTableFrameSet *m_table;
KWDocument *m_doc;
KoUnitDoubleSpinBox *m_position;
diff --git a/kword/KWSelectBookmarkDiaBase.ui b/kword/KWSelectBookmarkDiaBase.ui
index 71437a39..d77f36b8 100644
--- a/kword/KWSelectBookmarkDiaBase.ui
+++ b/kword/KWSelectBookmarkDiaBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>KWSelectBookmarkDiaBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KWSelectBookmarkDia</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>bookmarksGroup</cstring>
</property>
@@ -30,12 +30,12 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QListBox" row="0" column="0" rowspan="3" colspan="1">
+ <widget class="TQListBox" row="0" column="0" rowspan="3" colspan="1">
<property name="name">
<cstring>bookmarkList</cstring>
</property>
</widget>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>buttonRename</cstring>
</property>
@@ -43,7 +43,7 @@
<string>&amp;Rename...</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>buttonDelete</cstring>
</property>
@@ -61,7 +61,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -72,5 +72,5 @@
</widget>
</hbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kword/KWSortDia.cpp b/kword/KWSortDia.cpp
index fd254ebb..614e790c 100644
--- a/kword/KWSortDia.cpp
+++ b/kword/KWSortDia.cpp
@@ -20,23 +20,23 @@
#include "KWSortDia.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-#include <qradiobutton.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qvbox.h>
+#include <tqradiobutton.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqvbox.h>
-KWSortDia::KWSortDia( QWidget *parent, const char* name )
- : KDialogBase( parent, name,TRUE,i18n("Sort Text"),Ok|Cancel )
+KWSortDia::KWSortDia( TQWidget *tqparent, const char* name )
+ : KDialogBase( tqparent, name,TRUE,i18n("Sort Text"),Ok|Cancel )
{
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- QButtonGroup *grp = new QButtonGroup( 1, QGroupBox::Horizontal, i18n( "Sort" ),page );
+ TQButtonGroup *grp = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Sort" ),page );
grp->setRadioButtonExclusive( TRUE );
- grp->layout();
- m_increase = new QRadioButton( i18n("Increase"), grp );
- m_decrease = new QRadioButton( i18n("Decrease"), grp );
+ grp->tqlayout();
+ m_increase = new TQRadioButton( i18n("Increase"), grp );
+ m_decrease = new TQRadioButton( i18n("Decrease"), grp );
grp->setRadioButtonExclusive( TRUE );
m_increase->setChecked( true );
diff --git a/kword/KWSortDia.h b/kword/KWSortDia.h
index be32df2f..2ecc1c68 100644
--- a/kword/KWSortDia.h
+++ b/kword/KWSortDia.h
@@ -21,18 +21,19 @@
#include <kdialogbase.h>
#include "defs.h"
-class QRadioButton;
+class TQRadioButton;
class KWSortDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWSortDia( QWidget *parent, const char* name );
+ KWSortDia( TQWidget *tqparent, const char* name );
SortType getSortType() const;
private:
- QRadioButton *m_increase;
- QRadioButton *m_decrease;
+ TQRadioButton *m_increase;
+ TQRadioButton *m_decrease;
};
#endif
diff --git a/kword/KWSplitCellDia.cpp b/kword/KWSplitCellDia.cpp
index 0a29d438..c753f4df 100644
--- a/kword/KWSplitCellDia.cpp
+++ b/kword/KWSplitCellDia.cpp
@@ -21,34 +21,34 @@
#include "KWSplitCellDia.moc"
#include "KWTableDia.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qspinbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
#include <klocale.h>
-KWSplitCellDia::KWSplitCellDia( QWidget* parent, const char* name, unsigned int columns, unsigned int rows)
- : KDialogBase( Plain, i18n("Split Cell"), Ok | Cancel, Ok, parent, name, true)
+KWSplitCellDia::KWSplitCellDia( TQWidget* tqparent, const char* name, unsigned int columns, unsigned int rows)
+ : KDialogBase( Plain, i18n("Split Cell"), Ok | Cancel, Ok, tqparent, name, true)
{
m_cols = columns;
m_rows = rows;
- setInitialSize( QSize(400, 300) );
+ setInitialSize( TQSize(400, 300) );
- QWidget *page = plainPage();
- QGridLayout *grid = new QGridLayout( page, 4, 2, KDialog::marginHint(), KDialog::spacingHint() );
+ TQWidget *page = plainPage();
+ TQGridLayout *grid = new TQGridLayout( page, 4, 2, KDialog::marginHint(), KDialog::spacingHint() );
- QLabel *lRows = new QLabel( i18n( "Number of rows:" ), page );
+ TQLabel *lRows = new TQLabel( i18n( "Number of rows:" ), page );
grid->addWidget( lRows, 0, 0 );
- nRows = new QSpinBox( 1, 128, 1, page );
+ nRows = new TQSpinBox( 1, 128, 1, page );
nRows->setValue( m_rows );
grid->addWidget( nRows, 1, 0 );
- QLabel *lCols = new QLabel( i18n( "Number of columns:" ), page );
+ TQLabel *lCols = new TQLabel( i18n( "Number of columns:" ), page );
grid->addWidget( lCols, 2, 0 );
- nCols = new QSpinBox( 1, 128, 1, page );
+ nCols = new TQSpinBox( 1, 128, 1, page );
nCols->setValue( m_cols );
grid->addWidget( nCols, 3, 0 );
@@ -78,8 +78,8 @@ KWSplitCellDia::KWSplitCellDia( QWidget* parent, const char* name, unsigned int
grid->activate();
enableButtonOK( !(m_rows==1 && m_cols==1) );
- connect( nRows, SIGNAL( valueChanged( int ) ), this, SLOT( rowsChanged( int ) ) );
- connect( nCols, SIGNAL( valueChanged( int ) ), this, SLOT( colsChanged( int ) ) );
+ connect( nRows, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( rowsChanged( int ) ) );
+ connect( nCols, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( colsChanged( int ) ) );
setFocus();
}
diff --git a/kword/KWSplitCellDia.h b/kword/KWSplitCellDia.h
index 6b373ef6..4a6aa376 100644
--- a/kword/KWSplitCellDia.h
+++ b/kword/KWSplitCellDia.h
@@ -21,27 +21,28 @@
#define splitcelldia_h
#include <kdialogbase.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "defs.h"
-class QGridLayout;
-class QLabel;
-class QCheckBox;
-class QSpinBox;
+class TQGridLayout;
+class TQLabel;
+class TQCheckBox;
+class TQSpinBox;
class KWTablePreview;
class KWSplitCellDia : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- KWSplitCellDia( QWidget *parent, const char *name, unsigned int numcols, unsigned int numrows);
+ KWSplitCellDia( TQWidget *tqparent, const char *name, unsigned int numcols, unsigned int numrows);
unsigned int rows()const { return m_rows; }
unsigned int columns()const { return m_cols; }
protected:
- QSpinBox *nRows, *nCols;
+ TQSpinBox *nRows, *nCols;
KWTablePreview *preview;
unsigned int m_rows, m_cols;
diff --git a/kword/KWStartupWidget.cpp b/kword/KWStartupWidget.cpp
index fe22f534..644eca2b 100644
--- a/kword/KWStartupWidget.cpp
+++ b/kword/KWStartupWidget.cpp
@@ -23,41 +23,41 @@
#include <KoPageLayoutColumns.h>
#include <kdebug.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
-KWStartupWidget::KWStartupWidget(QWidget *parent, KWDocument *doc, const KoColumns &columns)
- : KWStartupWidgetBase(parent) {
+KWStartupWidget::KWStartupWidget(TQWidget *tqparent, KWDocument *doc, const KoColumns &columns)
+ : KWStartupWidgetBase(tqparent) {
m_columns = columns;
m_layout = KoPageLayout::standardLayout();
m_doc = doc;
setFocusProxy(m_createButton);
- QVBoxLayout *lay = new QVBoxLayout(m_sizeTab, KDialog::marginHint());
+ TQVBoxLayout *lay = new TQVBoxLayout(m_sizeTab, KDialog::marginHint());
m_sizeWidget = new KoPageLayoutSize(m_sizeTab, m_layout, m_doc->unit(), m_columns , true, true);
lay->addWidget(m_sizeWidget);
- lay = new QVBoxLayout(m_columnsTab, KDialog::marginHint());
+ lay = new TQVBoxLayout(m_columnsTab, KDialog::marginHint());
m_columnsWidget = new KoPageLayoutColumns(m_columnsTab, m_columns, m_doc->unit(), m_layout);
lay->addWidget(m_columnsWidget);
- connect (m_columnsWidget, SIGNAL( propertyChange(KoColumns&)),
- this, SLOT (columnsUpdated( KoColumns&)));
+ connect (m_columnsWidget, TQT_SIGNAL( propertyChange(KoColumns&)),
+ this, TQT_SLOT (columnsUpdated( KoColumns&)));
- connect (m_sizeWidget, SIGNAL( propertyChange(KoPageLayout&)),
- this, SLOT (sizeUpdated( KoPageLayout&)));
+ connect (m_sizeWidget, TQT_SIGNAL( propertyChange(KoPageLayout&)),
+ this, TQT_SLOT (sizeUpdated( KoPageLayout&)));
- connect (m_createButton, SIGNAL( clicked() ), this, SLOT (buttonClicked()) );
+ connect (m_createButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT (buttonClicked()) );
- connect (m_WpStyleCheckbox, SIGNAL(toggled(bool)), m_sizeWidget, SLOT(setEnableBorders(bool)));
- connect (m_WpStyleCheckbox, SIGNAL(toggled(bool)), m_columnsWidget, SLOT(setEnableColumns(bool)));
+ connect (m_WpStyleCheckbox, TQT_SIGNAL(toggled(bool)), m_sizeWidget, TQT_SLOT(setEnableBorders(bool)));
+ connect (m_WpStyleCheckbox, TQT_SIGNAL(toggled(bool)), m_columnsWidget, TQT_SLOT(setEnableColumns(bool)));
}
-void KWStartupWidget::sizeUpdated(KoPageLayout &layout) {
- m_layout = layout;
- m_columnsWidget->setLayout(layout);
+void KWStartupWidget::sizeUpdated(KoPageLayout &tqlayout) {
+ m_layout = tqlayout;
+ m_columnsWidget->setLayout(tqlayout);
}
void KWStartupWidget::columnsUpdated(KoColumns &columns) {
diff --git a/kword/KWStartupWidget.h b/kword/KWStartupWidget.h
index 534d3084..4106ac2f 100644
--- a/kword/KWStartupWidget.h
+++ b/kword/KWStartupWidget.h
@@ -32,17 +32,18 @@ class KWDocument;
*/
class KWStartupWidget : public KWStartupWidgetBase {
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor. Please note that this class is being used/created by KWDocument.
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param doc the document that wants to be altered
* @param columns the suggested columns to be shown initially
*/
- KWStartupWidget(QWidget *parent, KWDocument *doc, const KoColumns &columns);
+ KWStartupWidget(TQWidget *tqparent, KWDocument *doc, const KoColumns &columns);
private slots:
- void sizeUpdated(KoPageLayout &layout);
+ void sizeUpdated(KoPageLayout &tqlayout);
void columnsUpdated(KoColumns &columns);
void buttonClicked();
diff --git a/kword/KWStartupWidgetBase.ui b/kword/KWStartupWidgetBase.ui
index 9dd70d30..131ffc28 100644
--- a/kword/KWStartupWidgetBase.ui
+++ b/kword/KWStartupWidgetBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KWStartupWidgetBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KWStartupWidgetBase</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_WpStyleCheckbox</cstring>
</property>
@@ -34,11 +34,11 @@
For letters and notes with one main text, possibly on several pages, you should keep this checked. You should only uncheck it if you want to define completely where each text frame should be positioned.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QTabWidget" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQTabWidget" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>tabs</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>m_sizeTab</cstring>
</property>
@@ -46,7 +46,7 @@ For letters and notes with one main text, possibly on several pages, you should
<string>Page Size &amp;&amp; Margins</string>
</attribute>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>m_columnsTab</cstring>
</property>
@@ -65,14 +65,14 @@ For letters and notes with one main text, possibly on several pages, you should
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="2" column="1">
+ <widget class="TQPushButton" row="2" column="1">
<property name="name">
<cstring>m_createButton</cstring>
</property>
@@ -90,7 +90,7 @@ For letters and notes with one main text, possibly on several pages, you should
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -99,5 +99,5 @@ For letters and notes with one main text, possibly on several pages, you should
</spacer>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kword/KWStatisticsDialog.cpp b/kword/KWStatisticsDialog.cpp
index d323992d..a95154f5 100644
--- a/kword/KWStatisticsDialog.cpp
+++ b/kword/KWStatisticsDialog.cpp
@@ -20,24 +20,24 @@
#include "KWDocument.h"
#include "KWFrameSet.h"
#include <klocale.h>
-#include <qtabwidget.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qprogressdialog.h>
-#include <qcheckbox.h>
-
-KWStatisticsDialog::KWStatisticsDialog( QWidget *parent, KWDocument *document )
- : KDialogBase(parent, "statistics", true, i18n("Statistics"),KDialogBase::Ok, KDialogBase::Ok, false )
+#include <tqtabwidget.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqprogressdialog.h>
+#include <tqcheckbox.h>
+
+KWStatisticsDialog::KWStatisticsDialog( TQWidget *tqparent, KWDocument *document )
+ : KDialogBase(tqparent, "statistics", true, i18n("Statistics"),KDialogBase::Ok, KDialogBase::Ok, false )
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
- QTabWidget *tab = new QTabWidget( page );
- QFrame *pageAll = 0;
- QFrame *pageGeneral = 0;
- QFrame *pageSelected = 0;
+ TQTabWidget *tab = new TQTabWidget( page );
+ TQFrame *pageAll = 0;
+ TQFrame *pageGeneral = 0;
+ TQFrame *pageSelected = 0;
for (int i=0; i < 7; ++i) {
m_resultLabelAll[i] = 0;
m_resultLabelSelected[i] = 0;
@@ -45,25 +45,25 @@ KWStatisticsDialog::KWStatisticsDialog( QWidget *parent, KWDocument *document )
m_resultGeneralLabel[i]=0;
}
m_doc = document;
- m_parent = parent;
+ m_parent = tqparent;
m_canceled = true;
// add Tab "General"
- pageGeneral = new QFrame( this );
+ pageGeneral = new TQFrame( this );
tab->addTab( pageGeneral, i18n( "General" ) );
addBoxGeneral( pageGeneral, m_resultGeneralLabel );
calcGeneral( m_resultGeneralLabel );
// add Tab "All"
- pageAll = new QFrame( this );
+ pageAll = new TQFrame( this );
tab->addTab( pageAll, i18n( "Text" ) );
addBox( pageAll, m_resultLabelAll, true );
m_canceled = true;
- pageSelected = new QFrame( this );
+ pageSelected = new TQFrame( this );
tab->addTab( pageSelected, i18n( "Selected Text" ) );
// let's see if there's selected text
bool b = docHasSelection();
@@ -108,7 +108,7 @@ void KWStatisticsDialog::slotRefreshValue(bool state)
m_canceled = false;
}
-void KWStatisticsDialog::calcGeneral( QLabel **resultLabel )
+void KWStatisticsDialog::calcGeneral( TQLabel **resultLabel )
{
KLocale *locale = KGlobal::locale();
@@ -118,7 +118,7 @@ void KWStatisticsDialog::calcGeneral( QLabel **resultLabel )
int part = 0;
int nbFrameset = 0;
int nbFormula = 0;
- QPtrListIterator<KWFrameSet> framesetIt( m_doc->framesetsIterator() );
+ TQPtrListIterator<KWFrameSet> framesetIt( m_doc->framesetsIterator() );
for ( framesetIt.toFirst(); framesetIt.current(); ++framesetIt ) {
KWFrameSet *frameSet = framesetIt.current();
if ( frameSet && frameSet->isVisible())
@@ -142,7 +142,7 @@ void KWStatisticsDialog::calcGeneral( QLabel **resultLabel )
resultLabel[5]->setText( locale->formatNumber( nbFormula, 0 ) );
}
-bool KWStatisticsDialog::calcStats( QLabel **resultLabel, bool selection, bool useFootEndNote )
+bool KWStatisticsDialog::calcStats( TQLabel **resultLabel, bool selection, bool useFootEndNote )
{
ulong charsWithSpace = 0L;
ulong charsWithoutSpace = 0L;
@@ -161,7 +161,7 @@ bool KWStatisticsDialog::calcStats( QLabel **resultLabel, bool selection, bool u
// count paragraphs for progress dialog:
ulong paragraphs = 0L;
- QPtrListIterator<KWFrameSet> framesetIt( m_doc->framesetsIterator() );
+ TQPtrListIterator<KWFrameSet> framesetIt( m_doc->framesetsIterator() );
for ( framesetIt.toFirst(); framesetIt.current(); ++framesetIt ) {
KWFrameSet *frameSet = framesetIt.current();
if ( (frameSet->frameSetInfo() == KWFrameSet::FI_FOOTNOTE || frameSet->frameSetInfo() == KWFrameSet::FI_BODY) && frameSet->isVisible() )
@@ -172,7 +172,7 @@ bool KWStatisticsDialog::calcStats( QLabel **resultLabel, bool selection, bool u
}
}
}
- QProgressDialog progress( i18n( "Counting..." ), i18n( "Cancel" ), paragraphs, this, "count", true );
+ TQProgressDialog progress( i18n( "Counting..." ), i18n( "Cancel" ), paragraphs, this, "count", true );
progress.setMinimumDuration( 1000 );
progress.setProgress( 0 );
@@ -203,10 +203,10 @@ bool KWStatisticsDialog::calcStats( QLabel **resultLabel, bool selection, bool u
resultLabel[5]->setText( locale->formatNumber( lines, 0 ) );
// add flesch
double f = calcFlesch( sentences, words, syllables );
- QString flesch = locale->formatNumber( f , 1 );
+ TQString flesch = locale->formatNumber( f , 1 );
if( words < 200 ) {
// a kind of warning if too few words:
- flesch = i18n("approximately %1").arg( flesch );
+ flesch = i18n("approximately %1").tqarg( flesch );
}
resultLabel[6]->setText( flesch );
return true;
@@ -221,12 +221,12 @@ double KWStatisticsDialog::calcFlesch( ulong sentences, ulong words, ulong sylla
return flesch_score;
}
-void KWStatisticsDialog::addBoxGeneral( QFrame *page, QLabel **resultLabel )
+void KWStatisticsDialog::addBoxGeneral( TQFrame *page, TQLabel **resultLabel )
{
// Layout Managers
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, 7 );
- QGroupBox *box = new QGroupBox( i18n( "Statistics" ), page );
- QGridLayout *grid = new QGridLayout( box, 9, 3, KDialog::marginHint(), KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, 7 );
+ TQGroupBox *box = new TQGroupBox( i18n( "Statistics" ), page );
+ TQGridLayout *grid = new TQGridLayout( box, 9, 3, KDialog::marginHint(), KDialog::spacingHint() );
grid->setRowStretch (9, 1);
// margins
int fHeight = box->fontMetrics().height();
@@ -235,57 +235,57 @@ void KWStatisticsDialog::addBoxGeneral( QFrame *page, QLabel **resultLabel )
grid->addRowSpacing( 0, fHeight );
// insert labels
- QLabel *label1 = new QLabel( i18n( "Number of pages:" ), box );
+ TQLabel *label1 = new TQLabel( i18n( "Number of pages:" ), box );
grid->addWidget( label1, 1, 0, 1 );
- resultLabel[0] = new QLabel( "", box );
+ resultLabel[0] = new TQLabel( "", box );
grid->addWidget( resultLabel[0], 1, 2, 2 );
- QLabel *label2 = new QLabel( i18n( "Number of frames:" ), box );
+ TQLabel *label2 = new TQLabel( i18n( "Number of frames:" ), box );
grid->addWidget( label2, 2, 0, 1 );
- resultLabel[1] = new QLabel( "", box );
+ resultLabel[1] = new TQLabel( "", box );
grid->addWidget( resultLabel[1], 2, 2, 2 );
- QLabel *label3 = new QLabel( i18n( "Number of pictures:" ), box );
+ TQLabel *label3 = new TQLabel( i18n( "Number of pictures:" ), box );
grid->addWidget( label3, 3, 0, 1 );
- resultLabel[2] = new QLabel( "", box );
+ resultLabel[2] = new TQLabel( "", box );
grid->addWidget( resultLabel[2], 3, 2, 2 );
- QLabel *label4 = new QLabel( i18n( "Number of tables:" ), box );
+ TQLabel *label4 = new TQLabel( i18n( "Number of tables:" ), box );
grid->addWidget( label4, 4, 0, 1 );
- resultLabel[3] = new QLabel( "", box );
+ resultLabel[3] = new TQLabel( "", box );
grid->addWidget( resultLabel[3], 4, 2, 2 );
- QLabel *label5 = new QLabel( i18n( "Number of embedded objects:" ), box );
+ TQLabel *label5 = new TQLabel( i18n( "Number of embedded objects:" ), box );
grid->addWidget( label5, 5, 0, 1 );
- resultLabel[4] = new QLabel( "", box );
+ resultLabel[4] = new TQLabel( "", box );
grid->addWidget( resultLabel[4], 5, 2, 2 );
- QLabel *label6 = new QLabel( i18n( "Number of formula frameset:" ), box );
+ TQLabel *label6 = new TQLabel( i18n( "Number of formula frameset:" ), box );
grid->addWidget( label6, 6, 0, 1 );
- resultLabel[5] = new QLabel( "", box );
+ resultLabel[5] = new TQLabel( "", box );
grid->addWidget( resultLabel[5], 6, 2, 2 );
topLayout->addWidget( box );
}
-void KWStatisticsDialog::addBox( QFrame *page, QLabel **resultLabel, bool calcWithFootNoteCheckbox )
+void KWStatisticsDialog::addBox( TQFrame *page, TQLabel **resultLabel, bool calcWithFootNoteCheckbox )
{
// Layout Managers
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, 7 );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, 7 );
if ( calcWithFootNoteCheckbox )
{
- QWidget *w = new QWidget(page);
+ TQWidget *w = new TQWidget(page);
topLayout->addWidget( w );
- QVBoxLayout *noteLayout = new QVBoxLayout( w, KDialog::marginHint(), 0 );
- QCheckBox *calcWithFootNote = new QCheckBox( i18n("&Include text from foot- and endnotes"), w);
+ TQVBoxLayout *noteLayout = new TQVBoxLayout( w, KDialog::marginHint(), 0 );
+ TQCheckBox *calcWithFootNote = new TQCheckBox( i18n("&Include text from foot- and endnotes"), w);
noteLayout->addWidget( calcWithFootNote );
- connect( calcWithFootNote, SIGNAL(toggled ( bool )), this, SLOT( slotRefreshValue(bool)));
+ connect( calcWithFootNote, TQT_SIGNAL(toggled ( bool )), this, TQT_SLOT( slotRefreshValue(bool)));
}
- QGroupBox *box = new QGroupBox( i18n( "Statistics" ), page );
- QGridLayout *grid = new QGridLayout( box, 9, 3, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGroupBox *box = new TQGroupBox( i18n( "Statistics" ), page );
+ TQGridLayout *grid = new TQGridLayout( box, 9, 3, KDialog::marginHint(), KDialog::spacingHint() );
grid->setRowStretch (9, 1);
// margins
@@ -295,43 +295,43 @@ void KWStatisticsDialog::addBox( QFrame *page, QLabel **resultLabel, bool calcWi
grid->addRowSpacing( 0, fHeight );
//maximum size for result column (don't know how to do this better..)
- QString init = i18n("approximately %1").arg( "00000000" );
+ TQString init = i18n("approximately %1").tqarg( "00000000" );
// insert labels
- QLabel *label1 = new QLabel( i18n( "Characters including spaces:" ), box );
+ TQLabel *label1 = new TQLabel( i18n( "Characters including spaces:" ), box );
grid->addWidget( label1, 1, 0, 1 );
- resultLabel[0] = new QLabel( "", box );
+ resultLabel[0] = new TQLabel( "", box );
grid->addWidget( resultLabel[0], 1, 2, 2 );
- QLabel *label2 = new QLabel( i18n( "Characters without spaces:" ), box );
+ TQLabel *label2 = new TQLabel( i18n( "Characters without spaces:" ), box );
grid->addWidget( label2, 2, 0, 1 );
- resultLabel[1] = new QLabel( "", box );
+ resultLabel[1] = new TQLabel( "", box );
grid->addWidget( resultLabel[1], 2, 2, 2 );
- QLabel *label3 = new QLabel( i18n( "Syllables:" ), box );
+ TQLabel *label3 = new TQLabel( i18n( "Syllables:" ), box );
grid->addWidget( label3, 3, 0, 1 );
- resultLabel[2] = new QLabel( "", box );
+ resultLabel[2] = new TQLabel( "", box );
grid->addWidget( resultLabel[2], 3, 2, 2 );
- QLabel *label4 = new QLabel( i18n( "Words:" ), box );
+ TQLabel *label4 = new TQLabel( i18n( "Words:" ), box );
grid->addWidget( label4, 4, 0, 1 );
- resultLabel[3] = new QLabel( "", box );
+ resultLabel[3] = new TQLabel( "", box );
grid->addWidget( resultLabel[3], 4, 2, 2 );
- QLabel *label5 = new QLabel( i18n( "Sentences:" ), box );
+ TQLabel *label5 = new TQLabel( i18n( "Sentences:" ), box );
grid->addWidget( label5, 5, 0, 1 );
- resultLabel[4] = new QLabel( "", box );
+ resultLabel[4] = new TQLabel( "", box );
grid->addWidget( resultLabel[4], 5, 2, 2 );
- QLabel *label6 = new QLabel( i18n( "Lines:" ), box );
+ TQLabel *label6 = new TQLabel( i18n( "Lines:" ), box );
grid->addWidget( label6, 6, 0, 1 );
- resultLabel[5] = new QLabel( "", box );
+ resultLabel[5] = new TQLabel( "", box );
grid->addWidget( resultLabel[5], 6, 2, 2 );
- QLabel *label7 = new QLabel( i18n( "Flesch reading ease:" ), box );
+ TQLabel *label7 = new TQLabel( i18n( "Flesch reading ease:" ), box );
grid->addWidget( label7, 7, 0, 1 );
- resultLabel[6] = new QLabel( init, box );
+ resultLabel[6] = new TQLabel( init, box );
grid->addWidget( resultLabel[6], 7, 2, 2 );
topLayout->addWidget( box );
@@ -339,7 +339,7 @@ void KWStatisticsDialog::addBox( QFrame *page, QLabel **resultLabel, bool calcWi
bool KWStatisticsDialog::docHasSelection()const
{
- QPtrListIterator<KWFrameSet> fsIt( m_doc->framesetsIterator() );
+ TQPtrListIterator<KWFrameSet> fsIt( m_doc->framesetsIterator() );
for ( ; fsIt.current(); ++fsIt ) {
KWFrameSet *fs = fsIt.current();
diff --git a/kword/KWStatisticsDialog.h b/kword/KWStatisticsDialog.h
index 54fc1b62..0eece6a3 100644
--- a/kword/KWStatisticsDialog.h
+++ b/kword/KWStatisticsDialog.h
@@ -21,9 +21,9 @@
class KWFrameSet;
class KWDocument;
-class QVBoxLayout;
-class QTabWidget;
-class QLabel;
+class TQVBoxLayout;
+class TQTabWidget;
+class TQLabel;
#include <defs.h>
#include <kdialogbase.h>
@@ -34,24 +34,25 @@ class QLabel;
class KWStatisticsDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWStatisticsDialog( QWidget *parent, KWDocument *doc );
+ KWStatisticsDialog( TQWidget *tqparent, KWDocument *doc );
bool wasCanceled()const { return m_canceled; }
private:
KWDocument *m_doc;
- QWidget *m_parent;
+ TQWidget *m_parent;
bool m_canceled;
- QLabel *m_resultLabelAll[7];
- QLabel *m_resultLabelSelected[7];
- QLabel *m_resultGeneralLabel[6];
+ TQLabel *m_resultLabelAll[7];
+ TQLabel *m_resultLabelSelected[7];
+ TQLabel *m_resultGeneralLabel[6];
- void addBox( QFrame *page, QLabel **resultLabel, bool calcWithFootNoteCheckbox );
- void addBoxGeneral( QFrame *page, QLabel **resultLabel );
+ void addBox( TQFrame *page, TQLabel **resultLabel, bool calcWithFootNoteCheckbox );
+ void addBoxGeneral( TQFrame *page, TQLabel **resultLabel );
- bool calcStats( QLabel **resultLabel, bool selection, bool useFootEndNote );
- void calcGeneral( QLabel **resultLabel );
+ bool calcStats( TQLabel **resultLabel, bool selection, bool useFootEndNote );
+ void calcGeneral( TQLabel **resultLabel );
bool docHasSelection()const;
double calcFlesch(ulong sentences, ulong words, ulong syllables);
private slots:
diff --git a/kword/KWStyleManager.cpp b/kword/KWStyleManager.cpp
index a8126627..5e0169f4 100644
--- a/kword/KWStyleManager.cpp
+++ b/kword/KWStyleManager.cpp
@@ -28,9 +28,9 @@
/* Class: KWStyleManager */
/******************************************************************/
-KWStyleManager::KWStyleManager( QWidget *_parent, KoUnit::Unit unit,
+KWStyleManager::KWStyleManager( TQWidget *_parent, KoUnit::Unit unit,
KWDocument *_doc, const KoStyleCollection & styles,
- const QString & activeStyleName)
+ const TQString & activeStyleName)
: KoStyleManager( _parent, unit,
styles, activeStyleName,
ShowIncludeInToc )
@@ -60,7 +60,7 @@ void KWStyleManager::updateAllStyleLists()
m_doc->updateAllStyleLists();
}
-void KWStyleManager::updateStyleListOrder( const QStringList & list)
+void KWStyleManager::updateStyleListOrder( const TQStringList & list)
{
m_doc->styleCollection()->updateStyleListOrder( list );
}
diff --git a/kword/KWStyleManager.h b/kword/KWStyleManager.h
index e8712cfa..ecd62ce4 100644
--- a/kword/KWStyleManager.h
+++ b/kword/KWStyleManager.h
@@ -31,17 +31,18 @@ class KoUnit;
class KWStyleManager : public KoStyleManager
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWStyleManager( QWidget *_parent, KoUnit::Unit unit, KWDocument *_doc,
+ KWStyleManager( TQWidget *_parent, KoUnit::Unit unit, KWDocument *_doc,
const KoStyleCollection& styleCollection,
- const QString & activeStyleName = QString::null );
+ const TQString & activeStyleName = TQString() );
virtual KoParagStyle* addStyleTemplate(KoParagStyle *style);
virtual void applyStyleChange( KoStyleChangeDefMap changed );
virtual void removeStyleTemplate( KoParagStyle *style );
virtual void updateAllStyleLists();
- virtual void updateStyleListOrder( const QStringList & list);
+ virtual void updateStyleListOrder( const TQStringList & list);
protected:
KWDocument *m_doc;
};
diff --git a/kword/KWTableDia.cpp b/kword/KWTableDia.cpp
index 28df4ca8..711c76c5 100644
--- a/kword/KWTableDia.cpp
+++ b/kword/KWTableDia.cpp
@@ -31,12 +31,12 @@
#include "KWPage.h"
#include <kcommand.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
#include <klocale.h>
@@ -47,15 +47,15 @@
/* Class: KWTablePreview */
/******************************************************************/
-void KWTablePreview::paintEvent( QPaintEvent * )
+void KWTablePreview::paintEvent( TQPaintEvent * )
{
int wid = ( width() - 10 ) / cols;
int hei = ( height() - 10 ) / rows;
- QPainter p;
+ TQPainter p;
p.begin( this );
- p.setPen( QPen( black ) );
+ p.setPen( TQPen( black ) );
for ( int i = 0; i < rows; i++ )
{
@@ -70,9 +70,9 @@ void KWTablePreview::paintEvent( QPaintEvent * )
/* Class: KWTableDia */
/******************************************************************/
-KWTableDia::KWTableDia( QWidget* parent, const char* name, UseMode _useMode, KWCanvas *_canvas, KWDocument *_doc,
- int rows, int cols, CellSize wid, CellSize hei, bool floating , const QString & _templateName, int format)
- : KDialogBase( Tabbed, i18n("Table Settings"), Ok | Cancel, Ok, parent, name, true)
+KWTableDia::KWTableDia( TQWidget* tqparent, const char* name, UseMode _useMode, KWCanvas *_canvas, KWDocument *_doc,
+ int rows, int cols, CellSize wid, CellSize hei, bool floating , const TQString & _templateName, int format)
+ : KDialogBase( Tabbed, i18n("Table Settings"), Ok | Cancel, Ok, tqparent, name, true)
{
m_useMode = _useMode;
canvas = _canvas;
@@ -81,7 +81,7 @@ KWTableDia::KWTableDia( QWidget* parent, const char* name, UseMode _useMode, KWC
setupTab1( rows, cols, wid, hei, floating );
setupTab2( _templateName,format );
- setInitialSize( QSize(500, 480) );
+ setInitialSize( TQSize(500, 480) );
oldRowCount = rows;
oldColCount = cols;
@@ -98,38 +98,38 @@ void KWTableDia::setupTab1( int rows, int cols, CellSize wid, CellSize hei, bool
{
tab1 = addPage( i18n( "Geometry" ) );
- QGridLayout *grid = new QGridLayout( tab1, 9, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( tab1, 9, 2, 0, KDialog::spacingHint() );
- lRows = new QLabel( i18n( "Number of rows:" ), tab1 );
+ lRows = new TQLabel( i18n( "Number of rows:" ), tab1 );
grid->addWidget( lRows, 0, 0 );
- nRows = new QSpinBox( 1, 128, 1, tab1 );
+ nRows = new TQSpinBox( 1, 128, 1, tab1 );
nRows->setValue( rows );
grid->addWidget( nRows, 1, 0 );
- lCols = new QLabel( i18n( "Number of columns:" ), tab1 );
+ lCols = new TQLabel( i18n( "Number of columns:" ), tab1 );
grid->addWidget( lCols, 2, 0 );
- nCols = new QSpinBox( 1, 128, 1, tab1 );
+ nCols = new TQSpinBox( 1, 128, 1, tab1 );
nCols->setValue( cols );
grid->addWidget( nCols, 3, 0 );
#ifdef ALLOW_NON_INLINE_TABLES
if ( m_useMode==NEW )
{
- lHei = new QLabel( i18n( "Cell heights:" ), tab1 );
+ lHei = new TQLabel( i18n( "Cell heights:" ), tab1 );
grid->addWidget( lHei, 4, 0 );
- cHei = new QComboBox( FALSE, tab1 );
+ cHei = new TQComboBox( FALSE, tab1 );
cHei->insertItem( i18n( "Automatic" ) );
cHei->insertItem( i18n( "Manual" ) );
cHei->setCurrentItem( (int)hei );
grid->addWidget( cHei, 5, 0 );
- lWid = new QLabel( i18n( "Cell widths:" ), tab1 );
+ lWid = new TQLabel( i18n( "Cell widths:" ), tab1 );
grid->addWidget( lWid, 6, 0 );
- cWid = new QComboBox( FALSE, tab1 );
+ cWid = new TQComboBox( FALSE, tab1 );
cWid->insertItem( i18n( "Automatic" ) );
cWid->insertItem( i18n( "Manual" ) );
cWid->setCurrentItem( (int)wid );
@@ -149,21 +149,21 @@ void KWTableDia::setupTab1( int rows, int cols, CellSize wid, CellSize hei, bool
{
#ifdef ALLOW_NON_INLINE_TABLES
// Checkbox for floating/fixed location. The default is floating (aka inline).
- cbIsFloating = new QCheckBox( i18n( "The table is &inline" ), tab1 );
+ cbIsFloating = new TQCheckBox( i18n( "The table is &inline" ), tab1 );
//cbIsFloating->setEnabled(false);
cbIsFloating->setChecked( floating );
grid->addMultiCellWidget( cbIsFloating, 9, 9, 0, 2 );
- connect( cbIsFloating, SIGNAL( toggled ( bool ) ), this, SLOT( slotInlineTable( bool ) ) );
+ connect( cbIsFloating, TQT_SIGNAL( toggled ( bool ) ), this, TQT_SLOT( slotInlineTable( bool ) ) );
#endif
}
else
if (m_useMode==EDIT)
{
- cbReapplyTemplate1 = new QCheckBox( i18n("Reapply template to table"), tab1 );
+ cbReapplyTemplate1 = new TQCheckBox( i18n("Reapply template to table"), tab1 );
grid->addMultiCellWidget( cbReapplyTemplate1, 9, 9, 0, 2);
- connect( cbReapplyTemplate1, SIGNAL( toggled ( bool ) ), this, SLOT( slotSetReapply( bool ) ) );
+ connect( cbReapplyTemplate1, TQT_SIGNAL( toggled ( bool ) ), this, TQT_SLOT( slotSetReapply( bool ) ) );
}
grid->addRowSpacing( 0, lRows->height() );
@@ -214,28 +214,28 @@ void KWTableDia::setupTab1( int rows, int cols, CellSize wid, CellSize hei, bool
grid->activate();
- connect( nRows, SIGNAL( valueChanged( int ) ), this, SLOT( rowsChanged( int ) ) );
- connect( nCols, SIGNAL( valueChanged( int ) ), this, SLOT( colsChanged( int ) ) );
+ connect( nRows, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( rowsChanged( int ) ) );
+ connect( nCols, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( colsChanged( int ) ) );
}
-void KWTableDia::setupTab2(const QString & _templateName, int format )
+void KWTableDia::setupTab2(const TQString & _templateName, int format )
{
- QWidget *tab2 = addPage( i18n("Templates"));
+ TQWidget *tab2 = addPage( i18n("Templates"));
- QGridLayout *grid = new QGridLayout( tab2, 2, 1, 0, KDialog::spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( tab2, 2, 1, 0, KDialog::spacingHint() );
tableTemplateSelector = new KWTableTemplateSelector( doc, tab2, _templateName,format );
grid->addWidget(tableTemplateSelector, 0, 0);
if (m_useMode==EDIT)
{
- cbReapplyTemplate2 = new QCheckBox( i18n("Reapply template to table"), tab2 );
+ cbReapplyTemplate2 = new TQCheckBox( i18n("Reapply template to table"), tab2 );
grid->addWidget( cbReapplyTemplate2, 1, 0);
grid->setRowStretch( 0, 1);
grid->setRowStretch( 1, 0);
- connect( cbReapplyTemplate2, SIGNAL( toggled ( bool ) ), this, SLOT( slotSetReapply( bool ) ) );
+ connect( cbReapplyTemplate2, TQT_SIGNAL( toggled ( bool ) ), this, TQT_SLOT( slotSetReapply( bool ) ) );
}
grid->activate();
}
diff --git a/kword/KWTableDia.h b/kword/KWTableDia.h
index 60f58b5c..0e6ad2d5 100644
--- a/kword/KWTableDia.h
+++ b/kword/KWTableDia.h
@@ -21,7 +21,7 @@
#define tabledia_h
#include <kdialogbase.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "defs.h"
#include <KoBorder.h>
@@ -30,32 +30,33 @@ class KWCanvas;
class KWDocument;
class KWTableTemplateSelector;
-class QGridLayout;
-class QLabel;
-class QListBox;
-class QWidget;
-class QCheckBox;
-class QButtonGroup;
-class QComboBox;
-class QSpinBox;
+class TQGridLayout;
+class TQLabel;
+class TQListBox;
+class TQWidget;
+class TQCheckBox;
+class TQButtonGroup;
+class TQComboBox;
+class TQSpinBox;
/******************************************************************/
/* Class: KWTablePreview */
/******************************************************************/
-class KWTablePreview : public QWidget
+class KWTablePreview : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWTablePreview( QWidget *_parent, int _rows, int _cols )
- : QWidget( _parent ), rows( _rows ), cols( _cols ) {}
+ KWTablePreview( TQWidget *_parent, int _rows, int _cols )
+ : TQWidget( _parent ), rows( _rows ), cols( _cols ) {}
- void setRows( int _rows ) { rows = _rows; repaint( true ); }
- void setCols( int _cols ) { cols = _cols; repaint( true ); }
+ void setRows( int _rows ) { rows = _rows; tqrepaint( true ); }
+ void setCols( int _cols ) { cols = _cols; tqrepaint( true ); }
protected:
- void paintEvent( QPaintEvent *e );
+ void paintEvent( TQPaintEvent *e );
int rows, cols;
@@ -68,30 +69,31 @@ protected:
class KWTableDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
typedef int CellSize; // in fact KWTableFrameSet::CellSize, which is an enum
enum UseMode{ NEW, EDIT };
- KWTableDia( QWidget *parent, const char *name, UseMode _useMode, KWCanvas *_canvas,
+ KWTableDia( TQWidget *tqparent, const char *name, UseMode _useMode, KWCanvas *_canvas,
KWDocument *_doc, int rows, int cols, CellSize wid, CellSize hei, bool floating,
- const QString & _templateName, int format);
+ const TQString & _templateName, int format);
protected:
void setupTab1( int rows, int cols, CellSize wid, CellSize hei, bool floating );
- void setupTab2( const QString &_templateName, int format);
+ void setupTab2( const TQString &_templateName, int format);
- QWidget *tab1;
- QLabel *lRows, *lCols;
+ TQWidget *tab1;
+ TQLabel *lRows, *lCols;
#ifdef ALLOW_NON_INLINE_TABLES
- QLabel *lWid, *lHei;
- QComboBox *cHei, *cWid;
- QCheckBox *cbIsFloating;
+ TQLabel *lWid, *lHei;
+ TQComboBox *cHei, *cWid;
+ TQCheckBox *cbIsFloating;
#endif
- QSpinBox *nRows, *nCols;
+ TQSpinBox *nRows, *nCols;
KWTablePreview *preview;
- QCheckBox *cbReapplyTemplate1, *cbReapplyTemplate2;
+ TQCheckBox *cbReapplyTemplate1, *cbReapplyTemplate2;
- QGridLayout *grid;
+ TQGridLayout *grid;
KWTableTemplateSelector *tableTemplateSelector;
UseMode m_useMode;
@@ -99,7 +101,7 @@ protected:
KWDocument *doc;
int oldRowCount, oldColCount;
- QString oldTemplateName;
+ TQString oldTemplateName;
protected slots:
void rowsChanged( int );
void colsChanged( int );
diff --git a/kword/KWTableFrameSet.cpp b/kword/KWTableFrameSet.cpp
index 983c9e07..e7f557b1 100644
--- a/kword/KWTableFrameSet.cpp
+++ b/kword/KWTableFrameSet.cpp
@@ -50,16 +50,16 @@ DESCRIPTION
#include <kdebug.h>
#include <klocale.h>
#include <dcopobject.h>
-#include <qapplication.h>
-#include <qpopupmenu.h>
-#include <qclipboard.h>
+#include <tqapplication.h>
+#include <tqpopupmenu.h>
+#include <tqclipboard.h>
-KWTableFrameSet::KWTableFrameSet( KWDocument *doc, const QString & name ) :
+KWTableFrameSet::KWTableFrameSet( KWDocument *doc, const TQString & name ) :
KWFrameSet( doc )
{
m_rows = m_cols = m_nr_cells = 0;
- m_name = QString::null;
+ m_name = TQString();
m_active = true;
m_frames.setAutoDelete(false);
if ( name.isEmpty() )
@@ -143,7 +143,7 @@ KWAnchor * KWTableFrameSet::createAnchor( KoTextDocument *txt, int frameNum )
}
void KWTableFrameSet::createAnchors( KoTextParag * parag, int index, bool placeHolderExists /*= false */ /*only used when loading*/,
- bool repaint )
+ bool tqrepaint )
{
//kdDebug(32004) << "KWTableFrameSet::createAnchors" << endl;
// TODO make one rect per page, and create one anchor per page
@@ -154,8 +154,8 @@ void KWTableFrameSet::createAnchors( KoTextParag * parag, int index, bool placeH
parag->setCustomItem( index, anchor, 0 );
kdDebug(32004) << "KWTableFrameSet::createAnchors setting anchor" << endl;
parag->setChanged( true );
- if ( repaint )
- emit repaintChanged( m_anchorTextFs );
+ if ( tqrepaint )
+ emit tqrepaintChanged( m_anchorTextFs );
}
void KWTableFrameSet::deleteAnchors()
@@ -453,9 +453,9 @@ void KWTableFrameSet::recalcRows(unsigned int col, unsigned int row) {
unsigned int fromRow = m_rows; // possible reposition rows starting with this one, default to no repositioning
unsigned int untilRow=0; // possible reposition rows ending with this one
- if( QABS( difference ) > 1E-10 ) { // means "difference != 0.0"
- QValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
- QValueList<double>::iterator j = m_rowPositions.begin();
+ if( TQABS( difference ) > 1E-10 ) { // means "difference != 0.0"
+ TQValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
+ TQValueList<double>::iterator j = m_rowPositions.begin();
double last=0.0;
int lineNumber=-1;
while(j != m_rowPositions.end()) {
@@ -463,13 +463,13 @@ void KWTableFrameSet::recalcRows(unsigned int col, unsigned int row) {
if(pageBound!=m_pageBoundaries.end()) {
if((int)*pageBound == lineNumber) { // next page
if(lineNumber >= (int)row) { // then delete line j
- QValueList<double>::iterator nextJ = j;
+ TQValueList<double>::iterator nextJ = j;
++nextJ;
difference -= *(nextJ)-*(j);
kdDebug(32004) << "Deleting line with old pos: " << *j << endl;
j=m_rowPositions.remove(j);
j--;
- QValueList<unsigned int>::iterator tmp = pageBound;
+ TQValueList<unsigned int>::iterator tmp = pageBound;
++pageBound;
m_pageBoundaries.remove(tmp);
j++;
@@ -494,7 +494,7 @@ void KWTableFrameSet::recalcRows(unsigned int col, unsigned int row) {
row=0;
}
#if 0
-{ QValueList<unsigned int>::iterator pb = m_pageBoundaries.begin();
+{ TQValueList<unsigned int>::iterator pb = m_pageBoundaries.begin();
unsigned int i=0;
double last=0;
do {
@@ -514,8 +514,8 @@ void KWTableFrameSet::recalcRows(unsigned int col, unsigned int row) {
//double pageHeight = m_doc->ptPaperHeight() - m_doc->ptBottomBorder() - m_doc->ptTopBorder();
unsigned int pageNumber=cell(0,0)->frame(0)->pageNumber() +1;
unsigned int lineNumber=1;
- QValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
- QValueList<double>::iterator j = m_rowPositions.begin();
+ TQValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
+ TQValueList<double>::iterator j = m_rowPositions.begin();
double diff=0.0;
double pageBottom = pageNumber * m_doc->ptPaperHeight() - m_doc->ptBottomBorder();
@@ -570,7 +570,7 @@ void KWTableFrameSet::recalcRows(unsigned int col, unsigned int row) {
double topOfPage = m_doc->ptPaperHeight() * pageNumber + m_doc->ptTopBorder();
- QValueList<double>::iterator tmp = m_rowPositions.at(breakRow);
+ TQValueList<double>::iterator tmp = m_rowPositions.at(breakRow);
diff += topOfPage - (*tmp); // diff between bottom of last row on page and top of new page
//kdDebug() << "diff += " << topOfPage << " - " << (*tmp) << ". diff += " << topOfPage - (*tmp) <<" ="<< diff << endl;
lineNumber++;
@@ -603,7 +603,7 @@ void KWTableFrameSet::recalcRows(unsigned int col, unsigned int row) {
#if 0 // def SUPPORT_MULTI_PAGE_TABLES
// Note: produces much ouput!
int i = 1; // DEBUG
- for ( QValueList<double>::iterator itDebug = m_rowPositions.begin(); itDebug != m_rowPositions.end(); ++itDebug, ++i )
+ for ( TQValueList<double>::iterator itDebug = m_rowPositions.begin(); itDebug != m_rowPositions.end(); ++itDebug, ++i )
{
kdDebug(32004) << "m_rowPosition[" << i << "]= " << (*itDebug) << endl;
}
@@ -612,7 +612,7 @@ void KWTableFrameSet::recalcRows(unsigned int col, unsigned int row) {
}
#endif
#if 0
-{ QValueList<unsigned int>::iterator pb = m_pageBoundaries.begin();
+{ TQValueList<unsigned int>::iterator pb = m_pageBoundaries.begin();
unsigned int i=0;
double last=0;
do {
@@ -644,7 +644,7 @@ void KWTableFrameSet::recalcRows(unsigned int col, unsigned int row) {
// check if any rowPosition entries are unused
// first create a hash of all row entries
- QMap<unsigned int,int> rows; // rownr, count
+ TQMap<unsigned int,int> rows; // rownr, count
unsigned int top=m_rowPositions.count() - m_pageBoundaries.count()-1;
for(unsigned int i=0; i < top; rows[i++]=0);
@@ -877,7 +877,7 @@ void KWTableFrameSet::position( Cell *theCell, bool setMinFrameHeight ) {
double KWTableFrameSet::getPositionOfRow( unsigned int row, bool bottom ) {
unsigned int adjustment=0;
- QValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
+ TQValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
while(pageBound != m_pageBoundaries.end() && (*pageBound) <= row + adjustment) {
adjustment++;
pageBound++;
@@ -893,7 +893,7 @@ void KWTableFrameSet::moveBy( double dx, double dy ) {
//for(unsigned int i=0; i < m_rowPositions.count() ; kdDebug(32004) << "row " << i << ": " << m_rowPositions[i++] << endl);
if(!(dy > -0.001 && dy < 0.001)) {
redraw=true;
- QValueList<double>::iterator row = m_rowPositions.begin();
+ TQValueList<double>::iterator row = m_rowPositions.begin();
while(row != m_rowPositions.end()) {
(*row)= (*row)+dy;
row++;
@@ -901,7 +901,7 @@ void KWTableFrameSet::moveBy( double dx, double dy ) {
}
if(!(dx > -0.001 && dx < 0.001)) {
redraw=true;
- QValueList<double>::iterator col = m_colPositions.begin();
+ TQValueList<double>::iterator col = m_colPositions.begin();
while(col != m_colPositions.end()) {
(*col)= (*col)+dx;
col++;
@@ -921,7 +921,7 @@ void KWTableFrameSet::deleteRow( unsigned int row, RemovedRow &rr, bool _recalc)
const unsigned int rowspan=1;
double height= getPositionOfRow(row+rowspan-1,true) - getPositionOfRow(row);
- QValueList<double>::iterator tmp = m_rowPositions.at(row+rowspan);
+ TQValueList<double>::iterator tmp = m_rowPositions.at(row+rowspan);
tmp=m_rowPositions.erase(tmp);
while(tmp!=m_rowPositions.end()) {
(*tmp)= (*tmp)-height;
@@ -981,7 +981,7 @@ void KWTableFrameSet::reInsertRow(RemovedRow &rr)
// put back m_frames that were removed
for(uint i = 0; i < rlen; i++){
- if( m_frames.findRef((*r)[i]->frame(0)) == -1 )
+ if( m_frames.tqfindRef((*r)[i]->frame(0)) == -1 )
m_frames.append( (*r)[i]->frame(0) );
}
@@ -991,8 +991,8 @@ void KWTableFrameSet::reInsertRow(RemovedRow &rr)
m_rowPositions.append(d);
}
else {
- QValueList<double>::iterator top = m_rowPositions.at(row);
- QValueList<double>::iterator i = m_rowPositions.at(row+1);
+ TQValueList<double>::iterator top = m_rowPositions.at(row);
+ TQValueList<double>::iterator i = m_rowPositions.at(row+1);
i = m_rowPositions.insert(i, *top + rr.height());
i++;
for(; i != m_rowPositions.end(); ++i) {
@@ -1024,10 +1024,10 @@ void KWTableFrameSet::insertNewRow( uint idx, bool recalc, bool _removeable)
// What height to use for the new row
double height = getPositionOfRow(copyFromRow,true) - getPositionOfRow(copyFromRow);
- // Calculate offset in QValueList because of page breaks.
+ // Calculate offset in TQValueList because of page breaks.
unsigned int adjustment=0;
unsigned int untilRow=m_rows;
- QValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
+ TQValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
while(pageBound != m_pageBoundaries.end() && (*pageBound) <= idx) {
// Find out how many pages we already had.
adjustment++;
@@ -1035,7 +1035,7 @@ void KWTableFrameSet::insertNewRow( uint idx, bool recalc, bool _removeable)
}
// Move all rows down from newRow to bottom of page
- QValueList<double>::iterator tmp = m_rowPositions.at(idx);
+ TQValueList<double>::iterator tmp = m_rowPositions.at(idx);
double newPos = *tmp + height;
tmp++;
m_rowPositions.insert(tmp, newPos);
@@ -1071,7 +1071,7 @@ void KWTableFrameSet::insertNewRow( uint idx, bool recalc, bool _removeable)
}
KWFrame *theFrame = new KWFrame(copyRow->m_cellArray[i]->frame(0));
- Cell *newCell=new Cell( this, idx, i, QString::null );
+ Cell *newCell=new Cell( this, idx, i, TQString() );
newCell->setColumnSpan( cell(copyFromRow,i)->columnSpan() );
addCell(newCell);
newCell->addFrame( theFrame, false );
@@ -1096,7 +1096,7 @@ void KWTableFrameSet::deleteColumn(uint col, RemovedColumn &rc)
}
// move the colomn positions
- QValueList<double>::iterator tmp = m_colPositions.at(col+1);
+ TQValueList<double>::iterator tmp = m_colPositions.at(col+1);
tmp = m_colPositions.erase(tmp);
while(tmp != m_colPositions.end()) {
(*tmp) = (*tmp) - rc.m_width;
@@ -1154,7 +1154,7 @@ void KWTableFrameSet::deleteColumn(uint col, RemovedColumn &rc)
void KWTableFrameSet::reInsertColumn(RemovedColumn &rc)
{
- QValueList<double>::iterator tmp = m_colPositions.at(rc.m_index);
+ TQValueList<double>::iterator tmp = m_colPositions.at(rc.m_index);
tmp = m_colPositions.insert(tmp, *tmp);
tmp++;
@@ -1198,7 +1198,7 @@ void KWTableFrameSet::reInsertColumn(RemovedColumn &rc)
void KWTableFrameSet::insertNewColumn( uint idx, double width)
{
- QValueList<double>::iterator tmp = m_colPositions.at(idx);
+ TQValueList<double>::iterator tmp = m_colPositions.at(idx);
tmp = m_colPositions.insert(tmp, *tmp);
tmp++;
@@ -1234,7 +1234,7 @@ void KWTableFrameSet::insertNewColumn( uint idx, double width)
}
}
- Cell *newCell = new Cell( this, i, idx, QString::null );
+ Cell *newCell = new Cell( this, i, idx, TQString() );
KWFrame *theFrame = new KWFrame(cell(i, copyCol)->frame(0));
newCell->addFrame( theFrame, false );
position(newCell);
@@ -1267,8 +1267,8 @@ KCommand *KWTableFrameSet::joinCells(unsigned int colBegin,unsigned int rowBegin
// if just one cell selected for joining; exit.
if(rowBegin == rowEnd && colBegin == colEnd || cell(rowBegin,colBegin) == cell(rowEnd,colEnd))
return 0L;
- QPtrList<KWFrameSet> listFrameSet;
- QPtrList<KWFrame> listCopyFrame;
+ TQPtrList<KWFrameSet> listFrameSet;
+ TQPtrList<KWFrame> listCopyFrame;
// do the actual merge.
for(unsigned int i=colBegin; i<=colEnd;i++) {
@@ -1294,11 +1294,11 @@ KCommand *KWTableFrameSet::joinCells(unsigned int colBegin,unsigned int rowBegin
validate();
m_doc->updateAllFrames(); // TODO: only fs->updateFrames() & m_doc->updateFramesOnTopOrBelow(pageNum)
- m_doc->repaintAllViews();
+ m_doc->tqrepaintAllViews();
return new KWJoinCellCommand( i18n("Join Cells"), this,colBegin,rowBegin, colEnd,rowEnd,listFrameSet,listCopyFrame);
}
-KCommand *KWTableFrameSet::splitCell(unsigned int intoRows, unsigned int intoCols, unsigned int col, unsigned int row, QPtrList<KWFrameSet> listFrameSet, QPtrList<KWFrame>listFrame) {
+KCommand *KWTableFrameSet::splitCell(unsigned int intoRows, unsigned int intoCols, unsigned int col, unsigned int row, TQPtrList<KWFrameSet> listFrameSet, TQPtrList<KWFrame>listFrame) {
if(intoRows < 1 || intoCols < 1)
return 0L;
@@ -1309,14 +1309,14 @@ KCommand *KWTableFrameSet::splitCell(unsigned int intoRows, unsigned int intoCol
if(rowsDiff >0) {
unsigned int adjustment=0;
- QValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
+ TQValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
while(pageBound != m_pageBoundaries.end() && (*pageBound) <= row) {
adjustment++;
pageBound++;
}
double height = (m_rowPositions[row+adjustment+1] - m_rowPositions[row+adjustment])/intoRows;
- QValueList<double>::iterator iRow = m_rowPositions.at(adjustment+row);
+ TQValueList<double>::iterator iRow = m_rowPositions.at(adjustment+row);
for (int i=0; i < rowsDiff; i++) {
double newPos = *iRow + height;
iRow++;
@@ -1336,7 +1336,7 @@ KCommand *KWTableFrameSet::splitCell(unsigned int intoRows, unsigned int intoCol
if(colsDiff >0) {
double width = (m_colPositions[col+1] - m_colPositions[col])/intoCols;
- QValueList<double>::iterator iCol = m_colPositions.at(col);
+ TQValueList<double>::iterator iCol = m_colPositions.at(col);
for (int i=0; i < colsDiff; i++) {
double newPos = *iCol + width;
iCol++;
@@ -1436,7 +1436,7 @@ KCommand *KWTableFrameSet::splitCell(unsigned int intoRows, unsigned int intoCol
return new KWSplitCellCommand(i18n("Split Cells"),this,col,row,intoCols, intoRows);
}
-void KWTableFrameSet::viewFormatting( QPainter &/*painter*/, int )
+void KWTableFrameSet::viewFormatting( TQPainter &/*painter*/, int )
{
}
@@ -1454,7 +1454,7 @@ void KWTableFrameSet::validate()
for(uint j = cells->firstColumn(); j < cells->columnAfter(); ++j) {
if( cell(i,j) != cells.current() ) {
- QString str = QString("| 0x%1 ").arg( (unsigned long)cells.current(), 0, 16 );
+ TQString str = TQString("| 0x%1 ").tqarg( (unsigned long)cells.current(), 0, 16 );
kdDebug(32004) << " KWTableFrameSet::validate() failed " << endl;
kdDebug(32004) << "at row: "<< i << " col: "<< j << " cell: "<< str << endl;
kdDebug(32004) << cells->firstRow() << " " << cells->firstColumn() << " " << cells->rowSpan()
@@ -1466,21 +1466,21 @@ void KWTableFrameSet::validate()
}
}
-void KWTableFrameSet::createEmptyRegion( const QRect & crect, QRegion & emptyRegion, KWViewMode *viewMode )
+void KWTableFrameSet::createEmptyRegion( const TQRect & crect, TQRegion & emptyRegion, KWViewMode *viewMode )
{
// Avoid iterating over all cells if we are out of view
if ( !viewMode->normalToView( m_doc->zoomRect( boundingRect() ) ).intersects( crect ) )
return;
- QRect outerRect( viewMode->normalToView( m_doc->zoomRect( boundingRect() )));
+ TQRect outerRect( viewMode->normalToView( m_doc->zoomRect( boundingRect() )));
outerRect &= crect;
if ( !outerRect.isEmpty() )
emptyRegion = emptyRegion.subtract( outerRect );
- QPtrListIterator<KWFrame> frameIt = frameIterator();
+ TQPtrListIterator<KWFrame> frameIt = frameIterator();
for ( ; frameIt.current(); ++frameIt )
{
- QRect outerRect( viewMode->normalToView( frameIt.current()->outerRect(viewMode) ) );
+ TQRect outerRect( viewMode->normalToView( frameIt.current()->outerRect(viewMode) ) );
//kdDebug(32004) << "KWTableFrameSet::createEmptyRegion outerRect=" << DEBUGRECT( outerRect )
// << " crect=" << DEBUGRECT( crect ) << endl;
outerRect &= crect;
@@ -1489,7 +1489,7 @@ void KWTableFrameSet::createEmptyRegion( const QRect & crect, QRegion & emptyReg
}
}
-void KWTableFrameSet::drawBorders( QPainter& painter, const QRect &crect, KWViewMode *viewMode ) {
+void KWTableFrameSet::drawBorders( TQPainter& painter, const TQRect &crect, KWViewMode *viewMode ) {
/* Draw the borders on top of the lines stores in the m_rowPositions and m_colPositions arrays.
* check the relevant cells for borders and thus line thickness.
@@ -1497,14 +1497,14 @@ void KWTableFrameSet::drawBorders( QPainter& painter, const QRect &crect, KWView
* inside the boundary of the table!
*/
painter.save();
- QPen previewLinePen( QApplication::palette().color( QPalette::Active, QColorGroup::Mid ) );
- QColor defaultBorderColor = KoTextFormat::defaultTextColor( &painter );
+ TQPen previewLinePen( TQApplication::palette().color( TQPalette::Active, TQColorGroup::Mid ) );
+ TQColor defaultBorderColor = KoTextFormat::defaultTextColor( &painter );
const int minborder = 1;
bool drawPreviewLines = viewMode && viewMode->drawFrameBorders();
// *** draw horizontal lines *** //
unsigned int row=0;
- QValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
+ TQValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
for (unsigned int i=0 ; i < m_rowPositions.count() ; i++) {
//kdDebug(32004) << "Horizontal line code. i: " << i << endl;
bool bottom=false;
@@ -1543,9 +1543,9 @@ void KWTableFrameSet::drawBorders( QPainter& painter, const QRect &crect, KWView
}
}
double x = m_colPositions[col] + offset;
- QPoint topLeft = viewMode->normalToView(QPoint(m_doc->zoomItX(startPos), ypix));
- QPoint bottomRight = viewMode->normalToView(QPoint(m_doc->zoomItX(x), ypix));
- QRect line = QRect(topLeft, bottomRight);
+ TQPoint topLeft = viewMode->normalToView(TQPoint(m_doc->zoomItX(startPos), ypix));
+ TQPoint bottomRight = viewMode->normalToView(TQPoint(m_doc->zoomItX(x), ypix));
+ TQRect line = TQRect(topLeft, bottomRight);
if(crect.intersects( line )) {
//if(border->width() <= 0) kdDebug(32004) << "preview line" << endl;
if(border->width() <= 0)
@@ -1642,7 +1642,7 @@ void KWTableFrameSet::drawBorders( QPainter& painter, const QRect &crect, KWView
}
// Draw when something changed (different kind of border) or we're at the end
- // This code could be rewritten in a more QRT-like way
+ // This code could be rewritten in a more TQRT-like way
// (iterate and compare with next, instead of the startRow/cell/border hack...)
if(startRow != -1 &&
(!daCell || row == getRows() ||
@@ -1657,7 +1657,7 @@ void KWTableFrameSet::drawBorders( QPainter& painter, const QRect &crect, KWView
x-=border->width() / 2;
}
int xpix = m_doc->zoomItX(x);
- QValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
+ TQValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
unsigned int topRow=startRow;
//kdDebug(32004) << "Drawing from topRow=" << topRow << endl;
do { // draw minimum of one line per page.
@@ -1694,9 +1694,9 @@ void KWTableFrameSet::drawBorders( QPainter& painter, const QRect &crect, KWView
}
double bottom=m_rowPositions[toRow] + offset;
- QPoint topLeft = viewMode->normalToView(QPoint(xpix, m_doc->zoomItY(top)));
- QPoint bottomRight = viewMode->normalToView(QPoint(xpix, m_doc->zoomItY(bottom)));
- QRect line = QRect(topLeft, bottomRight);
+ TQPoint topLeft = viewMode->normalToView(TQPoint(xpix, m_doc->zoomItY(top)));
+ TQPoint bottomRight = viewMode->normalToView(TQPoint(xpix, m_doc->zoomItY(bottom)));
+ TQRect line = TQRect(topLeft, bottomRight);
if(crect.intersects( line )) {
if(border->width() <= 0)
painter.setPen( previewLinePen );
@@ -1731,16 +1731,16 @@ void KWTableFrameSet::drawBorders( QPainter& painter, const QRect &crect, KWView
#if 0
if(drawPreviewLines) {
- QPen minsizeLinePen( red );
+ TQPen minsizeLinePen( red );
painter.setPen( minsizeLinePen );
for ( unsigned int i = 0; i < m_cells.count(); i++ ) {
Cell *daCell = m_cells.at( i );
double y = daCell->frame(0)->top() + daCell->frame(0)->minimumFrameHeight() + 1.5;
if(y >= daCell->frame(0)->bottom()) continue;
int ypix=m_doc->zoomItY(y);
- QPoint topLeft = viewMode->normalToView(QPoint(m_doc->zoomItX(daCell->frame(0)->left()), ypix));
- QPoint bottomRight = viewMode->normalToView(QPoint(m_doc->zoomItX(daCell->frame(0)->right()), ypix));
- QRect line = QRect(topLeft, bottomRight);
+ TQPoint topLeft = viewMode->normalToView(TQPoint(m_doc->zoomItX(daCell->frame(0)->left()), ypix));
+ TQPoint bottomRight = viewMode->normalToView(TQPoint(m_doc->zoomItX(daCell->frame(0)->right()), ypix));
+ TQRect line = TQRect(topLeft, bottomRight);
if(crect.intersects( line )) {
painter.drawLine( line.left(), line.top(), line.right(), line.bottom());
}
@@ -1751,8 +1751,8 @@ void KWTableFrameSet::drawBorders( QPainter& painter, const QRect &crect, KWView
painter.restore();
}
-void KWTableFrameSet::drawContents( QPainter * painter, const QRect & crect,
- const QColorGroup & cg, bool onlyChanged, bool resetChanged,
+void KWTableFrameSet::drawContents( TQPainter * painter, const TQRect & crect,
+ const TQColorGroup & cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit * edit, KWViewMode * viewMode,
KWFrameViewManager *fvm )
{
@@ -1783,7 +1783,7 @@ void KWTableFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context,
KoGenStyle tableStyle( KWDocument::STYLE_TABLE, "table" );
tableStyle.addProperty( "table:align", "margins" );
tableStyle.addPropertyPt( "style:width", m_colPositions.last()-m_colPositions[0] );
- const QString tableStyleName = context.mainStyles().lookup( tableStyle, "table" );
+ const TQString tableStyleName = context.mainStyles().lookup( tableStyle, "table" );
writer.addAttribute( "table:style-name", tableStyleName );
// ### to minimize the XML, we could use table:number-columns-repeated here
@@ -1793,7 +1793,7 @@ void KWTableFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context,
writer.startElement( "table:table-column" );
KoGenStyle columnStyle( KWDocument::STYLE_TABLE_COLUMN, "table-column" );
columnStyle.addPropertyPt( "style:column-width", m_colPositions[colNr+1] - m_colPositions[colNr] );
- const QString colStyleName = context.mainStyles().lookup( columnStyle, "col" );
+ const TQString colStyleName = context.mainStyles().lookup( columnStyle, "col" );
writer.addAttribute( "table:style-name", colStyleName );
writer.endElement(); // table:table-column
}
@@ -1807,7 +1807,7 @@ void KWTableFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context,
KoGenStyle rowStyle( KWDocument::STYLE_TABLE_ROW, "table-row" );
rowStyle.addPropertyPt( "table:row-height", m_rowPositions[row+1] - m_rowPositions[row] );
// TODO is min-row-height or use-optimal-row-height necessary?
- const QString rowStyleName = context.mainStyles().lookup( rowStyle, "row" );
+ const TQString rowStyleName = context.mainStyles().lookup( rowStyle, "row" );
writer.addAttribute( "table:style-name", rowStyleName );
for ( uint col = 0; col < getColumns(); ++col )
@@ -1824,7 +1824,7 @@ void KWTableFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context,
// Style: background, border, padding.
KoGenStyle cellStyle( KWDocument::STYLE_TABLE_CELL_AUTO, "table-cell" );
daCell->frame( 0 )->saveBorderProperties( cellStyle );
- const QString colStyleName = context.mainStyles().lookup( cellStyle, "cell" );
+ const TQString colStyleName = context.mainStyles().lookup( cellStyle, "cell" );
writer.addAttribute( "table:style-name", colStyleName );
// Attributes
@@ -1851,15 +1851,15 @@ void KWTableFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context,
writer.endElement(); // table:table
}
-void KWTableFrameSet::loadOasis( const QDomElement& tableTag, KoOasisContext& context )
+void KWTableFrameSet::loadOasis( const TQDomElement& tableTag, KoOasisContext& context )
{
// Left position of each column. The last one defined is the right position of the last cell/column.
- QMemArray<double> columnLefts(4);
+ TQMemArray<double> columnLefts(4);
uint maxColumns = columnLefts.size() - 1;
uint col = 0;
columnLefts[0] = 0.0; // Initialize left of first cell
- QDomElement elem;
+ TQDomElement elem;
forEachElement( elem, tableTag )
{
if ( elem.localName() == "table-column" && elem.namespaceURI() == KoXmlNS::table )
@@ -1872,7 +1872,7 @@ void KWTableFrameSet::loadOasis( const QDomElement& tableTag, KoOasisContext& co
styleStack.save();
context.fillStyleStack( elem, KoXmlNS::table, "style-name", "table-column" );
- QString strWidth = styleStack.attributeNS( KoXmlNS::style, "column-width" );
+ TQString strWidth = styleStack.attributeNS( KoXmlNS::style, "column-width" );
double width = KoUnit::parseValue( strWidth );
if ( width < 1.0 ) // Something is wrong with the width
@@ -1890,7 +1890,7 @@ void KWTableFrameSet::loadOasis( const QDomElement& tableTag, KoOasisContext& co
{
// We need more columns
maxColumns += 4;
- columnLefts.resize( maxColumns+1, QGArray::SpeedOptim );
+ columnLefts.resize( maxColumns+1, TQGArray::SpeedOptim );
}
columnLefts[col] = width + columnLefts[col-1];
kdDebug(32004) << "Cell column " << col-1 << " left " << columnLefts[col-1] << " right " << columnLefts[col] << endl;
@@ -1904,18 +1904,18 @@ void KWTableFrameSet::loadOasis( const QDomElement& tableTag, KoOasisContext& co
parseInsideOfTable( tableTag, context, columnLefts, row, column, 0 );
}
-void KWTableFrameSet::parseInsideOfTable( const QDomElement& parent, KoOasisContext& context,
- const QMemArray<double> & columnLefts, uint& row, uint& column,
+void KWTableFrameSet::parseInsideOfTable( const TQDomElement& tqparent, KoOasisContext& context,
+ const TQMemArray<double> & columnLefts, uint& row, uint& column,
double currentRowHeight )
{
kdDebug(32004) << "parseInsideOfTable" << endl;
KoStyleStack& styleStack = context.styleStack();
- QDomElement e;
- forEachElement( e, parent )
+ TQDomElement e;
+ forEachElement( e, tqparent )
{
- const QString localName = e.localName();
- const QString ns = e.namespaceURI();
+ const TQString localName = e.localName();
+ const TQString ns = e.namespaceURI();
if ( ns != KoXmlNS::table ) {
kdWarning(32004) << "Skipping element " << e.tagName() << " (in parseInsideOfTable)" << endl;
continue;
@@ -1961,21 +1961,21 @@ void KWTableFrameSet::parseInsideOfTable( const QDomElement& parent, KoOasisCont
}
}
-void KWTableFrameSet::loadOasisCell( const QDomElement& element, KoOasisContext& context,
- const QMemArray<double> & columnLefts, uint row, uint column,
+void KWTableFrameSet::loadOasisCell( const TQDomElement& element, KoOasisContext& context,
+ const TQMemArray<double> & columnLefts, uint row, uint column,
double currentRowHeight )
{
//kdDebug(32004) << k_funcinfo << element.localName() << " " << row << "," << column << endl;
KoStyleStack& styleStack = context.styleStack();
- uint rowSpan = element.attributeNS( KoXmlNS::table, "number-rows-spanned", QString::null ).toUInt();
+ uint rowSpan = element.attributeNS( KoXmlNS::table, "number-rows-spanned", TQString() ).toUInt();
if ( rowSpan == 0 )
rowSpan = 1;
- uint colSpan = element.attributeNS( KoXmlNS::table, "number-columns-spanned", QString::null ).toUInt();
+ uint colSpan = element.attributeNS( KoXmlNS::table, "number-columns-spanned", TQString() ).toUInt();
if ( colSpan == 0 )
colSpan = 1;
- // m_rowPositions / m_colPositions could be QMemArrays, or QValueVectors...
+ // m_rowPositions / m_colPositions could be TQMemArrays, or TQValueVectors...
while(m_rowPositions.count() <= row + rowSpan + m_pageBoundaries.count()) {
m_rowPositions.append(0);
}
@@ -1983,13 +1983,13 @@ void KWTableFrameSet::loadOasisCell( const QDomElement& element, KoOasisContext&
m_colPositions.append(0);
}
- Cell *daCell = new Cell( this, row, column, QString::null /*unused*/ );
+ Cell *daCell = new Cell( this, row, column, TQString() /*unused*/ );
daCell->setRowSpan( rowSpan );
daCell->setColumnSpan( colSpan );
addCell( daCell ); // rowSpan/colSpan have changed -> update array
- double width = columnLefts[ QMIN( column+colSpan, columnLefts.size()-1 ) ] - columnLefts[column];
+ double width = columnLefts[ TQMIN( column+colSpan, columnLefts.size()-1 ) ] - columnLefts[column];
double height = currentRowHeight > 0 ? currentRowHeight : 20;
KWFrame* frame = new KWFrame( daCell, columnLefts[column], 0, width, height );
if ( currentRowHeight > 0 )
@@ -2009,19 +2009,19 @@ void KWTableFrameSet::loadOasisCell( const QDomElement& element, KoOasisContext&
}
// Old XML
-QDomElement KWTableFrameSet::save( QDomElement &parentElem, bool saveFrames ) {
+TQDomElement KWTableFrameSet::save( TQDomElement &tqparentElem, bool saveFrames ) {
// When saving to a file, we don't have anything specific to the frameset to save.
// Save the cells only.
for (TableIter cells(this) ; cells ; ++cells)
- cells->save(parentElem, saveFrames);
- return QDomElement(); // No englobing element for tables...
+ cells->save(tqparentElem, saveFrames);
+ return TQDomElement(); // No englobing element for tables...
}
// Old XML
-QDomElement KWTableFrameSet::toXML( QDomElement &parentElem, bool saveFrames )
+TQDomElement KWTableFrameSet::toXML( TQDomElement &tqparentElem, bool saveFrames )
{
- QDomElement framesetElem = parentElem.ownerDocument().createElement( "FRAMESET" );
- parentElem.appendChild( framesetElem );
+ TQDomElement framesetElem = tqparentElem.ownerDocument().createElement( "FRAMESET" );
+ tqparentElem.appendChild( framesetElem );
KWFrameSet::saveCommon( framesetElem, false ); // Save the frameset attributes
// Save the cells
save( framesetElem, saveFrames );
@@ -2029,11 +2029,11 @@ QDomElement KWTableFrameSet::toXML( QDomElement &parentElem, bool saveFrames )
}
// Old XML
-void KWTableFrameSet::fromXML( QDomElement &framesetElem, bool loadFrames, bool useNames )
+void KWTableFrameSet::fromXML( TQDomElement &framesetElem, bool loadFrames, bool useNames )
{
KWFrameSet::load( framesetElem, false ); // Load the frameset attributes
// Load the cells
- QDomElement cellElem = framesetElem.firstChild().toElement();
+ TQDomElement cellElem = framesetElem.firstChild().toElement();
for ( ; !cellElem.isNull() ; cellElem = cellElem.nextSibling().toElement() )
{
if ( cellElem.tagName() == "FRAMESET" )
@@ -2042,7 +2042,7 @@ void KWTableFrameSet::fromXML( QDomElement &framesetElem, bool loadFrames, bool
}
// Old XML
-KWTableFrameSet::Cell* KWTableFrameSet::loadCell( QDomElement &framesetElem, bool loadFrames, bool useNames )
+KWTableFrameSet::Cell* KWTableFrameSet::loadCell( TQDomElement &framesetElem, bool loadFrames, bool useNames )
{
int _row = KWDocument::getAttribute( framesetElem, "row", 0 );
if(_row <0) _row =0;
@@ -2054,7 +2054,7 @@ KWTableFrameSet::Cell* KWTableFrameSet::loadCell( QDomElement &framesetElem, boo
int _cols = KWDocument::getAttribute( framesetElem, "cols", 1 );
if(_cols <0) _cols = 1;
- // m_rowPositions / m_colPositions could be QMemArrays, or QValueVectors...
+ // m_rowPositions / m_colPositions could be TQMemArrays, or TQValueVectors...
while(m_rowPositions.count() <= static_cast<unsigned int>(row + _rows + m_pageBoundaries.count())) {
m_rowPositions.append(0);
}
@@ -2062,8 +2062,8 @@ KWTableFrameSet::Cell* KWTableFrameSet::loadCell( QDomElement &framesetElem, boo
m_colPositions.append(0);
}
- Cell *daCell = new Cell( this, row, _col, QString::null /*unused*/ );
- QString autoName = daCell->name();
+ Cell *daCell = new Cell( this, row, _col, TQString() /*unused*/ );
+ TQString autoName = daCell->name();
//kdDebug(32004) << "KWTableFrameSet::loadCell autoName=" << autoName << endl;
daCell->load( framesetElem, loadFrames );
daCell->setRowSpan(_rows);
@@ -2084,7 +2084,7 @@ void KWTableFrameSet::afterLoadingCell( Cell* daCell )
uint colSpan = daCell->columnSpan();
if(m_pageBoundaries.count() > 0) {
unsigned int adjustment=0;
- QValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
+ TQValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
while(pageBound != m_pageBoundaries.end() && (*pageBound) <= row + adjustment) {
adjustment++;
pageBound++;
@@ -2095,7 +2095,7 @@ void KWTableFrameSet::afterLoadingCell( Cell* daCell )
kdDebug(32004) << "loading cell (" << row << "," << col << ")\n";
if(daCell->frame(0)) {
daCell->frame(0)->setMinimumFrameHeight(daCell->frame(0)->height()); // TODO run the formatter over the text here
- QValueList<double>::iterator tmp = m_colPositions.at(col);
+ TQValueList<double>::iterator tmp = m_colPositions.at(col);
if(*tmp == 0) (*tmp) = daCell->frame(0)->left();
else (*tmp) = (daCell->frame(0)->left() + *tmp) / 2;
@@ -2109,7 +2109,7 @@ void KWTableFrameSet::afterLoadingCell( Cell* daCell )
else {
if (static_cast<int>(*tmp/m_doc->pageLayout().ptHeight) < static_cast<int>(daCell->frame(0)->top()/m_doc->pageLayout().ptHeight)) {
kdDebug(32004) << "This cell is on a new page" << endl;
- QValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
+ TQValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
while(pageBound != m_pageBoundaries.end() && (*pageBound) < row) ++pageBound;
if(*pageBound!=row) {
m_pageBoundaries.insert(pageBound,row++);
@@ -2126,7 +2126,7 @@ void KWTableFrameSet::afterLoadingCell( Cell* daCell )
else { // untested...
if (static_cast<int>(*tmp/m_doc->pageLayout().ptHeight) > static_cast<int>(daCell->frame(0)->top()/m_doc->pageLayout().ptHeight)) {
kdDebug(32004) << "next cell is on a new page" << endl;
- QValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
+ TQValueList<unsigned int>::iterator pageBound = m_pageBoundaries.begin();
while(pageBound != m_pageBoundaries.end() && (*pageBound) < row) ++pageBound;
if(*pageBound!=row) {
m_pageBoundaries.insert(pageBound,row++);
@@ -2158,7 +2158,7 @@ int KWTableFrameSet::paragraphsSelected()
return paragraphs;
}
-bool KWTableFrameSet::statistics( QProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace, ulong & words,
+bool KWTableFrameSet::statistics( TQProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace, ulong & words,
ulong & sentences, ulong & syllables, ulong & lines, bool selected )
{
for (TableIter cells(this) ; cells ; ++cells)
@@ -2183,16 +2183,16 @@ void KWTableFrameSet::finalize( ) {
KWFrameSet::finalize();
}
-void KWTableFrameSet::layout()
+void KWTableFrameSet::tqlayout()
{
for (TableIter cells(this) ; cells ; ++cells)
- cells->layout();
+ cells->tqlayout();
}
-void KWTableFrameSet::invalidate()
+void KWTableFrameSet::tqinvalidate()
{
for (TableIter cells(this) ; cells ; ++cells)
- cells->invalidate();
+ cells->tqinvalidate();
}
void KWTableFrameSet::setVisible( bool v )
@@ -2208,7 +2208,7 @@ bool KWTableFrameSet::canRemovePage( int num ) {
to check if the frame contains something, the simple existence of a frame
is enough
*/
- QPtrListIterator<KWFrame> frameIt( frameIterator() );
+ TQPtrListIterator<KWFrame> frameIt( frameIterator() );
for ( ; frameIt.current(); ++frameIt ) {
if ( frameIt.current()->pageNumber() == num ) {
return false;
@@ -2217,7 +2217,7 @@ bool KWTableFrameSet::canRemovePage( int num ) {
return true;
}
-void KWTableFrameSet::addTextFrameSets( QPtrList<KWTextFrameSet> & lst, bool onlyReadWrite )
+void KWTableFrameSet::addTextFrameSets( TQPtrList<KWTextFrameSet> & lst, bool onlyReadWrite )
{
for (TableIter cells(this) ; cells ; ++cells)
if (!cells->textObject()->protectContent() || onlyReadWrite )
@@ -2262,7 +2262,7 @@ void KWTableFrameSet::setZOrder()
// TODO provide toPlainText() (reimplemented from KWFrameSet)
-QByteArray KWTableFrameSet::convertTableToText() // should be const, but TableIter doesn't allow it
+TQByteArray KWTableFrameSet::convertTableToText() // should be const, but TableIter doesn't allow it
{
KWOasisSaver oasisSaver( m_doc );
for (TableIter cells(this); cells; ++cells)
@@ -2270,7 +2270,7 @@ QByteArray KWTableFrameSet::convertTableToText() // should be const, but TableIt
cells->textObject()->saveOasisContent( oasisSaver.bodyWriter(), oasisSaver.savingContext() );
}
if ( !oasisSaver.finish() )
- return QByteArray();
+ return TQByteArray();
return oasisSaver.data();
}
@@ -2291,9 +2291,9 @@ void KWTableFrameSet::printArrayDebug() {
kdDebug(32004) << " | Row/Cell arrays" << endl;
Q_ASSERT( m_rows == m_rowArray.size() );
for ( unsigned int row = 0; row < m_rows; ++row ) {
- QString str = QString( " | Row %1: " ).arg( row );
+ TQString str = TQString( " | Row %1: " ).tqarg( row );
for ( unsigned int col = 0; col < getColumns(); ++col )
- str += QString("| 0x%1 ").arg( (unsigned long)(*m_rowArray[row])[col], 0, 16 );
+ str += TQString("| 0x%1 ").tqarg( (unsigned long)(*m_rowArray[row])[col], 0, 16 );
kdDebug(32004) << str<< " |" << endl;
}
}
@@ -2315,11 +2315,11 @@ void KWTableFrameSet::printDebug() {
// ===
-KWTableFrameSet::Cell::Cell( KWTableFrameSet *table, unsigned int row, unsigned int col, const QString &/*name*/ ) :
+KWTableFrameSet::Cell::Cell( KWTableFrameSet *table, unsigned int row, unsigned int col, const TQString &/*name*/ ) :
KWTextFrameSet( table->m_doc,
// Generate frameset name from table_name+row+col
i18n("Hello dear translator :), 1 is the table name, 2 and 3 are row and column", "%1 Cell %2,%3")
- .arg( table->name() ).arg(row).arg(col) )
+ .tqarg( table->name() ).tqarg(row).tqarg(col) )
{
m_row = row;
m_col = col;
@@ -2457,24 +2457,24 @@ void KWTableFrameSet::Cell::setBottomBorder(KoBorder newBorder) {
void KWTableFrameSet::Cell::setZOrder()
{
- QPtrListIterator<KWFrame> frameIt = frameIterator();
+ TQPtrListIterator<KWFrame> frameIt = frameIterator();
for ( ; frameIt.current(); ++frameIt )
{
(*frameIt)->setZOrder( kWordDocument()->maxZOrder( (*frameIt)->pageNumber() ) + 1 );
}
}
-void KWTableFrameSet::Cell::drawContents( QPainter * painter, const QRect & crect,
- const QColorGroup & cg, bool onlyChanged, bool resetChanged,
+void KWTableFrameSet::Cell::drawContents( TQPainter * painter, const TQRect & crect,
+ const TQColorGroup & cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit * edit, KWViewMode * viewMode, KWFrameViewManager *fvm )
{
- bool printing = painter->device()->devType() == QInternal::Printer;
+ bool printing = painter->device()->devType() == TQInternal::Printer;
bool drawPreviewLines = viewMode && viewMode->drawFrameBorders();
- QRect cellRect = crect;
+ TQRect cellRect = crect;
if(!printing && drawPreviewLines) {
// Make sure the clipping is changed so the preview lines (frame borders) are not overwritten.
- QRect zoomedRect( m_doc->zoomRect(*frame(0)) );
- QRect innerFrameRect( viewMode->normalToView( zoomedRect ) );
+ TQRect zoomedRect( m_doc->zoomRect(*frame(0)) );
+ TQRect innerFrameRect( viewMode->normalToView( zoomedRect ) );
innerFrameRect.addCoords(1, 1, -1, -1); // move and shrink
cellRect = innerFrameRect.intersect(crect);
}
@@ -2488,7 +2488,7 @@ KWTableFrameSetEdit::~KWTableFrameSetEdit()
delete m_currentCell;
}
-void KWTableFrameSetEdit::mousePressEvent( QMouseEvent * e, const QPoint & nPoint, const KoPoint & dPoint )
+void KWTableFrameSetEdit::mousePressEvent( TQMouseEvent * e, const TQPoint & nPoint, const KoPoint & dPoint )
{
setCurrentCell( dPoint );
if ( m_currentCell )
@@ -2548,7 +2548,7 @@ KWFrameSetEdit* KWTableFrameSetEdit::currentTextEdit()
}
-void KWTableFrameSetEdit::keyPressEvent( QKeyEvent * e )
+void KWTableFrameSetEdit::keyPressEvent( TQKeyEvent * e )
{
// This method handles the up/left/down/right navigation keys in tables
if ( !m_currentCell )
@@ -2569,7 +2569,7 @@ void KWTableFrameSetEdit::keyPressEvent( QKeyEvent * e )
if(moveToOtherCell)
{
switch( e->key() ) {
- case QKeyEvent::Qt::Key_Up:
+ case TQt::Key_Up:
{
if(!(static_cast<KWTextFrameSetEdit *>(m_currentCell))->cursor()->parag()->prev())
{
@@ -2593,7 +2593,7 @@ void KWTableFrameSetEdit::keyPressEvent( QKeyEvent * e )
}
}
break;
- case QKeyEvent::Qt::Key_Down:
+ case TQt::Key_Down:
{
if(!(static_cast<KWTextFrameSetEdit *>(m_currentCell))->cursor()->parag()->next())
{
@@ -2615,12 +2615,12 @@ void KWTableFrameSetEdit::keyPressEvent( QKeyEvent * e )
}
}
break;
- case QKeyEvent::Qt::Key_Backtab:
+ case TQt::Key_Backtab:
tab=true;
- if (e->state() & QKeyEvent::ControlButton)
+ if (e->state() & TQt::ControlButton)
break; // Break if tab was pressed with Control (in *any* key combination)
// Do not break
- case QKeyEvent::Qt::Key_Left:
+ case TQt::Key_Left:
{
KoTextCursor *cur = (static_cast<KWTextFrameSetEdit *>(m_currentCell))->cursor();
if ( tab || (!cur->parag()->prev()&&cur->index()==0) )
@@ -2645,12 +2645,12 @@ void KWTableFrameSetEdit::keyPressEvent( QKeyEvent * e )
}
}
break;
- case QKeyEvent::Qt::Key_Tab:
+ case TQt::Key_Tab:
tab=true;
- if (e->state() & QKeyEvent::ControlButton)
+ if (e->state() & TQt::ControlButton)
break; // Break if tab was pressed with Control (in *any* key combination)
// Do not break
- case QKeyEvent::Qt::Key_Right:
+ case TQt::Key_Right:
{
KoTextCursor *cur = (static_cast<KWTextFrameSetEdit *>(m_currentCell))->cursor();
if( tab || (!cur->parag()->next()&&cur->index()==cur->parag()->string()->length()-1) )
@@ -2686,9 +2686,9 @@ void KWTableFrameSetEdit::keyPressEvent( QKeyEvent * e )
{
if ( !textframeSet->textObject()->protectContent() )
{
- if (tab && (e->state() & QKeyEvent::ControlButton) )
+ if (tab && (e->state() & TQt::ControlButton) )
{
- QKeyEvent event(QEvent::KeyPress, QKeyEvent::Qt::Key_Tab, 9, 0, QChar(9));
+ TQKeyEvent event(TQEvent::KeyPress, TQt::Key_Tab, 9, 0, TQChar(9));
m_currentCell->keyPressEvent( &event );
}
else
@@ -2699,31 +2699,31 @@ void KWTableFrameSetEdit::keyPressEvent( QKeyEvent * e )
}
}
-void KWTableFrameSetEdit::keyReleaseEvent( QKeyEvent * e )
+void KWTableFrameSetEdit::keyReleaseEvent( TQKeyEvent * e )
{
if ( m_currentCell )
m_currentCell->keyReleaseEvent( e );
}
-void KWTableFrameSetEdit::imStartEvent( QIMEvent* e )
+void KWTableFrameSetEdit::imStartEvent( TQIMEvent* e )
{
if ( m_currentCell )
m_currentCell->imStartEvent( e );
}
-void KWTableFrameSetEdit::imComposeEvent( QIMEvent* e )
+void KWTableFrameSetEdit::imComposeEvent( TQIMEvent* e )
{
if ( m_currentCell )
m_currentCell->imComposeEvent( e );
}
-void KWTableFrameSetEdit::imEndEvent( QIMEvent* e )
+void KWTableFrameSetEdit::imEndEvent( TQIMEvent* e )
{
if ( m_currentCell )
m_currentCell->imEndEvent( e );
}
-void KWTableFrameSetEdit::dragMoveEvent( QDragMoveEvent * e, const QPoint &n, const KoPoint &d )
+void KWTableFrameSetEdit::dragMoveEvent( TQDragMoveEvent * e, const TQPoint &n, const KoPoint &d )
{
kdDebug(32004)<<"m_currentCell :"<<m_currentCell<<endl;
if ( m_currentCell )
@@ -2829,7 +2829,7 @@ KWTableFrameSet::MarkedIterator::MarkedIterator(KWTableFrameSet *table) :
if ( current() ) {
// kdDebug() << "MarkedIterator: visit: "
-// << QString("| 0x%1 ").arg((unsigned long)current(), 0, 16) << endl;
+// << TQString("| 0x%1 ").tqarg((unsigned long)current(), 0, 16) << endl;
current()->setMark();
}
}
@@ -2844,7 +2844,7 @@ KWTableFrameSet::MarkedIterator::operator++()
}
if ( current() ) {
// kdDebug() << "MarkedIterator: visit: "
-// << QString("| 0x%1 ").arg((unsigned long)current(), 0, 16) << endl;
+// << TQString("| 0x%1 ").tqarg((unsigned long)current(), 0, 16) << endl;
current()->setMark();
}
return ret;
diff --git a/kword/KWTableFrameSet.h b/kword/KWTableFrameSet.h
index 92a5a867..3a3b5d64 100644
--- a/kword/KWTableFrameSet.h
+++ b/kword/KWTableFrameSet.h
@@ -30,15 +30,15 @@ DESCRIPTION
#include "KWFrame.h"
#include "KWTextFrameSet.h"
-#include <qptrlist.h>
-#include <qvaluevector.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqvaluevector.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <KoRichText.h>
class KWDocument;
class KWTableFrameSetEdit;
-class QPainter;
+class TQPainter;
class KWAnchor;
class KWordFrameSetIface;
class KWFrameViewManager;
@@ -58,6 +58,7 @@ class RemovedColumn;
class KWTableFrameSet : public KWFrameSet
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -77,7 +78,7 @@ public:
public:
/// constructor
- Cell( KWTableFrameSet *table, unsigned int row, unsigned int col, const QString & name = QString::null );
+ Cell( KWTableFrameSet *table, unsigned int row, unsigned int col, const TQString & name = TQString() );
Cell( KWTableFrameSet *table, const Cell &original );
// destructor
virtual ~Cell();
@@ -137,8 +138,8 @@ public:
bool marked() const { return m_marker; }
/** Overloaded to not clear any preview borders. */
- void drawContents( QPainter *painter, const QRect & crect,
- const QColorGroup & cg, bool onlyChanged, bool resetChanged,
+ void drawContents( TQPainter *painter, const TQRect & crect,
+ const TQColorGroup & cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit * edit, KWViewMode * viewMode,
KWFrameViewManager *frameViewManager );
@@ -161,7 +162,7 @@ public:
* If a cell has m_cols = N, N values in this array point to the same cell.
* (Same thing is a cell from a row above has m_rows > 1)
*/
- QPtrVector< Cell > m_cellArray;
+ TQPtrVector< Cell > m_cellArray;
};
@@ -303,10 +304,10 @@ public:
virtual KWordFrameSetIface* dcopObject();
- virtual void addTextFrameSets( QPtrList<KWTextFrameSet> & lst, bool onlyReadWrite =false );
+ virtual void addTextFrameSets( TQPtrList<KWTextFrameSet> & lst, bool onlyReadWrite =false );
/// constructor
- KWTableFrameSet( KWDocument *_doc, const QString & name );
+ KWTableFrameSet( KWDocument *_doc, const TQString & name );
/// destructor
virtual ~KWTableFrameSet();
@@ -318,16 +319,16 @@ public:
* @param crect the clip rect, outside which nothing is important
* @param viewMode the current view mode
*/
- virtual void createEmptyRegion( const QRect & crect, QRegion & emptyRegion, KWViewMode *viewMode );
- void drawBorders( QPainter& painter, const QRect &crect, KWViewMode *viewMode );
- virtual void drawContents( QPainter * painter, const QRect & crect,
- const QColorGroup & cg, bool onlyChanged, bool resetChanged,
+ virtual void createEmptyRegion( const TQRect & crect, TQRegion & emptyRegion, KWViewMode *viewMode );
+ void drawBorders( TQPainter& painter, const TQRect &crect, KWViewMode *viewMode );
+ virtual void drawContents( TQPainter * painter, const TQRect & crect,
+ const TQColorGroup & cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode,
KWFrameViewManager *frameViewManager );
/// Dummy since we reimplement drawContents
- virtual void drawFrame(KWFrame *, QPainter *, const QRect &, const QRect&,
- const QPoint&,
- KWFrame *, const QColorGroup &, bool, bool,
+ virtual void drawFrame(KWFrame *, TQPainter *, const TQRect &, const TQRect&,
+ const TQPoint&,
+ KWFrame *, const TQColorGroup &, bool, bool,
KWFrameSetEdit *, KWViewMode *, bool ) {}
// Frameset management
@@ -392,7 +393,7 @@ public:
/** returns the number of columns */
unsigned int getColumns() const { return m_cols; }
- /** returns the number of cells the table contains, this includes
+ /** returns the number of cells the table tqcontains, this includes
* temporary headers. */
unsigned int getNumCells()const { return m_nr_cells; }
@@ -441,38 +442,38 @@ public:
* @param listFrame needed for undo reasons
*/
KCommand * splitCell(unsigned int intoRows, unsigned int intoColumns, unsigned int column,
- unsigned int row, QPtrList<KWFrameSet> listFrameSet=QPtrList<KWFrameSet>(),
- QPtrList<KWFrame>listFrame=QPtrList<KWFrame>() );
+ unsigned int row, TQPtrList<KWFrameSet> listFrameSet=TQPtrList<KWFrameSet>(),
+ TQPtrList<KWFrame>listFrame=TQPtrList<KWFrame>() );
/** display formatting information */
- void viewFormatting( QPainter &painter, int zoom );
+ void viewFormatting( TQPainter &painter, int zoom );
/** do a number of complex tests to test the validity of the table. Missing/duplicate cells
* and wrong values will be detected (and corrected) */
void validate();
/** override save so we save in table style.. */
- virtual QDomElement save( QDomElement &parentElem, bool saveFrames = true );
+ virtual TQDomElement save( TQDomElement &tqparentElem, bool saveFrames = true );
virtual void saveOasis( KoXmlWriter&, KoSavingContext&, bool saveFrames ) const;
- void loadOasis( const QDomElement& tag, KoOasisContext& context );
+ void loadOasis( const TQDomElement& tag, KoOasisContext& context );
virtual bool canBeSavedAsInlineCharacter() const { return false; }
/** load one cell */
- Cell* loadCell( QDomElement &frameElem, bool loadFrames = true, bool useNames = true );
+ Cell* loadCell( TQDomElement &frameElem, bool loadFrames = true, bool useNames = true );
/** from and to XML - used when copying and pasting a table */
- virtual QDomElement toXML( QDomElement &parentElem, bool saveFrames = true );
- virtual void fromXML( QDomElement &framesetElem, bool loadFrames = true, bool useNames = true );
+ virtual TQDomElement toXML( TQDomElement &tqparentElem, bool saveFrames = true );
+ virtual void fromXML( TQDomElement &framesetElem, bool loadFrames = true, bool useNames = true );
/** Contribute to the document statistics */
virtual int paragraphs();
virtual int paragraphsSelected();
- virtual bool statistics( QProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace, ulong & words,
+ virtual bool statistics( TQProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace, ulong & words,
ulong & sentences, ulong & syllables,ulong & lines, bool selected );
virtual void finalize();
- virtual void invalidate();
- virtual void layout();
+ virtual void tqinvalidate();
+ virtual void tqlayout();
virtual void updateFrames( int flags = 0xff );
@@ -506,7 +507,7 @@ public:
*/
void setZOrder();
- QByteArray convertTableToText();
+ TQByteArray convertTableToText();
#ifndef NDEBUG
virtual void printDebug( KWFrame * frame );
@@ -519,16 +520,16 @@ protected:
/// \overload KWFrameSet::deleteAnchors
virtual void deleteAnchors();
/// \overload KWFrameSet::createAnchors
- virtual void createAnchors( KoTextParag * parag, int index, bool placeHolderExists = false, bool repaint = true );
+ virtual void createAnchors( KoTextParag * parag, int index, bool placeHolderExists = false, bool tqrepaint = true );
private:
void addCellToArray( Cell* cell );
void afterLoadingCell( Cell* cell );
- void parseInsideOfTable( const QDomElement& parent, KoOasisContext& context,
- const QMemArray<double> & columnLefts, uint& row, uint& column,
+ void parseInsideOfTable( const TQDomElement& tqparent, KoOasisContext& context,
+ const TQMemArray<double> & columnLefts, uint& row, uint& column,
double currentRowHeight );
- void loadOasisCell( const QDomElement& element, KoOasisContext& context,
- const QMemArray<double> & columnLefts, uint row, uint column,
+ void loadOasisCell( const TQDomElement& element, KoOasisContext& context,
+ const TQMemArray<double> & columnLefts, uint row, uint column,
double currentRowHeight );
/**
@@ -570,7 +571,7 @@ private:
private:
unsigned int m_rows, m_cols, m_nr_cells;
bool m_active;
- QPtrVector< Row > m_rowArray;
+ TQPtrVector< Row > m_rowArray;
/** The list of page boundaries.
* Each page the table spans has an entry in this list which points to the last _line_
@@ -578,9 +579,9 @@ private:
* For a 1 page table there is no page break; and therefor for such tables this list is
* empty.
*/
- QValueList<unsigned int> m_pageBoundaries;
+ TQValueList<unsigned int> m_pageBoundaries;
unsigned int m_redrawFromCol;
- QValueList<double> m_rowPositions, m_colPositions;
+ TQValueList<double> m_rowPositions, m_colPositions;
};
@@ -671,8 +672,8 @@ public:
class RemovedColumn {
- QPtrList<KWTableFrameSet::Cell> m_column;
- QValueList<bool> m_removed;
+ TQPtrList<KWTableFrameSet::Cell> m_column;
+ TQValueList<bool> m_removed;
uint m_index;
double m_width;
bool m_initialized;
@@ -704,25 +705,25 @@ public:
KWFrameSetEdit* currentCell() const { return m_currentCell; }
// Forward all events to the current cell
- virtual void keyPressEvent( QKeyEvent * e );
- virtual void keyReleaseEvent( QKeyEvent * e );
- virtual void imStartEvent( QIMEvent* e );
- virtual void imComposeEvent( QIMEvent* e );
- virtual void imEndEvent( QIMEvent* e );
- virtual void mousePressEvent( QMouseEvent * e, const QPoint &, const KoPoint & );
- virtual void mouseMoveEvent( QMouseEvent * e, const QPoint & n, const KoPoint & d )
+ virtual void keyPressEvent( TQKeyEvent * e );
+ virtual void keyReleaseEvent( TQKeyEvent * e );
+ virtual void imStartEvent( TQIMEvent* e );
+ virtual void imComposeEvent( TQIMEvent* e );
+ virtual void imEndEvent( TQIMEvent* e );
+ virtual void mousePressEvent( TQMouseEvent * e, const TQPoint &, const KoPoint & );
+ virtual void mouseMoveEvent( TQMouseEvent * e, const TQPoint & n, const KoPoint & d )
{ if ( m_currentCell ) m_currentCell->mouseMoveEvent( e, n, d ); }
- virtual void mouseReleaseEvent( QMouseEvent * e, const QPoint & n, const KoPoint & d )
+ virtual void mouseReleaseEvent( TQMouseEvent * e, const TQPoint & n, const KoPoint & d )
{ if ( m_currentCell ) m_currentCell->mouseReleaseEvent( e, n, d ); }
- virtual void mouseDoubleClickEvent( QMouseEvent * e, const QPoint & n, const KoPoint & d )
+ virtual void mouseDoubleClickEvent( TQMouseEvent * e, const TQPoint & n, const KoPoint & d )
{ if ( m_currentCell ) m_currentCell->mouseDoubleClickEvent( e, n, d ); } // TODO check current cell
- virtual void dragEnterEvent( QDragEnterEvent * e )
+ virtual void dragEnterEvent( TQDragEnterEvent * e )
{ if ( m_currentCell ) m_currentCell->dragEnterEvent( e ); }
- virtual void dragMoveEvent( QDragMoveEvent * e, const QPoint &n, const KoPoint &d );
- virtual void dragLeaveEvent( QDragLeaveEvent * e )
+ virtual void dragMoveEvent( TQDragMoveEvent * e, const TQPoint &n, const KoPoint &d );
+ virtual void dragLeaveEvent( TQDragLeaveEvent * e )
{ if ( m_currentCell ) m_currentCell->dragLeaveEvent( e ); }
- virtual void dropEvent( QDropEvent * e, const QPoint &n, const KoPoint &d, KWView* view )
+ virtual void dropEvent( TQDropEvent * e, const TQPoint &n, const KoPoint &d, KWView* view )
{ if ( m_currentCell ) m_currentCell->dropEvent( e, n, d, view ); } // TODO check current cell
virtual void focusInEvent() { if ( m_currentCell ) m_currentCell->focusInEvent(); }
@@ -738,7 +739,7 @@ public:
/// Set the cell which is currently being edited
void setCurrentCell( const KoPoint & dPoint );
- void showPopup( KWFrame* frame, KWView* view, const QPoint & _point );
+ void showPopup( KWFrame* frame, KWView* view, const TQPoint & _point );
protected:
KWFrameSetEdit * m_currentCell;
diff --git a/kword/KWTableStyle.cpp b/kword/KWTableStyle.cpp
index d8bb83a8..dd446669 100644
--- a/kword/KWTableStyle.cpp
+++ b/kword/KWTableStyle.cpp
@@ -28,17 +28,17 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qdom.h>
+#include <tqdom.h>
KWTableStyleCollection::KWTableStyleCollection()
- : KoUserStyleCollection( QString::fromLatin1( "table" ) )
+ : KoUserStyleCollection( TQString::tqfromLatin1( "table" ) )
{
}
void KWTableStyleCollection::saveOasis( KoGenStyles& mainStyles, KoSavingContext& savingContext ) const
{
if ( !isDefault() ) {
- for ( QValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt )
+ for ( TQValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt )
{
KWTableStyle* style = static_cast<KWTableStyle *>( *styleIt );
style->saveOasis( mainStyles, savingContext );
@@ -48,14 +48,14 @@ void KWTableStyleCollection::saveOasis( KoGenStyles& mainStyles, KoSavingContext
int KWTableStyleCollection::loadOasisStyles( KoOasisContext& context, const KoStyleCollection& paragraphStyles, const KWFrameStyleCollection& frameStyles )
{
- QValueVector<QDomElement> userStyles = context.oasisStyles().userStyles();
+ TQValueVector<TQDomElement> userStyles = context.oasisStyles().userStyles();
bool defaultStyleDeleted = false;
int stylesLoaded = 0;
for (unsigned int item = 0; item < userStyles.count(); item++) {
- QDomElement styleElem = userStyles[item];
+ TQDomElement styleElem = userStyles[item];
Q_ASSERT( !styleElem.isNull() );
- if ( styleElem.attributeNS( KoXmlNS::style, "family", QString::null ) != "table-cell" )
+ if ( styleElem.attributeNS( KoXmlNS::style, "family", TQString() ) != "table-cell" )
continue;
if ( !defaultStyleDeleted ) {
@@ -66,7 +66,7 @@ int KWTableStyleCollection::loadOasisStyles( KoOasisContext& context, const KoSt
defaultStyleDeleted = true;
}
- KWTableStyle *sty = new KWTableStyle( QString::null, 0, 0 );
+ KWTableStyle *sty = new KWTableStyle( TQString(), 0, 0 );
// Load the style
sty->loadOasis( styleElem, context, paragraphStyles, frameStyles );
// Style created, now let's try to add it
@@ -82,24 +82,24 @@ int KWTableStyleCollection::loadOasisStyles( KoOasisContext& context, const KoSt
/* Class: KWTableStyle */
/******************************************************************/
-KWTableStyle::KWTableStyle( const QString & name, KoParagStyle * _paragStyle, KWFrameStyle * _frameStyle )
+KWTableStyle::KWTableStyle( const TQString & name, KoParagStyle * _paragStyle, KWFrameStyle * _frameStyle )
: KoUserStyle( name )
{
m_paragStyle = _paragStyle;
m_frameStyle = _frameStyle;
}
-KWTableStyle::KWTableStyle( QDomElement & parentElem, KWDocument *_doc, int /*docVersion*/ )
- : KoUserStyle( QString::null )
+KWTableStyle::KWTableStyle( TQDomElement & tqparentElem, KWDocument *_doc, int /*docVersion*/ )
+ : KoUserStyle( TQString() )
{
- QDomElement element = parentElem.namedItem( "NAME" ).toElement();
+ TQDomElement element = tqparentElem.namedItem( "NAME" ).toElement();
if ( ( !element.isNull() ) && ( element.hasAttribute("value") ) ) {
m_name = element.attribute( "value" );
m_displayName = i18n( "Style name", m_name.utf8() );
} else
kdWarning() << "No NAME tag in table style!" << endl;
- element = parentElem.namedItem( "PFRAMESTYLE" ).toElement();
+ element = tqparentElem.namedItem( "PFRAMESTYLE" ).toElement();
m_frameStyle = 0;
if ( ( !element.isNull() ) && ( element.hasAttribute("name") ) )
m_frameStyle = _doc->frameStyleCollection()->findStyleByDisplayName( element.attribute( "name" ) );
@@ -109,17 +109,17 @@ KWTableStyle::KWTableStyle( QDomElement & parentElem, KWDocument *_doc, int /*do
m_frameStyle = _doc->frameStyleCollection()->frameStyleAt( 0 );
else { // Isn't possible ( I hope )
KWFrameStyle * standardFrameStyle = new KWFrameStyle( "Plain" );
- standardFrameStyle->setBackgroundColor(QColor("white"));
- standardFrameStyle->setTopBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
- standardFrameStyle->setRightBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
- standardFrameStyle->setLeftBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
- standardFrameStyle->setBottomBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setBackgroundColor(TQColor("white"));
+ standardFrameStyle->setTopBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setRightBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setLeftBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setBottomBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
_doc->frameStyleCollection()->addStyle( standardFrameStyle );
m_frameStyle = _doc->frameStyleCollection()->frameStyleAt( 0 );
}
}
- element = parentElem.namedItem( "PSTYLE" ).toElement();
+ element = tqparentElem.namedItem( "PSTYLE" ).toElement();
m_paragStyle = 0;
if ( ( !element.isNull() ) && ( element.hasAttribute("name") ) )
m_paragStyle = _doc->styleCollection()->findStyleByDisplayName( element.attribute( "name" ) );
@@ -143,31 +143,31 @@ void KWTableStyle::operator=( const KWTableStyle &rhs )
m_frameStyle = rhs.frameStyle();
}
-void KWTableStyle::saveTableStyle( QDomElement & parentElem )
+void KWTableStyle::saveTableStyle( TQDomElement & tqparentElem )
{
- QDomDocument doc = parentElem.ownerDocument();
- QDomElement element = doc.createElement( "NAME" );
- parentElem.appendChild( element );
+ TQDomDocument doc = tqparentElem.ownerDocument();
+ TQDomElement element = doc.createElement( "NAME" );
+ tqparentElem.appendChild( element );
element.setAttribute( "value", displayName() );
if (m_frameStyle)
{
element = doc.createElement( "PFRAMESTYLE" );
- parentElem.appendChild( element );
+ tqparentElem.appendChild( element );
element.setAttribute( "name", m_frameStyle->displayName() );
}
if (m_paragStyle)
{
element = doc.createElement( "PSTYLE" );
- parentElem.appendChild( element );
+ tqparentElem.appendChild( element );
element.setAttribute( "name", m_paragStyle->displayName() );
}
}
-KWTableStyle *KWTableStyle::loadStyle( QDomElement & parentElem, KWDocument *_doc, int docVersion )
+KWTableStyle *KWTableStyle::loadStyle( TQDomElement & tqparentElem, KWDocument *_doc, int docVersion )
{
- return new KWTableStyle( parentElem, _doc, docVersion );
+ return new KWTableStyle( tqparentElem, _doc, docVersion );
}
void KWTableStyle::saveOasis( KoGenStyles& mainStyles, KoSavingContext& /*savingContext*/ ) const
@@ -181,8 +181,8 @@ void KWTableStyle::saveOasis( KoGenStyles& mainStyles, KoSavingContext& /*saving
// try to preserve existing internal name, if it looks adequate (no spaces)
// ## TODO: check XML-Schemacs NCName conformity
- const bool nameIsConform = !m_name.isEmpty() && m_name.find( ' ' ) == -1;
- QString newName;
+ const bool nameIsConform = !m_name.isEmpty() && m_name.tqfind( ' ' ) == -1;
+ TQString newName;
if ( nameIsConform )
newName = mainStyles.lookup( tableCellStyle, m_name, KoGenStyles::DontForceNumbering );
else
@@ -190,11 +190,11 @@ void KWTableStyle::saveOasis( KoGenStyles& mainStyles, KoSavingContext& /*saving
const_cast<KWTableStyle*>( this )->m_name = newName;
}
-void KWTableStyle::loadOasis( QDomElement & styleElem, KoOasisContext& context, const KoStyleCollection& paragraphStyles, const KWFrameStyleCollection& frameStyles )
+void KWTableStyle::loadOasis( TQDomElement & styleElem, KoOasisContext& context, const KoStyleCollection& paragraphStyles, const KWFrameStyleCollection& frameStyles )
{
// Load name
- m_name = styleElem.attributeNS( KoXmlNS::style, "name", QString::null );
- m_displayName = styleElem.attributeNS( KoXmlNS::style, "display-name", QString::null );
+ m_name = styleElem.attributeNS( KoXmlNS::style, "name", TQString() );
+ m_displayName = styleElem.attributeNS( KoXmlNS::style, "display-name", TQString() );
if ( m_displayName.isEmpty() )
m_displayName = m_name;
kdDebug() << k_funcinfo << m_name << " " << m_displayName << endl;
@@ -203,14 +203,14 @@ void KWTableStyle::loadOasis( QDomElement & styleElem, KoOasisContext& context,
styleStack.setTypeProperties( "table-cell" );
styleStack.save();
- context.addStyles( &styleElem, "table-cell" ); // Load all parents - only because we don't support inheritance.
+ context.addStyles( &styleElem, "table-cell" ); // Load all tqparents - only because we don't support inheritance.
- const QString frameStyleName = styleStack.attributeNS( KoXmlNS::koffice, "frame-style-name" );
+ const TQString frameStyleName = styleStack.attributeNS( KoXmlNS::koffice, "frame-style-name" );
m_frameStyle = frameStyles.findStyle( frameStyleName );
if ( !m_frameStyle )
kdWarning(32001) << "Frame style " << frameStyleName << " not found!" << endl;
- const QString paragraphStyleName = styleStack.attributeNS( KoXmlNS::koffice, "paragraph-style-name" );
+ const TQString paragraphStyleName = styleStack.attributeNS( KoXmlNS::koffice, "paragraph-style-name" );
m_paragStyle = paragraphStyles.findStyle( paragraphStyleName );
if ( !m_paragStyle )
kdWarning(32001) << "Paragraph style " << paragraphStyleName << " not found!" << endl;
diff --git a/kword/KWTableStyle.h b/kword/KWTableStyle.h
index b63d8e0c..2fe1f26d 100644
--- a/kword/KWTableStyle.h
+++ b/kword/KWTableStyle.h
@@ -24,9 +24,9 @@
#include "KWFrameStyle.h"
#include <KoParagStyle.h>
-#include <qdom.h>
-#include <qptrlist.h>
-#include <qbrush.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
+#include <tqbrush.h>
class KWFrameStyleCollection;
class KoStyleCollection;
@@ -48,12 +48,12 @@ class KWTableStyle : public KoUserStyle
{
public:
/** Create a blank framestyle (with default attributes) */
- KWTableStyle( const QString & name, KoParagStyle * _style, KWFrameStyle * _frameStyle );
+ KWTableStyle( const TQString & name, KoParagStyle * _style, KWFrameStyle * _frameStyle );
- KWTableStyle( QDomElement & parentElem, KWDocument *_doc, int docVersion=2 );
+ KWTableStyle( TQDomElement & tqparentElem, KWDocument *_doc, int docVersion=2 );
/** Copy another framestyle */
- KWTableStyle( const KWTableStyle & rhs ) : KoUserStyle( QString::null ) { *this = rhs; }
+ KWTableStyle( const KWTableStyle & rhs ) : KoUserStyle( TQString() ) { *this = rhs; }
~KWTableStyle() {}
@@ -67,14 +67,14 @@ public:
void setFrameStyle( KWFrameStyle *frameStyle ) { m_frameStyle = frameStyle; }
/// save (old xml format)
- void saveTableStyle( QDomElement & parentElem );
+ void saveTableStyle( TQDomElement & tqparentElem );
/// save (new oasis xml format)
void saveOasis( KoGenStyles& mainStyles, KoSavingContext& savingContext ) const;
/// load (old xml format)
- static KWTableStyle *loadStyle( QDomElement & parentElem, KWDocument *_doc, int docVersion=2 );
+ static KWTableStyle *loadStyle( TQDomElement & tqparentElem, KWDocument *_doc, int docVersion=2 );
/// load (new oasis xml format)
- void loadOasis( QDomElement & styleElem, KoOasisContext& context, const KoStyleCollection& paragraphStyles, const KWFrameStyleCollection& frameStyles );
+ void loadOasis( TQDomElement & styleElem, KoOasisContext& context, const KoStyleCollection& paragraphStyles, const KWFrameStyleCollection& frameStyles );
private:
KoParagStyle *m_paragStyle;
@@ -89,13 +89,13 @@ class KWTableStyleCollection : public KoUserStyleCollection
public:
KWTableStyleCollection();
- static QString defaultStyleName() { return QString::fromLatin1( "Plain" ); }
+ static TQString defaultStyleName() { return TQString::tqfromLatin1( "Plain" ); }
/**
* Find style based on the untranslated name @p name.
* Overloaded for convenience
*/
- KWTableStyle* findStyle( const QString & name ) const {
+ KWTableStyle* findStyle( const TQString & name ) const {
return static_cast<KWTableStyle*>( KoUserStyleCollection::findStyle( name, defaultStyleName() ) );
}
@@ -105,7 +105,7 @@ public:
* This is only for the old XML loading.
* Overloaded for convenience
*/
- KWTableStyle* findStyleByDisplayName( const QString & name ) const {
+ KWTableStyle* findStyleByDisplayName( const TQString & name ) const {
return static_cast<KWTableStyle*>( KoUserStyleCollection::findStyleByDisplayName( name ) );
}
diff --git a/kword/KWTableStyleManager.cpp b/kword/KWTableStyleManager.cpp
index 7a2a6494..d2a0c1ea 100644
--- a/kword/KWTableStyleManager.cpp
+++ b/kword/KWTableStyleManager.cpp
@@ -34,26 +34,26 @@
#include <kiconloader.h>
#include <kdebug.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qpainter.h>
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qframe.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqpainter.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqframe.h>
/******************************************************************/
/* Class: KWTableStylePreview */
/******************************************************************/
-KWTableStylePreview::KWTableStylePreview( const QString& title, const QString& text, QWidget* parent, const char* name )
- : QGroupBox( title, parent, name )
+KWTableStylePreview::KWTableStylePreview( const TQString& title, const TQString& text, TQWidget* tqparent, const char* name )
+ : TQGroupBox( title, tqparent, name )
{
m_zoomHandler = new KoTextZoomHandler;
- QFont font = KoGlobal::defaultFont();
- m_textdoc = new KoTextDocument( m_zoomHandler, new KoTextFormatCollection( font, QColor(),KGlobal::locale()->language(), false ) );
+ TQFont font = KoGlobal::defaultFont();
+ m_textdoc = new KoTextDocument( m_zoomHandler, new KoTextFormatCollection( font, TQColor(),KGlobal::locale()->language(), false ) );
KoTextParag * parag = m_textdoc->firstParag();
parag->insert( 0, text );
}
@@ -65,12 +65,12 @@ KWTableStylePreview::~KWTableStylePreview()
}
#undef ptToPx
-#define ptToPx qRound
+#define ptToPx tqRound
-void KWTableStylePreview::drawContents( QPainter *p )
+void KWTableStylePreview::drawContents( TQPainter *p )
{
p->save();
- QRect r = contentsRect();
+ TQRect r = contentsRect();
int wid = ( r.width() - 40 );
int hei = ( r.height() - 40 );
@@ -78,7 +78,7 @@ void KWTableStylePreview::drawContents( QPainter *p )
// 1: create document background = white
- p->fillRect( QRect( 10, 20, r.width()-20, r.height() - 20 ), QColor("white") );
+ p->fillRect( TQRect( 10, 20, r.width()-20, r.height() - 20 ), TQColor("white") );
// 2: create borders (KWFrameStyle)
@@ -105,8 +105,8 @@ void KWTableStylePreview::drawContents( QPainter *p )
// 3: create background whithin "frame"
- QRect fr( QPoint(20 + int(ceil(tableStyle->frameStyle()->leftBorder().width()/2)), 30 + int(ceil(tableStyle->frameStyle()->topBorder().width()/2))),
- QPoint(20 + wid - int(floor(tableStyle->frameStyle()->rightBorder().width()/2)+1), 30 + hei - int(floor(tableStyle->frameStyle()->bottomBorder().width()/2)+1)) );
+ TQRect fr( TQPoint(20 + int(ceil(tableStyle->frameStyle()->leftBorder().width()/2)), 30 + int(ceil(tableStyle->frameStyle()->topBorder().width()/2))),
+ TQPoint(20 + wid - int(floor(tableStyle->frameStyle()->rightBorder().width()/2)+1), 30 + hei - int(floor(tableStyle->frameStyle()->bottomBorder().width()/2)+1)) );
p->fillRect( fr, tableStyle->frameStyle()->backgroundColor() );
@@ -118,20 +118,20 @@ void KWTableStylePreview::drawContents( QPainter *p )
{
// For centering to work, and to even get word wrapping when the thing is too big :)
m_textdoc->setWidth( widthLU );
- parag->invalidate(0);
+ parag->tqinvalidate(0);
}
parag->format();
- QRect textRect = parag->pixelRect( m_zoomHandler );
+ TQRect textRect = parag->pixelRect( m_zoomHandler );
- // Center vertically, but not horizontally, to keep the parag alignment working,
- textRect.moveTopLeft( QPoint( fr.x(), fr.y() + ( fr.height() - textRect.height() ) / 2 ) );
+ // Center vertically, but not horizontally, to keep the parag tqalignment working,
+ textRect.moveTopLeft( TQPoint( fr.x(), fr.y() + ( fr.height() - textRect.height() ) / 2 ) );
p->setClipRect( textRect.intersect( fr ) );
p->translate( textRect.x(), textRect.y() );
- QColorGroup cg = QApplication::palette().active();
- cg.setBrush( QColorGroup::Base, tableStyle->frameStyle()->backgroundColor() );
+ TQColorGroup cg = TQApplication::tqpalette().active();
+ cg.setBrush( TQColorGroup::Base, tableStyle->frameStyle()->backgroundColor() );
m_textdoc->drawWYSIWYG( p, 1, 0, textRect.width() - 1, textRect.height(), cg, m_zoomHandler );
@@ -145,7 +145,7 @@ void KWTableStylePreview::setTableStyle( KWTableStyle *_tableStyle )
KoTextParag * parag = m_textdoc->firstParag();
parag->applyStyle( tableStyle->paragraphStyle() );
- repaint(true);
+ tqrepaint(true);
}
/******************************************************************/
@@ -182,7 +182,7 @@ void KWTableStyleListItem::apply()
// Proof reader comment: stylist sounds like a hair dresser
-KWTableStyleManager::KWTableStyleManager( QWidget *_parent, KWDocument *_doc )
+KWTableStyleManager::KWTableStyleManager( TQWidget *_parent, KWDocument *_doc )
: KDialogBase( _parent, "Tablestylist", true,
i18n("Table Style Manager"),
KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::User1 )
@@ -199,9 +199,9 @@ KWTableStyleManager::KWTableStyleManager( QWidget *_parent, KWDocument *_doc )
m_stylesList->setCurrentItem( 0 );
noSignals=false;
switchStyle();
- setInitialSize( QSize( 450, 450 ) );
+ setInitialSize( TQSize( 450, 450 ) );
setButtonText( KDialogBase::User1, i18n("Import From File...") );
- connect(this, SIGNAL(user1Clicked()), this, SLOT(importFromFile()));
+ connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(importFromFile()));
}
@@ -213,18 +213,18 @@ KWTableStyleManager::~KWTableStyleManager()
void KWTableStyleManager::setupWidget()
{
- QFrame * frame1 = makeMainWidget();
- QGridLayout *frame1Layout = new QGridLayout( frame1, 0, 0, // auto
+ TQFrame * frame1 = makeMainWidget();
+ TQGridLayout *frame1Layout = new TQGridLayout( frame1, 0, 0, // auto
0, KDialog::spacingHint() );
KWTableStyleCollection* collection = m_doc->tableStyleCollection();
numTableStyles = collection->count();
- m_stylesList = new QListBox( frame1, "stylesList" );
+ m_stylesList = new TQListBox( frame1, "stylesList" );
m_stylesList->insertStringList( collection->displayNameList() );
- const QValueList<KoUserStyle*> styleList = collection->styleList();
+ const TQValueList<KoUserStyle*> styleList = collection->styleList();
Q_ASSERT( !styleList.isEmpty() );
- for ( QValueList<KoUserStyle *>::const_iterator it = styleList.begin(), end = styleList.end();
+ for ( TQValueList<KoUserStyle *>::const_iterator it = styleList.begin(), end = styleList.end();
it != end ; ++it )
{
KWTableStyle* style = static_cast<KWTableStyle *>( *it );
@@ -237,88 +237,88 @@ void KWTableStyleManager::setupWidget()
frame1Layout->addMultiCellWidget( m_stylesList, 0, 0, 0, 1 );
- m_moveUpButton = new QPushButton( frame1, "moveUpButton" );
+ m_moveUpButton = new TQPushButton( frame1, "moveUpButton" );
m_moveUpButton->setIconSet( SmallIconSet( "up" ) );
- connect( m_moveUpButton, SIGNAL( clicked() ), this, SLOT( moveUpStyle() ) );
+ connect( m_moveUpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( moveUpStyle() ) );
frame1Layout->addWidget( m_moveUpButton, 1, 1 );
- m_moveDownButton = new QPushButton( frame1, "moveDownButton" );
+ m_moveDownButton = new TQPushButton( frame1, "moveDownButton" );
m_moveDownButton->setIconSet( SmallIconSet( "down" ) );
- connect( m_moveDownButton, SIGNAL( clicked() ), this, SLOT( moveDownStyle() ) );
+ connect( m_moveDownButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( moveDownStyle() ) );
frame1Layout->addWidget( m_moveDownButton, 1, 0 );
- m_deleteButton = new QPushButton( frame1, "deleteButton" );
+ m_deleteButton = new TQPushButton( frame1, "deleteButton" );
m_deleteButton->setText( i18n( "&Delete" ) );
- connect( m_deleteButton, SIGNAL( clicked() ), this, SLOT( deleteStyle() ) );
+ connect( m_deleteButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deleteStyle() ) );
frame1Layout->addWidget( m_deleteButton, 2, 1 );
- m_newButton = new QPushButton( frame1, "newButton" );
+ m_newButton = new TQPushButton( frame1, "newButton" );
m_newButton->setText( i18n( "New" ) );
- connect( m_newButton, SIGNAL( clicked() ), this, SLOT( addStyle() ) );
+ connect( m_newButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addStyle() ) );
frame1Layout->addWidget( m_newButton, 2, 0 );
- main = new QWidget( frame1 );
+ main = new TQWidget( frame1 );
setupMain();
frame1Layout->addMultiCellWidget( main, 0, 2, 2, 2 );
- connect( m_stylesList, SIGNAL( selectionChanged() ), this, SLOT( switchStyle() ) );
+ connect( m_stylesList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( switchStyle() ) );
}
void KWTableStyleManager::setupMain()
{
- QGridLayout *mainLayout = new QGridLayout( main );
+ TQGridLayout *mainLayout = new TQGridLayout( main );
mainLayout->setSpacing( KDialog::spacingHint() );
preview = new KWTableStylePreview( i18n("Preview"), i18n("Tablestyles preview"), main );
- preview->resize(preview->sizeHint());
+ preview->resize(preview->tqsizeHint());
mainLayout->addMultiCellWidget( preview, 1, 1, 0, 1 );
- m_nameString = new QLineEdit( main );
- m_nameString->resize(m_nameString->sizeHint() );
- connect( m_nameString, SIGNAL( textChanged( const QString &) ), this, SLOT( renameStyle(const QString &) ) );
+ m_nameString = new TQLineEdit( main );
+ m_nameString->resize(m_nameString->tqsizeHint() );
+ connect( m_nameString, TQT_SIGNAL( textChanged( const TQString &) ), this, TQT_SLOT( renameStyle(const TQString &) ) );
mainLayout->addWidget( m_nameString, 0, 1 );
- QLabel *nameLabel = new QLabel( main );
+ TQLabel *nameLabel = new TQLabel( main );
nameLabel->setText( i18n( "Name:" ) );
- nameLabel->resize(nameLabel->sizeHint());
- nameLabel->setAlignment( AlignRight | AlignVCenter );
+ nameLabel->resize(nameLabel->tqsizeHint());
+ nameLabel->tqsetAlignment( AlignRight | AlignVCenter );
mainLayout->addWidget( nameLabel, 0, 0 );
- QGroupBox *adjustBox = new QGroupBox( 0, Qt::Vertical, i18n("Adjust"), main);
- adjustBox->layout()->setSpacing(KDialog::spacingHint());
- adjustBox->layout()->setMargin(KDialog::marginHint());
- QGridLayout *adjustLayout = new QGridLayout( adjustBox->layout() );
+ TQGroupBox *adjustBox = new TQGroupBox( 0, Qt::Vertical, i18n("Adjust"), main);
+ adjustBox->tqlayout()->setSpacing(KDialog::spacingHint());
+ adjustBox->tqlayout()->setMargin(KDialog::marginHint());
+ TQGridLayout *adjustLayout = new TQGridLayout( adjustBox->tqlayout() );
- QLabel *frameStyleLabel = new QLabel( adjustBox );
+ TQLabel *frameStyleLabel = new TQLabel( adjustBox );
frameStyleLabel->setText( i18n( "Framestyle:" ) );
- frameStyleLabel->setAlignment( AlignRight | AlignVCenter );
+ frameStyleLabel->tqsetAlignment( AlignRight | AlignVCenter );
- QLabel *styleLabel = new QLabel( adjustBox );
+ TQLabel *styleLabel = new TQLabel( adjustBox );
styleLabel->setText( i18n( "Textstyle:" ) );
- styleLabel->setAlignment( AlignRight | AlignVCenter );
+ styleLabel->tqsetAlignment( AlignRight | AlignVCenter );
- m_frameStyle = new QComboBox( adjustBox );
- m_style = new QComboBox( adjustBox );
+ m_frameStyle = new TQComboBox( adjustBox );
+ m_style = new TQComboBox( adjustBox );
updateAllStyleCombos();
- connect( m_frameStyle, SIGNAL( activated(int) ), this, SLOT( selectFrameStyle(int) ) );
- connect( m_style, SIGNAL( activated(int) ), this, SLOT( selectStyle(int) ) );
+ connect( m_frameStyle, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( selectFrameStyle(int) ) );
+ connect( m_style, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( selectStyle(int) ) );
- m_changeFrameStyleButton = new QPushButton( adjustBox );
+ m_changeFrameStyleButton = new TQPushButton( adjustBox );
m_changeFrameStyleButton->setText( i18n( "Change..." ) );
- connect( m_changeFrameStyleButton, SIGNAL( clicked() ), this, SLOT( changeFrameStyle() ) );
+ connect( m_changeFrameStyleButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( changeFrameStyle() ) );
- m_changeStyleButton = new QPushButton( adjustBox );
+ m_changeStyleButton = new TQPushButton( adjustBox );
m_changeStyleButton->setText( i18n( "Change..." ) );
- connect( m_changeStyleButton, SIGNAL( clicked() ), this, SLOT( changeStyle() ) );
+ connect( m_changeStyleButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( changeStyle() ) );
adjustLayout->addWidget( frameStyleLabel, 0, 0 );
adjustLayout->addWidget( styleLabel, 1, 0 );
@@ -412,7 +412,7 @@ void KWTableStyleManager::addStyle()
save();
KWTableStyleCollection* collection = m_doc->tableStyleCollection();
- QString str = i18n( "New Tablestyle Template (%1)" ).arg(numTableStyles++);
+ TQString str = i18n( "New Tablestyle Template (%1)" ).tqarg(numTableStyles++);
if ( m_currentTableStyle )
{
m_currentTableStyle = new KWTableStyle( *m_currentTableStyle );
@@ -442,7 +442,7 @@ void KWTableStyleManager::addStyle()
void KWTableStyleManager::importFromFile()
{
- QStringList lst;
+ TQStringList lst;
for (unsigned int i = 0; i<m_stylesList->count();i++)
{
lst << m_stylesList->text(i );
@@ -450,16 +450,16 @@ void KWTableStyleManager::importFromFile()
KWImportFrameTableStyleDia dia( m_doc, lst, KWImportFrameTableStyleDia::TableStyle, this, 0 );
if ( dia.listOfTableStyleImported().count() > 0 && dia.exec() ) {
- QPtrList<KWTableStyle> list = dia.listOfTableStyleImported();
+ TQPtrList<KWTableStyle> list = dia.listOfTableStyleImported();
addStyles( list);
}
}
-void KWTableStyleManager::addStyles(const QPtrList<KWTableStyle> &listStyle )
+void KWTableStyleManager::addStyles(const TQPtrList<KWTableStyle> &listStyle )
{
save();
- QPtrListIterator<KWTableStyle> style( listStyle );
+ TQPtrListIterator<KWTableStyle> style( listStyle );
for ( ; style.current() ; ++style )
{
noSignals=true;
@@ -499,9 +499,9 @@ void KWTableStyleManager::moveUpStyle()
if ( m_currentTableStyle )
save();
- const QString currentStyleName = m_currentTableStyle->name();
- const QString currentStyleDisplayName = m_stylesList->currentText();
- int pos2 = m_styleOrder.findIndex( currentStyleName );
+ const TQString currentStyleName = m_currentTableStyle->name();
+ const TQString currentStyleDisplayName = m_stylesList->currentText();
+ int pos2 = m_styleOrder.tqfindIndex( currentStyleName );
if ( pos2 != -1 )
{
m_styleOrder.remove( m_styleOrder.at(pos2) );
@@ -527,9 +527,9 @@ void KWTableStyleManager::moveDownStyle()
if ( m_currentTableStyle )
save();
- const QString currentStyleName = m_currentTableStyle->name();
- const QString currentStyleDisplayName = m_stylesList->currentText();
- int pos2 = m_styleOrder.findIndex( currentStyleName );
+ const TQString currentStyleName = m_currentTableStyle->name();
+ const TQString currentStyleDisplayName = m_stylesList->currentText();
+ int pos2 = m_styleOrder.tqfindIndex( currentStyleName );
if ( pos2 != -1 )
{
m_styleOrder.remove( m_styleOrder.at(pos2) );
@@ -582,7 +582,7 @@ void KWTableStyleManager::apply() {
noSignals=false;
}
-void KWTableStyleManager::renameStyle(const QString &theText) {
+void KWTableStyleManager::renameStyle(const TQString &theText) {
if(noSignals) return;
noSignals=true;
@@ -657,8 +657,8 @@ void KWTableStyleManager::updateAllStyleCombos()
{
unsigned int oldSindex = 0;
unsigned int oldFSindex = 0;
- QString oldS = "";
- QString oldFS = "";
+ TQString oldS = "";
+ TQString oldFS = "";
if (m_style->currentItem()>=0) {
oldSindex = m_style->currentItem();
@@ -677,12 +677,12 @@ void KWTableStyleManager::updateAllStyleCombos()
// - 1. Count is the same, but the user has delete the same number as he added
// - 2. Old name is not in new list, old index is wrong index in new list
if ( ( static_cast<unsigned int>(m_style->count())!=m_doc->styleCollection()->styleList().count() ) &&
- ( m_style->listBox()->findItem( oldS ) ) ) {
- oldSindex = m_style->listBox()->index( m_style->listBox()->findItem( oldS ) );
+ ( m_style->listBox()->tqfindItem( oldS ) ) ) {
+ oldSindex = m_style->listBox()->index( m_style->listBox()->tqfindItem( oldS ) );
}
if ( ( m_frameStyle->count() != m_doc->frameStyleCollection()->count() ) &&
- ( m_frameStyle->listBox()->findItem( oldFS ) ) ) {
- oldFSindex = m_frameStyle->listBox()->index( m_frameStyle->listBox()->findItem( oldFS ) );
+ ( m_frameStyle->listBox()->tqfindItem( oldFS ) ) ) {
+ oldFSindex = m_frameStyle->listBox()->index( m_frameStyle->listBox()->tqfindItem( oldFS ) );
}
// Update the comboboxes
diff --git a/kword/KWTableStyleManager.h b/kword/KWTableStyleManager.h
index aaa61083..4d95ca75 100644
--- a/kword/KWTableStyleManager.h
+++ b/kword/KWTableStyleManager.h
@@ -24,17 +24,17 @@
#include "KWTableStyle.h"
#include <kdialogbase.h>
-#include <qgroupbox.h>
-#include <qptrlist.h>
+#include <tqgroupbox.h>
+#include <tqptrlist.h>
-class QGridLayout;
-class QLineEdit;
-class QListBox;
-class QPushButton;
-class QWidget;
-class QFrame;
-class QComboBox;
+class TQGridLayout;
+class TQLineEdit;
+class TQListBox;
+class TQPushButton;
+class TQWidget;
+class TQFrame;
+class TQComboBox;
class KWDocument;
class KoParagStyle;
@@ -45,18 +45,19 @@ class KoTextDocument;
/* Class: KWTableStylePreview */
/******************************************************************/
-class KWTableStylePreview : public QGroupBox
+class KWTableStylePreview : public TQGroupBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWTableStylePreview(const QString &title, const QString &text, QWidget *parent, const char* name = 0);
+ KWTableStylePreview(const TQString &title, const TQString &text, TQWidget *tqparent, const char* name = 0);
virtual ~KWTableStylePreview();
void setTableStyle(KWTableStyle *_tableStyle);
protected:
- void drawContents( QPainter *p );
+ void drawContents( TQPainter *p );
KWTableStyle *tableStyle;
@@ -96,9 +97,10 @@ class KWTableStyleListItem
class KWTableStyleManager : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWTableStyleManager( QWidget *_parent, KWDocument *_doc );
+ KWTableStyleManager( TQWidget *_parent, KWDocument *_doc );
~KWTableStyleManager();
private:
@@ -110,26 +112,26 @@ private:
void save();
int tableStyleIndex( int pos );
- void addStyles(const QPtrList<KWTableStyle> &listStyle );
-
- QListBox *m_stylesList;
- QLineEdit *m_nameString;
- QPushButton *m_deleteButton;
- QPushButton *m_newButton;
- QPushButton *m_moveUpButton;
- QPushButton *m_moveDownButton;
- QComboBox *m_frameStyle;
- QComboBox *m_style;
- QPushButton *m_changeFrameStyleButton;
- QPushButton *m_changeStyleButton;
- QStringList m_styleOrder;
- QGroupBox *previewBox;
+ void addStyles(const TQPtrList<KWTableStyle> &listStyle );
+
+ TQListBox *m_stylesList;
+ TQLineEdit *m_nameString;
+ TQPushButton *m_deleteButton;
+ TQPushButton *m_newButton;
+ TQPushButton *m_moveUpButton;
+ TQPushButton *m_moveDownButton;
+ TQComboBox *m_frameStyle;
+ TQComboBox *m_style;
+ TQPushButton *m_changeFrameStyleButton;
+ TQPushButton *m_changeStyleButton;
+ TQStringList m_styleOrder;
+ TQGroupBox *previewBox;
KWTableStylePreview *preview;
- QWidget *main;
+ TQWidget *main;
KWTableStyle *m_currentTableStyle;
- QPtrList<KWTableStyleListItem> m_tableStyles;
+ TQPtrList<KWTableStyleListItem> m_tableStyles;
int numTableStyles;
bool noSignals;
@@ -148,7 +150,7 @@ protected slots:
void deleteStyle();
void moveUpStyle();
void moveDownStyle();
- void renameStyle(const QString &);
+ void renameStyle(const TQString &);
void setupMain();
void importFromFile();
};
diff --git a/kword/KWTableTemplate.cpp b/kword/KWTableTemplate.cpp
index 02bc428c..76eb224e 100644
--- a/kword/KWTableTemplate.cpp
+++ b/kword/KWTableTemplate.cpp
@@ -25,7 +25,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qdom.h>
+#include <tqdom.h>
/******************************************************************/
@@ -53,13 +53,13 @@ void KWTableTemplateCollection::clear()
m_lastTemplate = 0;
}
-KWTableTemplate* KWTableTemplateCollection::findTableTemplate( const QString & _name )
+KWTableTemplate* KWTableTemplateCollection::findTableTemplate( const TQString & _name )
{
// Caching, to speed things up
if ( m_lastTemplate && m_lastTemplate->name() == _name )
return m_lastTemplate;
- QPtrListIterator<KWTableTemplate> templateIt( m_templateList );
+ TQPtrListIterator<KWTableTemplate> templateIt( m_templateList );
for ( ; templateIt.current(); ++templateIt )
{
if ( templateIt.current()->name() == _name ) {
@@ -107,7 +107,7 @@ void KWTableTemplateCollection::removeTableTemplate ( KWTableTemplate *tt )
/* Class: KWTableTemplate */
/******************************************************************/
-KWTableTemplate::KWTableTemplate( const QString & name, KWTableStyle * _firstRow, KWTableStyle * _firstCol,
+KWTableTemplate::KWTableTemplate( const TQString & name, KWTableStyle * _firstRow, KWTableStyle * _firstCol,
KWTableStyle *_lastRow, KWTableStyle *_lastCol, KWTableStyle *_bodyCell,
KWTableStyle *_topLeftCorner, KWTableStyle *_topRightCorner,
KWTableStyle *_bottomLeftCorner, KWTableStyle *_bottomRightCorner )
@@ -124,18 +124,18 @@ KWTableTemplate::KWTableTemplate( const QString & name, KWTableStyle * _firstRow
m_bottomLeftCorner = _bottomLeftCorner;
}
-KWTableTemplate::KWTableTemplate( QDomElement & parentElem, KWDocument *_doc, int /*docVersion*/ )
+KWTableTemplate::KWTableTemplate( TQDomElement & tqparentElem, KWDocument *_doc, int /*docVersion*/ )
{
m_topRightCorner = 0L;
m_topLeftCorner = 0L;
m_bottomRightCorner = 0L;
m_bottomLeftCorner = 0L;
- QDomElement element = parentElem.namedItem( "NAME" ).toElement();
+ TQDomElement element = tqparentElem.namedItem( "NAME" ).toElement();
if ( ( !element.isNull() ) && ( element.hasAttribute("value") ) )
m_name = element.attribute( "value" );
- element = parentElem.namedItem( "BODYCELL" ).toElement();
+ element = tqparentElem.namedItem( "BODYCELL" ).toElement();
if ( ( !element.isNull() ) && ( element.hasAttribute("name") )
&& ( _doc->tableStyleCollection()->findStyle( element.attribute( "name" ) ) ) )
m_bodyCell = _doc->tableStyleCollection()->findStyle( element.attribute( "name" ) );
@@ -152,11 +152,11 @@ KWTableTemplate::KWTableTemplate( QDomElement & parentElem, KWDocument *_doc, in
ts->setFrameStyle( fs );
else {
KWFrameStyle * standardFrameStyle = new KWFrameStyle( "Plain" );
- standardFrameStyle->setBackgroundColor(QColor("white"));
- standardFrameStyle->setTopBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
- standardFrameStyle->setRightBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
- standardFrameStyle->setLeftBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
- standardFrameStyle->setBottomBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setBackgroundColor(TQColor("white"));
+ standardFrameStyle->setTopBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setRightBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setLeftBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setBottomBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
_doc->frameStyleCollection()->addStyle( standardFrameStyle );
ts->setFrameStyle( fs );
}
@@ -172,7 +172,7 @@ KWTableTemplate::KWTableTemplate( QDomElement & parentElem, KWDocument *_doc, in
setBodyCell ( ts );
}
}
- element = parentElem.namedItem( "FIRSTROW" ).toElement();
+ element = tqparentElem.namedItem( "FIRSTROW" ).toElement();
if ( ( !element.isNull() ) && ( element.hasAttribute("name") )
&& ( _doc->tableStyleCollection()->findStyle( element.attribute( "name" ) ) ) )
{
@@ -186,7 +186,7 @@ KWTableTemplate::KWTableTemplate( QDomElement & parentElem, KWDocument *_doc, in
else
m_firstRow = m_bodyCell;
- element = parentElem.namedItem( "FIRSTCOL" ).toElement();
+ element = tqparentElem.namedItem( "FIRSTCOL" ).toElement();
if ( ( !element.isNull() ) && ( element.hasAttribute("name") )
&& ( _doc->tableStyleCollection()->findStyle( element.attribute( "name" ) ) ) )
{
@@ -200,7 +200,7 @@ KWTableTemplate::KWTableTemplate( QDomElement & parentElem, KWDocument *_doc, in
else
m_firstCol = m_bodyCell;
- element = parentElem.namedItem( "LASTROW" ).toElement();
+ element = tqparentElem.namedItem( "LASTROW" ).toElement();
if ( ( !element.isNull() ) && ( element.hasAttribute("name") )
&& ( _doc->tableStyleCollection()->findStyle( element.attribute( "name" ) ) ) )
{
@@ -214,7 +214,7 @@ KWTableTemplate::KWTableTemplate( QDomElement & parentElem, KWDocument *_doc, in
else
m_lastRow = m_bodyCell;
- element = parentElem.namedItem( "LASTCOL" ).toElement();
+ element = tqparentElem.namedItem( "LASTCOL" ).toElement();
if ( ( !element.isNull() ) && ( element.hasAttribute("name") )
&& ( _doc->tableStyleCollection()->findStyle( element.attribute( "name" ) ) ) )
{
@@ -248,52 +248,52 @@ void KWTableTemplate::operator=( const KWTableTemplate &rhs )
m_bottomLeftCorner = rhs.pBottomLeftCorner();
}
-QString KWTableTemplate::displayName() const
+TQString KWTableTemplate::displayName() const
{
return i18n( "Style name", name().utf8() );
}
// TODO
-void KWTableTemplate::saveTableTemplate( QDomElement & parentElem )
+void KWTableTemplate::saveTableTemplate( TQDomElement & tqparentElem )
{
- QDomDocument doc = parentElem.ownerDocument();
- QDomElement element = doc.createElement( "NAME" );
- parentElem.appendChild( element );
+ TQDomDocument doc = tqparentElem.ownerDocument();
+ TQDomElement element = doc.createElement( "NAME" );
+ tqparentElem.appendChild( element );
element.setAttribute( "value", name() );
if (m_bodyCell)
{
element = doc.createElement( "BODYCELL" );
- parentElem.appendChild( element );
+ tqparentElem.appendChild( element );
element.setAttribute( "name", m_bodyCell->name() );
}
if (m_firstRow)
{
element = doc.createElement( "FIRSTROW" );
- parentElem.appendChild( element );
+ tqparentElem.appendChild( element );
element.setAttribute( "name", m_firstRow->name() );
}
if (m_firstCol)
{
element = doc.createElement( "FIRSTCOL" );
- parentElem.appendChild( element );
+ tqparentElem.appendChild( element );
element.setAttribute( "name", m_firstCol->name() );
}
if (m_lastRow)
{
element = doc.createElement( "LASTROW" );
- parentElem.appendChild( element );
+ tqparentElem.appendChild( element );
element.setAttribute( "name", m_lastRow->name() );
}
if (m_lastCol)
{
element = doc.createElement( "LASTCOL" );
- parentElem.appendChild( element );
+ tqparentElem.appendChild( element );
element.setAttribute( "name", m_lastCol->name() );
}
}
-KWTableTemplate *KWTableTemplate::loadTemplate( QDomElement & parentElem, KWDocument *_doc, int docVersion )
+KWTableTemplate *KWTableTemplate::loadTemplate( TQDomElement & tqparentElem, KWDocument *_doc, int docVersion )
{
- return new KWTableTemplate(parentElem, _doc, docVersion);
+ return new KWTableTemplate(tqparentElem, _doc, docVersion);
}
diff --git a/kword/KWTableTemplate.h b/kword/KWTableTemplate.h
index 729f2820..84820d2f 100644
--- a/kword/KWTableTemplate.h
+++ b/kword/KWTableTemplate.h
@@ -22,9 +22,9 @@
#include "KWTableStyle.h"
-#include <qdom.h>
-#include <qptrlist.h>
-#include <qbrush.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
+#include <tqbrush.h>
class KWTableTemplate;
class KWDocument;
@@ -38,10 +38,10 @@ class KWTableTemplateCollection
public:
KWTableTemplateCollection();
~KWTableTemplateCollection();
- const QPtrList<KWTableTemplate> & tableTemplateList() const { return m_templateList; }
+ const TQPtrList<KWTableTemplate> & tableTemplateList() const { return m_templateList; }
void clear();
- KWTableTemplate* findTableTemplate( const QString & name );
+ KWTableTemplate* findTableTemplate( const TQString & name );
/**
* Return style number @p i.
*/
@@ -52,8 +52,8 @@ public:
void removeTableTemplate ( KWTableTemplate *tt );
private:
- QPtrList<KWTableTemplate> m_templateList;
- QPtrList<KWTableTemplate> m_deletedTemplates;
+ TQPtrList<KWTableTemplate> m_templateList;
+ TQPtrList<KWTableTemplate> m_deletedTemplates;
KWTableTemplate *m_lastTemplate;
};
@@ -64,24 +64,24 @@ private:
class KWTableTemplate
{
public:
- KWTableTemplate( const QString & name, KWTableStyle * _firstRow=0L, KWTableStyle * _firstCol=0L,
+ KWTableTemplate( const TQString & name, KWTableStyle * _firstRow=0L, KWTableStyle * _firstCol=0L,
KWTableStyle *_lastRow=0L, KWTableStyle *_lastCol=0L, KWTableStyle *_bodyCell=0L,
KWTableStyle *_topLeftCorner=0L, KWTableStyle *_topRightCorner=0L,
KWTableStyle *_bottomLeftCorner=0L, KWTableStyle *_bottomRightCorner=0L );
KWTableTemplate( const KWTableTemplate & rhs ) { *this = rhs; }
- KWTableTemplate( QDomElement & parentElem, KWDocument *_doc, int docVersion=2 );
+ KWTableTemplate( TQDomElement & tqparentElem, KWDocument *_doc, int docVersion=2 );
~KWTableTemplate() {}
void operator=( const KWTableTemplate & );
/** The internal name (untranslated if a standard style) */
- QString name() const { return m_name; }
- void setName( const QString & name ) { m_name = name; }
+ TQString name() const { return m_name; }
+ void setName( const TQString & name ) { m_name = name; }
/** The translated name */
- QString displayName() const;
+ TQString displayName() const;
// ATTRIBUTES
KWTableStyle firstRow() const { return *m_firstRow; }
@@ -121,14 +121,14 @@ public:
void setBottomLeftCorner( KWTableStyle *_tableStyle ) { m_bottomLeftCorner = _tableStyle; }
// SAVING METHODS
- void save( QDomElement parentElem, KoTextZoomHandler* zh );
- void saveTableTemplate( QDomElement & parentElem );
+ void save( TQDomElement tqparentElem, KoTextZoomHandler* zh );
+ void saveTableTemplate( TQDomElement & tqparentElem );
// STATIC METHODS
- static KWTableTemplate *loadTemplate( QDomElement & parentElem, KWDocument *_doc, int docVersion=2 );
+ static KWTableTemplate *loadTemplate( TQDomElement & tqparentElem, KWDocument *_doc, int docVersion=2 );
private:
- QString m_name;
+ TQString m_name;
KWTableStyle *m_firstRow;
KWTableStyle *m_lastRow;
KWTableStyle *m_firstCol;
diff --git a/kword/KWTableTemplateSelector.cpp b/kword/KWTableTemplateSelector.cpp
index e80c5bba..fe4cb1c5 100644
--- a/kword/KWTableTemplateSelector.cpp
+++ b/kword/KWTableTemplateSelector.cpp
@@ -33,15 +33,15 @@
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qfile.h>
-#include <qdom.h>
-#include <qrect.h>
-#include <qptrlist.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqrect.h>
+#include <tqptrlist.h>
+#include <tqlayout.h>
#include <stdlib.h>
#include <math.h>
@@ -50,8 +50,8 @@
/* Class: KWTableTemplatePreview */
/******************************************************************/
-KWTableTemplatePreview::KWTableTemplatePreview( const QString& title, KWTableStyle *_emptyStyle, QWidget* parent, const char* name )
- : QGroupBox( title, parent, name )
+KWTableTemplatePreview::KWTableTemplatePreview( const TQString& title, KWTableStyle *_emptyStyle, TQWidget* tqparent, const char* name )
+ : TQGroupBox( title, tqparent, name )
{
m_emptyStyle = _emptyStyle;
m_zoomHandler = new KoTextZoomHandler;
@@ -141,12 +141,12 @@ int KWTableTemplatePreview::rightBorder(const int rows, const int cols, const in
return 0;
}
-void KWTableTemplatePreview::drawCell( QPainter *p, const KWTableStyle *ts, const QRect globalRect,
- const int rows, int cols, int rowpos, int colpos, const QString & txt)
+void KWTableTemplatePreview::drawCell( TQPainter *p, const KWTableStyle *ts, const TQRect globalRect,
+ const int rows, int cols, int rowpos, int colpos, const TQString & txt)
{
if (!ts) return;
- QRect insRect;
+ TQRect insRect;
p->resetXForm();
p->setClipping( false );
@@ -172,7 +172,7 @@ void KWTableTemplatePreview::drawCell( QPainter *p, const KWTableStyle *ts, cons
if (bb==0)
bb = bottomBorder(rows,cols,rowpos-1,colpos-1);
- p->fillRect( QRect( colpos*wid + globalRect.x() + ( (rb <= ts->frameStyle()->rightBorder().width()) ? int(ts->frameStyle()->rightBorder().width()) : rb ),
+ p->fillRect( TQRect( colpos*wid + globalRect.x() + ( (rb <= ts->frameStyle()->rightBorder().width()) ? int(ts->frameStyle()->rightBorder().width()) : rb ),
rowpos*hei + globalRect.y() + ( (bb <= ts->frameStyle()->topBorder().width()) ? int(ts->frameStyle()->topBorder().width()) : bb ),
wid + ( ( (wrb > ts->frameStyle()->rightBorder().width()) && ((rb > ts->frameStyle()->rightBorder().width()) || ((rb==0) && (ts->frameStyle()->rightBorder().width()==0) ) ) && ((wrb-rb)>0) ) ? wrb : 0 ),
hei + ( ( (hbb > ts->frameStyle()->bottomBorder().width()) && ((bb > ts->frameStyle()->topBorder().width()) || ((bb==0) && (ts->frameStyle()->topBorder().width()==0) ) ) && ((hbb-bb)>0) ) ? hbb : 0 )),
@@ -190,15 +190,15 @@ void KWTableTemplatePreview::drawCell( QPainter *p, const KWTableStyle *ts, cons
{
// For centering to work, and to even get word wrapping when the thing is too big :)
m_textdoc->setWidth( widthLU );
- parag->invalidate(0);
+ parag->tqinvalidate(0);
}
double x_add = ( (rb < ts->frameStyle()->rightBorder().width()) ?
ts->frameStyle()->rightBorder().width() : rb ) +1;
double y_add = ( (bb < ts->frameStyle()->topBorder().width()) ?
ts->frameStyle()->topBorder().width() : bb ) + 1;
- QRect textRect = parag->pixelRect( m_zoomHandler );
- textRect.moveTopLeft( QPoint( insRect.x() + static_cast<int>(x_add),
+ TQRect textRect = parag->pixelRect( m_zoomHandler );
+ textRect.moveTopLeft( TQPoint( insRect.x() + static_cast<int>(x_add),
insRect.y() + static_cast<int>(y_add)) );
@@ -207,8 +207,8 @@ void KWTableTemplatePreview::drawCell( QPainter *p, const KWTableStyle *ts, cons
p->setClipRect( textRect.intersect( globalRect ) );
p->translate( textRect.x(), textRect.y() );
- QColorGroup cg = QApplication::palette().active();
- cg.setBrush( QColorGroup::Base, ts->frameStyle()->backgroundColor() );
+ TQColorGroup cg = TQApplication::tqpalette().active();
+ cg.setBrush( TQColorGroup::Base, ts->frameStyle()->backgroundColor() );
m_textdoc->drawWYSIWYG( p, 1, 0, textRect.width() - 1, textRect.height(), cg, m_zoomHandler );
@@ -216,7 +216,7 @@ void KWTableTemplatePreview::drawCell( QPainter *p, const KWTableStyle *ts, cons
p->resetXForm();
p->setClipping( false );
- QRect cell(globalRect.x(), globalRect.y(),
+ TQRect cell(globalRect.x(), globalRect.y(),
int( globalRect.width() + ts->frameStyle()->rightBorder().width() ),
int( globalRect.height() + ts->frameStyle()->bottomBorder().width() ));
p->setClipRect( insRect.intersect( cell ) );
@@ -254,10 +254,10 @@ void KWTableTemplatePreview::drawCell( QPainter *p, const KWTableStyle *ts, cons
}
-void KWTableTemplatePreview::drawPreviewTable( QPainter *p, int rows, int cols, QRect globalRect )
+void KWTableTemplatePreview::drawPreviewTable( TQPainter *p, int rows, int cols, TQRect globalRect )
{
KWTableStyle *cell = 0L;
- QString txt;
+ TQString txt;
for ( int i = 0; i < rows; i++ )
{
@@ -299,25 +299,25 @@ void KWTableTemplatePreview::drawPreviewTable( QPainter *p, int rows, int cols,
if ( ( j==0 ) && ( i>0 ) )
txt = m_contents[1][i];
else
- txt = QString::number(i) + QString::number(j);
+ txt = TQString::number(i) + TQString::number(j);
drawCell( p, cell, globalRect, rows, cols, i, j, txt );
}
}
}
-void KWTableTemplatePreview::drawContents( QPainter *p )
+void KWTableTemplatePreview::drawContents( TQPainter *p )
{
p->save();
- QRect r = contentsRect();
+ TQRect r = contentsRect();
// 1. Draw fake document white background
- p->fillRect( QRect( 10, 20, r.width() - 20, r.height() - 20 ), QColor("white") );
+ p->fillRect( TQRect( 10, 20, r.width() - 20, r.height() - 20 ), TQColor("white") );
// 2. Draw preview table
if (tableTemplate) {
- QRect tableRect;
+ TQRect tableRect;
int x,y;
// x
@@ -403,7 +403,7 @@ void KWTableTemplatePreview::setTableTemplate( KWTableTemplate *_tableTemplate )
setSpecialCells(_tableTemplate);
- repaint( true );
+ tqrepaint( true );
}
void KWTableTemplatePreview::fillContents()
@@ -447,7 +447,7 @@ void KWTableTemplatePreview::cbFirstRowChanged( bool enable )
if ( (!enable) && ( origTableTemplate->pTopRightCorner()==origTableTemplate->pFirstRow() ) )
tableTemplate->setTopRightCorner( tableTemplate->pBodyCell() );
if ( !m_disableRepaint )
- repaint( true );
+ tqrepaint( true );
}
void KWTableTemplatePreview::cbFirstColChanged( bool enable )
@@ -470,7 +470,7 @@ void KWTableTemplatePreview::cbFirstColChanged( bool enable )
tableTemplate->setBottomLeftCorner( tableTemplate->pBodyCell() );
if ( !m_disableRepaint )
- repaint( true );
+ tqrepaint( true );
}
void KWTableTemplatePreview::cbLastRowChanged( bool enable )
@@ -493,7 +493,7 @@ void KWTableTemplatePreview::cbLastRowChanged( bool enable )
tableTemplate->setBottomLeftCorner( tableTemplate->pBodyCell() );
if ( !m_disableRepaint )
- repaint( true );
+ tqrepaint( true );
}
void KWTableTemplatePreview::cbLastColChanged( bool enable )
@@ -516,7 +516,7 @@ void KWTableTemplatePreview::cbLastColChanged( bool enable )
tableTemplate->setBottomRightCorner( tableTemplate->pBodyCell() );
if ( !m_disableRepaint )
- repaint( true );
+ tqrepaint( true );
}
void KWTableTemplatePreview::cbBodyChanged( bool enable )
@@ -533,7 +533,7 @@ void KWTableTemplatePreview::cbBodyChanged( bool enable )
delete oldTemplate;
if ( !m_disableRepaint )
- repaint( true );
+ tqrepaint( true );
}
@@ -542,19 +542,19 @@ void KWTableTemplatePreview::cbBodyChanged( bool enable )
/* Class: KWTableTemplateSelector */
/******************************************************************/
-KWTableTemplateSelector::KWTableTemplateSelector( KWDocument *_doc, QWidget *_parent, const QString & _tableTemplate, int _type,const char *_name)
- : QWidget( _parent, _name )
+KWTableTemplateSelector::KWTableTemplateSelector( KWDocument *_doc, TQWidget *_parent, const TQString & _tableTemplate, int _type,const char *_name)
+ : TQWidget( _parent, _name )
{
m_doc = _doc;
- QGridLayout *grid = new QGridLayout( this, 3, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( this, 3, 2, 0, KDialog::spacingHint() );
- QWidget *innerHolder = new QWidget( this );
- QGridLayout *innerGrid = new QGridLayout( innerHolder, 2, 1, 0, KDialog::spacingHint() );
+ TQWidget *innerHolder = new TQWidget( this );
+ TQGridLayout *innerGrid = new TQGridLayout( innerHolder, 2, 1, 0, KDialog::spacingHint() );
- lbTemplates = new QListBox( innerHolder );
+ lbTemplates = new TQListBox( innerHolder );
- QPtrListIterator<KWTableTemplate> it( m_doc->tableTemplateCollection()->tableTemplateList() );
+ TQPtrListIterator<KWTableTemplate> it( m_doc->tableTemplateCollection()->tableTemplateList() );
for ( ; it.current() ; ++it )
{
lbTemplates->insertItem( it.current()->displayName() );
@@ -562,7 +562,7 @@ KWTableTemplateSelector::KWTableTemplateSelector( KWDocument *_doc, QWidget *_pa
innerGrid->addWidget( lbTemplates, 0, 0 );
- pbCustomize = new QPushButton( i18n( "&Customize" ), innerHolder );
+ pbCustomize = new TQPushButton( i18n( "&Customize" ), innerHolder );
pbCustomize->setEnabled(false);
pbCustomize->hide();
innerGrid->addWidget( pbCustomize, 1, 0 );
@@ -572,13 +572,13 @@ KWTableTemplateSelector::KWTableTemplateSelector( KWDocument *_doc, QWidget *_pa
preview = new KWTableTemplatePreview( i18n( "Preview" ), m_doc->tableStyleCollection()->findStyle("Plain"), this );
grid->addWidget( preview, 0, 1 );
- bgCustomize = new QButtonGroup( 3, Horizontal, i18n( "Apply To" ), this );
+ bgCustomize = new TQButtonGroup( 3,Qt::Horizontal, i18n( "Apply To" ), this );
- cbFirstRow = new QCheckBox( i18n( "First row" ), bgCustomize );
- cbLastRow = new QCheckBox( i18n( "Last row" ), bgCustomize );
- cbBody = new QCheckBox( i18n( "Body" ), bgCustomize );
- cbFirstCol = new QCheckBox( i18n( "First column" ), bgCustomize );
- cbLastCol = new QCheckBox( i18n( "Last column" ), bgCustomize );
+ cbFirstRow = new TQCheckBox( i18n( "First row" ), bgCustomize );
+ cbLastRow = new TQCheckBox( i18n( "Last row" ), bgCustomize );
+ cbBody = new TQCheckBox( i18n( "Body" ), bgCustomize );
+ cbFirstCol = new TQCheckBox( i18n( "First column" ), bgCustomize );
+ cbLastCol = new TQCheckBox( i18n( "Last column" ), bgCustomize );
grid->addWidget( bgCustomize, 1, 1 );
@@ -589,14 +589,14 @@ KWTableTemplateSelector::KWTableTemplateSelector( KWDocument *_doc, QWidget *_pa
grid->setColStretch( 1, 1 );
grid->activate();
- connect( cbFirstRow, SIGNAL( toggled( bool ) ), preview, SLOT( cbFirstRowChanged( bool ) ) );
- connect( cbFirstCol, SIGNAL( toggled( bool ) ), preview, SLOT( cbFirstColChanged( bool ) ) );
- connect( cbLastRow, SIGNAL( toggled( bool ) ), preview, SLOT( cbLastRowChanged( bool ) ) );
- connect( cbLastCol, SIGNAL( toggled( bool ) ), preview, SLOT( cbLastColChanged( bool ) ) );
- connect( cbBody, SIGNAL( toggled( bool ) ), preview, SLOT( cbBodyChanged( bool ) ) );
+ connect( cbFirstRow, TQT_SIGNAL( toggled( bool ) ), preview, TQT_SLOT( cbFirstRowChanged( bool ) ) );
+ connect( cbFirstCol, TQT_SIGNAL( toggled( bool ) ), preview, TQT_SLOT( cbFirstColChanged( bool ) ) );
+ connect( cbLastRow, TQT_SIGNAL( toggled( bool ) ), preview, TQT_SLOT( cbLastRowChanged( bool ) ) );
+ connect( cbLastCol, TQT_SIGNAL( toggled( bool ) ), preview, TQT_SLOT( cbLastColChanged( bool ) ) );
+ connect( cbBody, TQT_SIGNAL( toggled( bool ) ), preview, TQT_SLOT( cbBodyChanged( bool ) ) );
- connect( lbTemplates, SIGNAL( selectionChanged () ), this, SLOT( changeTableTemplate() ) );
- QListBoxItem * item = lbTemplates->findItem( _tableTemplate );
+ connect( lbTemplates, TQT_SIGNAL( selectionChanged () ), this, TQT_SLOT( changeTableTemplate() ) );
+ TQListBoxItem * item = lbTemplates->tqfindItem( _tableTemplate );
int index = 0;
if ( item )
index = lbTemplates->index ( item );
@@ -648,7 +648,7 @@ void KWTableTemplateSelector::initPreview()
preview->cbLastColChanged( cbLastCol->isChecked() );
preview->cbBodyChanged( cbBody->isChecked() );
preview->disableRepaint(false);
- preview->repaint();
+ preview->tqrepaint();
}
int KWTableTemplateSelector::getFormatType() const
diff --git a/kword/KWTableTemplateSelector.h b/kword/KWTableTemplateSelector.h
index ada023bf..43a6e358 100644
--- a/kword/KWTableTemplateSelector.h
+++ b/kword/KWTableTemplateSelector.h
@@ -20,22 +20,22 @@
#ifndef kwtabletemplateselector_h
#define kwtabletemplateselector_h
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qptrlist.h>
-
-#include <qlabel.h>
-#include <qpushbutton.h>
-/*#include <qlayout.h>
-#include <qfont.h>
-#include <qbrush.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqptrlist.h>
+
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+/*#include <tqlayout.h>
+#include <tqfont.h>
+#include <tqbrush.h>
*/
-class QListBox;
-class QCheckBox;
-class QButtonGroup;
-class QGroupBox;
-class QRect;
+class TQListBox;
+class TQCheckBox;
+class TQButtonGroup;
+class TQGroupBox;
+class TQRect;
class KWTableTemplate;
class KWTableTemplateCollection;
@@ -50,12 +50,13 @@ class KWTableStyle;
/* Class: KWTableTemplatePreview */
/******************************************************************/
-class KWTableTemplatePreview : public QGroupBox
+class KWTableTemplatePreview : public TQGroupBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWTableTemplatePreview( const QString& title, KWTableStyle *_emptyStyle, QWidget* parent, const char* name=0L );
+ KWTableTemplatePreview( const TQString& title, KWTableStyle *_emptyStyle, TQWidget* tqparent, const char* name=0L );
~KWTableTemplatePreview();
void setTableTemplate(KWTableTemplate *_tableTemplate);
KWTableTemplate *getTableTemplate()const ;
@@ -70,10 +71,10 @@ public slots:
protected:
int bottomBorder(const int rows, const int cols, const int rowpos, const int colpos);
int rightBorder(const int rows, const int cols, const int rowpos, const int colpos);
- void drawCell( QPainter *p, const KWTableStyle *ts, const QRect globalRect,
- const int rows, int cols, int rowpos, int colpos, const QString & txt);
- void drawPreviewTable(QPainter *p, int rows, int cols, QRect globalRect);
- void drawContents( QPainter *p );
+ void drawCell( TQPainter *p, const KWTableStyle *ts, const TQRect globalRect,
+ const int rows, int cols, int rowpos, int colpos, const TQString & txt);
+ void drawPreviewTable(TQPainter *p, int rows, int cols, TQRect globalRect);
+ void drawContents( TQPainter *p );
void setSpecialCells(KWTableTemplate *);
KWTableStyle *m_emptyStyle;
@@ -84,7 +85,7 @@ protected:
//necessary when we init preview
bool m_disableRepaint;
private:
- QString m_contents[2][5];
+ TQString m_contents[2][5];
void fillContents();
};
@@ -93,13 +94,14 @@ private:
/* Class: KWTableTemplateSelector */
/******************************************************************/
-class KWTableTemplateSelector : public QWidget
+class KWTableTemplateSelector : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum FormatType { FirstRow = 1 , FirstColumn = 2, LastRow = 4, LastCol =8, Body =16 };
- KWTableTemplateSelector( KWDocument *_doc, QWidget * _parent, const QString & _tableTemplate, int _type = 31 , const char * _name = 0 );
+ KWTableTemplateSelector( KWDocument *_doc, TQWidget * _parent, const TQString & _tableTemplate, int _type = 31 , const char * _name = 0 );
KWTableTemplate *getTableTemplate()const ;
int getFormatType() const ;
@@ -107,12 +109,12 @@ protected:
KWDocument *m_doc;
KWTableTemplatePreview *preview;
- QLabel *lTemplates;
- QListBox *lbTemplates;
- QPushButton *pbCustomize;
+ TQLabel *lTemplates;
+ TQListBox *lbTemplates;
+ TQPushButton *pbCustomize;
- QButtonGroup *bgCustomize;
- QCheckBox *cbFirstRow, *cbFirstCol, *cbLastRow, *cbLastCol, *cbBody;
+ TQButtonGroup *bgCustomize;
+ TQCheckBox *cbFirstRow, *cbFirstCol, *cbLastRow, *cbLastCol, *cbBody;
int selectedTableTemplate;
void initFormat( int format);
diff --git a/kword/KWTextDocument.cpp b/kword/KWTextDocument.cpp
index ddfb5304..580e378d 100644
--- a/kword/KWTextDocument.cpp
+++ b/kword/KWTextDocument.cpp
@@ -43,7 +43,7 @@ KWTextDocument::KWTextDocument( KWTextFrameSet * textfs, KoTextFormatCollection
}
KWTextDocument::KWTextDocument( KoTextZoomHandler * zoomHandler )
- : KoTextDocument( zoomHandler, new KoTextFormatCollection( KGlobalSettings::generalFont() /*unused*/, QColor(), KGlobal::locale()->language(), false), 0L, false ),
+ : KoTextDocument( zoomHandler, new KoTextFormatCollection( KGlobalSettings::generalFont() /*unused*/, TQColor(), KGlobal::locale()->language(), false), 0L, false ),
m_textfs( 0 )
{
init();
@@ -64,30 +64,30 @@ KoTextParag * KWTextDocument::createParag( KoTextDocument *d, KoTextParag *pr, K
return new KWTextParag( static_cast<KoTextDocument *>(d), static_cast<KoTextParag *>(pr), static_cast<KoTextParag *>(nx), updateIds );
}
-KoTextDocCommand *KWTextDocument::deleteTextCommand( KoTextDocument *textdoc, int id, int index, const QMemArray<KoTextStringChar> & str, const CustomItemsMap & customItemsMap, const QValueList<KoParagLayout> & oldParagLayouts )
+KoTextDocCommand *KWTextDocument::deleteTextCommand( KoTextDocument *textdoc, int id, int index, const TQMemArray<KoTextStringChar> & str, const CustomItemsMap & customItemsMap, const TQValueList<KoParagLayout> & oldParagLayouts )
{
//kdDebug(32500)<<" KoTextDocument::deleteTextCommand************\n";
return new KWTextDeleteCommand( textdoc, id, index, str, customItemsMap, oldParagLayouts );
}
-void KWTextDocument::loadOasisTOC( const QDomElement& tag, KoOasisContext& context, KoTextParag* & lastParagraph, KoStyleCollection * styleColl, KoTextParag* nextParagraph )
+void KWTextDocument::loadOasisTOC( const TQDomElement& tag, KoOasisContext& context, KoTextParag* & lastParagraph, KoStyleCollection * styleColl, KoTextParag* nextParagraph )
{
// table-of-content OOo SPEC 7.5 p452
//fillStyleStack( tag, "text:style-name" ); that's the section style
- //QDomElement tocSource = KoDom::namedItemNS( toc, KoXmlNS::text, "table-of-content-source" );
+ //TQDomElement tocSource = KoDom::namedItemNS( toc, KoXmlNS::text, "table-of-content-source" );
// TODO parse templates and generate "Contents ..." styles from it
- //for ( QDomNode n(tocSource.firstChild()); !text.isNull(); text = text.nextSibling() )
+ //for ( TQDomNode n(tocSource.firstChild()); !text.isNull(); text = text.nextSibling() )
//{
//}
- QDomElement tocIndexBody = KoDom::namedItemNS( tag, KoXmlNS::text, "index-body" );
- QDomElement t;
+ TQDomElement tocIndexBody = KoDom::namedItemNS( tag, KoXmlNS::text, "index-body" );
+ TQDomElement t;
forEachElement( t, tocIndexBody )
{
context.styleStack().save();
- const QString localName = t.localName();
- QDomElement e;
+ const TQString localName = t.localName();
+ TQDomElement e;
bool isTextNS = tag.namespaceURI() == KoXmlNS::text;
if ( isTextNS && localName == "index-title" ) {
lastParagraph = loadOasisText( t, context, lastParagraph, styleColl, nextParagraph ); // recurse again
@@ -106,11 +106,11 @@ void KWTextDocument::loadOasisTOC( const QDomElement& tag, KoOasisContext& conte
m_textfs->kWordDocument()->setTocPresent( true );
}
-bool KWTextDocument::loadOasisBodyTag( const QDomElement& tag, KoOasisContext& context,
+bool KWTextDocument::loadOasisBodyTag( const TQDomElement& tag, KoOasisContext& context,
KoTextParag* & lastParagraph, KoStyleCollection* styleColl,
KoTextParag* nextParagraph )
{
- const QString localName( tag.localName() );
+ const TQString localName( tag.localName() );
// Non-inline frame (i.e. anchored to page)
if ( localName == "frame" && tag.namespaceURI() == KoXmlNS::draw )
{
@@ -148,23 +148,23 @@ bool KWTextDocument::loadOasisBodyTag( const QDomElement& tag, KoOasisContext& c
return false;
}
-void KWTextDocument::appendBookmark( KoTextParag* parag, int pos, KoTextParag* endParag, int endPos, const QString& name )
+void KWTextDocument::appendBookmark( KoTextParag* parag, int pos, KoTextParag* endParag, int endPos, const TQString& name )
{
// The OASIS format is cool. No need to store the bookmarks until end of loading (e.g. KWLoadingInfo)
// We can "resolve" them right away.
m_textfs->kWordDocument()->insertBookmark( name, parag, endParag, pos, endPos );
}
-void KWTextDocument::loadOasisFootnote( const QDomElement& tag, KoOasisContext& context,
+void KWTextDocument::loadOasisFootnote( const TQDomElement& tag, KoOasisContext& context,
KoTextCustomItem* & customItem )
{
- const QString frameName( tag.attributeNS( KoXmlNS::text, "id", QString::null) );
- const QString localName( tag.localName() );
- const QDomElement citationElem = tag.namedItem( localName + "-citation" ).toElement();
+ const TQString frameName( tag.attributeNS( KoXmlNS::text, "id", TQString()) );
+ const TQString localName( tag.localName() );
+ const TQDomElement citationElem = tag.namedItem( localName + "-citation" ).toElement();
bool endnote = localName == "endnote" && tag.namespaceURI() == KoXmlNS::text;
- QString label = citationElem.attributeNS( KoXmlNS::text, "label", QString::null );
+ TQString label = citationElem.attributeNS( KoXmlNS::text, "label", TQString() );
bool autoNumbered = label.isEmpty();
KWFootNoteFrameSet *fs = m_textfs->insertFootNote(
@@ -176,15 +176,15 @@ void KWTextDocument::loadOasisFootnote( const QDomElement& tag, KoOasisContext&
fs->createInitialFrame( 0 ); // we don't know the page number...
// Parse contents into the frameset
- const QDomElement bodyElem = KoDom::namedItemNS( tag, KoXmlNS::text, QCString( localName.latin1() ) + "-body" ).toElement();
+ const TQDomElement bodyElem = KoDom::namedItemNS( tag, KoXmlNS::text, TQCString( localName.latin1() ) + "-body" ).toElement();
fs->loadOasisContent( bodyElem, context );
}
-bool KWTextDocument::loadSpanTag( const QDomElement& tag, KoOasisContext& context,
+bool KWTextDocument::loadSpanTag( const TQDomElement& tag, KoOasisContext& context,
KoTextParag* parag, uint pos,
- QString& textData, KoTextCustomItem* & customItem )
+ TQString& textData, KoTextCustomItem* & customItem )
{
- const QString localName( tag.localName() );
+ const TQString localName( tag.localName() );
const bool isTextNS = tag.namespaceURI() == KoXmlNS::text;
kdDebug(32500) << "KWTextDocument::loadSpanTag: " << localName << endl;
@@ -192,7 +192,7 @@ bool KWTextDocument::loadSpanTag( const QDomElement& tag, KoOasisContext& contex
{
if ( localName == "a" )
{
- QString href( tag.attributeNS( KoXmlNS::xlink, "href", QString::null) );
+ TQString href( tag.attributeNS( KoXmlNS::xlink, "href", TQString()) );
if ( href.startsWith("#") )
{
context.styleStack().save();
@@ -207,19 +207,19 @@ bool KWTextDocument::loadSpanTag( const QDomElement& tag, KoOasisContext& contex
// we could have multiple spans there, but OO ensures that there is always only one,
// splitting the hyperlink if necessary (at format changes).
// Note that we ignore the formatting of the span.
- QDomElement spanElem = KoDom::namedItemNS( tag, KoXmlNS::text, "span" );
- QString text;
+ TQDomElement spanElem = KoDom::namedItemNS( tag, KoXmlNS::text, "span" );
+ TQString text;
if( spanElem.isNull() )
text = tag.text();
else {
// The save/restore of the stack is done by the caller (KoTextParag::loadOasisSpan)
// This allows to use the span's format for the variable.
- //kdDebug(32500) << "filling stack with " << spanElem.attributeNS( KoXmlNS::text, "style-name", QString::null ) << endl;
+ //kdDebug(32500) << "filling stack with " << spanElem.attributeNS( KoXmlNS::text, "style-name", TQString() ) << endl;
context.fillStyleStack( spanElem, KoXmlNS::text, "style-name", "text" );
text = spanElem.text();
}
textData = KoTextObject::customItemChar(); // hyperlink placeholder
- // unused tag.attributeNS( KoXmlNS::office, "name", QString::null )
+ // unused tag.attributeNS( KoXmlNS::office, "name", TQString() )
KoVariableCollection& coll = context.variableCollection();
customItem = new KoLinkVariable( this, text, href,
coll.formatCollection()->format( "STRING" ),
@@ -229,22 +229,22 @@ bool KWTextDocument::loadSpanTag( const QDomElement& tag, KoOasisContext& contex
}
else if ( localName == "bookmark" )
{
- appendBookmark( parag, pos, parag, pos, tag.attributeNS( KoXmlNS::text, "name", QString::null ) );
+ appendBookmark( parag, pos, parag, pos, tag.attributeNS( KoXmlNS::text, "name", TQString() ) );
return true;
}
else if ( localName == "bookmark-start" ) {
KWLoadingInfo* loadingInfo = m_textfs->kWordDocument()->loadingInfo();
- loadingInfo->m_bookmarkStarts.insert( tag.attributeNS( KoXmlNS::text, "name", QString::null ),
+ loadingInfo->m_bookmarkStarts.insert( tag.attributeNS( KoXmlNS::text, "name", TQString() ),
KWLoadingInfo::BookmarkStart( this, parag, pos ) );
return true;
}
else if ( localName == "bookmark-end" ) {
KWLoadingInfo* loadingInfo = m_textfs->kWordDocument()->loadingInfo();
- QString bkName = tag.attributeNS( KoXmlNS::text, "name", QString::null );
- KWLoadingInfo::BookmarkStartsMap::iterator it = loadingInfo->m_bookmarkStarts.find( bkName );
+ TQString bkName = tag.attributeNS( KoXmlNS::text, "name", TQString() );
+ KWLoadingInfo::BookmarkStartsMap::iterator it = loadingInfo->m_bookmarkStarts.tqfind( bkName );
if ( it == loadingInfo->m_bookmarkStarts.end() ) { // bookmark end without start. This seems to happen..
// insert simple bookmark then
- appendBookmark( parag, pos, parag, pos, tag.attributeNS( KoXmlNS::text, "name", QString::null ) );
+ appendBookmark( parag, pos, parag, pos, tag.attributeNS( KoXmlNS::text, "name", TQString() ) );
} else {
if ( (*it).doc != this ) {
// Oh tell me this never happens...
@@ -267,15 +267,15 @@ bool KWTextDocument::loadSpanTag( const QDomElement& tag, KoOasisContext& contex
{
if ( tag.namespaceURI() == KoXmlNS::draw && localName == "frame" )
{
- if ( tag.attributeNS( KoXmlNS::koffice, "is-wrapper-frame", QString::null )
+ if ( tag.attributeNS( KoXmlNS::koffice, "is-wrapper-frame", TQString() )
== "true" )
{
- QDomElement textbox = KoDom::namedItemNS( tag, KoXmlNS::draw, "text-box" );
+ TQDomElement textbox = KoDom::namedItemNS( tag, KoXmlNS::draw, "text-box" );
if ( !textbox.isNull() )
{
int numberOfElements = 0;
- QDomElement elem;
- QDomElement firstElem;
+ TQDomElement elem;
+ TQDomElement firstElem;
forEachElement( elem, textbox )
{
++numberOfElements;
diff --git a/kword/KWTextDocument.h b/kword/KWTextDocument.h
index c1a6bb84..261694a5 100644
--- a/kword/KWTextDocument.h
+++ b/kword/KWTextDocument.h
@@ -35,6 +35,7 @@ class KoTextDocCommand;
class KWTextDocument : public KoTextDocument
{
Q_OBJECT
+ TQ_OBJECT
public:
/** A real text document inside a frameset */
KWTextDocument( KWTextFrameSet * textfs, KoTextFormatCollection *fc, KoTextFormatter *formatter = 0L );
@@ -49,23 +50,23 @@ public:
* Note that this can be 0L (e.g. for paragraphs in the paragdia preview) */
KWTextFrameSet * textFrameSet() const { return m_textfs; }
- virtual KoTextDocCommand *deleteTextCommand( KoTextDocument *textdoc, int id, int index, const QMemArray<KoTextStringChar> & str, const CustomItemsMap & customItemsMap, const QValueList<KoParagLayout> & oldParagLayouts );
+ virtual KoTextDocCommand *deleteTextCommand( KoTextDocument *textdoc, int id, int index, const TQMemArray<KoTextStringChar> & str, const CustomItemsMap & customItemsMap, const TQValueList<KoParagLayout> & oldParagLayouts );
/// Extensions to KoTextParag::loadOasisSpan
- virtual bool loadSpanTag( const QDomElement& tag, KoOasisContext& context,
+ virtual bool loadSpanTag( const TQDomElement& tag, KoOasisContext& context,
KoTextParag* parag, uint pos,
- QString& textData, KoTextCustomItem* & customItem );
+ TQString& textData, KoTextCustomItem* & customItem );
/// Extensions to KoTextDocument::loadOasisText
- virtual bool loadOasisBodyTag( const QDomElement& tag, KoOasisContext& context,
+ virtual bool loadOasisBodyTag( const TQDomElement& tag, KoOasisContext& context,
KoTextParag* & lastParagraph, KoStyleCollection * styleColl,
KoTextParag* nextParagraph );
protected:
void init();
private:
- void appendBookmark( KoTextParag* parag, int pos, KoTextParag* endParag, int endPos, const QString& name );
- void loadOasisFootnote( const QDomElement& tag, KoOasisContext& context,
+ void appendBookmark( KoTextParag* parag, int pos, KoTextParag* endParag, int endPos, const TQString& name );
+ void loadOasisFootnote( const TQDomElement& tag, KoOasisContext& context,
KoTextCustomItem* & customItem );
- void loadOasisTOC( const QDomElement& tag, KoOasisContext& context, KoTextParag* & lastParagraph, KoStyleCollection* styleColl, KoTextParag* nextParagraph );
+ void loadOasisTOC( const TQDomElement& tag, KoOasisContext& context, KoTextParag* & lastParagraph, KoStyleCollection* styleColl, KoTextParag* nextParagraph );
KWTextFrameSet * m_textfs;
};
diff --git a/kword/KWTextFrameSet.cpp b/kword/KWTextFrameSet.cpp
index 9652cd0c..26b4da07 100644
--- a/kword/KWTextFrameSet.cpp
+++ b/kword/KWTextFrameSet.cpp
@@ -59,15 +59,15 @@
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qclipboard.h>
-#include <qdragobject.h>
-#include <qcursor.h>
-#include <qfile.h>
-#include <qprogressdialog.h>
-#include <qregexp.h>
+#include <tqclipboard.h>
+#include <tqdragobject.h>
+#include <tqcursor.h>
+#include <tqfile.h>
+#include <tqprogressdialog.h>
+#include <tqregexp.h>
#include <assert.h>
-#include <qapplication.h>
+#include <tqapplication.h>
//#define DEBUG_MARGINS
//#define DEBUG_FORMATVERTICALLY
@@ -102,7 +102,7 @@ private:
KWTextFrameSet *m_textfs;
};
-KWTextFrameSet::KWTextFrameSet( KWDocument *_doc, const QString & name )
+KWTextFrameSet::KWTextFrameSet( KWDocument *_doc, const TQString & name )
: KWFrameSet( _doc )
{
//kdDebug() << "KWTextFrameSet::KWTextFrameSet " << this << endl;
@@ -111,14 +111,14 @@ KWTextFrameSet::KWTextFrameSet( KWDocument *_doc, const QString & name )
else
m_name = name;
- QObject::setName( m_name.utf8() ); // store name in the QObject, for DCOP users
+ TQObject::setName( m_name.utf8() ); // store name in the TQObject, for DCOP users
init();
}
-KWTextFrameSet::KWTextFrameSet( KWDocument* doc, const QDomElement& tag, KoOasisContext& /*context*/ )
+KWTextFrameSet::KWTextFrameSet( KWDocument* doc, const TQDomElement& tag, KoOasisContext& /*context*/ )
: KWFrameSet( doc )
{
- m_name = tag.attributeNS( KoXmlNS::draw, "name", QString::null );
+ m_name = tag.attributeNS( KoXmlNS::draw, "name", TQString() );
if ( doc->frameSetByName( m_name ) ) // already exists!
m_name = doc->generateFramesetName( m_name + " %1" );
init();
@@ -127,10 +127,10 @@ KWTextFrameSet::KWTextFrameSet( KWDocument* doc, const QDomElement& tag, KoOasis
}
// protected constructor for testing purposes; does not do an init.
-KWTextFrameSet::KWTextFrameSet( const QString &name ) : KWFrameSet(0) {
+KWTextFrameSet::KWTextFrameSet( const TQString &name ) : KWFrameSet(0) {
m_name = name;
- QObject::setName( m_name.utf8() ); // store name in the QObject, for DCOP users
+ TQObject::setName( m_name.utf8() ); // store name in the TQObject, for DCOP users
m_currentViewMode = 0L;
m_currentDrawnFrame = 0L;
m_lastTextDocHeight = 0;
@@ -144,7 +144,7 @@ void KWTextFrameSet::init()
m_lastTextDocHeight = 0;
// Create the text document to set in the text object
KWTextDocument* textdoc = new KWTextDocument( this,
- new KoTextFormatCollection( m_doc->defaultFont(), QColor(),
+ new KoTextFormatCollection( m_doc->defaultFont(), TQColor(),
m_doc->globalLanguage(),
m_doc->globalHyphenation() ),
new KWTextFormatter( this ) );
@@ -156,25 +156,25 @@ void KWTextFrameSet::init()
m_textobj = new KoTextObject( textdoc, m_doc->styleCollection()->findStyle( "Standard" ),
this, (m_name+"-textobj").utf8() );
m_doc->backSpeller()->registerNewTextObject( m_textobj );
- connect( m_textobj, SIGNAL( availableHeightNeeded() ),
- SLOT( slotAvailableHeightNeeded() ) );
- connect( m_textobj, SIGNAL( afterFormatting( int, KoTextParag*, bool* ) ),
- SLOT( slotAfterFormatting( int, KoTextParag*, bool* ) ) );
- //connect( m_textobj, SIGNAL( formattingFirstParag() ),
- // SLOT( slotFormattingFirstParag() ) );
- //connect( m_textobj, SIGNAL( chapterParagraphFormatted( KoTextParag * ) ),
- // SLOT( slotChapterParagraphFormatted( KoTextParag * ) ) );
- connect( m_textobj, SIGNAL( newCommand( KCommand * ) ),
- SLOT( slotNewCommand( KCommand * ) ) );
- connect( m_textobj, SIGNAL( repaintChanged( KoTextObject* ) ),
- SLOT( slotRepaintChanged() ) );
- connect( m_textobj, SIGNAL( paragraphDeleted( KoTextParag*) ),
- SLOT( slotParagraphDeleted(KoTextParag*) ));
-
- connect( m_textobj, SIGNAL( paragraphCreated( KoTextParag*) ),
- SLOT( slotParagraphCreated(KoTextParag*) ));
- connect( m_textobj, SIGNAL( paragraphModified( KoTextParag*, int, int, int) ),
- SLOT( slotParagraphModified(KoTextParag*, int, int, int) ));
+ connect( m_textobj, TQT_SIGNAL( availableHeightNeeded() ),
+ TQT_SLOT( slotAvailableHeightNeeded() ) );
+ connect( m_textobj, TQT_SIGNAL( afterFormatting( int, KoTextParag*, bool* ) ),
+ TQT_SLOT( slotAfterFormatting( int, KoTextParag*, bool* ) ) );
+ //connect( m_textobj, TQT_SIGNAL( formattingFirstParag() ),
+ // TQT_SLOT( slotFormattingFirstParag() ) );
+ //connect( m_textobj, TQT_SIGNAL( chapterParagraphFormatted( KoTextParag * ) ),
+ // TQT_SLOT( slotChapterParagraphFormatted( KoTextParag * ) ) );
+ connect( m_textobj, TQT_SIGNAL( newCommand( KCommand * ) ),
+ TQT_SLOT( slotNewCommand( KCommand * ) ) );
+ connect( m_textobj, TQT_SIGNAL( tqrepaintChanged( KoTextObject* ) ),
+ TQT_SLOT( slotRepaintChanged() ) );
+ connect( m_textobj, TQT_SIGNAL( paragraphDeleted( KoTextParag*) ),
+ TQT_SLOT( slotParagraphDeleted(KoTextParag*) ));
+
+ connect( m_textobj, TQT_SIGNAL( paragraphCreated( KoTextParag*) ),
+ TQT_SLOT( slotParagraphCreated(KoTextParag*) ));
+ connect( m_textobj, TQT_SIGNAL( paragraphModified( KoTextParag*, int, int, int) ),
+ TQT_SLOT( slotParagraphModified(KoTextParag*, int, int, int) ));
}
void KWTextFrameSet::slotParagraphModified(KoTextParag* _parag, int /*KoTextParag::ParagModifyType*/ _type, int start, int lenght)
@@ -222,23 +222,23 @@ void KWTextFrameSet::slotAvailableHeightNeeded()
updateFrames( 0 ); // only do the available-height determination
}
-KWFrame * KWTextFrameSet::documentToInternal( const KoPoint &dPoint, QPoint &iPoint ) const
+KWFrame * KWTextFrameSet::documentToInternal( const KoPoint &dPoint, TQPoint &iPoint ) const
{
#ifdef DEBUG_DTI
kdDebug() << "KWTextFrameSet::documentToInternal dPoint:" << dPoint.x() << "," << dPoint.y() << endl;
#endif
- if ( !m_doc->layoutViewMode()->hasFrames() ) { // text viewmode
- iPoint = QPoint( m_doc->ptToLayoutUnitPixX( dPoint.x() ),
+ if ( !m_doc->tqlayoutViewMode()->hasFrames() ) { // text viewmode
+ iPoint = TQPoint( m_doc->ptToLayoutUnitPixX( dPoint.x() ),
m_doc->ptToLayoutUnitPixY( dPoint.y() ) );
return m_frames.getFirst();
}
// Find the frame that contains dPoint. To go fast, we look them up by page number.
int pageNum = m_doc->pageManager()->pageNumber(dPoint);
- QPtrListIterator<KWFrame> frameIt( framesInPage( pageNum ) );
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( pageNum ) );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame *theFrame = frameIt.current();
- if ( theFrame->contains( dPoint ) )
+ if ( theFrame->tqcontains( dPoint ) )
{
iPoint.setX( m_doc->ptToLayoutUnitPixX( dPoint.x() - theFrame->innerRect().x() ) );
iPoint.setY( m_doc->ptToLayoutUnitPixY( dPoint.y() - theFrame->innerRect().y() + theFrame->internalY() ) );
@@ -260,25 +260,25 @@ KWFrame * KWTextFrameSet::documentToInternal( const KoPoint &dPoint, QPoint &iPo
return 0;
}
-KWFrame * KWTextFrameSet::documentToInternalMouseSelection( const KoPoint &dPoint, QPoint &iPoint, RelativePosition& relPos, KWViewMode *viewMode ) const
+KWFrame * KWTextFrameSet::documentToInternalMouseSelection( const KoPoint &dPoint, TQPoint &iPoint, RelativePosition& relPos, KWViewMode *viewMode ) const
{
#ifdef DEBUG_DTI
kdDebug() << "KWTextFrameSet::documentToInternalMouseSelection dPoint:" << dPoint.x() << "," << dPoint.y() << endl;
#endif
if ( !viewMode->hasFrames() ) { // text viewmode
relPos = InsideFrame;
- iPoint = QPoint( m_doc->ptToLayoutUnitPixX( dPoint.x() ),
+ iPoint = TQPoint( m_doc->ptToLayoutUnitPixX( dPoint.x() ),
m_doc->ptToLayoutUnitPixY( dPoint.y() ) );
return m_frames.getFirst();
}
// Find the frame that contains dPoint. To go fast, we look them up by page number.
int pageNum = m_doc->pageManager()->pageNumber(dPoint);
- QPtrListIterator<KWFrame> frameIt( framesInPage( pageNum ) );
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( pageNum ) );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame *theFrame = frameIt.current();
- if ( theFrame->contains( dPoint ) )
+ if ( theFrame->tqcontains( dPoint ) )
{
iPoint.setX( m_doc->ptToLayoutUnitPixX( dPoint.x() - theFrame->innerRect().x() ) );
iPoint.setY( m_doc->ptToLayoutUnitPixY( dPoint.y() - theFrame->innerRect().y() + theFrame->internalY() ) );
@@ -300,7 +300,7 @@ KWFrame * KWTextFrameSet::documentToInternalMouseSelection( const KoPoint &dPoin
#ifdef DEBUG_DTI
kdDebug() << "documentToInternal: openLeftRect=" << openLeftRect << endl;
#endif
- if ( openLeftRect.contains( dPoint ) )
+ if ( openLeftRect.tqcontains( dPoint ) )
{
// We are at the left of this frame (and not in any other frame of this frameset)
iPoint.setX( m_doc->ptToLayoutUnitPixX(theFrame->innerRect().left() ));
@@ -317,7 +317,7 @@ KWFrame * KWTextFrameSet::documentToInternalMouseSelection( const KoPoint &dPoin
#ifdef DEBUG_DTI
kdDebug() << "documentToInternal: openTopRect=" << openTopRect << endl;
#endif
- if ( openTopRect.contains( dPoint ) )
+ if ( openTopRect.tqcontains( dPoint ) )
{
// We are at the top of this frame (...)
iPoint.setX( m_doc->ptToLayoutUnitPixX( dPoint.x() - theFrame->innerRect().left() ) );
@@ -348,14 +348,14 @@ KWFrame * KWTextFrameSet::documentToInternalMouseSelection( const KoPoint &dPoin
}
else
{
- QPtrListIterator<KWFrame> frameIt( framesInPage( pageNum + 1 ) );
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( pageNum + 1 ) );
if ( frameIt.current() )
{
// There is a frame on the next page
KWFrame *theFrame = frameIt.current();
KoRect openTopRect( theFrame->innerRect() );
openTopRect.setTop( 0 );
- if ( openTopRect.contains( dPoint ) ) // We are at the top of this frame
+ if ( openTopRect.tqcontains( dPoint ) ) // We are at the top of this frame
iPoint.setX( m_doc->ptToLayoutUnitPixX( dPoint.x() - theFrame->left() ) );
else
iPoint.setX( 0 ); // We are, hmm, on the left or right of the frames
@@ -377,26 +377,26 @@ KWFrame * KWTextFrameSet::documentToInternalMouseSelection( const KoPoint &dPoin
return 0;
}
-KWFrame * KWTextFrameSet::internalToDocumentWithHint( const QPoint &iPoint, KoPoint &dPoint, const KoPoint &hintDPoint ) const
+KWFrame * KWTextFrameSet::internalToDocumentWithHint( const TQPoint &iPoint, KoPoint &dPoint, const KoPoint &hintDPoint ) const
{
#ifdef DEBUG_ITD
kdDebug() << "KWTextFrameSet::internalToDocumentWithHint hintDPoint: " << hintDPoint.x() << "," << hintDPoint.y() << endl;
#endif
- if ( !m_doc->layoutViewMode()->hasFrames() ) { // text viewmode
- dPoint = m_doc->layoutUnitPtToPt( m_doc->pixelToPt( iPoint ) );
+ if ( !m_doc->tqlayoutViewMode()->hasFrames() ) { // text viewmode
+ dPoint = m_doc->tqlayoutUnitPtToPt( m_doc->pixelToPt( iPoint ) );
return m_frames.getFirst();
}
KWFrame *lastFrame = 0L;
- QPtrListIterator<KWFrame> frameIt( frameIterator() );
+ TQPtrListIterator<KWFrame> frameIt( frameIterator() );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame *theFrame = frameIt.current();
- QRect r( 0, m_doc->ptToLayoutUnitPixY( theFrame->internalY() ), m_doc->ptToLayoutUnitPixX( theFrame->innerWidth() )+1, m_doc->ptToLayoutUnitPixY( theFrame->innerHeight() )+1 );
+ TQRect r( 0, m_doc->ptToLayoutUnitPixY( theFrame->internalY() ), m_doc->ptToLayoutUnitPixX( theFrame->innerWidth() )+1, m_doc->ptToLayoutUnitPixY( theFrame->innerHeight() )+1 );
#ifdef DEBUG_ITD
kdDebug() << "ITD: r=" << r << " iPoint=" << iPoint.x() << "," << iPoint.y() << endl;
#endif
// r is the frame in qrt coords
- if ( r.contains( iPoint ) ) // both r and p are in layout units (aka internal)
+ if ( r.tqcontains( iPoint ) ) // both r and p are in tqlayout units (aka internal)
{
dPoint = internalToDocumentKnowingFrame( iPoint, theFrame );
#ifdef DEBUG_ITD
@@ -421,7 +421,7 @@ KWFrame * KWTextFrameSet::internalToDocumentWithHint( const QPoint &iPoint, KoPo
kdDebug(32002) << "KWTextFrameSet::internalToDocumentWithHint " << iPoint.x() << "," << iPoint.y()
<< " not in any frame of " << (void*)this << endl;
#endif
- dPoint = m_doc->layoutUnitPtToPt( m_doc->pixelToPt( iPoint ) ); // bah
+ dPoint = m_doc->tqlayoutUnitPtToPt( m_doc->pixelToPt( iPoint ) ); // bah
return 0L;
}
@@ -429,7 +429,7 @@ KWFrame * KWTextFrameSet::internalToDocumentWithHint( const QPoint &iPoint, KoPo
KoPoint KWTextFrameSet::internalToDocumentKnowingFrame( const KoPoint &relPoint, KWFrame* theFrame ) const
{
// It's ok to have theFrame == 0 in the text viewmode, but not in other modes
- if ( m_doc->layoutViewMode()->hasFrames() )
+ if ( m_doc->tqlayoutViewMode()->hasFrames() )
Q_ASSERT( theFrame );
if ( theFrame )
return KoPoint( relPoint.x() + theFrame->innerRect().x(),
@@ -438,16 +438,16 @@ KoPoint KWTextFrameSet::internalToDocumentKnowingFrame( const KoPoint &relPoint,
return relPoint;
}
-KoPoint KWTextFrameSet::internalToDocumentKnowingFrame( const QPoint &iPoint, KWFrame* theFrame ) const
+KoPoint KWTextFrameSet::internalToDocumentKnowingFrame( const TQPoint &iPoint, KWFrame* theFrame ) const
{
// Convert LU to relative coordinates (pt), then call the real internalToDocumentKnowingFrame().
- return internalToDocumentKnowingFrame( m_doc->layoutUnitPtToPt( m_doc->pixelToPt( iPoint ) ), theFrame );
+ return internalToDocumentKnowingFrame( m_doc->tqlayoutUnitPtToPt( m_doc->pixelToPt( iPoint ) ), theFrame );
}
-QPoint KWTextFrameSet::moveToPage( int currentPgNum, short int direction ) const
+TQPoint KWTextFrameSet::moveToPage( int currentPgNum, short int direction ) const
{
if ( !isVisible() || m_frames.isEmpty() )
- return QPoint();
+ return TQPoint();
//kdDebug() << "KWTextFrameSet::moveToPage currentPgNum=" << currentPgNum << " direction=" << direction << endl;
int num = currentPgNum + direction;
int pages = m_doc->pageCount();
@@ -459,20 +459,20 @@ QPoint KWTextFrameSet::moveToPage( int currentPgNum, short int direction ) const
continue; // No frame on that page
//kdDebug() << "KWTextFrameSet::moveToPage ok for first frame in page " << num << endl;
- QPtrListIterator<KWFrame> frameIt( framesInPage( num ) );
- return QPoint( 0, m_doc->ptToLayoutUnitPixY( frameIt.current()->internalY() ) + 2 ); // found, ok.
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( num ) );
+ return TQPoint( 0, m_doc->ptToLayoutUnitPixY( frameIt.current()->internalY() ) + 2 ); // found, ok.
}
// Not found. Go to top of first frame or bottom of last frame, depending on direction
if ( direction < 0 )
- return QPoint( 0, m_doc->ptToLayoutUnitPixY( m_frames.getFirst()->internalY() ) + 2 );
+ return TQPoint( 0, m_doc->ptToLayoutUnitPixY( m_frames.getFirst()->internalY() ) + 2 );
else
{
KWFrame * theFrame = m_frames.getLast();
- return QPoint( 0, m_doc->ptToLayoutUnitPixY( theFrame->internalY() + theFrame->innerHeight() ) );
+ return TQPoint( 0, m_doc->ptToLayoutUnitPixY( theFrame->internalY() + theFrame->innerHeight() ) );
}
}
-void KWTextFrameSet::drawContents( QPainter *p, const QRect & crect, const QColorGroup &cg,
+void KWTextFrameSet::drawContents( TQPainter *p, const TQRect & crect, const TQColorGroup &cg,
bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode,
KWFrameViewManager *fvm)
@@ -521,29 +521,29 @@ void KWTextFrameSet::drawContents( QPainter *p, const QRect & crect, const QColo
break;
}
- QRect flatRect = viewMode->normalToView( m_doc->zoomRect( rect ) );
+ TQRect flatRect = viewMode->normalToView( m_doc->zoomRect( rect ) );
//kdDebug() << " KWTextFrameSet::drawContents rect=" << rect << " zoomed:" << flatRect << endl;
- flatRect.setBottom( flatRect.top() + 1 ); // #!@!@!& QRect....
+ flatRect.setBottom( flatRect.top() + 1 ); // #!@!@!& TQRect....
if ( flatRect.intersects( crect ) ) {
p->save();
- QPen pen( KoTextFormat::defaultTextColor( p ), // always in default fg color (and black when printing)
+ TQPen pen( KoTextFormat::defaultTextColor( p ), // always in default fg color (and black when printing)
KoBorder::zoomWidthY( m_doc->footNoteSeparatorLineWidth(), m_doc, 1 ) ); // penwidth = zoomIt( 2 pt )
switch( m_doc->footNoteSeparatorLineType())
{
case SLT_SOLID:
- pen.setStyle( SolidLine );
+ pen.setStyle( Qt::SolidLine );
break;
case SLT_DASH:
- pen.setStyle( DashLine );
+ pen.setStyle( Qt::DashLine );
break;
case SLT_DOT:
- pen.setStyle( DotLine );
+ pen.setStyle( Qt::DotLine );
break;
case SLT_DASH_DOT:
- pen.setStyle( DashDotLine );
+ pen.setStyle( Qt::DashDotLine );
break;
case SLT_DASH_DOT_DOT:
- pen.setStyle( DashDotDotLine );
+ pen.setStyle( Qt::DashDotDotLine );
break;
}
p->setPen( pen );
@@ -558,9 +558,9 @@ void KWTextFrameSet::drawContents( QPainter *p, const QRect & crect, const QColo
}
}
-void KWTextFrameSet::drawFrame( KWFrame *theFrame, QPainter *painter, const QRect &fcrect, const QRect &crect,
- const QPoint& translationOffset,
- KWFrame *settingsFrame, const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+void KWTextFrameSet::drawFrame( KWFrame *theFrame, TQPainter *painter, const TQRect &fcrect, const TQRect &crect,
+ const TQPoint& translationOffset,
+ KWFrame *settingsFrame, const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode, bool drawUnderlyingFrames )
{
// Detect if text frame needs transparency painting, to save time if it's using SolidPattern
@@ -572,8 +572,8 @@ void KWTextFrameSet::drawFrame( KWFrame *theFrame, QPainter *painter, const QRec
KWFrameSet::drawFrame( theFrame, painter, fcrect, crect, translationOffset, settingsFrame, cg, onlyChanged, resetChanged, edit, viewMode, drawUnderlyingFrames );
}
-void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, QPainter *painter, const QRect &r,
- const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, TQPainter *painter, const TQRect &r,
+ const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode )
{
Q_ASSERT( r.isValid() );
@@ -586,13 +586,13 @@ void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, QPainter *painter, co
{
// Update variables for each frame (e.g. for page-number)
// If more than KWPgNumVariable need this functionality, create an intermediary base class
- QPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
+ TQPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
for ( ; cit.current() ; ++cit )
{
KWPgNumVariable * var = dynamic_cast<KWPgNumVariable *>( cit.current() );
if ( var && !var->isDeleted() )
{
- QSize oldSize( var->width, var->height );
+ TQSize oldSize( var->width, var->height );
const int pageNumberOffset = kWordDocument()->variableCollection()->variableSetting()->startingPageNumber() - 1;
switch ( var->subType() )
{
@@ -605,7 +605,7 @@ void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, QPainter *painter, co
var->setSectionTitle( kWordDocument()->sectionTitle( theFrame->pageNumber() ) );
break;
case KWPgNumVariable::VST_PGNUM_PREVIOUS:
- var->setPgNum( QMAX(theFrame->pageNumber()-1,0) + pageNumberOffset );
+ var->setPgNum( TQMAX(theFrame->pageNumber()-1,0) + pageNumberOffset );
break;
case KWPgNumVariable::VST_PGNUM_NEXT:
var->setPgNum( theFrame->pageNumber() + 1 + pageNumberOffset );
@@ -613,9 +613,9 @@ void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, QPainter *painter, co
}
var->resize();
- QSize newSize( var->width, var->height );
+ TQSize newSize( var->width, var->height );
if ( oldSize != newSize )
- var->paragraph()->invalidate( 0 ); // size has changed -> need reformatting !
+ var->paragraph()->tqinvalidate( 0 ); // size has changed -> need reformatting !
var->paragraph()->setChanged( true );
}
}
@@ -632,7 +632,7 @@ void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, QPainter *painter, co
if ( m_doc->viewFormattingChars() )
drawingFlags |= KoTextDocument::DrawFormattingChars;
- //kdDebug(32001) << "KWTextFrameSet::drawFrame calling drawWYSIWYG. cg base color:" << cg.brush( QColorGroup::Base) << endl;
+ //kdDebug(32001) << "KWTextFrameSet::drawFrame calling drawWYSIWYG. cg base color:" << cg.brush( TQColorGroup::Base) << endl;
KoTextParag * lastFormatted = textDocument()->drawWYSIWYG(
painter, r.x(), r.y(), r.width(), r.height(),
cg, kWordDocument(),
@@ -646,59 +646,59 @@ void KWTextFrameSet::drawFrameContents( KWFrame *theFrame, QPainter *painter, co
// Finding the "last parag of the frame" is a bit tricky.
// It's usually the one before lastFormatted, except if it's actually lastParag :} [see KoTextDocument::draw]
KoTextParag * lastDrawn = lastFormatted->prev();
- if ( lastFormatted == textDocument()->lastParag() && ( !lastDrawn || m_doc->layoutUnitToPixelY( lastDrawn->rect().bottom() ) < r.bottom() ) )
+ if ( lastFormatted == textDocument()->lastParag() && ( !lastDrawn || m_doc->tqlayoutUnitToPixelY( lastDrawn->rect().bottom() ) < r.bottom() ) )
lastDrawn = lastFormatted;
//kdDebug(32002) << "KWTextFrameSet::drawFrame drawn. onlyChanged=" << onlyChanged << " resetChanged=" << resetChanged << " lastDrawn=" << lastDrawn->paragId() << " lastDrawn's bottom:" << lastDrawn->rect().bottom() << " r.bottom=" << r.bottom() << endl;
- if ( lastDrawn && m_doc->layoutUnitToPixelY( lastDrawn->rect().bottom() ) > r.bottom() )
+ if ( lastDrawn && m_doc->tqlayoutUnitToPixelY( lastDrawn->rect().bottom() ) > r.bottom() )
{
//kdDebug(32002) << "KWTextFrameSet::drawFrame setting lastDrawn " << lastDrawn->paragId() << " to changed" << endl;
lastDrawn->setChanged( true );
}
}
- // NOTE: QTextView sets m_lastFormatted to lastFormatted here
+ // NOTE: TQTextView sets m_lastFormatted to lastFormatted here
// But when scrolling up, this causes to reformat a lot of stuff for nothing.
// And updateViewArea takes care of formatting things before we even arrive here.
- // Blank area under the very last paragraph - QRT draws it up to textdoc->height,
+ // Blank area under the very last paragraph - TQRT draws it up to textdoc->height,
// we have to draw it from there up to the bottom of the last frame.
if ( ( !lastFormatted || lastFormatted == textDocument()->lastParag() )
&& viewMode->drawFrameBackground() )
{
// This is drawing code, so we convert everything to pixels
int docHeight = textDocument()->lastParag()->pixelRect(m_doc).bottom() + 1;
- //QRect frameRect = m_doc->zoomRect( (theFrame->innerRect()) );
+ //TQRect frameRect = m_doc->zoomRect( (theFrame->innerRect()) );
- QSize availSize = viewMode->availableSizeForText( this );
- QRect blank( 0, docHeight, availSize.width(), availSize.height() /*+ frameRect.height() ?? */ - docHeight );
+ TQSize availSize = viewMode->availableSizeForText( this );
+ TQRect blank( 0, docHeight, availSize.width(), availSize.height() /*+ frameRect.height() ?? */ - docHeight );
//kdDebug(32002) << this << " Blank area: " << blank << endl;
- painter->fillRect( blank, cg.brush( QColorGroup::Base ) );
+ painter->fillRect( blank, cg.brush( TQColorGroup::Base ) );
// for debugging :)
- //painter->setPen( QPen(Qt::blue, 1, DashLine) ); painter->drawRect( blank );
+ //painter->setPen( TQPen(TQt::blue, 1, DashLine) ); painter->drawRect( blank );
}
m_currentDrawnFrame = 0L;
}
-void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorVisible, KWCanvas *canvas, KWFrame *theFrame )
+void KWTextFrameSet::drawCursor( TQPainter *p, KoTextCursor *cursor, bool cursorVisible, KWCanvas *canvas, KWFrame *theFrame )
{
// This redraws the paragraph where the cursor is - with a small clip region around the cursor
m_currentViewMode = canvas->viewMode();
bool hasFrames = m_currentViewMode->hasFrames();
m_currentDrawnFrame = theFrame;
- QRect normalFrameRect;
+ TQRect normalFrameRect;
if (hasFrames)
normalFrameRect = m_doc->zoomRect( theFrame->innerRect() );
else
- normalFrameRect = QRect( QPoint(0, 0), m_currentViewMode->contentsSize() );
+ normalFrameRect = TQRect( TQPoint(0, 0), m_currentViewMode->contentsSize() );
KoTextParag* parag = cursor->parag();
- QPoint topLeft = parag->rect().topLeft(); // in QRT coords
+ TQPoint topLeft = parag->rect().topLeft(); // in TQRT coords
int lineY;
// Cursor height, in pixels
- int cursorHeight = m_doc->layoutUnitToPixelY( topLeft.y(), parag->lineHeightOfChar( cursor->index(), 0, &lineY ) );
- QPoint iPoint( topLeft.x() + cursor->x(),
+ int cursorHeight = m_doc->tqlayoutUnitToPixelY( topLeft.y(), parag->lineHeightOfChar( cursor->index(), 0, &lineY ) );
+ TQPoint iPoint( topLeft.x() + cursor->x(),
topLeft.y() + lineY );
#ifdef DEBUG_CURSOR
@@ -713,15 +713,15 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
{
#ifdef DEBUG_CURSOR
kdDebug() << " dPoint(doc, pts)=" << dPoint.x() << "," << dPoint.y() << endl;
- QPoint debugPt = m_doc->zoomPoint( dPoint );
+ TQPoint debugPt = m_doc->zoomPoint( dPoint );
kdDebug() << " zoomed dPoint(doc, pixels)=" << debugPt.x() << "," << debugPt.y() << endl;
#endif
- QPoint vPoint = m_currentViewMode->normalToView( m_doc->zoomPoint( dPoint ) ); // from doc to view contents
+ TQPoint vPoint = m_currentViewMode->normalToView( m_doc->zoomPoint( dPoint ) ); // from doc to view contents
#ifdef DEBUG_CURSOR
kdDebug() << " vPoint(view, pixels)=" << vPoint.x() << "," << vPoint.y() << endl;
#endif
// from now on, iPoint will be in pixels
- iPoint = m_doc->layoutUnitToPixel( iPoint );
+ iPoint = m_doc->tqlayoutUnitToPixel( iPoint );
//int xadj = parag->at( cursor->index() )->pixelxadj;
#ifdef DEBUG_CURSOR
//kdDebug() << " iPoint in pixels : " << iPoint.x() << "," << iPoint.y() << " will add xadj=" << xadj << endl;
@@ -729,23 +729,23 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
//iPoint.rx() += xadj;
//vPoint.rx() += xadj;
// very small clipping around the cursor
- QRect clip( vPoint.x() - 5, vPoint.y(), 10, cursorHeight );
+ TQRect clip( vPoint.x() - 5, vPoint.y(), 10, cursorHeight );
#ifdef DEBUG_CURSOR
kdDebug() << " clip(view, before intersect)=" << clip << endl;
#endif
- QRect viewFrameRect = m_currentViewMode->normalToView( normalFrameRect );
+ TQRect viewFrameRect = m_currentViewMode->normalToView( normalFrameRect );
clip &= viewFrameRect; // clip to frame
#ifdef DEBUG_CURSOR
kdDebug() << "KWTextFrameSet::drawCursor normalFrameRect=" << normalFrameRect
<< " clip(view, after intersect)=" << clip << endl;
#endif
- QRegion reg;
+ TQRegion reg;
if ( hasFrames ) {
reg = frameClipRegion( p, theFrame, clip, m_currentViewMode );
- if ( !isFloating() ) // problem with multiparent inline frames
+ if ( !isFloating() ) // problem with multitqparent inline frames
reg &= p->xForm( viewFrameRect );
}
@@ -753,11 +753,11 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
{
#ifdef DEBUG_CURSOR
// for debug only!
- //p->fillRect( clip, QBrush( Qt::red, QBrush::Dense3Pattern ) );
+ //p->fillRect( clip, TQBrush( TQt::red, TQBrush::Dense3Pattern ) );
#endif
p->save();
- QColorGroup cg = QApplication::palette().active();
+ TQColorGroup cg = TQApplication::tqpalette().active();
if ( hasFrames )
{
@@ -775,18 +775,18 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
// The settings come from this frame
KWFrame * settings = settingsFrame( theFrame );
- QBrush bgBrush( settings->backgroundColor() );
+ TQBrush bgBrush( settings->backgroundColor() );
bgBrush.setColor( KWDocument::resolveBgColor( bgBrush.color(), p ) );
- cg.setBrush( QColorGroup::Base, bgBrush );
+ cg.setBrush( TQColorGroup::Base, bgBrush );
// color of cursor, the inverse of the frame background
- QColor background = bgBrush.color();
- cg.setColor(QColorGroup::Text, QColor( 255 - background.red(),
+ TQColor background = bgBrush.color();
+ cg.setColor(TQColorGroup::Text, TQColor( 255 - background.red(),
255 - background.green(), 255 - background.blue()) );
}
else if(dynamic_cast<KWViewModeText *>(m_currentViewMode) != 0)
p->translate( KWViewModeText::OFFSET, 0 );
- QPixmap *pix = 0;
+ TQPixmap *pix = 0;
uint drawingFlags = KoTextDocument::DrawSelections;
if ( m_doc->backgroundSpellCheckEnabled() )
drawingFlags |= KoTextDocument::DrawMisspelledLine;
@@ -803,7 +803,7 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
textDocument()->drawParagWYSIWYG(
p, parag,
- QMAX(0, iPoint.x() - 5), // negative values create problems
+ TQMAX(0, iPoint.x() - 5), // negative values create problems
iPoint.y(), clip.width(), clip.height(),
pix, cg, m_doc, // TODO view's zoom handler
cursorVisible, cursor, FALSE /*resetChanged*/, drawingFlags );
@@ -816,7 +816,7 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
p->restore();
//XIM Position
- QPoint ximPoint = vPoint;
+ TQPoint ximPoint = vPoint;
canvas->setXimPosition( ximPoint.x(), ximPoint.y(),
0, cursorHeight - parag->lineSpacing( line ) );
}
@@ -824,23 +824,23 @@ void KWTextFrameSet::drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorV
m_currentDrawnFrame = 0L;
}
-void KWTextFrameSet::layout()
+void KWTextFrameSet::tqlayout()
{
- invalidate();
- // Get the thing going though, repainting doesn't call formatMore
+ tqinvalidate();
+ // Get the thing going though, tqrepainting doesn't call formatMore
m_textobj->formatMore( 2 );
}
-void KWTextFrameSet::invalidate()
+void KWTextFrameSet::tqinvalidate()
{
- //kdDebug() << "KWTextFrameSet::invalidate " << name() << endl;
+ //kdDebug() << "KWTextFrameSet::tqinvalidate " << name() << endl;
m_textobj->setLastFormattedParag( textDocument()->firstParag() );
- textDocument()->invalidate(); // lazy layout, real update follows upon next repaint
+ textDocument()->tqinvalidate(); // lazy tqlayout, real update follows upon next tqrepaint
}
void KWTextFrameSet::slotRepaintChanged()
{
- emit repaintChanged( this );
+ emit tqrepaintChanged( this );
}
int KWTextFrameSet::paragraphs()
@@ -864,7 +864,7 @@ int KWTextFrameSet::paragraphsSelected()
}
-bool KWTextFrameSet::statistics( QProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace, ulong & words,
+bool KWTextFrameSet::statistics( TQProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace, ulong & words,
ulong & sentences, ulong & syllables, ulong & lines, bool selected )
{
return m_textobj->statistics( progress, charsWithSpace, charsWithoutSpace, words, sentences, syllables, lines, selected );
@@ -873,15 +873,15 @@ bool KWTextFrameSet::statistics( QProgressDialog *progress, ulong & charsWithSpa
// Only interested in the body textframeset, not in header/footer
#define kdDebugBody(area) if ( frameSetInfo() == FI_BODY ) kdDebug(area)
-QValueList<KWFrame*> KWTextFrameSet::framesFromTo( int y1, int y2 ) const
+TQValueList<KWFrame*> KWTextFrameSet::framesFromTo( int y1, int y2 ) const
{
- QValueList<KWFrame*> framesList;
+ TQValueList<KWFrame*> framesList;
KoPoint pt;
- KWFrame * firstFrame = internalToDocument( QPoint(0, y1), pt );
+ KWFrame * firstFrame = internalToDocument( TQPoint(0, y1), pt );
if ( !firstFrame )
return framesList;
framesList.append( firstFrame );
- uint frameIndex = const_cast<KWTextFrameSet *>(this)->m_frames.findRef( firstFrame );
+ uint frameIndex = const_cast<KWTextFrameSet *>(this)->m_frames.tqfindRef( firstFrame );
while ( ++frameIndex < m_frames.count() ) {
KWFrame* f = frame( frameIndex );
if ( f->internalY() > y2 ) // too far down, we're done
@@ -926,7 +926,7 @@ void KWTextFrameSet::getMargins( int yp, int h, int reqMinWidth,
// List of text frames holding the paragraph (yp,yp+h)
// Usually there is only one, but you can have a paragraph
// starting in one frame/column and ending in another one.
- QValueList<KWFrame*> textFrames = framesFromTo( yp, yp + h );
+ TQValueList<KWFrame*> textFrames = framesFromTo( yp, yp + h );
if (textFrames.isEmpty())
{
#ifdef DEBUG_MARGINS
@@ -960,7 +960,7 @@ void KWTextFrameSet::getMargins( int yp, int h, int reqMinWidth,
if ( validHeight )
*validHeight = h; // TODO
- // Everything from there is in layout units
+ // Everything from there is in tqlayout units
// Note: it is very important that this method works in internal coordinates.
// Otherwise, parags broken at the line-level (e.g. between two columns) are seen
// as still in one piece, and we miss the frames in the 2nd column.
@@ -974,15 +974,15 @@ void KWTextFrameSet::getMargins( int yp, int h, int reqMinWidth,
#ifdef DEBUG_MARGINS
kdDebugBody(32002) << " getMargins: looking for frames between " << yp << " and " << yp+h << " (internal coords)" << endl;
#endif
- if ( m_doc->layoutViewMode()->shouldAdjustMargins() )
+ if ( m_doc->tqlayoutViewMode()->shouldAdjustMargins() )
{
// Principle: for every frame on top at this height, we'll move from and to
// towards each other. The text flows between 'from' and 'to'
- for ( QValueList<KWFrame*>::const_iterator txtit = textFrames.begin(), txtend = textFrames.end() ; txtit != txtend ; ++txtit ) {
+ for ( TQValueList<KWFrame*>::const_iterator txtit = textFrames.begin(), txtend = textFrames.end() ; txtit != txtend ; ++txtit ) {
KWFrame* theFrame = *txtit;
Q_ASSERT( theFrame->frameStack() );
- QValueList<KWFrame*> onTop = theFrame->frameStack()->framesOnTop();
- for (QValueListIterator<KWFrame*> fIt = onTop.begin(); from < to && fIt != onTop.end(); ++fIt )
+ TQValueList<KWFrame*> onTop = theFrame->frameStack()->framesOnTop();
+ for (TQValueListIterator<KWFrame*> fIt = onTop.begin(); from < to && fIt != onTop.end(); ++fIt )
{
if ( (*fIt)->runAround() == KWFrame::RA_BOUNDINGRECT )
{
@@ -990,24 +990,24 @@ void KWTextFrameSet::getMargins( int yp, int h, int reqMinWidth,
#ifdef DEBUG_MARGINS
kdDebugBody(32002) << " getMargins found frame on top " << (*fIt)->frameSet()->name() << " with rect-on-top at (normal coords) " << rectOnTop << endl;
#endif
- QPoint iTop, iBottom; // top and bottom of intersection in internal coordinates
+ TQPoint iTop, iBottom; // top and bottom of intersection in internal coordinates
if ( documentToInternal( rectOnTop.topLeft(), iTop ) &&
iTop.y() <= yp + h && // optimization
documentToInternal( rectOnTop.bottomRight(), iBottom ) )
{
#ifdef DEBUG_MARGINS
- kdDebugBody(32002) << " in internal coords: " << QRect(iTop,iBottom) << endl;
+ kdDebugBody(32002) << " in internal coords: " << TQRect(iTop,iBottom) << endl;
#endif
// Look for intersection between yp -- yp+h and iTop -- iBottom
- if ( QMAX( yp, iTop.y() ) <= QMIN( yp+h, iBottom.y() ) )
+ if ( TQMAX( yp, iTop.y() ) <= TQMIN( yp+h, iBottom.y() ) )
{
#ifdef DEBUG_MARGINS
kdDebugBody(32002) << " getMargins iTop=" << iTop.x() << "," << iTop.y()
<< " iBottom=" << iBottom.x() << "," << iBottom.y() << endl;
#endif
- int availLeft = QMAX( 0, iTop.x() - from );
- int availRight = QMAX( 0, to - iBottom.x() );
+ int availLeft = TQMAX( 0, iTop.x() - from );
+ int availRight = TQMAX( 0, to - iBottom.x() );
#ifdef DEBUG_MARGINS
kdDebugBody(32002) << " getMargins availLeft=" << availLeft
<< " availRight=" << availRight << endl;
@@ -1025,10 +1025,10 @@ void KWTextFrameSet::getMargins( int yp, int h, int reqMinWidth,
if ( chooseLeft )
// flow text at the left of the frame
- to = QMIN( to, from + availLeft - 1 ); // can only go left -> QMIN
+ to = TQMIN( to, from + availLeft - 1 ); // can only go left -> TQMIN
else
// flow text at the right of the frame
- from = QMAX( from, to - availRight + 1 ); // can only go right -> QMAX
+ from = TQMAX( from, to - availRight + 1 ); // can only go right -> TQMAX
#ifdef DEBUG_MARGINS
kdDebugBody(32002) << " getMargins from=" << from << " to=" << to << endl;
@@ -1052,8 +1052,8 @@ void KWTextFrameSet::getMargins( int yp, int h, int reqMinWidth,
}
else
{
- *breakBegin = QMIN( *breakBegin, iTop.y() );
- *breakEnd = QMAX( *breakEnd, iBottom.y() );
+ *breakBegin = TQMIN( *breakBegin, iTop.y() );
+ *breakEnd = TQMAX( *breakEnd, iBottom.y() );
}
#ifdef DEBUG_MARGINS
kdDebugBody(32002) << " getMargins iBottom.y=" << iBottom.y()
@@ -1113,7 +1113,7 @@ bool KWTextFrameSet::checkVerticalBreak( int & yp, int & hp, KoTextParag * parag
// its bottom. Without the +1, we hit the frame again on the next adjustLMargin call.
// Check for intersection between the parag (yp -- yp+hp) and the break area (breakBegin -- breakEnd)
- if ( QMAX( yp, breakBegin ) <= QMIN( yp+hp, breakEnd ) )
+ if ( TQMAX( yp, breakBegin ) <= TQMIN( yp+hp, breakEnd ) )
{
if ( !parag || linesTogether ) // Paragraph-level breaking
{
@@ -1126,7 +1126,7 @@ bool KWTextFrameSet::checkVerticalBreak( int & yp, int & hp, KoTextParag * parag
}
else // Line-level breaking
{
- QMap<int, KoTextParagLineStart*>& lineStarts = parag->lineStartList();
+ TQMap<int, KoTextParagLineStart*>& lineStarts = parag->lineStartList();
#ifdef DEBUG_FORMATVERTICALLY
kdDebug(32002) << "checkVerticalBreak parag " << parag->paragId()
<< ". lineStarts has " << lineStarts.count()
@@ -1134,7 +1134,7 @@ bool KWTextFrameSet::checkVerticalBreak( int & yp, int & hp, KoTextParag * parag
#endif
int dy = 0;
int line = 0;
- QMap<int, KoTextParagLineStart*>::Iterator it = lineStarts.begin();
+ TQMap<int, KoTextParagLineStart*>::Iterator it = lineStarts.begin();
for ( ; it != lineStarts.end() ; ++it, ++line )
{
KoTextParagLineStart * ls = it.data();
@@ -1149,7 +1149,7 @@ bool KWTextFrameSet::checkVerticalBreak( int & yp, int & hp, KoTextParag * parag
#endif
if ( !dy )
{
- if ( QMAX( y, breakBegin ) <= QMIN( y + ls->h, breakEnd ) )
+ if ( TQMAX( y, breakBegin ) <= TQMIN( y + ls->h, breakEnd ) )
{
if ( line == 0 ) // First line ? It's like a paragraph breaking then
{
@@ -1189,11 +1189,11 @@ bool KWTextFrameSet::checkVerticalBreak( int & yp, int & hp, KoTextParag * parag
return false;
}
-int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRect )
+int KWTextFrameSet::formatVertically( KoTextParag * _parag, const TQRect& paragRect )
{
// WARNING: in this whole method parag can be 0. See adjustFlow()
KWTextParag *parag = static_cast<KWTextParag *>( _parag );
- if ( !m_doc->layoutViewMode()->shouldFormatVertically() )
+ if ( !m_doc->tqlayoutViewMode()->shouldFormatVertically() )
{
return 0;
}
@@ -1229,7 +1229,7 @@ int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRe
#endif
int totalHeight = 0;
- QPtrListIterator<KWFrame> frameIt( frameIterator() );
+ TQPtrListIterator<KWFrame> frameIt( frameIterator() );
for ( ; frameIt.current(); ++frameIt )
{
int frameHeight = kWordDocument()->ptToLayoutUnitPixY( frameIt.current()->innerHeight() );
@@ -1241,7 +1241,7 @@ int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRe
{
// ## TODO optimize this [maybe we should simply start from the end in the main loop?]
// Or cache the attribute ( e.g. "frame->hasCopy()" ).
- QPtrListIterator<KWFrame> nextFrame( frameIt );
+ TQPtrListIterator<KWFrame> nextFrame( frameIt );
while ( !check && !nextFrame.atLast() )
{
++nextFrame;
@@ -1271,7 +1271,7 @@ int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRe
// don't move down parags that have only one line and are bigger than the page (e.g. floating tables)
if ( hp < frameHeight || ( parag && parag->lineStartList().count() > 1 ) )
{
- // breakBegin==breakEnd==bottom, since the next frame's top is the same as bottom, in QRT coords.
+ // breakBegin==breakEnd==bottom, since the next frame's top is the same as bottom, in TQRT coords.
(void) checkVerticalBreak( yp, hp, parag, linesTogether, bottom, bottom );
// Some people write a single paragraph over 3 frames! So we have to keep looking, that's why we ignore the return value
}
@@ -1293,13 +1293,13 @@ int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRe
for ( ; frameIt.current(); ++frameIt )
{
Q_ASSERT( frameIt.current()->frameStack() );
- QValueList<KWFrame*> onTop = frameIt.current()->frameStack()->framesOnTop();
- for (QValueListIterator<KWFrame*> fIt = onTop.begin(); fIt != onTop.end(); ++fIt )
+ TQValueList<KWFrame*> onTop = frameIt.current()->frameStack()->framesOnTop();
+ for (TQValueListIterator<KWFrame*> fIt = onTop.begin(); fIt != onTop.end(); ++fIt )
{
if ( (*fIt)->runAround() == KWFrame::RA_SKIP )
{
KoRect rectOnTop = frameIt.current()->intersect( (*fIt)->runAroundRect() );
- QPoint iTop, iBottom; // top and bottom in internal coordinates
+ TQPoint iTop, iBottom; // top and bottom in internal coordinates
if ( documentToInternal( rectOnTop.topLeft(), iTop ) &&
iTop.y() <= yp + hp &&
documentToInternal( rectOnTop.bottomLeft(), iBottom ) &&
@@ -1339,7 +1339,7 @@ int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRe
if ( hp != oldHeight )
parag->setHeight( hp );
if ( yp != oldY ) {
- QRect r = parag->rect();
+ TQRect r = parag->rect();
r.moveBy( 0, yp - oldY );
parag->setRect( r );
parag->setMovedDown( true );
@@ -1355,7 +1355,7 @@ int KWTextFrameSet::formatVertically( KoTextParag * _parag, const QRect& paragRe
// There is no parag pointer in that case.
int KWTextFrameSet::adjustFlow( int y, int w, int h )
{
- QRect r( 0, y, w, h );
+ TQRect r( 0, y, w, h );
return formatVertically( 0L, r );
}
@@ -1367,11 +1367,11 @@ void KWTextFrameSet::fixParagWidth( KWTextParag* parag )
if ( parag->hardFrameBreakAfter() )
{
KoTextFormat * lastFormat = parag->at( parag->length() - 1 )->format();
- const QFontMetrics& refFontMetrics = lastFormat->refFontMetrics();
+ const TQFontMetrics& refFontMetrics = lastFormat->refFontMetrics();
// keep in sync with KWTextFrameSet::formatVertically
- QString str = i18n( "--- Frame Break ---" );
+ TQString str = i18n( "--- Frame Break ---" );
int width = refFontMetrics.width( str );
- parag->setWidth( QMIN( parag->rect().width() + width, textDocument()->width() ) );
+ parag->setWidth( TQMIN( parag->rect().width() + width, textDocument()->width() ) );
}
else // default KoTextFormatter implementation
parag->fixParagWidth( true );
@@ -1450,15 +1450,15 @@ void KWTextFrameSet::updateFrames( int flags )
// Adjustment on 20-Jun-2002 which does not change the itent of this but moves the
// sorting from top-left of frame to the whole frame area. (TZ)
- QValueList<FrameStruct> sortedFrames;
+ TQValueList<FrameStruct> sortedFrames;
int width = 0;
- QPtrListIterator<KWFrame> frameIter( frameIterator() );
+ TQPtrListIterator<KWFrame> frameIter( frameIterator() );
for ( ; frameIter.current(); ++frameIter )
{
// Calculate max width while we're at it
//kdDebug(32002) << "KWTextFrameSet::updateFrames frame " << *frameIter.current() << " innerWidth=" << frameIter.current()->innerWidth() << "pt" << endl;
- width = QMAX( width, m_doc->ptToLayoutUnitPixX( frameIter.current()->innerWidth()));
+ width = TQMAX( width, m_doc->ptToLayoutUnitPixX( frameIter.current()->innerWidth()));
if ( flags & SortFrames )
{
FrameStruct str;
@@ -1470,7 +1470,7 @@ void KWTextFrameSet::updateFrames( int flags )
{
//kdDebug(32002) << "KWTextFrameSet::updateFrames setWidth " << width << " LU pixels." << endl;
//textDocument()->setMinimumWidth( -1, 0 );
- textDocument()->setWidth( width + 1 ); // QRect semantics problem (#32866)
+ textDocument()->setWidth( width + 1 ); // TQRect semantics problem (#32866)
} //else kdDebug(32002) << "KWTextFrameSet::updateFrames width already " << width << " LU pixels." << endl;
if ( flags & SortFrames )
@@ -1481,7 +1481,7 @@ void KWTextFrameSet::updateFrames( int flags )
m_frames.setAutoDelete( false );
m_frames.clear();
- QValueList<FrameStruct>::Iterator it = sortedFrames.begin();
+ TQValueList<FrameStruct>::Iterator it = sortedFrames.begin();
for ( ; it != sortedFrames.end() ; ++it )
m_frames.append( (*it).frame );
}
@@ -1491,7 +1491,7 @@ void KWTextFrameSet::updateFrames( int flags )
double lastRealFrameHeight = 0;
bool firstFrame = true;
- QPtrListIterator<KWFrame> frameIt( m_frames );
+ TQPtrListIterator<KWFrame> frameIt( m_frames );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame* theFrame = frameIt.current();
@@ -1528,7 +1528,7 @@ KWFrame * KWTextFrameSet::internalToDocument( const KoPoint &relPoint, KoPoint &
#ifdef DEBUG_ITD
kdDebug() << name() << " ITD called for relPoint=" << relPoint.x() << "," << relPoint.y() << endl;
#endif
- if ( !m_doc->layoutViewMode()->hasFrames() ) { // text viewmode
+ if ( !m_doc->tqlayoutViewMode()->hasFrames() ) { // text viewmode
dPoint = relPoint;
return m_frames.getFirst();
}
@@ -1628,7 +1628,7 @@ KWFrame * KWTextFrameSet::internalToDocument( const KoPoint &relPoint, KoPoint &
}
// Now iterate over the frames in page 'result' and find the right one
- QPtrListIterator<KWFrame> frameIt( *m_framesInPage[result] );
+ TQPtrListIterator<KWFrame> frameIt( *m_framesInPage[result] );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame *theFrame = frameIt.current();
@@ -1636,7 +1636,7 @@ KWFrame * KWTextFrameSet::internalToDocument( const KoPoint &relPoint, KoPoint &
#ifdef DEBUG_ITD
kdDebug() << "KWTextFrameSet::internalToDocument frame's relative rect:" << relRect << endl;
#endif
- if ( relRect.contains( relPoint ) ) // both relRect and relPoint are in "relative coordinates"
+ if ( relRect.tqcontains( relPoint ) ) // both relRect and relPoint are in "relative coordinates"
{
dPoint = internalToDocumentKnowingFrame( relPoint, theFrame );
return theFrame;
@@ -1651,9 +1651,9 @@ KWFrame * KWTextFrameSet::internalToDocument( const KoPoint &relPoint, KoPoint &
}
// same but with iPoint in LU
-KWFrame * KWTextFrameSet::internalToDocument( const QPoint &iPoint, KoPoint &dPoint ) const
+KWFrame * KWTextFrameSet::internalToDocument( const TQPoint &iPoint, KoPoint &dPoint ) const
{
- KoPoint relPoint = m_doc->layoutUnitPtToPt( m_doc->pixelToPt( iPoint ) );
+ KoPoint relPoint = m_doc->tqlayoutUnitPtToPt( m_doc->pixelToPt( iPoint ) );
return internalToDocument( relPoint, dPoint );
}
@@ -1666,7 +1666,7 @@ void KWTextFrameSet::printDebug()
kdDebug() << "KoTextDocument width = " << textDocument()->width() << " height = " << textDocument()->height() << endl;
}
- QPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
+ TQPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
for ( ; cit.current() ; ++cit )
{
KWAnchor *anc = dynamic_cast<KWAnchor *>( cit.current() );
@@ -1676,13 +1676,13 @@ void KWTextFrameSet::printDebug()
}
#endif
-QDomElement KWTextFrameSet::saveInternal( QDomElement &parentElem, bool saveFrames, bool saveAnchorsFramesets )
+TQDomElement KWTextFrameSet::saveInternal( TQDomElement &tqparentElem, bool saveFrames, bool saveAnchorsFramesets )
{
if ( m_frames.isEmpty() ) // Deleted frameset -> don't save
- return QDomElement();
+ return TQDomElement();
- QDomElement framesetElem = parentElem.ownerDocument().createElement( "FRAMESET" );
- parentElem.appendChild( framesetElem );
+ TQDomElement framesetElem = tqparentElem.ownerDocument().createElement( "FRAMESET" );
+ tqparentElem.appendChild( framesetElem );
if ( m_groupmanager ) {
framesetElem.setAttribute( "grpMgr", m_groupmanager->name() );
@@ -1708,7 +1708,7 @@ QDomElement KWTextFrameSet::saveInternal( QDomElement &parentElem, bool saveFram
return framesetElem;
}
-KWFrame* KWTextFrameSet::loadOasisTextFrame( const QDomElement& frameTag, const QDomElement &tag, KoOasisContext& context )
+KWFrame* KWTextFrameSet::loadOasisTextFrame( const TQDomElement& frameTag, const TQDomElement &tag, KoOasisContext& context )
{
context.styleStack().save();
context.fillStyleStack( frameTag, KoXmlNS::draw, "style-name", "graphic" ); // get the style for the graphics element
@@ -1718,14 +1718,14 @@ KWFrame* KWTextFrameSet::loadOasisTextFrame( const QDomElement& frameTag, const
// Load minimum height - only available for text-box
bool hasMinHeight = tag.hasAttributeNS( KoXmlNS::fo, "min-height" );
if ( hasMinHeight ) {
- double height = KoUnit::parseValue( tag.attributeNS( KoXmlNS::fo, "min-height", QString::null ) );
+ double height = KoUnit::parseValue( tag.attributeNS( KoXmlNS::fo, "min-height", TQString() ) );
frame->setMinimumFrameHeight( height );
if ( height > frame->height() || !tag.hasAttributeNS( KoXmlNS::fo, "height" ) )
frame->setHeight( height );
}
// Load overflow behavior (OASIS 14.27.27, not in OO-1.1 DTD). This is here since it's only for text framesets.
- const QString overflowBehavior = context.styleStack().attributeNS( KoXmlNS::style, "overflow-behavior" );
+ const TQString overflowBehavior = context.styleStack().attributeNS( KoXmlNS::style, "overflow-behavior" );
if ( frame->minimumFrameHeight() > 0 )
frame->setFrameBehavior( KWFrame::AutoExtendFrame );
else if ( overflowBehavior == "auto-create-new-frame" )
@@ -1743,12 +1743,12 @@ KWFrame* KWTextFrameSet::loadOasisTextFrame( const QDomElement& frameTag, const
return frame;
}
-void KWTextFrameSet::loadOasisContent( const QDomElement &bodyElem, KoOasisContext& context )
+void KWTextFrameSet::loadOasisContent( const TQDomElement &bodyElem, KoOasisContext& context )
{
return m_textobj->loadOasisContent( bodyElem, context, m_doc->styleCollection() );
}
-KWFrame* KWTextFrameSet::loadOasis( const QDomElement& frameTag, const QDomElement &tag, KoOasisContext& context )
+KWFrame* KWTextFrameSet::loadOasis( const TQDomElement& frameTag, const TQDomElement &tag, KoOasisContext& context )
{
KWFrame* frame = loadOasisTextFrame( frameTag, tag, context );
loadOasisContent( tag, context );
@@ -1765,7 +1765,7 @@ void KWTextFrameSet::saveOasisContent( KoXmlWriter& writer, KoSavingContext& con
{
// TODO save protectContent
- QMap<const KoTextParag*, KoTextBookmarkList> bookmarksPerParagraph;
+ TQMap<const KoTextParag*, KoTextBookmarkList> bookmarksPerParagraph;
if ( m_doc->bookmarkList() )
bookmarksPerParagraph = m_doc->bookmarkList()->bookmarksPerParagraph();
@@ -1795,9 +1795,9 @@ void KWTextFrameSet::saveOasisContent( KoXmlWriter& writer, KoSavingContext& con
}
- // I want Qt4's QMap/QHash::value()!
+ // I want TQt4's TQMap/TQHash::value()!
KoSavingContext::BookmarkPositions bookmarkStarts, bookmarkEnds;
- QMap<const KoTextParag*, KoTextBookmarkList>::const_iterator bkit = bookmarksPerParagraph.find( parag );
+ TQMap<const KoTextParag*, KoTextBookmarkList>::const_iterator bkit = bookmarksPerParagraph.tqfind( parag );
if ( bkit != bookmarksPerParagraph.end() ) {
// Massage a bit the bookmarks data; KoTextParag wants it ordered by position, for speed.
const KoTextBookmarkList& bookmarks = *bkit;
@@ -1835,10 +1835,10 @@ void KWTextFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context, b
{
// Save first frame with the whole contents
KWFrame* frame = m_frames.getFirst();
- QString lastFrameName = name();
+ TQString lastFrameName = name();
frame->startOasisFrame( writer, context.mainStyles(), lastFrameName );
- QString nextFrameName = name() + "-";
+ TQString nextFrameName = name() + "-";
writer.startElement( "draw:text-box" );
if ( frame->frameBehavior() == KWFrame::AutoExtendFrame )
@@ -1853,18 +1853,18 @@ void KWTextFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context, b
if ( saveFrames ) // false when called from KWDocument::saveSelectedFrames
{
int frameNumber = 2;
- QPtrListIterator<KWFrame> frameIter( frameIterator() );
+ TQPtrListIterator<KWFrame> frameIter( frameIterator() );
++frameIter; // skip first frame, already saved
for ( ; frameIter.current(); ++frameIter, ++frameNumber )
{
- const QString frameName = nextFrameName + QString::number( frameNumber );
+ const TQString frameName = nextFrameName + TQString::number( frameNumber );
frameIter.current()->startOasisFrame( writer, context.mainStyles(), frameName, lastFrameName );
lastFrameName = frameName; // this is used for copy-frames
writer.startElement( "draw:text-box" );
if ( frame->frameBehavior() == KWFrame::AutoExtendFrame )
writer.addAttributePt( "fo:min-height", frame->minimumFrameHeight() );
if ( frameNumber < (int)m_frames.count() )
- writer.addAttribute( "draw:chain-next-name", nextFrameName + QString::number( frameNumber+1 ) );
+ writer.addAttribute( "draw:chain-next-name", nextFrameName + TQString::number( frameNumber+1 ) );
// No contents. Well, OOo saves an empty paragraph, but I'd say that's wrong.
writer.endElement();
writer.endElement(); // draw:frame
@@ -1872,7 +1872,7 @@ void KWTextFrameSet::saveOasis( KoXmlWriter& writer, KoSavingContext& context, b
}
}
-void KWTextFrameSet::load( QDomElement &attributes, bool loadFrames )
+void KWTextFrameSet::load( TQDomElement &attributes, bool loadFrames )
{
KWFrameSet::load( attributes, loadFrames );
if ( attributes.hasAttribute( "protectContent"))
@@ -1883,7 +1883,7 @@ void KWTextFrameSet::load( QDomElement &attributes, bool loadFrames )
KWTextParag *lastParagraph = 0L;
// <PARAGRAPH>
- QDomElement paragraph = attributes.firstChild().toElement();
+ TQDomElement paragraph = attributes.firstChild().toElement();
for ( ; !paragraph.isNull() ; paragraph = paragraph.nextSibling().toElement() )
{
if ( paragraph.tagName() == "PARAGRAPH" )
@@ -1928,7 +1928,7 @@ void KWTextFrameSet::setVisible(bool visible)
void KWTextFrameSet::setInlineFramesVisible(bool visible)
{
- QPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
+ TQPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
for ( ; cit.current() ; ++cit )
{
KWAnchor *anc = dynamic_cast<KWAnchor *>( cit.current() );
@@ -1937,7 +1937,7 @@ void KWTextFrameSet::setInlineFramesVisible(bool visible)
}
}
-void KWTextFrameSet::addTextFrameSets( QPtrList<KWTextFrameSet> & lst, bool onlyReadWrite )
+void KWTextFrameSet::addTextFrameSets( TQPtrList<KWTextFrameSet> & lst, bool onlyReadWrite )
{
if (!textObject()->protectContent() || !onlyReadWrite)
lst.append(this);
@@ -1984,7 +1984,7 @@ bool KWTextFrameSet::slotAfterFormattingNeedMoreSpace( int bottom, KoTextParag *
frmBehavior = KWFrame::Ignore;
}
- int difference = ( bottom + 2 ) - availHeight; // in layout unit pixels
+ int difference = ( bottom + 2 ) - availHeight; // in tqlayout unit pixels
#ifdef DEBUG_FORMAT_MORE
kdDebug(32002) << "AutoExtendFrame bottom=" << bottom << " availHeight=" << availHeight
<< " => difference = " << difference << endl;
@@ -2010,7 +2010,7 @@ bool KWTextFrameSet::slotAfterFormattingNeedMoreSpace( int bottom, KoTextParag *
// The Y position doesn't matter much, recalcFrames will reposition the frame
// But the point of this code is set the correct height for the frame.
double maxFooterSize = footerHeaderSizeMax( theFrame );
- double diffPt = m_doc->layoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
+ double diffPt = m_doc->tqlayoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
wantedPosition = theFrame->top() - diffPt;
#ifdef DEBUG_FORMAT_MORE
kdDebug() << " diffPt=" << diffPt << " -> wantedPosition=" << wantedPosition << endl;
@@ -2038,24 +2038,24 @@ bool KWTextFrameSet::slotAfterFormattingNeedMoreSpace( int bottom, KoTextParag *
}
// Other frames are resized by the bottom
- wantedPosition = m_doc->layoutUnitPtToPt( m_doc->pixelYToPt( difference ) ) + theFrame->bottom();
+ wantedPosition = m_doc->tqlayoutUnitPtToPt( m_doc->pixelYToPt( difference ) ) + theFrame->bottom();
KWPage *page = m_doc->pageManager()->page( theFrame );
double pageBottom;
if(page)
pageBottom = page->offsetInDocument() + page->height() - page->bottomMargin();
else
pageBottom = theFrame->bottom();
- double newPosition = QMIN( wantedPosition, pageBottom );
+ double newPosition = TQMIN( wantedPosition, pageBottom );
kdDebug(32002) << "wantedPosition=" << wantedPosition << " pageBottom=" << pageBottom
<< " -> newPosition=" << newPosition << endl;
if ( theFrame->frameSet()->isAHeader() )
{
double maxHeaderSize=footerHeaderSizeMax( theFrame );
- newPosition = QMIN( newPosition, maxHeaderSize + theFrame->top() );
+ newPosition = TQMIN( newPosition, maxHeaderSize + theFrame->top() );
}
- newPosition = QMAX( newPosition, theFrame->top() ); // avoid negative heights
+ newPosition = TQMAX( newPosition, theFrame->top() ); // avoid negative heights
kdDebug(32002) << "newPosition=" << newPosition << endl;
bool resized = false;
@@ -2065,7 +2065,7 @@ bool KWTextFrameSet::slotAfterFormattingNeedMoreSpace( int bottom, KoTextParag *
kdDebug(32002) << "is table cell; just setting new minFrameHeight, to " << newPosition - theFrame->top() << endl;
#endif
double newMinFrameHeight = newPosition - theFrame->top();
- resized = QABS( newMinFrameHeight - theFrame->minimumFrameHeight() ) > 1E-10;
+ resized = TQABS( newMinFrameHeight - theFrame->minimumFrameHeight() ) > 1E-10;
if ( resized ) {
theFrame->setMinimumFrameHeight( newMinFrameHeight );
KWTableFrameSet::Cell *cell = (KWTableFrameSet::Cell *)theFrame->frameSet();
@@ -2086,7 +2086,7 @@ bool KWTextFrameSet::slotAfterFormattingNeedMoreSpace( int bottom, KoTextParag *
// The Y position doesn't matter much, recalcFrames will reposition the frame
// But the point of this code is set the correct height for the frame.
double maxFooterSize = footerHeaderSizeMax( theFrame );
- double diffPt = m_doc->layoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
+ double diffPt = m_doc->tqlayoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
wantedPosition = theFrame->top() - diffPt;
if ( wantedPosition < 0 )
{
@@ -2108,7 +2108,7 @@ bool KWTextFrameSet::slotAfterFormattingNeedMoreSpace( int bottom, KoTextParag *
}
return true; // abort formatting for now (not sure this is correct)
} else {
- resized = QABS( theFrame->bottom() - newPosition ) > 1E-10;
+ resized = TQABS( theFrame->bottom() - newPosition ) > 1E-10;
#ifdef DEBUG_FORMAT_MORE
kdDebug() << " bottom=" << theFrame->bottom() << " new position:" << newPosition << " wantedPosition=" << wantedPosition << " resized=" << resized << endl;
#endif
@@ -2183,7 +2183,7 @@ void KWTextFrameSet::slotAfterFormattingTooMuchSpace( int bottom )
#endif
if ( theFrame->frameSet()->isAFooter() || theFrame->frameSet()->isFootEndNote() )
{
- double wantedPosition = theFrame->top() + m_doc->layoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
+ double wantedPosition = theFrame->top() + m_doc->tqlayoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
Q_ASSERT( wantedPosition < theFrame->bottom() );
if ( wantedPosition != theFrame->top() )
{
@@ -2199,11 +2199,11 @@ void KWTextFrameSet::slotAfterFormattingTooMuchSpace( int bottom )
}
else // header or other frame: resize bottom
{
- double wantedPosition = theFrame->bottom() - m_doc->layoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
+ double wantedPosition = theFrame->bottom() - m_doc->tqlayoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
#ifdef DEBUG_FORMAT_MORE
kdDebug() << "slotAfterFormatting wantedPosition=" << wantedPosition << " top+minheight=" << theFrame->top() + s_minFrameHeight << endl;
#endif
- wantedPosition = QMAX( wantedPosition, theFrame->top() + s_minFrameHeight );
+ wantedPosition = TQMAX( wantedPosition, theFrame->top() + s_minFrameHeight );
if( theFrame->frameSet()->groupmanager() ) {
if ( wantedPosition != theFrame->bottom()) {
KWTableFrameSet *table = theFrame->frameSet()->groupmanager();
@@ -2231,7 +2231,7 @@ void KWTextFrameSet::slotAfterFormattingTooMuchSpace( int bottom )
else if ( table->anchorFrameset()->isAFooter() || table->anchorFrameset()->isFootEndNote() )
{
theFrame = table->anchorFrameset()->frameIterator().getLast();
- double wantedPosition = theFrame->top() + m_doc->layoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
+ double wantedPosition = theFrame->top() + m_doc->tqlayoutUnitPtToPt( m_doc->pixelYToPt( difference ) );
Q_ASSERT( wantedPosition < theFrame->bottom() );
if ( wantedPosition != theFrame->top() )
{
@@ -2244,7 +2244,7 @@ void KWTextFrameSet::slotAfterFormattingTooMuchSpace( int bottom )
}
} else {
// Also apply the frame's minimum height
- wantedPosition = QMAX( wantedPosition, theFrame->top() + theFrame->minimumFrameHeight() );
+ wantedPosition = TQMAX( wantedPosition, theFrame->top() + theFrame->minimumFrameHeight() );
if ( wantedPosition != theFrame->bottom()) {
#ifdef DEBUG_FORMAT_MORE
kdDebug() << " the frame was " << *theFrame << endl;
@@ -2340,8 +2340,8 @@ bool KWTextFrameSet::createNewPageAndNewFrame( KoTextParag* lastFormatted, int /
if(isMainFrameset()) // is never added in the framesToCopyOnNewPage
heightWeWillGet += m_doc->ptToLayoutUnitPixY( m_frames.last()->height() );
else {
- QPtrList<KWFrame> framesToCopy = m_doc->framesToCopyOnNewPage( lastPageNumber );
- QPtrListIterator<KWFrame> frameIt( framesToCopy );
+ TQPtrList<KWFrame> framesToCopy = m_doc->framesToCopyOnNewPage( lastPageNumber );
+ TQPtrListIterator<KWFrame> frameIt( framesToCopy );
for ( ; frameIt.current(); ++frameIt )
if (frameIt.current()->frameSet() == this &&
frameIt.current()->newFrameBehavior()==KWFrame::Reconnect)
@@ -2388,7 +2388,7 @@ bool KWTextFrameSet::createNewPageAndNewFrame( KoTextParag* lastFormatted, int /
Q_ASSERT(frame(0) && frame(0)->frameStack());
frame(0)->frameStack()->update();
/// We don't want to start from the beginning every time !
- ////m_doc->invalidate();
+ ////m_doc->tqinvalidate();
// Reformat the last paragraph. If it's over the two pages, it will need
// the new page (e.g. for inline frames that need internalToDocument to work)
@@ -2400,7 +2400,7 @@ bool KWTextFrameSet::createNewPageAndNewFrame( KoTextParag* lastFormatted, int /
if ( lastFormatted )
{
m_textobj->setLastFormattedParag( lastFormatted );
- lastFormatted->invalidate( 0 );
+ lastFormatted->tqinvalidate( 0 );
//This was a way to format the rest from here (recursively), but it didn't help much ensureCursorVisible()
//So instead I fixed formatMore to return formatMore(2) itself.
//m_textobj->formatMore( 2 );
@@ -2414,7 +2414,7 @@ double KWTextFrameSet::footNoteSize( KWFrame *theFrame )
{
double tmp =0.0;
int page = theFrame->pageNumber();
- QPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
for ( ; fit.current() ; ++fit )
{
if((fit.current()->isFootNote() || fit.current()->isEndNote()) &&
@@ -2439,7 +2439,7 @@ double KWTextFrameSet::footerHeaderSizeMax( KWFrame *theFrame )
bool header=theFrame->frameSet()->isAHeader();
if( header ? m_doc->isHeaderVisible():m_doc->isFooterVisible() )
{
- QPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
for ( ; fit.current() ; ++fit )
{
bool state = header ? fit.current()->isAFooter():fit.current()->isAHeader();
@@ -2459,9 +2459,9 @@ double KWTextFrameSet::footerHeaderSizeMax( KWFrame *theFrame )
return tmp;
}
-void KWTextFrameSet::frameResized( KWFrame *theFrame, bool invalidateLayout )
+void KWTextFrameSet::frameResized( KWFrame *theFrame, bool tqinvalidateLayout )
{
- kdDebug(32002) << "KWTextFrameSet::frameResized " << theFrame << " " << *theFrame << " invalidateLayout=" << invalidateLayout << endl;
+ kdDebug(32002) << "KWTextFrameSet::frameResized " << theFrame << " " << *theFrame << " tqinvalidateLayout=" << tqinvalidateLayout << endl;
if ( theFrame->height() < 0 )
return; // safety!
@@ -2484,12 +2484,12 @@ void KWTextFrameSet::frameResized( KWFrame *theFrame, bool invalidateLayout )
m_doc->recalcFrames( theFrame->pageNumber(), -1 ); // warning this can delete theFrame!
// m_doc->frameChanged( theFrame );
- // Warning, can't call layout() (frameChanged calls it)
+ // Warning, can't call tqlayout() (frameChanged calls it)
// from here, since it calls formatMore() !
- if ( invalidateLayout )
- m_doc->invalidate(this);
+ if ( tqinvalidateLayout )
+ m_doc->tqinvalidate(this);
- // Can't repaint directly, we might be in a paint event already
+ // Can't tqrepaint directly, we might be in a paint event already
m_doc->delayedRepaintAllViews();
}
@@ -2526,7 +2526,7 @@ bool KWTextFrameSet::canRemovePage( int num )
return true;
}
- QPtrListIterator<KWFrame> frameIt( framesInPage( num ) );
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( num ) );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame * theFrame = frameIt.current();
@@ -2553,7 +2553,7 @@ void KWTextFrameSet::deleteFrame( unsigned int num, bool remove, bool recalc )
KWFrameSet::deleteFrame( num, remove, recalc );
}
-void KWTextFrameSet::updateViewArea( QWidget * w, KWViewMode* viewMode, const QPoint & nPointBottom )
+void KWTextFrameSet::updateViewArea( TQWidget * w, KWViewMode* viewMode, const TQPoint & nPointBottom )
{
if (!isVisible(viewMode))
return;
@@ -2572,10 +2572,10 @@ void KWTextFrameSet::updateViewArea( QWidget * w, KWViewMode* viewMode, const QP
else
{
// Find frames on that page, and keep the max bottom, in internal coordinates
- QPtrListIterator<KWFrame> frameIt( framesInPage( maxPage ) );
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( maxPage ) );
for ( ; frameIt.current(); ++frameIt )
{
- maxY = QMAX( maxY, m_doc->ptToLayoutUnitPixY( frameIt.current()->internalY() + frameIt.current()->innerHeight() ) );
+ maxY = TQMAX( maxY, m_doc->ptToLayoutUnitPixY( frameIt.current()->internalY() + frameIt.current()->innerHeight() ) );
}
}
#ifdef DEBUG_VIEWAREA
@@ -2610,7 +2610,7 @@ KCommand * KWTextFrameSet::setPageBreakingCommand( KoTextCursor * cursor, int pa
}
m_textobj->formatMore( 2 );
- emit repaintChanged( this );
+ emit tqrepaintChanged( this );
KoTextObject::UndoRedoInfo & undoRedoInfo = m_textobj->undoRedoInfoStruct();
undoRedoInfo.newParagLayout.pageBreaking = pageBreaking;
KoTextParagCommand *cmd = new KoTextParagCommand(
@@ -2626,7 +2626,7 @@ KCommand * KWTextFrameSet::setPageBreakingCommand( KoTextCursor * cursor, int pa
return new KoTextCommand( m_textobj, /*cmd, */i18n("Change Paragraph Attribute") );
}
-KCommand * KWTextFrameSet::pasteOasis( KoTextCursor * cursor, const QByteArray & data, bool removeSelected )
+KCommand * KWTextFrameSet::pasteOasis( KoTextCursor * cursor, const TQByteArray & data, bool removeSelected )
{
if (protectContent() )
return 0;
@@ -2642,7 +2642,7 @@ KCommand * KWTextFrameSet::pasteOasis( KoTextCursor * cursor, const QByteArray &
KWOasisPasteCommand * cmd = new KWOasisPasteCommand( textDocument(), cursor->parag()->paragId(), cursor->index(), data );
textDocument()->addCommand( cmd );
- macroCmd->addCommand( new KoTextCommand( m_textobj, /*cmd, */QString::null ) );
+ macroCmd->addCommand( new KoTextCommand( m_textobj, /*cmd, */TQString() ) );
*cursor = *( cmd->execute( cursor ) );
@@ -2650,7 +2650,7 @@ KCommand * KWTextFrameSet::pasteOasis( KoTextCursor * cursor, const QByteArray &
//m_textobj->formatMore( 2 );
ensureFormatted( cursor->parag() );
- emit repaintChanged( this );
+ emit tqrepaintChanged( this );
m_textobj->emitEnsureCursorVisible();
m_textobj->emitUpdateUI( true );
m_textobj->emitShowCursor();
@@ -2671,12 +2671,12 @@ void KWTextFrameSet::insertTOC( KoTextCursor * cursor )
KoTextDocCommand * cmd = new KWInsertTOCCommand( this,cur ? cur->parag(): cursor->parag() );
textDocument()->addCommand( cmd );
- macroCmd->addCommand( new KoTextCommand( m_textobj, QString::null ) );
+ macroCmd->addCommand( new KoTextCommand( m_textobj, TQString() ) );
*cursor = *( cmd->execute( cursor ) );
m_textobj->setLastFormattedParag( textDocument()->firstParag() );
m_textobj->formatMore( 2 );
- emit repaintChanged( this );
+ emit tqrepaintChanged( this );
m_textobj->emitEnsureCursorVisible();
m_textobj->emitUpdateUI( true );
m_textobj->emitShowCursor();
@@ -2686,7 +2686,7 @@ void KWTextFrameSet::insertTOC( KoTextCursor * cursor )
KNamedCommand* KWTextFrameSet::insertFrameBreakCommand( KoTextCursor *cursor )
{
- KMacroCommand* macroCmd = new KMacroCommand( QString::null );
+ KMacroCommand* macroCmd = new KMacroCommand( TQString() );
macroCmd->addCommand( m_textobj->insertParagraphCommand( cursor ) );
KWTextParag *parag = static_cast<KWTextParag *>( cursor->parag() );
if(parag->prev()) {
@@ -2713,32 +2713,32 @@ void KWTextFrameSet::insertFrameBreak( KoTextCursor *cursor )
m_textobj->setLastFormattedParag( cursor->parag() );
m_textobj->formatMore( 2 );
- emit repaintChanged( this );
+ emit tqrepaintChanged( this );
m_textobj->emitEnsureCursorVisible();
m_textobj->emitUpdateUI( true );
m_textobj->emitShowCursor();
}
-QRect KWTextFrameSet::paragRect( KoTextParag * parag ) const
+TQRect KWTextFrameSet::paragRect( KoTextParag * parag ) const
{
// ## Warning. Imagine a paragraph cut in two pieces (at the line-level),
// between two columns. A single rect in internal coords, but two rects in
- // normal coords. QRect( topLeft, bottomRight ) is just plain wrong.
+ // normal coords. TQRect( topLeft, bottomRight ) is just plain wrong.
// Currently this method is only used for "ensure visible" so that's fine, but
// we shouldn't use it for more precise stuff.
KoPoint p;
(void)internalToDocument( parag->rect().topLeft(), p );
- QPoint topLeft = m_doc->zoomPoint( p );
+ TQPoint topLeft = m_doc->zoomPoint( p );
(void)internalToDocument( parag->rect().bottomRight(), p );
- QPoint bottomRight = m_doc->zoomPoint( p );
- return QRect( topLeft, bottomRight );
+ TQPoint bottomRight = m_doc->zoomPoint( p );
+ return TQRect( topLeft, bottomRight );
}
void KWTextFrameSet::findPosition( const KoPoint &dPoint, KoTextParag * & parag, int & index )
{
KoTextCursor cursor( textDocument() );
- QPoint iPoint;
+ TQPoint iPoint;
if ( documentToInternal( dPoint, iPoint ) )
{
cursor.place( iPoint, textDocument()->firstParag() );
@@ -2756,7 +2756,7 @@ void KWTextFrameSet::findPosition( const KoPoint &dPoint, KoTextParag * & parag,
bool KWTextFrameSet::minMaxInternalOnPage( int pageNum, int& topLU, int& bottomLU ) const
{
- QPtrListIterator<KWFrame> frameIt( framesInPage( pageNum ) );
+ TQPtrListIterator<KWFrame> frameIt( framesInPage( pageNum ) );
if ( !frameIt.current() )
return false;
@@ -2767,10 +2767,10 @@ bool KWTextFrameSet::minMaxInternalOnPage( int pageNum, int& topLU, int& bottomL
for ( ; frameIt.current(); ++frameIt )
{
double y = frameIt.current()->internalY();
- topPt = QMIN( topPt, y );
- bottomPt = QMAX( bottomPt, y + frameIt.current()->height() );
+ topPt = TQMIN( topPt, y );
+ bottomPt = TQMAX( bottomPt, y + frameIt.current()->height() );
}
- // Convert to layout units
+ // Convert to tqlayout units
topLU = m_doc->ptToLayoutUnitPixY( topPt );
bottomLU = m_doc->ptToLayoutUnitPixY( bottomPt );
return true;
@@ -2800,7 +2800,7 @@ KCommand * KWTextFrameSet::deleteAnchoredFrame( KWAnchor * anchor )
textDocument()->setSelectionEnd( KoTextDocument::Temp, &c );
KCommand *cmd = m_textobj->removeSelectedTextCommand( &c, KoTextDocument::Temp );
- m_doc->repaintAllViews();
+ m_doc->tqrepaintAllViews();
return cmd;
}
@@ -2809,43 +2809,43 @@ bool KWTextFrameSet::hasSelection() const
return m_textobj->hasSelection();
}
-QString KWTextFrameSet::selectedText() const
+TQString KWTextFrameSet::selectedText() const
{
return m_textobj->selectedText();
}
-QString KWTextFrameSet::toPlainText() const
+TQString KWTextFrameSet::toPlainText() const
{
return m_textobj->textDocument()->plainText();
}
-void KWTextFrameSet::highlightPortion( KoTextParag * parag, int index, int length, KWCanvas * canvas, bool repaint, KDialogBase* dialog )
+void KWTextFrameSet::highlightPortion( KoTextParag * parag, int index, int length, KWCanvas * canvas, bool tqrepaint, KDialogBase* dialog )
{
Q_ASSERT( isVisible() );
Q_ASSERT( m_textobj->isVisible() );
- //kdDebug() << "highlighting in " << name() << " parag=" << parag->paragId() << " index=" << index << " repaint=" << repaint << endl;
- m_textobj->highlightPortion( parag, index, length, repaint );
- if ( repaint ) {
+ //kdDebug() << "highlighting in " << name() << " parag=" << parag->paragId() << " index=" << index << " tqrepaint=" << tqrepaint << endl;
+ m_textobj->highlightPortion( parag, index, length, tqrepaint );
+ if ( tqrepaint ) {
// Position the cursor
canvas->editTextFrameSet( this, parag, index );
// Ensure text is fully visible
- QRect expose = canvas->viewMode()->normalToView( paragRect( parag ) );
+ TQRect expose = canvas->viewMode()->normalToView( paragRect( parag ) );
canvas->ensureVisible( (expose.left()+expose.right()) / 2, // point = center of the rect
(expose.top()+expose.bottom()) / 2,
(expose.right()-expose.left()) / 2, // margin = half-width of the rect
(expose.bottom()-expose.top()) / 2);
if ( dialog ) {
//kdDebug() << k_funcinfo << " dialog=" << dialog << " avoiding rect=" << expose << endl;
- QRect globalRect( expose );
+ TQRect globalRect( expose );
globalRect.moveTopLeft( canvas->mapToGlobal( globalRect.topLeft() ) );
KDialog::avoidArea( dialog, globalRect );
}
}
}
-void KWTextFrameSet::removeHighlight( bool repaint )
+void KWTextFrameSet::removeHighlight( bool tqrepaint )
{
- m_textobj->removeHighlight( repaint );
+ m_textobj->removeHighlight( tqrepaint );
}
void KWTextFrameSet::clearUndoRedoInfo()
@@ -2900,10 +2900,10 @@ KCommand *KWTextFrameSet::setParagLayoutFormatCommand( KoParagLayout *newLayout,
return m_textobj->setParagLayoutFormatCommand(newLayout, flags, marginIndex);
}
-class KWFootNoteVarList : public QPtrList< KWFootNoteVariable >
+class KWFootNoteVarList : public TQPtrList< KWFootNoteVariable >
{
protected:
- virtual int compareItems(QPtrCollection::Item a, QPtrCollection::Item b)
+ virtual int compareItems(TQPtrCollection::Item a, TQPtrCollection::Item b)
{
KWFootNoteVariable* vara = ((KWFootNoteVariable *)a);
KWFootNoteVariable* varb = ((KWFootNoteVariable *)b);
@@ -2920,10 +2920,10 @@ protected:
}
};
-void KWTextFrameSet::renumberFootNotes( bool repaint )
+void KWTextFrameSet::renumberFootNotes( bool tqrepaint )
{
KWFootNoteVarList lst;
- QPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
+ TQPtrListIterator<KoTextCustomItem> cit( textDocument()->allCustomItems() );
for ( ; cit.current() ; ++cit )
{
KWFootNoteVariable *fnv = dynamic_cast<KWFootNoteVariable *>( cit.current() );
@@ -2936,10 +2936,10 @@ void KWTextFrameSet::renumberFootNotes( bool repaint )
short int footNoteNumDisplay = 1; // the number being displayed
short int endNoteNumDisplay = 1;
bool needRepaint = false;
- QPtrListIterator< KWFootNoteVariable > vit( lst );
+ TQPtrListIterator< KWFootNoteVariable > vit( lst );
//create a list with all manual footnotes numbers
- QValueList<int> addedNums;
+ TQValueList<int> addedNums;
for ( ; vit.current() ; ++vit )
{
KWFootNoteVariable* var = vit.current();
@@ -2966,7 +2966,7 @@ void KWTextFrameSet::renumberFootNotes( bool repaint )
}
if ( var->numberingType()==KWFootNoteVariable::Auto )
{
- if ( addedNums.contains( numDisplay ) != 0 ) // the automatic generated number should not be equal to a manual one
+ if ( addedNums.tqcontains( numDisplay ) != 0 ) // the automatic generated number should not be equal to a manual one
{
numDisplay++;
continue; //try with the next number
@@ -2982,39 +2982,39 @@ void KWTextFrameSet::renumberFootNotes( bool repaint )
{
if ( var->frameSet() ) //safety
{
- QString fsName = endNote ? i18n("Endnote %1") : i18n("Footnote %1");
+ TQString fsName = endNote ? i18n("Endnote %1") : i18n("Footnote %1");
if ( var->numberingType()== KWFootNoteVariable::Manual)
var->frameSet()->setName( m_doc->generateFramesetName(fsName));
else
- var->frameSet()->setName( fsName.arg( var->text() ) );
+ var->frameSet()->setName( fsName.tqarg( var->text() ) );
var->frameSet()->setCounterText( var->text() );
}
var->resize();
- var->paragraph()->invalidate(0);
+ var->paragraph()->tqinvalidate(0);
var->paragraph()->setChanged( true );
needRepaint = true;
}
++vit;
}
- if ( needRepaint && repaint )
+ if ( needRepaint && tqrepaint )
m_doc->slotRepaintChanged( this );
}
-KoTextDocCommand *KWTextFrameSet::deleteTextCommand( KoTextDocument *textdoc, int id, int index, const QMemArray<KoTextStringChar> & str, const CustomItemsMap & customItemsMap, const QValueList<KoParagLayout> & oldParagLayouts )
+KoTextDocCommand *KWTextFrameSet::deleteTextCommand( KoTextDocument *textdoc, int id, int index, const TQMemArray<KoTextStringChar> & str, const CustomItemsMap & customItemsMap, const TQValueList<KoParagLayout> & oldParagLayouts )
{
return new KWTextDeleteCommand( textdoc, id, index, str, customItemsMap, oldParagLayouts );
}
-QByteArray KWTextFrameSet::sortText(SortType type) const
+TQByteArray KWTextFrameSet::sortText(SortType type) const
{
const KoTextCursor c1 = textDocument()->selectionStartCursor(KoTextDocument::Standard );
const KoTextCursor c2 = textDocument()->selectionEndCursor( KoTextDocument::Standard );
if ( c1.parag() == c2.parag() )
- return QByteArray();
+ return TQByteArray();
else
{
// ( paragraph text -> paragraph ) map. Note that this sorts on the key automatically.
- QMap<QString, const KoTextParag*> sortMap;
+ TQMap<TQString, const KoTextParag*> sortMap;
sortMap.insert( c1.parag()->toString(0), c1.parag() );
const KoTextParag *p = c1.parag()->next();
@@ -3024,11 +3024,11 @@ QByteArray KWTextFrameSet::sortText(SortType type) const
}
sortMap.insert( c2.parag()->toString(0), c2.parag());
- typedef QValueList<const KoTextParag *> ParagList;
+ typedef TQValueList<const KoTextParag *> ParagList;
ParagList sortedParags = sortMap.values();
if ( type == KW_SORTDECREASE )
{
- // I could use an STL algorithm here, but only if Qt was compiled with STL support...
+ // I could use an STL algorithm here, but only if TQt was compiled with STL support...
ParagList newList;
for ( ParagList::const_iterator it = sortedParags.begin(),
end = sortedParags.end();
@@ -3041,15 +3041,15 @@ QByteArray KWTextFrameSet::sortText(SortType type) const
KWOasisSaver oasisSaver( m_doc );
oasisSaver.saveParagraphs( sortedParags );
if ( !oasisSaver.finish() )
- return QByteArray();
+ return TQByteArray();
return oasisSaver.data();
}
}
// This is used when loading (KWTextDocument::loadOasisFootnote)
// and when inserting from the GUI (KWTextFrameSetEdit::insertFootNote),
-// so don't add any 'repaint' or 'recalc' code here
-KWFootNoteFrameSet * KWTextFrameSet::insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const QString &manualString )
+// so don't add any 'tqrepaint' or 'recalc' code here
+KWFootNoteFrameSet * KWTextFrameSet::insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const TQString &manualString )
{
kdDebug() << "KWTextFrameSetEdit::insertFootNote " << endl;
KWDocument * doc = m_doc;
@@ -3074,7 +3074,7 @@ KWFootNoteFrameSet * KWTextFrameSet::insertFootNote( NoteType noteType, KWFootNo
KoVariable* KWTextFrameSet::variableUnderMouse( const KoPoint& dPoint )
{
- QPoint iPoint;
+ TQPoint iPoint;
if ( documentToInternal( dPoint, iPoint ) )
return textObject()->variableAtPoint( iPoint );
return 0;
@@ -3082,7 +3082,7 @@ KoVariable* KWTextFrameSet::variableUnderMouse( const KoPoint& dPoint )
KoLinkVariable* KWTextFrameSet::linkVariableUnderMouse( const KoPoint& dPoint )
{
- QPoint iPoint;
+ TQPoint iPoint;
if ( documentToInternal( dPoint, iPoint ) )
{
KoLinkVariable* linkVariable = dynamic_cast<KoLinkVariable *>( textObject()->variableAtPoint( iPoint ) );
@@ -3100,11 +3100,11 @@ KWTextFrameSetEdit::KWTextFrameSetEdit( KWTextFrameSet * fs, KWCanvas * canvas )
//kdDebug(32001) << "KWTextFrameSetEdit::KWTextFrameSetEdit " << fs->name() << endl;
KoTextView::setReadWrite( fs->kWordDocument()->isReadWrite() );
KoTextObject* textobj = fs->textObject();
- connect( textobj, SIGNAL( selectionChanged(bool) ), canvas, SIGNAL( selectionChanged(bool) ) );
- connect( fs, SIGNAL( frameDeleted(KWFrame *) ), this, SLOT( slotFrameDeleted(KWFrame *) ) );
- connect( textView(), SIGNAL( cut() ), SLOT( cut() ) );
- connect( textView(), SIGNAL( copy() ), SLOT( copy() ) );
- connect( textView(), SIGNAL( paste() ), SLOT( paste() ) );
+ connect( textobj, TQT_SIGNAL( selectionChanged(bool) ), canvas, TQT_SIGNAL( selectionChanged(bool) ) );
+ connect( fs, TQT_SIGNAL( frameDeleted(KWFrame *) ), this, TQT_SLOT( slotFrameDeleted(KWFrame *) ) );
+ connect( textView(), TQT_SIGNAL( cut() ), TQT_SLOT( cut() ) );
+ connect( textView(), TQT_SIGNAL( copy() ), TQT_SLOT( copy() ) );
+ connect( textView(), TQT_SIGNAL( paste() ), TQT_SLOT( paste() ) );
updateUI( true, true );
if( canvas->gui() && canvas->gui()->getHorzRuler())
@@ -3134,7 +3134,7 @@ KoTextViewIface* KWTextFrameSetEdit::dcopObject()
void KWTextFrameSetEdit::terminate(bool removeSelection)
{
- disconnect( textView()->textObject(), SIGNAL( selectionChanged(bool) ), m_canvas, SIGNAL( selectionChanged(bool) ) );
+ disconnect( textView()->textObject(), TQT_SIGNAL( selectionChanged(bool) ), m_canvas, TQT_SIGNAL( selectionChanged(bool) ) );
textView()->terminate(removeSelection);
}
@@ -3146,12 +3146,12 @@ void KWTextFrameSetEdit::slotFrameDeleted( KWFrame *frm )
void KWTextFrameSetEdit::paste()
{
- QMimeSource *data = QApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::tqclipboard()->data();
int provides = KWView::checkClipboard( data );
pasteData( data, provides, false );
}
-void KWTextFrameSetEdit::pasteData( QMimeSource* data, int provides, bool drop )
+void KWTextFrameSetEdit::pasteData( TQMimeSource* data, int provides, bool drop )
{
if ( provides & KWView::ProvidesOasis )
{
@@ -3161,9 +3161,9 @@ void KWTextFrameSetEdit::pasteData( QMimeSource* data, int provides, bool drop )
}
else if ( provides & KWView::ProvidesPlainText )
{
- // Note: QClipboard::text() seems to do a better job than encodedData( "text/plain" )
+ // Note: TQClipboard::text() seems to do a better job than tqencodedData( "text/plain" )
// In particular it handles charsets (in the mimetype).
- const QString text = QApplication::clipboard()->text();
+ const TQString text = TQApplication::tqclipboard()->text();
const bool removeSelected = !drop;
if ( !text.isEmpty() )
textObject()->pasteText( cursor(), text, currentFormat(), removeSelected );
@@ -3182,13 +3182,13 @@ void KWTextFrameSetEdit::pasteData( QMimeSource* data, int provides, bool drop )
}
}
-KCommand* KWTextFrameSetEdit::pasteOasisCommand( QMimeSource* data )
+KCommand* KWTextFrameSetEdit::pasteOasisCommand( TQMimeSource* data )
{
// Find which mimetype it was (could be oasis text, oasis presentation etc.)
- QCString returnedTypeMime = KoTextObject::providesOasis( data );
+ TQCString returnedTypeMime = KoTextObject::providesOasis( data );
if ( !returnedTypeMime.isEmpty() )
{
- QByteArray arr = data->encodedData( returnedTypeMime );
+ TQByteArray arr = data->tqencodedData( returnedTypeMime );
Q_ASSERT( !arr.isEmpty() );
if ( arr.size() )
return textFrameSet()->pasteOasis( cursor(), arr, true );
@@ -3207,13 +3207,13 @@ void KWTextFrameSetEdit::cut()
void KWTextFrameSetEdit::copy()
{
if ( textDocument()->hasSelection( KoTextDocument::Standard ) ) {
- QDragObject *drag = newDrag( 0 );
- QApplication::clipboard()->setData( drag );
+ TQDragObject *drag = newDrag( 0 );
+ TQApplication::tqclipboard()->setData( drag );
}
}
bool KWTextFrameSetEdit::doIgnoreDoubleSpace(KoTextParag * parag,
- int index,QChar ch )
+ int index,TQChar ch )
{
if( textFrameSet()->kWordDocument()->allowAutoFormat())
{
@@ -3228,7 +3228,7 @@ bool KWTextFrameSetEdit::doIgnoreDoubleSpace(KoTextParag * parag,
}
-void KWTextFrameSetEdit::doAutoFormat( KoTextCursor* cursor, KoTextParag *parag, int index, QChar ch )
+void KWTextFrameSetEdit::doAutoFormat( KoTextCursor* cursor, KoTextParag *parag, int index, TQChar ch )
{
if( textFrameSet()->kWordDocument()->allowAutoFormat() )
{
@@ -3260,7 +3260,7 @@ bool KWTextFrameSetEdit::doToolTipCompletion( KoTextCursor* cursor, KoTextParag
return false;
}
-void KWTextFrameSetEdit::showToolTipBox(KoTextParag *parag, int index, QWidget *widget, const QPoint &pos)
+void KWTextFrameSetEdit::showToolTipBox(KoTextParag *parag, int index, TQWidget *widget, const TQPoint &pos)
{
if( textFrameSet()->kWordDocument()->allowAutoFormat() )
{
@@ -3302,7 +3302,7 @@ void KWTextFrameSetEdit::startDrag()
{
textView()->dragStarted();
m_canvas->dragStarted();
- QDragObject *drag = newDrag( m_canvas->viewport() );
+ TQDragObject *drag = newDrag( m_canvas->viewport() );
if ( !frameSet()->kWordDocument()->isReadWrite() )
drag->dragCopy();
else {
@@ -3310,7 +3310,7 @@ void KWTextFrameSetEdit::startDrag()
if ( move )
{
#if 0
- if ( QDragObject::target() != m_canvas && QDragObject::target() != m_canvas->viewport() ) {
+ if ( TQDragObject::target() != m_canvas && TQDragObject::target() != m_canvas->viewport() ) {
//This is when dropping text _out_ of KWord. Since we have Move and Copy
//options (Copy being accessed by pressing CTRL), both are possible.
//But is that intuitive enough ? Doesn't the user expect a Copy in all cases ?
@@ -3323,10 +3323,10 @@ void KWTextFrameSetEdit::startDrag()
}
}
-QDragObject * KWTextFrameSetEdit::newDrag( QWidget * parent )
+TQDragObject * KWTextFrameSetEdit::newDrag( TQWidget * tqparent )
{
KWTextFrameSet* fs = textFrameSet();
- return fs->kWordDocument()->dragSelected( parent, fs );
+ return fs->kWordDocument()->dragSelected( tqparent, fs );
}
void KWTextFrameSetEdit::ensureCursorVisible()
@@ -3352,18 +3352,18 @@ void KWTextFrameSetEdit::ensureCursorVisible()
KoPoint hintDPoint;
if ( m_currentFrame )
hintDPoint = m_currentFrame->topLeft();
- KWFrame * theFrame = textFrameSet()->internalToDocumentWithHint( QPoint(x, y), pt, hintDPoint );
+ KWFrame * theFrame = textFrameSet()->internalToDocumentWithHint( TQPoint(x, y), pt, hintDPoint );
//kdDebug() << "KWTextFrameSetEdit::ensureCursorVisible frame=" << theFrame << " m_currentFrame=" << m_currentFrame << endl;
if ( theFrame && m_currentFrame != theFrame )
{
m_currentFrame = theFrame;
m_canvas->gui()->getView()->updatePageInfo();
}
- QPoint cursorPos = textFrameSet()->kWordDocument()->zoomPoint( pt );
+ TQPoint cursorPos = textFrameSet()->kWordDocument()->zoomPoint( pt );
cursorPos = m_canvas->viewMode()->normalToView( cursorPos );
- areaLeft = textFrameSet()->kWordDocument()->layoutUnitToPixelX( areaLeft ) + 1;
- areaRight = textFrameSet()->kWordDocument()->layoutUnitToPixelX( areaRight ) + 1;
- cursorHeight = textFrameSet()->kWordDocument()->layoutUnitToPixelY( cursorHeight );
+ areaLeft = textFrameSet()->kWordDocument()->tqlayoutUnitToPixelX( areaLeft ) + 1;
+ areaRight = textFrameSet()->kWordDocument()->tqlayoutUnitToPixelX( areaRight ) + 1;
+ cursorHeight = textFrameSet()->kWordDocument()->tqlayoutUnitToPixelY( cursorHeight );
//kdDebug() << "KWTextFrameSetEdit::ensureCursorVisible pt=" << pt << " cursorPos=" << cursorPos
// << " areaLeft=" << areaLeft << " areaRight=" << areaRight << " y=" << y << endl;
m_canvas->ensureVisible( cursorPos.x() - areaLeft, cursorPos.y() + cursorHeight / 2, areaLeft + areaRight, cursorHeight / 2 + 2 );
@@ -3396,7 +3396,7 @@ bool KWTextFrameSetEdit::enterCustomItem( KoTextCustomItem* customItem, bool fro
// A FormulaFrameSetEdit looks a little different from
// a FormulaFrameSet. (Colors)
static_cast<KWFormulaFrameSet*>( frameSet )->setChanged();
- canvas->repaintChanged( frameSet, true );
+ canvas->tqrepaintChanged( frameSet, true );
}
return true;
}
@@ -3404,7 +3404,7 @@ bool KWTextFrameSetEdit::enterCustomItem( KoTextCustomItem* customItem, bool fro
return false;
}
-void KWTextFrameSetEdit::keyPressEvent( QKeyEvent* e )
+void KWTextFrameSetEdit::keyPressEvent( TQKeyEvent* e )
{
// Handle moving into inline frames (e.g. formula frames).
if ( !( e->state() & ControlButton ) && !( e->state() & ShiftButton ) )
@@ -3452,31 +3452,31 @@ void KWTextFrameSetEdit::keyPressEvent( QKeyEvent* e )
}
}
// Calculate position of tooltip for autocompletion
- QPoint pos = textFrameSet()->cursorPos( cursor(), m_canvas, m_currentFrame );
+ TQPoint pos = textFrameSet()->cursorPos( cursor(), m_canvas, m_currentFrame );
textView()->handleKeyPressEvent( e, m_canvas, pos );
}
-void KWTextFrameSetEdit::keyReleaseEvent( QKeyEvent* e )
+void KWTextFrameSetEdit::keyReleaseEvent( TQKeyEvent* e )
{
textView()->handleKeyReleaseEvent( e );
}
-void KWTextFrameSetEdit::imStartEvent( QIMEvent* e )
+void KWTextFrameSetEdit::imStartEvent( TQIMEvent* e )
{
textView()->handleImStartEvent( e );
}
-void KWTextFrameSetEdit::imComposeEvent( QIMEvent* e )
+void KWTextFrameSetEdit::imComposeEvent( TQIMEvent* e )
{
textView()->handleImComposeEvent( e );
}
-void KWTextFrameSetEdit::imEndEvent( QIMEvent* e )
+void KWTextFrameSetEdit::imEndEvent( TQIMEvent* e )
{
textView()->handleImEndEvent( e );
}
-void KWTextFrameSetEdit::mousePressEvent( QMouseEvent *e, const QPoint &, const KoPoint & dPoint )
+void KWTextFrameSetEdit::mousePressEvent( TQMouseEvent *e, const TQPoint &, const KoPoint & dPoint )
{
if ( dPoint.x() < 0 || dPoint.y() < 0 )
return; // Ignore clicks completely outside of the page (e.g. in the gray area, or ruler)
@@ -3485,7 +3485,7 @@ void KWTextFrameSetEdit::mousePressEvent( QMouseEvent *e, const QPoint &, const
if ( m_currentFrame )
hideCursor(); // Need to do that with the old m_currentFrame
- QPoint iPoint;
+ TQPoint iPoint;
KWTextFrameSet::RelativePosition relPos;
KWFrame * theFrame = textFrameSet()->documentToInternalMouseSelection( dPoint, iPoint, relPos, m_canvas->viewMode() );
if ( theFrame && m_currentFrame != theFrame )
@@ -3509,7 +3509,7 @@ void KWTextFrameSetEdit::mousePressEvent( QMouseEvent *e, const QPoint &, const
}
// else mightStartDrag = FALSE; necessary?
- if ( e->button() != LeftButton )
+ if ( e->button() != Qt::LeftButton )
return;
KoVariable* var = variable();
if ( var )
@@ -3523,14 +3523,14 @@ void KWTextFrameSetEdit::mousePressEvent( QMouseEvent *e, const QPoint &, const
}
}
-void KWTextFrameSetEdit::mouseMoveEvent( QMouseEvent * e, const QPoint & nPoint, const KoPoint & )
+void KWTextFrameSetEdit::mouseMoveEvent( TQMouseEvent * e, const TQPoint & nPoint, const KoPoint & )
{
if ( textView()->maybeStartDrag( e ) )
return;
if ( nPoint.x() < 0 || nPoint.y() < 0 )
return; // Ignore clicks completely outside of the page (e.g. in the gray area, or ruler)
- QPoint iPoint;
+ TQPoint iPoint;
KoPoint dPoint = frameSet()->kWordDocument()->unzoomPoint( nPoint );
KWTextFrameSet::RelativePosition relPos;
if ( nPoint.y() > 0 && textFrameSet()->documentToInternalMouseSelection( dPoint, iPoint, relPos , m_canvas->viewMode()) )
@@ -3549,7 +3549,7 @@ bool KWTextFrameSetEdit::openLink( KoLinkVariable* variable )
KWDocument* doc = fs->kWordDocument();
if ( doc->variableCollection()->variableSetting()->displayLink() ) {
- const QString url = variable->url();
+ const TQString url = variable->url();
if( url.startsWith("bkm://") )
{
const KoTextBookmark* bookmark = doc->bookmarkByName(url.mid(6) );
@@ -3573,17 +3573,17 @@ void KWTextFrameSetEdit::openLink()
openLink( v );
}
-void KWTextFrameSetEdit::mouseReleaseEvent( QMouseEvent *, const QPoint &, const KoPoint & )
+void KWTextFrameSetEdit::mouseReleaseEvent( TQMouseEvent *, const TQPoint &, const KoPoint & )
{
textView()->handleMouseReleaseEvent();
}
-void KWTextFrameSetEdit::mouseDoubleClickEvent( QMouseEvent *e, const QPoint &, const KoPoint & )
+void KWTextFrameSetEdit::mouseDoubleClickEvent( TQMouseEvent *e, const TQPoint &, const KoPoint & )
{
- textView()->handleMouseDoubleClickEvent( e, QPoint() /* Currently unused */ );
+ textView()->handleMouseDoubleClickEvent( e, TQPoint() /* Currently unused */ );
}
-void KWTextFrameSetEdit::dragEnterEvent( QDragEnterEvent * e )
+void KWTextFrameSetEdit::dragEnterEvent( TQDragEnterEvent * e )
{
int provides = KWView::checkClipboard( e );
if ( !frameSet()->kWordDocument()->isReadWrite() || provides == 0 )
@@ -3594,7 +3594,7 @@ void KWTextFrameSetEdit::dragEnterEvent( QDragEnterEvent * e )
e->acceptAction();
}
-void KWTextFrameSetEdit::dragMoveEvent( QDragMoveEvent * e, const QPoint &nPoint, const KoPoint & )
+void KWTextFrameSetEdit::dragMoveEvent( TQDragMoveEvent * e, const TQPoint &nPoint, const KoPoint & )
{
int provides = KWView::checkClipboard( e );
if ( !frameSet()->kWordDocument()->isReadWrite() || provides == 0 )
@@ -3606,7 +3606,7 @@ void KWTextFrameSetEdit::dragMoveEvent( QDragMoveEvent * e, const QPoint &nPoint
// wants the dropped image to be inline or absolute positioned.
if ( provides & ( KWView::ProvidesOasis | KWView::ProvidesPlainText | KWView::ProvidesFormula ) )
{
- QPoint iPoint;
+ TQPoint iPoint;
KoPoint dPoint = frameSet()->kWordDocument()->unzoomPoint( nPoint );
if ( textFrameSet()->documentToInternal( dPoint, iPoint ) )
{
@@ -3618,18 +3618,18 @@ void KWTextFrameSetEdit::dragMoveEvent( QDragMoveEvent * e, const QPoint &nPoint
e->acceptAction();
}
-void KWTextFrameSetEdit::dragLeaveEvent( QDragLeaveEvent * )
+void KWTextFrameSetEdit::dragLeaveEvent( TQDragLeaveEvent * )
{
}
-void KWTextFrameSetEdit::dropEvent( QDropEvent * e, const QPoint & nPoint, const KoPoint &, KWView* view )
+void KWTextFrameSetEdit::dropEvent( TQDropEvent * e, const TQPoint & nPoint, const KoPoint &, KWView* view )
{
int provides = KWView::checkClipboard( e );
if ( frameSet()->kWordDocument()->isReadWrite() && provides )
{
e->acceptAction();
KoTextCursor dropCursor( textDocument() );
- QPoint dropPoint;
+ TQPoint dropPoint;
KoPoint dPoint = frameSet()->kWordDocument()->unzoomPoint( nPoint );
if ( !textFrameSet()->documentToInternal( dPoint, dropPoint ) )
return; // Don't know where to paste
@@ -3639,7 +3639,7 @@ void KWTextFrameSetEdit::dropEvent( QDropEvent * e, const QPoint & nPoint, const
if ( ( e->source() == m_canvas ||
e->source() == m_canvas->viewport() ) &&
- e->action() == QDropEvent::Move &&
+ e->action() == TQDropEvent::Move &&
// this is the indicator that the source and dest text objects are the same
textDocument()->hasSelection( KoTextDocument::Standard ) ) {
@@ -3652,9 +3652,9 @@ void KWTextFrameSetEdit::dropEvent( QDropEvent * e, const QPoint & nPoint, const
cmd = pasteOasisCommand( e );
if ( cmd )
macroCmd->addCommand(cmd);
- //relayout textframeset after a dnd otherwise autoextend
- //frameset is not re-layouted
- textFrameSet()->layout();
+ //retqlayout textframeset after a dnd otherwise autoextend
+ //frameset is not re-tqlayouted
+ textFrameSet()->tqlayout();
frameSet()->kWordDocument()->addCommand( macroCmd );
}
return;
@@ -3702,7 +3702,7 @@ void KWTextFrameSetEdit::drawCursor( bool visible )
if ( m_canvas->viewMode()->hasFrames() && !m_currentFrame )
return;
- QPainter p( m_canvas->viewport() );
+ TQPainter p( m_canvas->viewport() );
p.translate( -m_canvas->contentsX(), -m_canvas->contentsY() );
p.setBrushOrigin( -m_canvas->contentsX(), -m_canvas->contentsY() );
@@ -3711,7 +3711,7 @@ void KWTextFrameSetEdit::drawCursor( bool visible )
bool KWTextFrameSetEdit::pgUpKeyPressed()
{
- QRect crect( m_canvas->contentsX(), m_canvas->contentsY(),
+ TQRect crect( m_canvas->contentsX(), m_canvas->contentsY(),
m_canvas->visibleWidth(), m_canvas->visibleHeight() );
crect = m_canvas->viewMode()->viewToNormal( crect );
@@ -3741,7 +3741,7 @@ bool KWTextFrameSetEdit::pgUpKeyPressed()
bool KWTextFrameSetEdit::pgDownKeyPressed()
{
- QRect crect( m_canvas->contentsX(), m_canvas->contentsY(),
+ TQRect crect( m_canvas->contentsX(), m_canvas->contentsY(),
m_canvas->visibleWidth(), m_canvas->visibleHeight() );
crect = m_canvas->viewMode()->viewToNormal( crect );
// Go down of 90% of crect.height()
@@ -3777,7 +3777,7 @@ void KWTextFrameSetEdit::ctrlPgUpKeyPressed()
{
if ( m_currentFrame )
{
- QPoint iPoint = textFrameSet()->moveToPage( m_currentFrame->pageNumber(), -1 );
+ TQPoint iPoint = textFrameSet()->moveToPage( m_currentFrame->pageNumber(), -1 );
if ( !iPoint.isNull() )
placeCursor( iPoint );
}
@@ -3787,7 +3787,7 @@ void KWTextFrameSetEdit::ctrlPgDownKeyPressed()
{
if ( m_currentFrame )
{
- QPoint iPoint = textFrameSet()->moveToPage( m_currentFrame->pageNumber(), +1 );
+ TQPoint iPoint = textFrameSet()->moveToPage( m_currentFrame->pageNumber(), +1 );
if ( !iPoint.isNull() )
placeCursor( iPoint );
}
@@ -3799,7 +3799,7 @@ void KWTextFrameSetEdit::setCursor( KoTextParag* parag, int index )
cursor()->setIndex( index );
}
-void KWTextFrameSetEdit::insertExpression(const QString &_c)
+void KWTextFrameSetEdit::insertExpression(const TQString &_c)
{
if(textObject()->hasSelection() )
frameSet()->kWordDocument()->addCommand(textObject()->replaceSelectionCommand(
@@ -3808,11 +3808,11 @@ void KWTextFrameSetEdit::insertExpression(const QString &_c)
textObject()->insert( cursor(), currentFormat(), _c, i18n("Insert Expression") );
}
-void KWTextFrameSetEdit::insertFloatingFrameSet( KWFrameSet * fs, const QString & commandName )
+void KWTextFrameSetEdit::insertFloatingFrameSet( KWFrameSet * fs, const TQString & commandName )
{
textObject()->clearUndoRedoInfo();
CustomItemsMap customItemsMap;
- QString placeHolders;
+ TQString placeHolders;
// TODO support for multiple floating items (like multiple-page tables)
int frameNumber = 0;
int index = 0;
@@ -3822,7 +3822,7 @@ void KWTextFrameSetEdit::insertFloatingFrameSet( KWFrameSet * fs, const QString
if ( frameNumber == 0 && anchor->ownLine() && cursor()->index() > 0 ) // enforce start of line - currently unused
{
kdDebug() << "ownline -> prepending \\n" << endl;
- placeHolders += QChar('\n');
+ placeHolders += TQChar('\n');
index++;
insertFlags |= KoTextObject::CheckNewLine;
}
@@ -3835,14 +3835,14 @@ void KWTextFrameSetEdit::insertFloatingFrameSet( KWFrameSet * fs, const QString
customItemsMap );
}
-void KWTextFrameSetEdit::insertLink(const QString &_linkName, const QString & hrefName)
+void KWTextFrameSetEdit::insertLink(const TQString &_linkName, const TQString & hrefName)
{
KWDocument * doc = frameSet()->kWordDocument();
KoVariable * var = new KoLinkVariable( textFrameSet()->textDocument(), _linkName, hrefName, doc->variableFormatCollection()->format( "STRING" ), doc->variableCollection() );
insertVariable( var );
}
-void KWTextFrameSetEdit::insertComment(const QString &_comment)
+void KWTextFrameSetEdit::insertComment(const TQString &_comment)
{
KWDocument * doc = frameSet()->kWordDocument();
KoVariable * var = new KoNoteVariable( textFrameSet()->textDocument(), _comment, doc->variableFormatCollection()->format( "STRING" ), doc->variableCollection() );
@@ -3850,14 +3850,14 @@ void KWTextFrameSetEdit::insertComment(const QString &_comment)
}
-void KWTextFrameSetEdit::insertCustomVariable( const QString &name)
+void KWTextFrameSetEdit::insertCustomVariable( const TQString &name)
{
KWDocument * doc = frameSet()->kWordDocument();
KoVariable * var = new KoCustomVariable( textFrameSet()->textDocument(), name, doc->variableFormatCollection()->format( "STRING" ), doc->variableCollection());
insertVariable( var );
}
-void KWTextFrameSetEdit::insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const QString &manualString )
+void KWTextFrameSetEdit::insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const TQString &manualString )
{
KWFootNoteFrameSet *fs = textFrameSet()->insertFootNote( noteType, numType, manualString );
KWFootNoteVariable * var = fs->footNoteVariable();
@@ -3893,7 +3893,7 @@ void KWTextFrameSetEdit::insertVariable( int type, int subtype )
if ( type == VT_CUSTOM )
{
KoCustomVarDialog dia( m_canvas );
- if ( dia.exec() == QDialog::Accepted )
+ if ( dia.exec() == TQDialog::Accepted )
{
KoCustomVariable *v = new KoCustomVariable( textFrameSet()->textDocument(), dia.name(), doc->variableFormatCollection()->format( "STRING" ),doc->variableCollection() );
v->setValue( dia.value() );
@@ -3904,7 +3904,7 @@ void KWTextFrameSetEdit::insertVariable( int type, int subtype )
else if ( type == VT_MAILMERGE )
{
KWMailMergeVariableInsertDia dia( m_canvas, doc->mailMergeDataBase() );
- if ( dia.exec() == QDialog::Accepted )
+ if ( dia.exec() == TQDialog::Accepted )
{
var = new KWMailMergeVariable( textFrameSet()->textDocument(), dia.getName(), doc->variableFormatCollection()->format( "STRING" ),doc->variableCollection(),doc );
}
@@ -3984,9 +3984,9 @@ void KWTextFrameSetEdit::updateUI( bool updateFormat, bool force )
// Paragraph settings
KWTextParag * parag = static_cast<KWTextParag *>(cursor()->parag());
- if ( m_paragLayout.alignment != parag->resolveAlignment() || force ) {
- m_paragLayout.alignment = parag->resolveAlignment();
- m_canvas->gui()->getView()->showAlign( m_paragLayout.alignment );
+ if ( m_paragLayout.tqalignment != parag->resolveAlignment() || force ) {
+ m_paragLayout.tqalignment = parag->resolveAlignment();
+ m_canvas->gui()->getView()->showAlign( m_paragLayout.tqalignment );
}
// Counter
@@ -4023,22 +4023,22 @@ void KWTextFrameSetEdit::updateUI( bool updateFormat, bool force )
m_canvas->gui()->getView()->showStyle( m_paragLayout.style->name() );
}
- if( m_paragLayout.margins[QStyleSheetItem::MarginLeft] != parag->margin(QStyleSheetItem::MarginLeft)
- || m_paragLayout.margins[QStyleSheetItem::MarginFirstLine] != parag->margin(QStyleSheetItem::MarginFirstLine)
- || m_paragLayout.margins[QStyleSheetItem::MarginRight] != parag->margin(QStyleSheetItem::MarginRight)
+ if( m_paragLayout.margins[TQStyleSheetItem::MarginLeft] != parag->margin(TQStyleSheetItem::MarginLeft)
+ || m_paragLayout.margins[TQStyleSheetItem::MarginFirstLine] != parag->margin(TQStyleSheetItem::MarginFirstLine)
+ || m_paragLayout.margins[TQStyleSheetItem::MarginRight] != parag->margin(TQStyleSheetItem::MarginRight)
|| parag->string()->isRightToLeft() != m_rtl
|| force )
{
- m_paragLayout.margins[QStyleSheetItem::MarginFirstLine] = parag->margin(QStyleSheetItem::MarginFirstLine);
- m_paragLayout.margins[QStyleSheetItem::MarginLeft] = parag->margin(QStyleSheetItem::MarginLeft);
- m_paragLayout.margins[QStyleSheetItem::MarginRight] = parag->margin(QStyleSheetItem::MarginRight);
+ m_paragLayout.margins[TQStyleSheetItem::MarginFirstLine] = parag->margin(TQStyleSheetItem::MarginFirstLine);
+ m_paragLayout.margins[TQStyleSheetItem::MarginLeft] = parag->margin(TQStyleSheetItem::MarginLeft);
+ m_paragLayout.margins[TQStyleSheetItem::MarginRight] = parag->margin(TQStyleSheetItem::MarginRight);
if ( m_rtl != parag->string()->isRightToLeft() && parag->counter() )
{
- parag->counter()->invalidate();
- parag->setChanged( true ); // repaint
+ parag->counter()->tqinvalidate();
+ parag->setChanged( true ); // tqrepaint
}
m_rtl = parag->string()->isRightToLeft();
- m_canvas->gui()->getView()->showRulerIndent( m_paragLayout.margins[QStyleSheetItem::MarginLeft], m_paragLayout.margins[QStyleSheetItem::MarginFirstLine], m_paragLayout.margins[QStyleSheetItem::MarginRight], m_rtl );
+ m_canvas->gui()->getView()->showRulerIndent( m_paragLayout.margins[TQStyleSheetItem::MarginLeft], m_paragLayout.margins[TQStyleSheetItem::MarginFirstLine], m_paragLayout.margins[TQStyleSheetItem::MarginRight], m_rtl );
}
if( m_paragLayout.tabList() != parag->tabList() || force)
{
@@ -4062,19 +4062,19 @@ void KWTextFrameSetEdit::showFormat( KoTextFormat *format )
m_canvas->gui()->getView()->showFormat( *format );
}
-QPoint KWTextFrameSet::cursorPos( KoTextCursor *cursor, KWCanvas* canvas, KWFrame* currentFrame )
+TQPoint KWTextFrameSet::cursorPos( KoTextCursor *cursor, KWCanvas* canvas, KWFrame* currentFrame )
{
KWViewMode *viewMode = canvas->viewMode();
KoTextParag* parag = cursor->parag();
- const QPoint topLeft = parag->rect().topLeft(); // in QRT coords
+ const TQPoint topLeft = parag->rect().topLeft(); // in TQRT coords
int lineY;
parag->lineHeightOfChar( cursor->index(), 0, &lineY );
// iPoint is the topright corner of the current character
- QPoint iPoint( topLeft.x() + cursor->x() + parag->at( cursor->index() )->width, topLeft.y() + lineY );
+ TQPoint iPoint( topLeft.x() + cursor->x() + parag->at( cursor->index() )->width, topLeft.y() + lineY );
KoPoint dPoint;
- QPoint vPoint;
+ TQPoint vPoint;
KoPoint hintDPoint = currentFrame ? currentFrame->innerRect().topLeft() : KoPoint();
if ( internalToDocumentWithHint( iPoint, dPoint, hintDPoint ) )
{
@@ -4130,7 +4130,7 @@ void KWFootNoteFrameSet::setFootNoteVariable( KWFootNoteVariable* var )
m_footNoteVar = var;
}
-void KWFootNoteFrameSet::setCounterText( const QString& text )
+void KWFootNoteFrameSet::setCounterText( const TQString& text )
{
KoTextParag* parag = textDocument()->firstParag();
Q_ASSERT( parag );
@@ -4138,7 +4138,7 @@ void KWFootNoteFrameSet::setCounterText( const QString& text )
KoParagCounter counter;
counter.setNumbering( KoParagCounter::NUM_FOOTNOTE );
counter.setPrefix( text );
- counter.setSuffix( QString::null );
+ counter.setSuffix( TQString() );
parag->setCounter( counter );
}
}
diff --git a/kword/KWTextFrameSet.h b/kword/KWTextFrameSet.h
index 97aba949..3477bc3f 100644
--- a/kword/KWTextFrameSet.h
+++ b/kword/KWTextFrameSet.h
@@ -49,8 +49,8 @@ class KAction;
class KNamedCommand;
class KMacroCommand;
-class QDragObject;
-class QProgressDialog;
+class TQDragObject;
+class TQProgressDialog;
/**
* Class: KWTextFrameSet
@@ -63,11 +63,12 @@ class QProgressDialog;
class KWTextFrameSet : public KWFrameSet, public KoTextFlow, public KoTextFormatInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
/// Cnstructor
- KWTextFrameSet( KWDocument *_doc, const QString & name );
+ KWTextFrameSet( KWDocument *_doc, const TQString & name );
/// Used for OASIS loading
- KWTextFrameSet( KWDocument* doc, const QDomElement& tag, KoOasisContext& context );
+ KWTextFrameSet( KWDocument* doc, const TQDomElement& tag, KoOasisContext& context );
/// Destructor
~KWTextFrameSet();
@@ -92,19 +93,19 @@ public:
void clearUndoRedoInfo();
/** Convert the @p dPoint in the normal coordinate system (and in pt)
- * into a point (@p iPoint) in the internal qtextdoc coordinates (in layout units). */
- KWFrame * documentToInternal( const KoPoint &dPoint, QPoint &iPoint ) const;
+ * into a point (@p iPoint) in the internal qtextdoc coordinates (in tqlayout units). */
+ KWFrame * documentToInternal( const KoPoint &dPoint, TQPoint &iPoint ) const;
/// used by documentToInternalMouseSelection()
enum RelativePosition { InsideFrame, LeftOfFrame, TopOfFrame, AtEnd };
- KWFrame * documentToInternalMouseSelection( const KoPoint &dPoint, QPoint &iPoint, RelativePosition& relPos, KWViewMode *viewMode ) const;
+ KWFrame * documentToInternalMouseSelection( const KoPoint &dPoint, TQPoint &iPoint, RelativePosition& relPos, KWViewMode *viewMode ) const;
- /** Convert the @p in the internal qtextdoc coordinates (in layout units)
+ /** Convert the @p in the internal qtextdoc coordinates (in tqlayout units)
* into a point in the document coordinate system (in pt).
* Also returns the frame in which this point is. */
KWFrame * internalToDocument( const KoPoint &relPoint, KoPoint &dPoint ) const;
// version taking a LU point as input
- KWFrame * internalToDocument( const QPoint &iPoint, KoPoint &dPoint ) const;
+ KWFrame * internalToDocument( const TQPoint &iPoint, KoPoint &dPoint ) const;
/** Same as internalToDocument, but goes directly to the normal coords (zoomed)
* since this method is used for view stuff only (mouse).
@@ -114,18 +115,18 @@ public:
* @param iPoint internal document point
* @param dPoint the other point
*/
- KWFrame * internalToDocumentWithHint( const QPoint &iPoint, KoPoint &dPoint, const KoPoint &hintDPoint ) const;
+ KWFrame * internalToDocumentWithHint( const TQPoint &iPoint, KoPoint &dPoint, const KoPoint &hintDPoint ) const;
/** A variant of internalToDocument, when the frame is already known.
* Both faster, and more correct for inline frames that spawn over multiple containing frames
*/
KoPoint internalToDocumentKnowingFrame( const KoPoint &relPoint, KWFrame* theFrame ) const;
// [deprecated?] version taking a LU point as input
- KoPoint internalToDocumentKnowingFrame( const QPoint &iPoint, KWFrame* theFrame ) const;
+ KoPoint internalToDocumentKnowingFrame( const TQPoint &iPoint, KWFrame* theFrame ) const;
/** Implementation of Ctrl+PageUp/PageDown
- * Returns a point in layout units (for placing the cursor) */
- QPoint moveToPage( int currentPgNum, short int direction ) const;
+ * Returns a point in tqlayout units (for placing the cursor) */
+ TQPoint moveToPage( int currentPgNum, short int direction ) const;
/** Return the available height in pixels (sum of all frames' height, with zoom applied)
* Used to know if we need to create more pages. */
@@ -152,72 +153,72 @@ public:
* @param nPointBottom the max the view looks at, in normal coordinates
* @param viewMode the current viewMode
*/
- void updateViewArea( QWidget * w, KWViewMode* viewMode, const QPoint & nPointBottom );
+ void updateViewArea( TQWidget * w, KWViewMode* viewMode, const TQPoint & nPointBottom );
- virtual QDomElement save( QDomElement &parentElem, bool saveFrames = true )
- { return saveInternal( parentElem, saveFrames, false ); }
+ virtual TQDomElement save( TQDomElement &tqparentElem, bool saveFrames = true )
+ { return saveInternal( tqparentElem, saveFrames, false ); }
/** save to XML - when copying to clipboard (includes floating framesets) */
- virtual QDomElement toXML( QDomElement &parentElem, bool saveFrames = true )
- { return saveInternal( parentElem, saveFrames, true ); }
+ virtual TQDomElement toXML( TQDomElement &tqparentElem, bool saveFrames = true )
+ { return saveInternal( tqparentElem, saveFrames, true ); }
- virtual void load( QDomElement &attributes, bool loadFrames = true );
+ virtual void load( TQDomElement &attributes, bool loadFrames = true );
/// Load the contents of a frame (i.e. the text)
- void loadOasisContent( const QDomElement &bodyElem, KoOasisContext& context );
+ void loadOasisContent( const TQDomElement &bodyElem, KoOasisContext& context );
/// Load a complete textbox (frame and text)
- KWFrame* loadOasis( const QDomElement& frame, const QDomElement &bodyElem, KoOasisContext& context );
+ KWFrame* loadOasis( const TQDomElement& frame, const TQDomElement &bodyElem, KoOasisContext& context );
/// Load a frame and add it to this frameset - called by KWOasisLoader
- KWFrame* loadOasisTextFrame( const QDomElement& frameTag, const QDomElement &tag, KoOasisContext& context );
+ KWFrame* loadOasisTextFrame( const TQDomElement& frameTag, const TQDomElement &tag, KoOasisContext& context );
/// Save the contents of a frame (i.e. the text)
void saveOasisContent( KoXmlWriter& writer, KoSavingContext& context ) const;
/// Save a complete textbox (frame and text)
virtual void saveOasis( KoXmlWriter& writer, KoSavingContext& context, bool saveFrames ) const;
- virtual QString toPlainText() const;
+ virtual TQString toPlainText() const;
virtual void finalize();
- //virtual void preparePrinting( QPainter *painter, QProgressDialog *progress, int &processedParags );
+ //virtual void preparePrinting( TQPainter *painter, TQProgressDialog *progress, int &processedParags );
/** return true if some text is selected */
bool hasSelection() const;
/** returns the selected text [without formatting] if hasSelection() */
- QString selectedText() const;
+ TQString selectedText() const;
- virtual void drawContents( QPainter *painter, const QRect &crect,
- const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+ virtual void drawContents( TQPainter *painter, const TQRect &crect,
+ const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit* edit, KWViewMode *viewMode,
KWFrameViewManager *frameViewManager );
- virtual void drawFrame( KWFrame * frame, QPainter *painter, const QRect& fcrect, const QRect& crect,
- const QPoint& translationOffset,
- KWFrame *settingsFrame, const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+ virtual void drawFrame( KWFrame * frame, TQPainter *painter, const TQRect& fcrect, const TQRect& crect,
+ const TQPoint& translationOffset,
+ KWFrame *settingsFrame, const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit * edit, KWViewMode *viewMode, bool drawUnderlyingFrames );
- virtual void drawFrameContents( KWFrame * frame, QPainter *painter, const QRect & fcrect,
- const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+ virtual void drawFrameContents( KWFrame * frame, TQPainter *painter, const TQRect & fcrect,
+ const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit * edit, KWViewMode *viewMode );
- void drawCursor( QPainter *p, KoTextCursor *cursor, bool cursorVisible, KWCanvas *canvas, KWFrame *currentFrame );
- QPoint cursorPos( KoTextCursor *cursor, KWCanvas* canvas, KWFrame* currentFrame );
+ void drawCursor( TQPainter *p, KoTextCursor *cursor, bool cursorVisible, KWCanvas *canvas, KWFrame *currentFrame );
+ TQPoint cursorPos( KoTextCursor *cursor, KWCanvas* canvas, KWFrame* currentFrame );
- KCommand* pasteOasis( KoTextCursor * cursor, const QByteArray & data, bool removeSelected );
+ KCommand* pasteOasis( KoTextCursor * cursor, const TQByteArray & data, bool removeSelected );
void insertTOC( KoTextCursor * cursor );
KNamedCommand* insertFrameBreakCommand( KoTextCursor *cursor );
void insertFrameBreak( KoTextCursor * cursor );
KCommand * setPageBreakingCommand( KoTextCursor * cursor, int pageBreaking );
- QRect paragRect( KoTextParag * parag ) const; // in normal coords
+ TQRect paragRect( KoTextParag * parag ) const; // in normal coords
KCommand *deleteAnchoredFrame( KWAnchor * anchor );
void findPosition( const KoPoint &dPoint, KoTextParag * & parag, int & index );
- /** Highlighting support (for search/replace, spellchecking etc.) */
- void highlightPortion( KoTextParag * parag, int index, int length, KWCanvas * canvas, bool repaint = true, KDialogBase* dialog = 0 );
- void removeHighlight( bool repaint = true );
+ /** Highlighting support (for search/tqreplace, spellchecking etc.) */
+ void highlightPortion( KoTextParag * parag, int index, int length, KWCanvas * canvas, bool tqrepaint = true, KDialogBase* dialog = 0 );
+ void removeHighlight( bool tqrepaint = true );
- virtual void addTextFrameSets( QPtrList<KWTextFrameSet> &lst, bool onlyReadWrite=false );
+ virtual void addTextFrameSets( TQPtrList<KWTextFrameSet> &lst, bool onlyReadWrite=false );
/** Update the paragraph that use the given style, after this style was changed.
* The flags tell which changes should be applied.
@@ -236,14 +237,14 @@ public:
#endif
/** Invalidate all paragraphs and start re-formatting */
- virtual void layout();
+ virtual void tqlayout();
/** Invalidate all paragraphs (causes a re-flow of the text upon next redraw) */
- virtual void invalidate();
+ virtual void tqinvalidate();
virtual int paragraphs();
virtual int paragraphsSelected();
/** Calculate statistics for this frameset */
- virtual bool statistics( QProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace,
+ virtual bool statistics( TQProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace,
ulong & words, ulong& sentences, ulong & syllables, ulong & lines, bool selected );
/** reimplemented from KoTextFlow, implements flowing around frames etc. */
@@ -252,7 +253,7 @@ public:
virtual int adjustFlow( int y, int w, int h );
/** Called by KWTextFormatter. Implements page breaking, breaking around frames, etc. */
- int formatVertically( KoTextParag *parag, const QRect& rect );
+ int formatVertically( KoTextParag *parag, const TQRect& rect );
/** Called by KWTextFormatter::postFormat() */
void fixParagWidth( KWTextParag* parag );
@@ -265,7 +266,7 @@ public:
/** The viewmode that was passed to drawContents. Special hook for KWAnchor. Don't use. */
KWViewMode * currentViewMode() const { return m_currentViewMode; }
/** The frame that we are currently drawing in drawFrame. Stored here since we can't pass it
- * through QRT's drawing methods. Used by e.g. KWAnchor. */
+ * through TQRT's drawing methods. Used by e.g. KWAnchor. */
KWFrame * currentDrawnFrame() const { return m_currentDrawnFrame; }
/** Let KoTextFormatInterface access the current format */
@@ -274,19 +275,19 @@ public:
/** Let KoTextFormatInterface set the modified format */
virtual KCommand *setFormatCommand( const KoTextFormat * newFormat, int flags, bool zoomFont = false );
- /** Let KoTextFormatInterface access the current parag layout */
+ /** Let KoTextFormatInterface access the current parag tqlayout */
virtual const KoParagLayout * currentParagLayoutFormat() const;
virtual bool rtl() const ;
- /** Let KoTextFormatInterface set a modified current parag layout */
+ /** Let KoTextFormatInterface set a modified current parag tqlayout */
virtual KCommand *setParagLayoutFormatCommand( KoParagLayout *newLayout, int flags, int marginIndex=-1);
virtual KCommand *setChangeCaseOfTextCommand(KoChangeCaseDia::TypeOfCase _type);
/** (Assuming this==main frameset), recalc the foot note numbers */
- void renumberFootNotes( bool repaint = true );
+ void renumberFootNotes( bool tqrepaint = true );
/**
* Iteration over text objects - used by KWBgSpellCheck
@@ -308,15 +309,15 @@ public:
/**
* Insert a footnote (var and frameset). Shared code for loading and inserting from GUI.
*/
- KWFootNoteFrameSet * insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const QString &manualString );
+ KWFootNoteFrameSet * insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const TQString &manualString );
- KoTextDocCommand *deleteTextCommand( KoTextDocument *textdoc, int id, int index, const QMemArray<KoTextStringChar> & str, const CustomItemsMap & customItemsMap, const QValueList<KoParagLayout> & oldParagLayouts );
+ KoTextDocCommand *deleteTextCommand( KoTextDocument *textdoc, int id, int index, const TQMemArray<KoTextStringChar> & str, const CustomItemsMap & customItemsMap, const TQValueList<KoParagLayout> & oldParagLayouts );
- QString copyTextParag( KoXmlWriter& writer, KoSavingContext& context, int selectionId );
+ TQString copyTextParag( KoXmlWriter& writer, KoSavingContext& context, int selectionId );
/// Sort selected paragraphs
/// Return a complete OASIS store, ready for "pasting"
- QByteArray sortText(SortType type) const;
+ TQByteArray sortText(SortType type) const;
KoLinkVariable* linkVariableUnderMouse( const KoPoint& dPoint );
KoVariable* variableUnderMouse( const KoPoint& dPoint );
@@ -343,7 +344,7 @@ protected slots:
protected: // for testing purposes
- KWTextFrameSet( const QString & name );
+ KWTextFrameSet( const TQString & name );
private:
void init();
@@ -352,15 +353,15 @@ private:
void getMargins( int yp, int h, int reqMinWidth, int* marginLeft, int* marginRight, int* pageWidth, int* validHeight,
int* breakBegin, int* breakEnd, KoTextParag* parag );
bool checkVerticalBreak( int & yp, int & h, KoTextParag * parag, bool linesTogether, int breakBegin, int breakEnd );
- void frameResized( KWFrame *theFrame, bool invalidateLayout );
+ void frameResized( KWFrame *theFrame, bool tqinvalidateLayout );
/**
* Return the list of frames containing the text that goes from @p y1 to @p y2
* (in internal coordinates).
*/
- QValueList<KWFrame*> framesFromTo( int y1, int y2 ) const;
+ TQValueList<KWFrame*> framesFromTo( int y1, int y2 ) const;
double footerHeaderSizeMax( KWFrame *theFrame );
double footNoteSize( KWFrame *theFrame );
- QDomElement saveInternal( QDomElement &parentElem, bool saveFrames, bool saveAnchorsFramesets );
+ TQDomElement saveInternal( TQDomElement &tqparentElem, bool saveFrames, bool saveAnchorsFramesets );
bool createNewPageAndNewFrame( KoTextParag* lastFormatted, int difference );
private:
@@ -384,6 +385,7 @@ private:
class KWTextFrameSetEdit : public KoTextView, public KWFrameSetEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
KWTextFrameSetEdit( KWTextFrameSet * fs, KWCanvas * canvas );
virtual ~KWTextFrameSetEdit();
@@ -407,19 +409,19 @@ public:
KoTextView * textView() { return this; }
// Events forwarded by the canvas (when being in "edit" mode)
- virtual void keyPressEvent( QKeyEvent * );
- virtual void keyReleaseEvent( QKeyEvent * );
- virtual void imStartEvent( QIMEvent * );
- virtual void imComposeEvent( QIMEvent * );
- virtual void imEndEvent( QIMEvent * );
- virtual void mousePressEvent( QMouseEvent *, const QPoint &, const KoPoint & );
- virtual void mouseMoveEvent( QMouseEvent *, const QPoint &, const KoPoint & ); // only called if button is pressed
- virtual void mouseReleaseEvent( QMouseEvent *, const QPoint &, const KoPoint & );
- virtual void mouseDoubleClickEvent( QMouseEvent *, const QPoint &, const KoPoint & );
- virtual void dragEnterEvent( QDragEnterEvent * );
- virtual void dragMoveEvent( QDragMoveEvent *, const QPoint &, const KoPoint & );
- virtual void dragLeaveEvent( QDragLeaveEvent * );
- virtual void dropEvent( QDropEvent *, const QPoint &, const KoPoint &, KWView* view );
+ virtual void keyPressEvent( TQKeyEvent * );
+ virtual void keyReleaseEvent( TQKeyEvent * );
+ virtual void imStartEvent( TQIMEvent * );
+ virtual void imComposeEvent( TQIMEvent * );
+ virtual void imEndEvent( TQIMEvent * );
+ virtual void mousePressEvent( TQMouseEvent *, const TQPoint &, const KoPoint & );
+ virtual void mouseMoveEvent( TQMouseEvent *, const TQPoint &, const KoPoint & ); // only called if button is pressed
+ virtual void mouseReleaseEvent( TQMouseEvent *, const TQPoint &, const KoPoint & );
+ virtual void mouseDoubleClickEvent( TQMouseEvent *, const TQPoint &, const KoPoint & );
+ virtual void dragEnterEvent( TQDragEnterEvent * );
+ virtual void dragMoveEvent( TQDragMoveEvent *, const TQPoint &, const KoPoint & );
+ virtual void dragLeaveEvent( TQDragLeaveEvent * );
+ virtual void dropEvent( TQDropEvent *, const TQPoint &, const KoPoint &, KWView* view );
virtual void focusInEvent();
virtual void focusOutEvent();
virtual void selectAll();
@@ -437,24 +439,24 @@ public:
void insertFrameBreak() { textFrameSet()->insertFrameBreak( cursor() ); }
void insertWPPage();
void insertVariable( int type, int subtype = 0 );
- void insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const QString& manualString );
- void insertCustomVariable( const QString &name);
+ void insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const TQString& manualString );
+ void insertCustomVariable( const TQString &name);
void insertVariable( KoVariable *var,
KoTextFormat *format = 0 /*means currentFormat()*/,
bool refreshCustomMenu = false/*don't refresh all the time custom menu*/ );
- void insertLink(const QString &_linkName, const QString & hrefName);
- void insertComment(const QString &_comment);
+ void insertLink(const TQString &_linkName, const TQString & hrefName);
+ void insertComment(const TQString &_comment);
- void insertExpression(const QString &_c);
- void insertFloatingFrameSet( KWFrameSet * fs, const QString & commandName );
+ void insertExpression(const TQString &_c);
+ void insertFloatingFrameSet( KWFrameSet * fs, const TQString & commandName );
void insertTOC() { textFrameSet()->insertTOC( cursor() ); }
KCommand * setPageBreakingCommand( int pageBreaking )
{ return textFrameSet()->setPageBreakingCommand( cursor(), pageBreaking ); }
//const KoParagLayout & currentParagLayout() const { return m_paragLayout; }
- double currentLeftMargin() const { return m_paragLayout.margins[QStyleSheetItem::MarginLeft]; }
+ double currentLeftMargin() const { return m_paragLayout.margins[TQStyleSheetItem::MarginLeft]; }
virtual void removeToolTipCompletion();
@@ -465,8 +467,8 @@ public:
/// Called by KWView when using the action
void openLink();
- void pasteData( QMimeSource* data, int provides, bool drop );
- KCommand* pasteOasisCommand( QMimeSource* data );
+ void pasteData( TQMimeSource* data, int provides, bool drop );
+ KCommand* pasteOasisCommand( TQMimeSource* data );
/**
* Return the requested border of the paragraph that the cursor currently is in.
@@ -487,16 +489,16 @@ public slots:
protected:
// Reimplemented from KoTextView
- virtual void doAutoFormat( KoTextCursor* cursor, KoTextParag *parag, int index, QChar ch );
- virtual bool doIgnoreDoubleSpace(KoTextParag * parag, int index,QChar ch );
+ virtual void doAutoFormat( KoTextCursor* cursor, KoTextParag *parag, int index, TQChar ch );
+ virtual bool doIgnoreDoubleSpace(KoTextParag * parag, int index,TQChar ch );
virtual bool doCompletion( KoTextCursor* cursor, KoTextParag *parag, int index );
virtual bool doToolTipCompletion( KoTextCursor* cursor, KoTextParag *parag, int index,int keyPress );
- virtual void showToolTipBox(KoTextParag *parag, int index, QWidget *widget, const QPoint &pos);
+ virtual void showToolTipBox(KoTextParag *parag, int index, TQWidget *widget, const TQPoint &pos);
virtual void textIncreaseIndent();
virtual bool textDecreaseIndent();
virtual void startDrag();
- QDragObject * newDrag( QWidget * parent );
+ TQDragObject * newDrag( TQWidget * tqparent );
private slots:
void slotFrameDeleted(KWFrame *);
@@ -513,7 +515,7 @@ class KWFootNoteFrameSet : public KWTextFrameSet
{
public:
/** constructor */
- KWFootNoteFrameSet( KWDocument *doc, const QString & name )
+ KWFootNoteFrameSet( KWDocument *doc, const TQString & name )
: KWTextFrameSet( doc, name ), m_footNoteVar( 0L ) {}
virtual KWordFrameSetIface* dcopObject();
@@ -536,7 +538,7 @@ public:
/** Called by KWTextFrameSet::renumberFootNotes.
* Sets the text of the parag-counter in the footnote text.
*/
- void setCounterText( const QString& text );
+ void setCounterText( const TQString& text );
virtual bool isFootNote() const;
virtual bool isEndNote() const;
diff --git a/kword/KWTextImage.cpp b/kword/KWTextImage.cpp
index 4f2cde40..0a036d87 100644
--- a/kword/KWTextImage.cpp
+++ b/kword/KWTextImage.cpp
@@ -27,7 +27,7 @@
#include "KWTextImage.h"
-KWTextImage::KWTextImage( KWTextDocument *textdoc, const QString & filename )
+KWTextImage::KWTextImage( KWTextDocument *textdoc, const TQString & filename )
: KoTextCustomItem( textdoc ), place( PlaceInline )
{
KWDocument * doc = textdoc->textFrameSet()->kWordDocument();
@@ -53,18 +53,18 @@ void KWTextImage::resize()
if ( m_deleted )
return;
if ( !m_image.isNull() ) {
- //KWDocument * doc = static_cast<KWTextDocument *>(parent)->textFrameSet()->kWordDocument();
+ //KWDocument * doc = static_cast<KWTextDocument *>(tqparent)->textFrameSet()->kWordDocument();
width = m_image.getOriginalSize().width();
// width is a 100%-zoom pixel size. We want a LU pixel size -> we simply need 'to LU', i.e. ptToLayoutPt
width = KoTextZoomHandler::ptToLayoutUnitPt( width );
height = m_image.getOriginalSize().height();
height = KoTextZoomHandler::ptToLayoutUnitPt( height );
kdDebug() << "KWTextImage::resize: " << width << ", " << height << endl;
- // no! m_image.setSize( QSize( width, height ) );
+ // no! m_image.setSize( TQSize( width, height ) );
}
}
-void KWTextImage::drawCustomItem( QPainter* p, int x, int y, int wpix, int hpix, int /*ascentpix*/, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected, int /*offset*/, bool drawingShadow)
+void KWTextImage::drawCustomItem( TQPainter* p, int x, int y, int wpix, int hpix, int /*ascentpix*/, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected, int /*offset*/, bool drawingShadow)
{
if ( drawingShadow )
return;
@@ -78,54 +78,54 @@ void KWTextImage::drawCustomItem( QPainter* p, int x, int y, int wpix, int hpix,
return;
}
- QSize imgSize( wpix, hpix );
+ TQSize imgSize( wpix, hpix );
- QRect rect( QPoint(x, y), imgSize );
- if ( !rect.intersects( QRect( cx, cy, cw, ch ) ) )
+ TQRect rect( TQPoint(x, y), imgSize );
+ if ( !rect.intersects( TQRect( cx, cy, cw, ch ) ) )
return;
- QPixmap pixmap=m_image.generatePixmap( imgSize, true );
+ TQPixmap pixmap=m_image.generatePixmap( imgSize, true );
//if ( placement() == PlaceInline )
p->drawPixmap( x, y, pixmap );
//else
// p->drawPixmap( cx, cy, pixmap, cx - x, cy - y, cw, ch );
- if ( selected && placement() == PlaceInline && p->device()->devType() != QInternal::Printer ) {
- p->fillRect( rect , QBrush( cg.highlight(), QBrush::Dense4Pattern) );
+ if ( selected && placement() == PlaceInline && p->device()->devType() != TQInternal::Printer ) {
+ p->fillRect( rect , TQBrush( cg.highlight(), TQBrush::Dense4Pattern) );
}
}
-void KWTextImage::save( QDomElement & parentElem )
+void KWTextImage::save( TQDomElement & tqparentElem )
{
// This code is similar to KWPictureFrameSet::save
- KWDocument * doc = static_cast<KWTextDocument *>(parent)->textFrameSet()->kWordDocument();
+ KWDocument * doc = static_cast<KWTextDocument *>(tqparent)->textFrameSet()->kWordDocument();
- QDomElement imageElem = parentElem.ownerDocument().createElement( "PICTURE" );
- parentElem.appendChild( imageElem );
+ TQDomElement imageElem = tqparentElem.ownerDocument().createElement( "PICTURE" );
+ tqparentElem.appendChild( imageElem );
//imageElem.setAttribute( "keepAspectRatio", "true" );
- QDomElement elem = parentElem.ownerDocument().createElement( "KEY" );
+ TQDomElement elem = tqparentElem.ownerDocument().createElement( "KEY" );
imageElem.appendChild( elem );
image().getKey().saveAttributes( elem );
// Now we must take care that a <KEY> element will be written as a child of <PICTURES>
doc->addTextImageRequest( this );
}
-void KWTextImage::load( QDomElement & parentElem )
+void KWTextImage::load( TQDomElement & tqparentElem )
{
// This code is similar to KWPictureFrameSet::load
- KWDocument * doc = static_cast<KWTextDocument *>(parent)->textFrameSet()->kWordDocument();
+ KWDocument * doc = static_cast<KWTextDocument *>(tqparent)->textFrameSet()->kWordDocument();
// <IMAGE> (KOffice 1.0) or <PICTURE> (KWord 1.2)
- QDomNode node=parentElem.namedItem( "PICTURE" );
+ TQDomNode node=tqparentElem.namedItem( "PICTURE" );
if ( node.isNull() )
{
- node=parentElem.namedItem( "IMAGE" );
+ node=tqparentElem.namedItem( "IMAGE" );
}
- QDomElement image = node.toElement();
+ TQDomElement image = node.toElement();
if ( image.isNull() )
- image = parentElem; // The data is directly child of <FORMAT>
+ image = tqparentElem; // The data is directly child of <FORMAT>
// <KEY>
- QDomElement keyElement = image.namedItem( "KEY" ).toElement();
+ TQDomElement keyElement = image.namedItem( "KEY" ).toElement();
if ( !keyElement.isNull() )
{
KoPictureKey key;
@@ -136,10 +136,10 @@ void KWTextImage::load( QDomElement & parentElem )
else
{
// <FILENAME> (old format, up to KWord-1.1-beta2)
- QDomElement filenameElement = image.namedItem( "FILENAME" ).toElement();
+ TQDomElement filenameElement = image.namedItem( "FILENAME" ).toElement();
if ( !filenameElement.isNull() )
{
- QString filename = filenameElement.attribute( "value" );
+ TQString filename = filenameElement.attribute( "value" );
m_image.setKey( KoPictureKey( filename ) );
doc->addTextImageRequest( this );
}
diff --git a/kword/KWTextImage.h b/kword/KWTextImage.h
index 19f7c334..9c3bbf47 100644
--- a/kword/KWTextImage.h
+++ b/kword/KWTextImage.h
@@ -37,7 +37,7 @@ public:
* Set filename to load a real file from the disk
* Otherwise use setImage() - this is what's done on loading
*/
- KWTextImage( KWTextDocument *textdoc, const QString & filename );
+ KWTextImage( KWTextDocument *textdoc, const TQString & filename );
~KWTextImage()
{
// Remove image from collection ?
@@ -52,14 +52,14 @@ public:
KoPicture image() const { return m_image; }
- virtual void drawCustomItem( QPainter* p, int x, int y, int wpix, int hpix, int ascentpix, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected, int offset, bool drawingShadow );
+ virtual void drawCustomItem( TQPainter* p, int x, int y, int wpix, int hpix, int ascentpix, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected, int offset, bool drawingShadow );
// Save to XML
- virtual void save( QDomElement & formatElem );
+ virtual void save( TQDomElement & formatElem );
virtual void saveOasis( KoXmlWriter&, KoSavingContext& ) const;
virtual int typeId() const { return 2; }
- void load( QDomElement & formatElem );
+ void load( TQDomElement & formatElem );
/**
* Get the key of the picture
@@ -68,7 +68,7 @@ public:
private:
Placement place;
KoPicture m_image;
- QSize m_size; // Size of image
+ TQSize m_size; // Size of image
};
#endif
diff --git a/kword/KWTextParag.cpp b/kword/KWTextParag.cpp
index 152e2f70..f715298d 100644
--- a/kword/KWTextParag.cpp
+++ b/kword/KWTextParag.cpp
@@ -40,11 +40,11 @@
#undef S_NONE // Solaris defines it in sys/signal.h
// Called by KoTextParag::drawParagString - all params are in pixel coordinates
-void KWTextParag::drawFormattingChars( QPainter &painter, int start, int len,
+void KWTextParag::drawFormattingChars( TQPainter &painter, int start, int len,
int lastY_pix, int baseLine_pix, int h_pix, // in pixels
bool drawSelections,
- KoTextFormat *lastFormat, const QMemArray<int> &selectionStarts,
- const QMemArray<int> &selectionEnds, const QColorGroup &cg,
+ KoTextFormat *lastFormat, const TQMemArray<int> &selectionStarts,
+ const TQMemArray<int> &selectionEnds, const TQColorGroup &cg,
bool rightToLeft, int line, KoTextZoomHandler* zh,
int whichFormattingChars )
{
@@ -70,27 +70,27 @@ void KWTextParag::drawFormattingChars( QPainter &painter, int start, int len,
if ( start + len == length() && (whichFormattingChars & FormattingBreak) && hardFrameBreakAfter() )
{
painter.save();
- QPen pen( KGlobalSettings::linkColor() ); // #101820
+ TQPen pen( KGlobalSettings::linkColor() ); // #101820
painter.setPen( pen );
//kdDebug() << "KWTextParag::drawFormattingChars start=" << start << " len=" << len << " length=" << length() << endl;
// keep in sync with KWTextFrameSet::formatVertically
- QString str = i18n( "--- Frame Break ---" );
+ TQString str = i18n( "--- Frame Break ---" );
int width = 0;
//width = lastFormat->screenStringWidth( zh, str );
width = lastFormat->screenFontMetrics( zh ).width( str );
- QColorGroup cg2( cg );
- //cg2.setColor( QColorGroup::Base, Qt::green ); // for debug
+ TQColorGroup cg2( cg );
+ //cg2.setColor( TQColorGroup::Base, TQt::green ); // for debug
int last = length() - 1;
KoTextStringChar &ch = string()->at( last );
- int x = zh->layoutUnitToPixelX( ch.x );// + ch.pixelxadj;
+ int x = zh->tqlayoutUnitToPixelX( ch.x );// + ch.pixelxadj;
KoTextFormat format( *lastFormat );
format.setColor( pen.color() ); // ### A bit slow, maybe pass the color to drawParagStringInternal ?
KoTextParag::drawParagStringInternal(
painter, str, 0, str.length(),
x, lastY_pix, // startX and lastY
- zh->layoutUnitToPixelY( ch.ascent() ), // baseline
- width, zh->layoutUnitToPixelY( ch.height() ), // bw and h
+ zh->tqlayoutUnitToPixelY( ch.ascent() ), // baseline
+ width, zh->tqlayoutUnitToPixelY( ch.height() ), // bw and h
drawSelections, &format, selectionStarts,
selectionEnds, cg2, rightToLeft, line, zh, false );
// Clear 'paint end of line' flag, we don't want it overwriting the above
@@ -109,9 +109,9 @@ void KWTextParag::drawFormattingChars( QPainter &painter, int start, int len,
void KWTextParag::setPageBreaking( int pb )
{
m_layout.pageBreaking = pb;
- invalidate(0);
+ tqinvalidate(0);
if ( next() && ( pb & KoParagLayout::HardFrameBreakAfter ) )
- next()->invalidate(0);
+ next()->tqinvalidate(0);
}
KWTextDocument * KWTextParag::kwTextDocument() const
@@ -120,19 +120,19 @@ KWTextDocument * KWTextParag::kwTextDocument() const
}
//static
-QDomElement KWTextParag::saveFormat( QDomDocument & doc, KoTextFormat * curFormat, KoTextFormat * refFormat, int pos, int len )
+TQDomElement KWTextParag::saveFormat( TQDomDocument & doc, KoTextFormat * curFormat, KoTextFormat * refFormat, int pos, int len )
{
//kdDebug() << "KWTextParag::saveFormat refFormat=" << ( refFormat ? refFormat->key() : "none" )
// << " curFormat=" << curFormat->key()
// << " pos=" << pos << " len=" << len << endl;
- QDomElement formatElem = doc.createElement( "FORMAT" );
+ TQDomElement formatElem = doc.createElement( "FORMAT" );
formatElem.setAttribute( "id", 1 ); // text format
if ( len ) // 0 when saving the format of a style
{
formatElem.setAttribute( "pos", pos );
formatElem.setAttribute( "len", len );
}
- QDomElement elem;
+ TQDomElement elem;
if( !refFormat || curFormat->font().weight() != refFormat->font().weight() )
{
elem = doc.createElement( "WEIGHT" );
@@ -195,7 +195,7 @@ QDomElement KWTextParag::saveFormat( QDomDocument & doc, KoTextFormat * curForma
elem.setAttribute( "value", "wave" );
else
elem.setAttribute( "value", static_cast<int>(curFormat->underline()) );
- QString strLineType=KoTextFormat::underlineStyleToString( curFormat->underlineStyle() );
+ TQString strLineType=KoTextFormat::underlineStyleToString( curFormat->underlineStyle() );
elem.setAttribute( "styleline", strLineType );
if ( curFormat->textUnderlineColor().isValid() )
elem.setAttribute( "underlinecolor", curFormat->textUnderlineColor().name() );
@@ -215,7 +215,7 @@ QDomElement KWTextParag::saveFormat( QDomDocument & doc, KoTextFormat * curForma
elem.setAttribute( "value", "single-bold" );
else
elem.setAttribute( "value", static_cast<int>(curFormat->strikeOut()) );
- QString strLineType=KoTextFormat::strikeOutStyleToString( curFormat->strikeOutStyle() );
+ TQString strLineType=KoTextFormat::strikeOutStyleToString( curFormat->strikeOutStyle() );
elem.setAttribute( "styleline", strLineType );
elem.setAttribute( "wordbyword" , static_cast<int>(curFormat->wordByWord()));
}
@@ -280,30 +280,30 @@ QDomElement KWTextParag::saveFormat( QDomDocument & doc, KoTextFormat * curForma
return formatElem;
}
-void KWTextParag::save( QDomElement &parentElem, bool saveAnchorsFramesets )
+void KWTextParag::save( TQDomElement &tqparentElem, bool saveAnchorsFramesets )
{
- // The QMAX below ensures that although we don't save the trailing space
+ // The TQMAX below ensures that although we don't save the trailing space
// in the normal case, we do save it for empty paragraphs (#30336)
- save( parentElem, 0, QMAX( 0, length()-2 ), saveAnchorsFramesets );
+ save( tqparentElem, 0, TQMAX( 0, length()-2 ), saveAnchorsFramesets );
}
-void KWTextParag::save( QDomElement &parentElem, int from /* default 0 */,
+void KWTextParag::save( TQDomElement &tqparentElem, int from /* default 0 */,
int to /* default length()-2 */,
bool saveAnchorsFramesets /* default false */ )
{
- QDomDocument doc = parentElem.ownerDocument();
- QDomElement paragElem = doc.createElement( "PARAGRAPH" );
- parentElem.appendChild( paragElem );
- QDomElement textElem = doc.createElement( "TEXT" );
+ TQDomDocument doc = tqparentElem.ownerDocument();
+ TQDomElement paragElem = doc.createElement( "PARAGRAPH" );
+ tqparentElem.appendChild( paragElem );
+ TQDomElement textElem = doc.createElement( "TEXT" );
textElem.setAttribute("xml:space", "preserve");
paragElem.appendChild( textElem );
if ( partOfTableOfContents() )
paragElem.setAttribute( "toc", "true" );
- QString text = string()->toString();
+ TQString text = string()->toString();
Q_ASSERT( text.right(1)[0] == ' ' );
textElem.appendChild( doc.createTextNode( text.mid( from, to - from + 1 ) ) );
- QDomElement formatsElem = doc.createElement( "FORMATS" );
+ TQDomElement formatsElem = doc.createElement( "FORMATS" );
int startPos = -1;
int index = 0; // Usually same as 'i' but if from>0, 'i' indexes the parag's text and this one indexes the output
KoTextFormat *curFormat = paragraphFormat();
@@ -314,13 +314,13 @@ void KWTextParag::save( QDomElement &parentElem, int from /* default 0 */,
if ( ch.isCustom() )
{
if ( startPos > -1 && curFormat) { // Save former format
- QDomElement formatElem = saveFormat( doc, curFormat,
+ TQDomElement formatElem = saveFormat( doc, curFormat,
paragraphFormat(), startPos, index-startPos );
if ( !formatElem.firstChild().isNull() ) // Don't save an empty format tag
formatsElem.appendChild( formatElem );
}
- QDomElement formatElem = saveFormat( doc, newFormat, paragraphFormat(), index, 1 );
+ TQDomElement formatElem = saveFormat( doc, newFormat, paragraphFormat(), index, 1 );
formatsElem.appendChild( formatElem );
KoTextCustomItem* customItem = ch.customItem();
formatElem.setAttribute( "id", customItem->typeId() );
@@ -341,7 +341,7 @@ void KWTextParag::save( QDomElement &parentElem, int from /* default 0 */,
{
// Save inline framesets at the toplevel. Necessary when copying a textframeset that
// itself includes an inline frameset - we want all frameset tags at the toplevel.
- QDomElement elem = doc.documentElement();
+ TQDomElement elem = doc.documentElement();
kdDebug() << " saving into " << elem.tagName() << endl;
inlineFs->toXML( elem );
}
@@ -353,7 +353,7 @@ void KWTextParag::save( QDomElement &parentElem, int from /* default 0 */,
{
// Format changed.
if ( startPos > -1 && curFormat) { // Save former format
- QDomElement formatElem = saveFormat( doc, curFormat, paragraphFormat(), startPos, index-startPos );
+ TQDomElement formatElem = saveFormat( doc, curFormat, paragraphFormat(), startPos, index-startPos );
if ( !formatElem.firstChild().isNull() ) // Don't save an empty format tag
formatsElem.appendChild( formatElem );
}
@@ -373,7 +373,7 @@ void KWTextParag::save( QDomElement &parentElem, int from /* default 0 */,
}
}
if ( startPos > -1 && index > startPos && curFormat) { // Save last format
- QDomElement formatElem = saveFormat( doc, curFormat, paragraphFormat(), startPos, index-startPos );
+ TQDomElement formatElem = saveFormat( doc, curFormat, paragraphFormat(), startPos, index-startPos );
if ( !formatElem.firstChild().isNull() ) // Don't save an empty format tag
formatsElem.appendChild( formatElem );
}
@@ -382,27 +382,27 @@ void KWTextParag::save( QDomElement &parentElem, int from /* default 0 */,
paragElem.appendChild( formatsElem );
- QDomElement layoutElem = doc.createElement( "LAYOUT" );
- paragElem.appendChild( layoutElem );
+ TQDomElement tqlayoutElem = doc.createElement( "LAYOUT" );
+ paragElem.appendChild( tqlayoutElem );
- // save with the real alignment (left or right, not auto)
- m_layout.saveParagLayout( layoutElem, resolveAlignment() );
+ // save with the real tqalignment (left or right, not auto)
+ m_layout.saveParagLayout( tqlayoutElem, resolveAlignment() );
// Paragraph's format
// ## Maybe we should have a "default format" somewhere and
// pass it instead of 0L, to only save the non-default attributes
// But this would break all export filters again.
- QDomElement paragFormatElement = saveFormat( doc, paragraphFormat(), 0L, 0, to - from + 1 );
- layoutElem.appendChild( paragFormatElement );
+ TQDomElement paragFormatElement = saveFormat( doc, paragraphFormat(), 0L, 0, to - from + 1 );
+ tqlayoutElem.appendChild( paragFormatElement );
}
//static
-KoTextFormat KWTextParag::loadFormat( QDomElement &formatElem, KoTextFormat * refFormat, const QFont & defaultFont, const QString & defaultLanguage, bool hyphanation )
+KoTextFormat KWTextParag::loadFormat( TQDomElement &formatElem, KoTextFormat * refFormat, const TQFont & defaultFont, const TQString & defaultLanguage, bool hyphanation )
{
KoTextFormat format;
//todo fixme !!!!!!!!!!!!
format.setHyphenation( hyphanation );
- QFont font;
+ TQFont font;
if ( refFormat )
{
format = *refFormat;
@@ -414,7 +414,7 @@ KoTextFormat KWTextParag::loadFormat( QDomElement &formatElem, KoTextFormat * re
font = defaultFont;
}
- QDomElement elem;
+ TQDomElement elem;
elem = formatElem.namedItem( "FONT" ).toElement();
if ( !elem.isNull() )
{
@@ -435,7 +435,7 @@ KoTextFormat KWTextParag::loadFormat( QDomElement &formatElem, KoTextFormat * re
font.setItalic( elem.attribute("value").toInt() == 1 );
elem = formatElem.namedItem( "UNDERLINE" ).toElement();
if ( !elem.isNull() ) {
- QString value = elem.attribute("value");
+ TQString value = elem.attribute("value");
if ( value == "0" || value == "1" )
format.setUnderlineType( (value.toInt() == 1)?KoTextFormat::U_SIMPLE: KoTextFormat::U_NONE );
else if ( value == "single" ) // value never used when saving, but why not support it? ;)
@@ -448,12 +448,12 @@ KoTextFormat KWTextParag::loadFormat( QDomElement &formatElem, KoTextFormat * re
format.setUnderlineType ( KoTextFormat::U_WAVE);
if ( elem.hasAttribute("styleline" ))
{
- QString strLineType = elem.attribute("styleline");
+ TQString strLineType = elem.attribute("styleline");
format.setUnderlineStyle( KoTextFormat::stringToUnderlineStyle( strLineType ));
}
if ( elem.hasAttribute("underlinecolor"))
{
- QColor col( QColor(elem.attribute("underlinecolor")));
+ TQColor col( TQColor(elem.attribute("underlinecolor")));
format.setTextUnderlineColor( col );
}
if ( elem.hasAttribute( "wordbyword" ))
@@ -462,7 +462,7 @@ KoTextFormat KWTextParag::loadFormat( QDomElement &formatElem, KoTextFormat * re
elem = formatElem.namedItem( "STRIKEOUT" ).toElement();
if ( !elem.isNull() )
{
- QString value = elem.attribute("value");
+ TQString value = elem.attribute("value");
if ( value == "0" || value == "1" )
format.setStrikeOutType( (value.toInt() == 1)?KoTextFormat::S_SIMPLE: KoTextFormat::S_NONE );
else if ( value == "single" ) // value never used when saving, but why not support it? ;)
@@ -474,7 +474,7 @@ KoTextFormat KWTextParag::loadFormat( QDomElement &formatElem, KoTextFormat * re
if ( elem.hasAttribute("styleline" ))
{
- QString strLineType = elem.attribute("styleline");
+ TQString strLineType = elem.attribute("styleline");
format.setStrikeOutStyle( KoTextFormat::stringToStrikeOutStyle( strLineType ));
}
if ( elem.hasAttribute( "wordbyword" ))
@@ -484,7 +484,7 @@ KoTextFormat KWTextParag::loadFormat( QDomElement &formatElem, KoTextFormat * re
/*
elem = formatElem.namedItem( "CHARSET" ).toElement();
if ( !elem.isNull() )
- font.setCharSet( (QFont::CharSet) elem.attribute("value").toInt() );
+ font.setCharSet( (TQFont::CharSet) elem.attribute("value").toInt() );
*/
format.setFont( font );
@@ -502,9 +502,9 @@ KoTextFormat KWTextParag::loadFormat( QDomElement &formatElem, KoTextFormat * re
int green = elem.attribute("green").toInt();
int blue = elem.attribute("blue").toInt();
if ( red == -1 && blue == -1 && green == -1 )
- format.setColor( QColor() );
+ format.setColor( TQColor() );
else
- format.setColor( QColor(red,green,blue) );
+ format.setColor( TQColor(red,green,blue) );
}
elem = formatElem.namedItem( "TEXTBACKGROUNDCOLOR" ).toElement();
if ( !elem.isNull() )
@@ -513,9 +513,9 @@ KoTextFormat KWTextParag::loadFormat( QDomElement &formatElem, KoTextFormat * re
int green = elem.attribute("green").toInt();
int blue = elem.attribute("blue").toInt();
if ( red == -1 && blue == -1 && green == -1 )
- format.setTextBackgroundColor( QColor() );
+ format.setTextBackgroundColor( TQColor() );
else
- format.setTextBackgroundColor( QColor(red,green,blue) );
+ format.setTextBackgroundColor( TQColor(red,green,blue) );
}
elem = formatElem.namedItem( "SHADOW" ).toElement();
if ( !elem.isNull() )
@@ -550,18 +550,18 @@ KoTextFormat KWTextParag::loadFormat( QDomElement &formatElem, KoTextFormat * re
return format;
}
-void KWTextParag::loadLayout( QDomElement & attributes )
+void KWTextParag::loadLayout( TQDomElement & attributes )
{
- QDomElement layout = attributes.namedItem( "LAYOUT" ).toElement();
- if ( !layout.isNull() )
+ TQDomElement tqlayout = attributes.namedItem( "LAYOUT" ).toElement();
+ if ( !tqlayout.isNull() )
{
KWDocument * doc = kwTextDocument()->textFrameSet()->kWordDocument();
- KoParagLayout paragLayout = loadParagLayout( layout, doc, true );
+ KoParagLayout paragLayout = loadParagLayout( tqlayout, doc, true );
setParagLayout( paragLayout );
// Load default format from style.
KoTextFormat *defaultFormat = style() ? &style()->format() : 0L;
- QDomElement formatElem = layout.namedItem( "FORMAT" ).toElement();
+ TQDomElement formatElem = tqlayout.namedItem( "FORMAT" ).toElement();
if ( !formatElem.isNull() )
{
// Load paragraph format
@@ -577,16 +577,16 @@ void KWTextParag::loadLayout( QDomElement & attributes )
else
{
// Even the simplest import filter should do <LAYOUT><NAME value="Standard"/></LAYOUT>
- kdWarning(32001) << "No LAYOUT tag in PARAGRAPH, dunno what layout to apply" << endl;
+ kdWarning(32001) << "No LAYOUT tag in PARAGRAPH, dunno what tqlayout to apply" << endl;
}
}
-void KWTextParag::load( QDomElement &attributes )
+void KWTextParag::load( TQDomElement &attributes )
{
loadLayout( attributes );
// Set the text after setting the paragraph format - so that the format applies
- QDomElement element = attributes.namedItem( "TEXT" ).toElement();
+ TQDomElement element = attributes.namedItem( "TEXT" ).toElement();
if ( !element.isNull() )
{
//kdDebug() << "KWTextParag::load '" << element.text() << "'" << endl;
@@ -601,20 +601,20 @@ void KWTextParag::load( QDomElement &attributes )
loadFormatting( attributes );
setChanged( true );
- invalidate( 0 );
+ tqinvalidate( 0 );
}
-void KWTextParag::loadFormatting( QDomElement &attributes, int offset, bool loadFootNote )
+void KWTextParag::loadFormatting( TQDomElement &attributes, int offset, bool loadFootNote )
{
- QValueList<int> removeLenList;
- QValueList<int> removePosList;
+ TQValueList<int> removeLenList;
+ TQValueList<int> removePosList;
KWDocument * doc = kwTextDocument()->textFrameSet()->kWordDocument();
- QDomElement formatsElem = attributes.namedItem( "FORMATS" ).toElement();
+ TQDomElement formatsElem = attributes.namedItem( "FORMATS" ).toElement();
if ( !formatsElem.isNull() )
{
- QDomElement formatElem = formatsElem.firstChild().toElement();
+ TQDomElement formatElem = formatsElem.firstChild().toElement();
for ( ; !formatElem.isNull() ; formatElem = formatElem.nextSibling().toElement() )
{
if ( formatElem.tagName() == "FORMAT" )
@@ -635,17 +635,17 @@ void KWTextParag::loadFormatting( QDomElement &attributes, int offset, bool load
{
len = 1; // it was missing from old 1.0 files
- // The character matching this format is probably a QChar(1)
+ // The character matching this format is probably a TQChar(1)
// However, as it is an invalid XML character, we must replace it
// or it will be written out while save the file.
KoTextStringChar& ch = string()->at(index);
- if (ch.c.unicode()==1)
+ if (ch.c.tqunicode()==1)
{
- kdDebug() << "Replacing QChar(1) (in KWTextParag::loadFormatting)" << endl;
+ kdDebug() << "Replacing TQChar(1) (in KWTextParag::loadFormatting)" << endl;
ch.c='#';
}
- KWTextImage * custom = new KWTextImage( kwTextDocument(), QString::null );
+ KWTextImage * custom = new KWTextImage( kwTextDocument(), TQString() );
kdDebug() << "KWTextParag::loadFormatting insertCustomItem" << endl;
paragFormat()->addRef();
setCustomItem( index, custom, paragFormat() );
@@ -656,7 +656,7 @@ void KWTextParag::loadFormatting( QDomElement &attributes, int offset, bool load
{
len = 1; // it was missing from old 1.0 files
- // We have to replace the # or QChar(1) by a tabulator
+ // We have to replace the # or TQChar(1) by a tabulator
KoTextStringChar& ch = string()->at(index);
ch.c='\t';
@@ -668,7 +668,7 @@ void KWTextParag::loadFormatting( QDomElement &attributes, int offset, bool load
}
case 4: // Variable
{
- QDomElement varElem = formatElem.namedItem( "VARIABLE" ).toElement();
+ TQDomElement varElem = formatElem.namedItem( "VARIABLE" ).toElement();
bool oldDoc = false;
if ( varElem.isNull() )
{
@@ -677,7 +677,7 @@ void KWTextParag::loadFormatting( QDomElement &attributes, int offset, bool load
varElem = formatElem;
oldDoc = true;
}
- QDomElement typeElem = varElem.namedItem( "TYPE" ).toElement();
+ TQDomElement typeElem = varElem.namedItem( "TYPE" ).toElement();
if ( typeElem.isNull() )
kdWarning(32001) <<
( oldDoc ? "No <TYPE> in <FORMAT> with id=4, for a variable [old document assumed] !"
@@ -685,7 +685,7 @@ void KWTextParag::loadFormatting( QDomElement &attributes, int offset, bool load
else
{
int type = typeElem.attribute( "type" ).toInt();
- QString key = typeElem.attribute( "key" );
+ TQString key = typeElem.attribute( "key" );
kdDebug() << "KWTextParag::loadFormatting variable type=" << type << " key=" << key << endl;
KoVariableFormat * varFormat = key.isEmpty() ? 0 : doc->variableFormatCollection()->format( key.latin1() );
// If varFormat is 0 (no key specified), the default format will be used.
@@ -709,12 +709,12 @@ void KWTextParag::loadFormatting( QDomElement &attributes, int offset, bool load
case 6: // Anchor
{
Q_ASSERT( len == 1 );
- QDomElement anchorElem = formatElem.namedItem( "ANCHOR" ).toElement();
+ TQDomElement anchorElem = formatElem.namedItem( "ANCHOR" ).toElement();
if ( !anchorElem.isNull() ) {
- QString type = anchorElem.attribute( "type" );
+ TQString type = anchorElem.attribute( "type" );
if ( type == "grpMgr" /* old syntax */ || type == "frameset" )
{
- QString framesetName = anchorElem.attribute( "instance" );
+ TQString framesetName = anchorElem.attribute( "instance" );
KWAnchorPosition pos;
pos.textfs = kwTextDocument()->textFrameSet();
pos.paragId = paragId();
@@ -740,20 +740,20 @@ void KWTextParag::loadFormatting( QDomElement &attributes, int offset, bool load
}
}
-void KWTextParag::setParagLayout( const KoParagLayout & layout, int flags, int marginIndex )
+void KWTextParag::setParagLayout( const KoParagLayout & tqlayout, int flags, int marginIndex )
{
- KoTextParag::setParagLayout( layout, flags, marginIndex );
+ KoTextParag::setParagLayout( tqlayout, flags, marginIndex );
if ( flags & KoParagLayout::PageBreaking )
- setPageBreaking( layout.pageBreaking );
+ setPageBreaking( tqlayout.pageBreaking );
}
//////////
// Create a KoParagLayout from XML.
-KoParagLayout KWTextParag::loadParagLayout( QDomElement & parentElem, KWDocument *doc, bool findStyle )
+KoParagLayout KWTextParag::loadParagLayout( TQDomElement & tqparentElem, KWDocument *doc, bool findStyle )
{
- KoParagLayout layout;
+ KoParagLayout tqlayout;
// Only when loading paragraphs, not when loading styles
if ( findStyle )
@@ -761,10 +761,10 @@ KoParagLayout KWTextParag::loadParagLayout( QDomElement & parentElem, KWDocument
KoParagStyle *style;
// Name of the style. If there is no style, then we do not supply
// any default!
- QDomElement element = parentElem.namedItem( "NAME" ).toElement();
+ TQDomElement element = tqparentElem.namedItem( "NAME" ).toElement();
if ( !element.isNull() )
{
- QString styleName = element.attribute( "value" );
+ TQString styleName = element.attribute( "value" );
style = doc->styleCollection()->findStyle( styleName );
if (!style)
{
@@ -779,12 +779,12 @@ KoParagLayout KWTextParag::loadParagLayout( QDomElement & parentElem, KWDocument
style = doc->styleCollection()->findStyle( "Standard" );
}
Q_ASSERT(style);
- layout.style = style;
+ tqlayout.style = style;
}
- KoParagLayout::loadParagLayout( layout, parentElem, doc->syntaxVersion() );
+ KoParagLayout::loadParagLayout( tqlayout, tqparentElem, doc->syntaxVersion() );
- return layout;
+ return tqlayout;
}
void KWTextParag::join( KoTextParag *parag )
@@ -793,7 +793,7 @@ void KWTextParag::join( KoTextParag *parag )
KoTextParag::join( parag );
}
-void KWTextParag::loadOasis( const QDomElement& paragElement, KoOasisContext& context, KoStyleCollection *styleCollection, uint& pos )
+void KWTextParag::loadOasis( const TQDomElement& paragElement, KoOasisContext& context, KoStyleCollection *styleCollection, uint& pos )
{
KoTextParag::loadOasis( paragElement, context, styleCollection, pos );
@@ -801,39 +801,39 @@ void KWTextParag::loadOasis( const QDomElement& paragElement, KoOasisContext& co
if ( textfs->isMainFrameset() && textfs->kWordDocument()->isLoading() /*not during copy/paste*/ )
{
KWDocument * doc = textfs->kWordDocument();
- QString& currentMasterPageRef = doc->loadingInfo()->m_currentMasterPage;
- const QString styleName = paragElement.attributeNS( KoXmlNS::text, "style-name", QString::null );
+ TQString& currentMasterPageRef = doc->loadingInfo()->m_currentMasterPage;
+ const TQString styleName = paragElement.attributeNS( KoXmlNS::text, "style-name", TQString() );
if ( !styleName.isEmpty() )
{
- const QDomElement* paragraphStyle = context.oasisStyles().findStyle( styleName, "paragraph" );
- QString masterPageName = paragraphStyle ? paragraphStyle->attributeNS( KoXmlNS::style, "master-page-name", QString::null ) : QString::null;
+ const TQDomElement* paragraphStyle = context.oasisStyles().findStyle( styleName, "paragraph" );
+ TQString masterPageName = paragraphStyle ? paragraphStyle->attributeNS( KoXmlNS::style, "master-page-name", TQString() ) : TQString();
- // In KWord we don't support sections so the first paragraph is the one that determines the page layout.
+ // In KWord we don't support sections so the first paragraph is the one that determines the page tqlayout.
if ( prev() == 0 ) {
if ( masterPageName.isEmpty() )
- masterPageName = "Standard"; // Seems to be a builtin name for the default layout...
+ masterPageName = "Standard"; // Seems to be a builtin name for the default tqlayout...
currentMasterPageRef = masterPageName; // do this first to avoid recursion
context.styleStack().save();
context.styleStack().setTypeProperties( "paragraph" );
context.addStyles( paragraphStyle, "paragraph" );
// This is quite ugly... OOo stores the starting page-number in the first paragraph style...
- QString pageNumber = context.styleStack().attributeNS( KoXmlNS::style, "page-number" );
+ TQString pageNumber = context.styleStack().attributeNS( KoXmlNS::style, "page-number" );
if ( !pageNumber.isEmpty() )
doc->variableCollection()->variableSetting()->setStartingPageNumber( pageNumber.toInt() );
context.styleStack().restore();
- doc->loadOasisPageLayout( masterPageName, context ); // page layout
+ doc->loadOasisPageLayout( masterPageName, context ); // page tqlayout
}
else if ( !masterPageName.isEmpty() // empty means no change
&& masterPageName != currentMasterPageRef )
{
- // Detected a change in the master page -> this means we have to use a new page layout
+ // Detected a change in the master page -> this means we have to use a new page tqlayout
// and insert a frame break if not on the first paragraph.
kdDebug(32001) << "KWTextParag::loadOasis: change of master page detected: from " << currentMasterPageRef << " to " << masterPageName << " -> inserting page break" << endl;
currentMasterPageRef = masterPageName;
// [see also KoParagLayout for the 'normal' way to insert page breaks]
m_layout.pageBreaking |= KoParagLayout::HardFrameBreakBefore;
- // We have no way to load/use the new page layout, KWord doesn't have "sections".
+ // We have no way to load/use the new page tqlayout, KWord doesn't have "sections".
}
}
}
diff --git a/kword/KWTextParag.h b/kword/KWTextParag.h
index 9e3ffe27..db873c24 100644
--- a/kword/KWTextParag.h
+++ b/kword/KWTextParag.h
@@ -23,7 +23,7 @@
#include "KoTextParag.h"
class KoStyleCollection;
-class QDomDocument;
+class TQDomDocument;
class KWTextFrameSet;
class KWTextDocument;
class KWDocument;
@@ -46,7 +46,7 @@ public:
KWTextDocument * kwTextDocument() const;
- virtual void setParagLayout( const KoParagLayout &layout, int flags = KoParagLayout::All, int marginIndex = -1 );
+ virtual void setParagLayout( const KoParagLayout &tqlayout, int flags = KoParagLayout::All, int marginIndex = -1 );
/** The type of page-breaking behaviour */
void setPageBreaking( int pb ); // warning this sets all the flags!
@@ -56,40 +56,40 @@ public:
bool hardFrameBreakAfter() const { return m_layout.pageBreaking & KoParagLayout::HardFrameBreakAfter; }
/** Public for loading a style (KWord-1.3 XML) */
- static KoTextFormat loadFormat( QDomElement &formatElem, KoTextFormat *refFormat, const QFont &defaultFont, const QString & defaultLanguage, bool hyphanation );
+ static KoTextFormat loadFormat( TQDomElement &formatElem, KoTextFormat *refFormat, const TQFont &defaultFont, const TQString & defaultLanguage, bool hyphanation );
/** Public for saving a style (KWord-1.3 XML) */
- static QDomElement saveFormat( QDomDocument &doc, KoTextFormat *curFormat, KoTextFormat *refFormat, int pos, int len );
+ static TQDomElement saveFormat( TQDomDocument &doc, KoTextFormat *curFormat, KoTextFormat *refFormat, int pos, int len );
/** Save (to KWord-1.3 XML) the whole paragraph */
- void save( QDomElement &parentElem, bool saveAnchorsFramesets = false );
+ void save( TQDomElement &tqparentElem, bool saveAnchorsFramesets = false );
/** Save (to KWord-1.3 XML) a portion of the paragraph */
- void save( QDomElement &parentElem, int from, int to, bool saveAnchorsFramesets = false );
+ void save( TQDomElement &tqparentElem, int from, int to, bool saveAnchorsFramesets = false );
/** Load (from KWord-1.3 XML) the paragraph */
- void load( QDomElement &attributes );
+ void load( TQDomElement &attributes );
/** Load (from KWord-1.3 XML) and apply \<FORMAT\> tags (used by KWTextParag::load and by KWPasteCommand) */
- void loadFormatting( QDomElement &attributes, int offset = 0, bool loadFootNote=true );
+ void loadFormatting( TQDomElement &attributes, int offset = 0, bool loadFootNote=true );
- /** Load (from KWord-1.3 XML) and apply paragraph layout */
- void loadLayout( QDomElement & attributes );
+ /** Load (from KWord-1.3 XML) and apply paragraph tqlayout */
+ void loadLayout( TQDomElement & attributes );
/** Load (from KWord-1.3 XML), optionally using styles from document. */
- static KoParagLayout loadParagLayout( QDomElement & parentElem, KWDocument *doc, bool useRefStyle );
+ static KoParagLayout loadParagLayout( TQDomElement & tqparentElem, KWDocument *doc, bool useRefStyle );
- virtual void loadOasis( const QDomElement& e, KoOasisContext& context, KoStyleCollection *styleCollection, uint& pos );
+ virtual void loadOasis( const TQDomElement& e, KoOasisContext& context, KoStyleCollection *styleCollection, uint& pos );
virtual void saveOasis( KoXmlWriter& writer, KoSavingContext& context,
int from, int to, bool saveAnchorsFramesets = false ) const;
virtual void join( KoTextParag *parag );
protected:
- virtual void drawFormattingChars( QPainter &painter, int start, int len,
+ virtual void drawFormattingChars( TQPainter &painter, int start, int len,
int lastY_pix, int baseLine_pix, int h_pix, // in pixels
bool drawSelections,
- KoTextFormat *lastFormat, const QMemArray<int> &selectionStarts,
- const QMemArray<int> &selectionEnds, const QColorGroup &cg,
+ KoTextFormat *lastFormat, const TQMemArray<int> &selectionStarts,
+ const TQMemArray<int> &selectionEnds, const TQColorGroup &cg,
bool rightToLeft, int line, KoTextZoomHandler* zh,
int whichFormattingChars );
diff --git a/kword/KWVariable.cpp b/kword/KWVariable.cpp
index 675f22b1..1b463878 100644
--- a/kword/KWVariable.cpp
+++ b/kword/KWVariable.cpp
@@ -37,8 +37,8 @@
KWVariableSettings::KWVariableSettings() : KoVariableSettings()
{
- m_footNoteCounter.setSuffix( QString::null );
- m_endNoteCounter.setSuffix( QString::null );
+ m_footNoteCounter.setSuffix( TQString() );
+ m_endNoteCounter.setSuffix( TQString() );
// By default endnotes are numbered in lowercase roman numbers, in other WPs.
m_endNoteCounter.setStyle( KoParagCounter::STYLE_ROM_NUM_L );
}
@@ -70,21 +70,21 @@ void KWVariableSettings::saveNoteConfiguration( KoXmlWriter& writer ) const
writer.endElement();
}
-void KWVariableSettings::loadNoteConfiguration( const QDomElement& parent )
+void KWVariableSettings::loadNoteConfiguration( const TQDomElement& tqparent )
{
- QDomElement e;
- forEachElement( e, parent )
+ TQDomElement e;
+ forEachElement( e, tqparent )
{
if ( e.localName() == "notes-configuration" && e.namespaceURI() == KoXmlNS::text )
{
- const QString noteClass = e.attributeNS( KoXmlNS::text, "note-class", QString::null );
+ const TQString noteClass = e.attributeNS( KoXmlNS::text, "note-class", TQString() );
if ( noteClass == "footnote" ) {
- m_footNoteCounter.loadOasisListStyle( e, QDomElement(), QDomElement(), -1, true, false, 1, false );
+ m_footNoteCounter.loadOasisListStyle( e, TQDomElement(), TQDomElement(), -1, true, false, 1, false );
m_footNoteCounter.setNumbering( KoParagCounter::NUM_FOOTNOTE );
m_footNoteCounter.setRestartCounter( false );
}
else if ( noteClass == "endnote" ) {
- m_endNoteCounter.loadOasisListStyle( e, QDomElement(), QDomElement(), -1, true, false, 1, false );
+ m_endNoteCounter.loadOasisListStyle( e, TQDomElement(), TQDomElement(), -1, true, false, 1, false );
m_endNoteCounter.setNumbering( KoParagCounter::NUM_FOOTNOTE );
m_endNoteCounter.setRestartCounter( false );
}
@@ -92,25 +92,25 @@ void KWVariableSettings::loadNoteConfiguration( const QDomElement& parent )
}
}
-void KWVariableSettings::save( QDomElement &parentElem )
+void KWVariableSettings::save( TQDomElement &tqparentElem )
{
- KoVariableSettings::save( parentElem );
- QDomDocument doc = parentElem.ownerDocument();
- QDomElement footNoteSettingElem = doc.createElement( "FOOTNOTESETTING" );
- parentElem.appendChild( footNoteSettingElem );
+ KoVariableSettings::save( tqparentElem );
+ TQDomDocument doc = tqparentElem.ownerDocument();
+ TQDomElement footNoteSettingElem = doc.createElement( "FOOTNOTESETTING" );
+ tqparentElem.appendChild( footNoteSettingElem );
m_footNoteCounter.save( footNoteSettingElem );
- QDomElement endNoteSettingElem = doc.createElement( "ENDNOTESETTING" );
- parentElem.appendChild( endNoteSettingElem );
+ TQDomElement endNoteSettingElem = doc.createElement( "ENDNOTESETTING" );
+ tqparentElem.appendChild( endNoteSettingElem );
m_endNoteCounter.save( endNoteSettingElem );
}
-void KWVariableSettings::load( QDomElement &elem )
+void KWVariableSettings::load( TQDomElement &elem )
{
KoVariableSettings::load( elem );
- QDomElement footNoteSettings = elem.namedItem( "FOOTNOTESETTING" ).toElement();
+ TQDomElement footNoteSettings = elem.namedItem( "FOOTNOTESETTING" ).toElement();
if ( !footNoteSettings.isNull() )
m_footNoteCounter.load( footNoteSettings );
- QDomElement endNoteSettings = elem.namedItem( "ENDNOTESETTING" ).toElement();
+ TQDomElement endNoteSettings = elem.namedItem( "ENDNOTESETTING" ).toElement();
if ( !endNoteSettings.isNull() )
m_endNoteCounter.load( endNoteSettings );
}
@@ -120,16 +120,16 @@ KWVariableCollection::KWVariableCollection(KWVariableSettings *_setting, KoVaria
{
}
-KoVariable* KWVariableCollection::loadOasisField( KoTextDocument* textdoc, const QDomElement& tag, KoOasisContext& context )
+KoVariable* KWVariableCollection::loadOasisField( KoTextDocument* textdoc, const TQDomElement& tag, KoOasisContext& context )
{
- const QString localName( tag.localName() );
+ const TQString localName( tag.localName() );
const bool isTextNS = tag.namespaceURI() == KoXmlNS::text;
if ( isTextNS )
{
//kdDebug()<<" localName :"<<localName<<endl;
if ( localName == "note" )
{
- QString key = "STRING";
+ TQString key = "STRING";
int type = VT_FOOTNOTE;
return loadOasisFieldCreateVariable( textdoc, tag, context, key, type );
}
@@ -145,7 +145,7 @@ KoVariable* KWVariableCollection::loadOasisField( KoTextDocument* textdoc, const
localName == "non-whitespace-character-count" ||
localName == "syllable-count")
{
- QString key = "NUMBER";
+ TQString key = "NUMBER";
int type = VT_STATISTIC;
return loadOasisFieldCreateVariable( textdoc, tag, context, key, type );
}
@@ -167,7 +167,7 @@ KoVariable *KWVariableCollection::createVariable( int type, short int subtype, K
var = new KWPgNumVariable( textdoc, subtype, varFormat, this, m_doc );
break;
case VT_MAILMERGE:
- var = new KWMailMergeVariable( textdoc, QString::null, coll->format("STRING"), this, m_doc );
+ var = new KWMailMergeVariable( textdoc, TQString(), coll->format("STRING"), this, m_doc );
break;
case VT_FOOTNOTE:
if ( !loadFootNote )
@@ -197,7 +197,7 @@ KWPgNumVariable::KWPgNumVariable( KoTextDocument *textdoc, int subtype, KoVariab
void KWPgNumVariable::recalc()
{
- if ( !m_doc->layoutViewMode()->hasPages() ) // ModeText
+ if ( !m_doc->tqlayoutViewMode()->hasPages() ) // ModeText
{
//necessary to resize it in this mode because in this mode
//we don't call KWTextFrameSet::drawFrame()
@@ -207,7 +207,7 @@ void KWPgNumVariable::recalc()
if ( m_subtype == VST_PGNUM_TOTAL )
{
- m_varValue = QVariant(m_doc->pageCount()+m_varColl->variableSetting()->startingPageNumber()-1);
+ m_varValue = TQVariant(m_doc->pageCount()+m_varColl->variableSetting()->startingPageNumber()-1);
resize();
}
// The other cases are handled by the more dynamic code in KWTextFrameSet::drawFrame()
@@ -216,12 +216,12 @@ void KWPgNumVariable::recalc()
width = 0;
}
-QString KWPgNumVariable::text(bool realValue)
+TQString KWPgNumVariable::text(bool realValue)
{
if (m_varColl->variableSetting()->displayFieldCode()&& !realValue)
return fieldCode();
// #### ??? What?
- else if ( m_subtype != VST_CURRENT_SECTION && !m_doc->layoutViewMode()->hasPages() && !realValue)
+ else if ( m_subtype != VST_CURRENT_SECTION && !m_doc->tqlayoutViewMode()->hasPages() && !realValue)
return fieldCode();
else
return m_varFormat->convert( m_varValue );
@@ -230,22 +230,22 @@ QString KWPgNumVariable::text(bool realValue)
/******************************************************************/
/* Class: KWMailMergeVariable */
/******************************************************************/
-KWMailMergeVariable::KWMailMergeVariable( KoTextDocument *textdoc, const QString &name, KoVariableFormat *varFormat,KoVariableCollection *_varColl, KWDocument *doc )
+KWMailMergeVariable::KWMailMergeVariable( KoTextDocument *textdoc, const TQString &name, KoVariableFormat *varFormat,KoVariableCollection *_varColl, KWDocument *doc )
: KoMailMergeVariable( textdoc, name, varFormat,_varColl ), m_doc(doc)
{
}
-QString KWMailMergeVariable::value() const
+TQString KWMailMergeVariable::value() const
{
return m_doc->mailMergeDataBase()->getValue( m_varValue.toString() );
}
-QString KWMailMergeVariable::text(bool realValue)
+TQString KWMailMergeVariable::text(bool realValue)
{
if (m_varColl->variableSetting()->displayFieldCode()&& !realValue)
return fieldCode();
// ## should use a format maybe
- QString v = value();
+ TQString v = value();
if ( m_doc->mailMergeDataBase()->isSampleRecord() )
return "<" + v + ">";
return v;
@@ -266,7 +266,7 @@ KWFootNoteVariable::KWFootNoteVariable( KoTextDocument *textdoc, KoVariableForma
m_num( -1 ),
m_numDisplay( -1 )
{
- m_varValue = QVariant( QString::null );
+ m_varValue = TQVariant( TQString() );
}
void KWFootNoteVariable::setNumberingType( Numbering _type )
@@ -276,15 +276,15 @@ void KWFootNoteVariable::setNumberingType( Numbering _type )
setVariableFormat(m_doc->variableFormatCollection()->format("STRING"));
}
-void KWFootNoteVariable::loadOasis( const QDomElement& footNoteTag, KoOasisContext& context )
+void KWFootNoteVariable::loadOasis( const TQDomElement& footNoteTag, KoOasisContext& context )
{
/*<text:note text:id="ftn0" text:note-class="footnote"><text:note-citation>1</text:note-citation><text:note-body>
<text:p text:style-name="Footnote"></text:p></text:note-body></text:note> */
- const QString id = footNoteTag.attributeNS( KoXmlNS::text, "id", QString::null );
+ const TQString id = footNoteTag.attributeNS( KoXmlNS::text, "id", TQString() );
if ( footNoteTag.hasAttributeNS( KoXmlNS::text, "note-class" ) )
{
- const QString str = footNoteTag.attributeNS( KoXmlNS::text, "note-class", QString::null );
+ const TQString str = footNoteTag.attributeNS( KoXmlNS::text, "note-class", TQString() );
if ( str == "footnote" )
m_noteType = FootNote;
else if ( str == "endnote" )
@@ -295,14 +295,14 @@ void KWFootNoteVariable::loadOasis( const QDomElement& footNoteTag, KoOasisConte
}
}
- QDomElement element;
- QDomElement bodyElement;
+ TQDomElement element;
+ TQDomElement bodyElement;
forEachElement( element, footNoteTag )
{
if ( element.namespaceURI() != KoXmlNS::text )
continue;
- const QString localName = element.localName();
+ const TQString localName = element.localName();
if( localName == "note-citation" )
{
if ( element.hasAttributeNS( KoXmlNS::text, "label" ) )
@@ -318,7 +318,7 @@ void KWFootNoteVariable::loadOasis( const QDomElement& footNoteTag, KoOasisConte
else
{
// kdDebug()<<" manual \n";
- m_varValue = QVariant( element.text() );
+ m_varValue = TQVariant( element.text() );
}
} else if ( localName == "note-body" ) {
bodyElement = element;
@@ -351,7 +351,7 @@ void KWFootNoteVariable::saveOasis( KoXmlWriter& writer, KoSavingContext& contex
writer.startElement( "text:note-citation" );
if ( m_numberingType == Auto )
- writer.addTextNode( QString( "%1" ).arg( m_numDisplay ) );
+ writer.addTextNode( TQString( "%1" ).tqarg( m_numDisplay ) );
else
{
writer.addAttribute( "text:label", m_varValue.toString() );
@@ -367,10 +367,10 @@ void KWFootNoteVariable::saveOasis( KoXmlWriter& writer, KoSavingContext& contex
writer.endElement();
}
-void KWFootNoteVariable::saveVariable( QDomElement &parentElem )
+void KWFootNoteVariable::saveVariable( TQDomElement &tqparentElem )
{
- QDomElement footnoteElem = parentElem.ownerDocument().createElement( "FOOTNOTE" );
- parentElem.appendChild( footnoteElem );
+ TQDomElement footnoteElem = tqparentElem.ownerDocument().createElement( "FOOTNOTE" );
+ tqparentElem.appendChild( footnoteElem );
//footnoteElem.setAttribute( "subtype", 0 );
if ( m_numberingType == Auto )
footnoteElem.setAttribute( "value", m_numDisplay );
@@ -383,14 +383,14 @@ void KWFootNoteVariable::saveVariable( QDomElement &parentElem )
footnoteElem.setAttribute( "frameset", m_frameset->name() );
}
-void KWFootNoteVariable::load( QDomElement &elem )
+void KWFootNoteVariable::load( TQDomElement &elem )
{
KoVariable::load( elem );
- QDomElement footnoteElem = elem.namedItem( "FOOTNOTE" ).toElement();
+ TQDomElement footnoteElem = elem.namedItem( "FOOTNOTE" ).toElement();
if (!footnoteElem.isNull())
{
//m_subtype = footnoteElem.attribute("subtype").toInt();
- QString str = footnoteElem.attribute("notetype").lower();
+ TQString str = footnoteElem.attribute("notetype").lower();
if ( str == "footnote" )
m_noteType = FootNote;
else if ( str == "endnote" )
@@ -412,7 +412,7 @@ void KWFootNoteVariable::load( QDomElement &elem )
formatedNote();
}
else
- m_varValue = QVariant(footnoteElem.attribute("value"));
+ m_varValue = TQVariant(footnoteElem.attribute("value"));
str = footnoteElem.attribute("frameset");
m_doc->addFootNoteRequest( str, this );
@@ -423,16 +423,16 @@ void KWFootNoteVariable::formatedNote()
{
if ( m_numberingType == Auto )
{
- m_varValue = QVariant(applyStyle());
+ m_varValue = TQVariant(applyStyle());
}
}
-QString KWFootNoteVariable::applyStyle()
+TQString KWFootNoteVariable::applyStyle()
{
KWVariableSettings* settings = static_cast<KWVariableSettings*>(m_varColl->variableSetting());
KoParagCounter tmpCounter = (m_noteType == FootNote) ? settings->footNoteCounter() : settings->endNoteCounter();
- QString tmp;
+ TQString tmp;
int val = m_numDisplay + tmpCounter.startNumber()-1;
Q_ASSERT( val >= 0 );
if ( val < 0 ) // let's not go into makeRomanNumber with a negative number :}
@@ -468,7 +468,7 @@ QString KWFootNoteVariable::applyStyle()
return tmp;
}
-QString KWFootNoteVariable::text(bool realValue)
+TQString KWFootNoteVariable::text(bool realValue)
{
if (m_varColl->variableSetting()->displayFieldCode()&& !realValue)
return fieldCode();
@@ -478,33 +478,33 @@ QString KWFootNoteVariable::text(bool realValue)
void KWFootNoteVariable::setNumDisplay( int val )
{
m_numDisplay = val;
- if ( val != -1 ) // -1 is used to 'invalidate so that renumberFootNotes recalcs'
+ if ( val != -1 ) // -1 is used to 'tqinvalidate so that renumberFootNotes recalcs'
formatedNote();
}
-QString KWFootNoteVariable::fieldCode()
+TQString KWFootNoteVariable::fieldCode()
{
return (noteType()==FootNote) ?i18n("Footnote"):i18n("Endnote");
}
-void KWFootNoteVariable::drawCustomItem( QPainter* p, int x, int y, int wpix, int hpix, int ascentpix, int /*cx*/, int /*cy*/, int /*cw*/, int /*ch*/, const QColorGroup& cg, bool selected, int _offset, bool drawingShadow )
+void KWFootNoteVariable::drawCustomItem( TQPainter* p, int x, int y, int wpix, int hpix, int ascentpix, int /*cx*/, int /*cy*/, int /*cw*/, int /*ch*/, const TQColorGroup& cg, bool selected, int _offset, bool drawingShadow )
{
KoTextFormat * fmt = format();
KoTextZoomHandler * zh = textDocument()->paintingZoomHandler();
// Force drawing as "superscript" - hmm, the formatting will use too big font metrics though.
- QFont font( fmt->screenFont( zh ) );
+ TQFont font( fmt->screenFont( zh ) );
int pointSize = ( ( font.pointSize() * 2 ) / 3 );
font.setPointSize( pointSize );
int offset = _offset;
if ( offset == 0 )
{
- int h = zh->layoutUnitToPixelY( /*_y HACK,*/ height );
- offset = -( h - QFontMetrics(font).height() );
+ int h = zh->tqlayoutUnitToPixelY( /*_y HACK,*/ height );
+ offset = -( h - TQFontMetrics(font).height() );
}
- QColor textColor( fmt->color() );
+ TQColor textColor( fmt->color() );
drawCustomItemHelper( p, x, y, wpix, hpix, ascentpix, cg, selected, offset, fmt, font, textColor, drawingShadow );
}
@@ -532,8 +532,8 @@ void KWFootNoteVariable::finalize()
fs->textObject()->abortFormatting();
// abortFormatting is a bool in kotextobject. So we need to return there before
- // starting text layout again.
- m_doc->delayedRecalcFrames( QMIN( pageNum, framePage ) );
+ // starting text tqlayout again.
+ m_doc->delayedRecalcFrames( TQMIN( pageNum, framePage ) );
m_doc->delayedRepaintAllViews();
}
}
@@ -543,19 +543,19 @@ void KWFootNoteVariable::resize()
if ( m_deleted )
return;
KoTextFormat *fmt = format();
- QFont font( fmt->refFont() ); // LU font
+ TQFont font( fmt->refFont() ); // LU font
if ( fmt->vAlign() == KoTextFormat::AlignNormal ) // if it's still normal...
{
int pointSize = ( ( font.pointSize() * 2 ) / 3 ); // ...force superscript
font.setPointSize( pointSize );
}
- QFontMetrics fm( font );
- QString txt = text();
+ TQFontMetrics fm( font );
+ TQString txt = text();
width = 0;
for ( int i = 0 ; i < (int)txt.length() ; ++i )
width += fm.charWidth( txt, i ); // size at 100%
// zoom to LU
- width = qRound( KoTextZoomHandler::ptToLayoutUnitPt( width ) );
+ width = tqRound( KoTextZoomHandler::ptToLayoutUnitPt( width ) );
height = fmt->height();
m_ascent = fmt->ascent();
//kdDebug() << "KWFootNoteVariable::resize text=" << txt << " width=" << width << " height=" << height << endl;
@@ -596,7 +596,7 @@ void KWFootNoteVariable::setDeleted( bool del )
m_doc->recalcFrames();
if (!del)
- m_frameset->layout(); // format its text, so that it resizes the frame
+ m_frameset->tqlayout(); // format its text, so that it resizes the frame
KoVariable::setDeleted( del );
// Does this compress? Probably not.
m_doc->delayedRepaintAllViews();
@@ -617,17 +617,17 @@ double KWFootNoteVariable::varY() const
if ( !fs->hasFramesInPageArray() ) // we need it for internalToDocument
{
kdDebug(32001) << "KWFootNoteVariable::varY too early, no updateFrames yet" << endl;
- return 0; // this happens on loading - frame layout is done before text layout
+ return 0; // this happens on loading - frame tqlayout is done before text tqlayout
}
- // What we need is "has never been formatted". Not "has just been invalidated"...
+ // What we need is "has never been formatted". Not "has just been tqinvalidated"...
//if ( !paragraph()->isValid() )
//{
// kdDebug(32001) << "KWFootNoteVariable::varY called but paragraph " << paragraph()->paragId() << " not valid" << endl;
// return 0;
//}
KoPoint dPoint;
- //kdDebug(32001) << "KWFootNoteVariable::pageNum position of variable (LU): " << QPoint( x(), paragy + y() + height ) << endl;
- KWFrame* containingFrame = fs->internalToDocument( QPoint( x(), paragy + y() + height ), dPoint );
+ //kdDebug(32001) << "KWFootNoteVariable::pageNum position of variable (LU): " << TQPoint( x(), paragy + y() + height ) << endl;
+ KWFrame* containingFrame = fs->internalToDocument( TQPoint( x(), paragy + y() + height ), dPoint );
if ( containingFrame )
{
// Ok, the (bottom of the) footnote variable is at dPoint.
@@ -663,7 +663,7 @@ void KWStatisticVariable::recalc()
m_subtype == VST_STATISTIC_NB_SENTENCE ||
m_subtype == VST_STATISTIC_NB_LINES ||
m_subtype == VST_STATISTIC_NB_CHARACTERE);
- QPtrListIterator<KWFrameSet> framesetIt( m_doc->framesetsIterator() );
+ TQPtrListIterator<KWFrameSet> framesetIt( m_doc->framesetsIterator() );
//TODO change int to ulong
for ( framesetIt.toFirst(); framesetIt.current(); ++framesetIt )
{
@@ -724,13 +724,13 @@ void KWStatisticVariable::recalc()
nb = 0;
}
}
- m_varValue = QVariant(nb);
+ m_varValue = TQVariant(nb);
resize();
if ( width == -1 )
width = 0;
}
-QString KWStatisticVariable::text(bool realValue)
+TQString KWStatisticVariable::text(bool realValue)
{
if ( m_varColl->variableSetting()->displayFieldCode() && !realValue )
return fieldCode();
diff --git a/kword/KWVariable.h b/kword/KWVariable.h
index 545bea90..005ca434 100644
--- a/kword/KWVariable.h
+++ b/kword/KWVariable.h
@@ -20,9 +20,9 @@
#ifndef variable_h
#define variable_h
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qasciidict.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqasciidict.h>
#include "defs.h"
@@ -35,7 +35,7 @@ class KWFootNoteFrameSet;
class KoVariable;
class KoPageVariable;
class KoMailMergeVariable;
-class QDomElement;
+class TQDomElement;
class KoTextFormat;
@@ -44,10 +44,10 @@ class KWVariableSettings : public KoVariableSettings
public:
KWVariableSettings();
virtual ~KWVariableSettings() {}
- virtual void save( QDomElement &parentElem );
- virtual void load( QDomElement &elem );
+ virtual void save( TQDomElement &tqparentElem );
+ virtual void load( TQDomElement &elem );
void saveNoteConfiguration( KoXmlWriter& writer ) const;
- void loadNoteConfiguration( const QDomElement& parent );
+ void loadNoteConfiguration( const TQDomElement& tqparent );
void changeFootNoteCounter( KoParagCounter _c );
void changeEndNoteCounter( KoParagCounter _c );
KoParagCounter endNoteCounter() const { return m_endNoteCounter;}
@@ -62,7 +62,7 @@ class KWVariableCollection : public KoVariableCollection
public:
KWVariableCollection(KWVariableSettings *_settings, KoVariableFormatCollection* coll);
virtual KoVariable *createVariable( int type, short int subtype, KoVariableFormatCollection * coll, KoVariableFormat *varFormat,KoTextDocument *textdoc, KoDocument * doc, int _correct, bool _forceDefaultFormat=false, bool loadFootNote= true );
- virtual KoVariable* loadOasisField( KoTextDocument* textdoc, const QDomElement& tag, KoOasisContext& context );
+ virtual KoVariable* loadOasisField( KoTextDocument* textdoc, const TQDomElement& tag, KoOasisContext& context );
private:
KWDocument *m_doc;
@@ -77,7 +77,7 @@ public:
KWPgNumVariable( KoTextDocument *textdoc, int subtype, KoVariableFormat *varFormat ,KoVariableCollection *_varColl, KWDocument *doc );
virtual void recalc();
- virtual QString text(bool realValue=false);
+ virtual TQString text(bool realValue=false);
private:
KWDocument *m_doc;
@@ -90,10 +90,10 @@ private:
class KWMailMergeVariable : public KoMailMergeVariable
{
public:
- KWMailMergeVariable( KoTextDocument *textdoc, const QString &name, KoVariableFormat *varFormat,KoVariableCollection *_varColl, KWDocument *doc );
+ KWMailMergeVariable( KoTextDocument *textdoc, const TQString &name, KoVariableFormat *varFormat,KoVariableCollection *_varColl, KWDocument *doc );
- virtual QString text(bool realValue=false);
- virtual QString value() const;
+ virtual TQString text(bool realValue=false);
+ virtual TQString value() const;
virtual void recalc();
private:
KWDocument *m_doc;
@@ -116,24 +116,24 @@ public:
void setNumberingType( Numbering _type );
Numbering numberingType() const { return m_numberingType;}
- void setManualString( const QString & _str ) { m_varValue=QVariant(_str);}
- QString manualString() const { return m_varValue.toString();}
+ void setManualString( const TQString & _str ) { m_varValue=TQVariant(_str);}
+ TQString manualString() const { return m_varValue.toString();}
virtual void resize();
- virtual void drawCustomItem( QPainter* p, int x, int y, int wpix, int hpix, int ascentpix, int /*cx*/, int /*cy*/, int /*cw*/, int /*ch*/, const QColorGroup& cg, bool selected, int offset, bool drawingShadow );
+ virtual void drawCustomItem( TQPainter* p, int x, int y, int wpix, int hpix, int ascentpix, int /*cx*/, int /*cy*/, int /*cw*/, int /*ch*/, const TQColorGroup& cg, bool selected, int offset, bool drawingShadow );
/** The frameset that contains the text for this footnote */
KWFootNoteFrameSet * frameSet() const { return m_frameset; }
void setFrameSet( KWFootNoteFrameSet* fs ) { Q_ASSERT( !m_frameset ); m_frameset = fs; }
- virtual void saveVariable( QDomElement &parentElem );
- virtual void load( QDomElement &elem );
+ virtual void saveVariable( TQDomElement &tqparentElem );
+ virtual void load( TQDomElement &elem );
- virtual void loadOasis( const QDomElement &footNoteTag, KoOasisContext& context );
+ virtual void loadOasis( const TQDomElement &footNoteTag, KoOasisContext& context );
virtual void saveOasis( KoXmlWriter& writer, KoSavingContext& context ) const;
- virtual QString text(bool realValue=false);
+ virtual TQString text(bool realValue=false);
// Nothing to do here. Numbering done by KWTextFrameSet::renumberFootNotes
virtual void recalc() { }
@@ -155,9 +155,9 @@ public:
virtual void setDeleted( bool del );
void formatedNote();
- virtual QString fieldCode();
+ virtual TQString fieldCode();
protected:
- QString applyStyle();
+ TQString applyStyle();
private:
KWDocument *m_doc;
@@ -174,7 +174,7 @@ class KWStatisticVariable : public KoStatisticVariable
public:
KWStatisticVariable( KoTextDocument *textdoc, int subtype, KoVariableFormat *varFormat,KoVariableCollection *_varColl, KWDocument *doc );
virtual void recalc();
- virtual QString text(bool realValue=false);
+ virtual TQString text(bool realValue=false);
protected:
KWDocument *m_doc;
diff --git a/kword/KWView.cpp b/kword/KWView.cpp
index ec7be88b..751869eb 100644
--- a/kword/KWView.cpp
+++ b/kword/KWView.cpp
@@ -119,15 +119,15 @@
#include <kdeversion.h>
#include <kiconloader.h>
-#include <qclipboard.h>
-#include <qapplication.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qpaintdevicemetrics.h>
-#include <qprogressdialog.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qbuffer.h>
+#include <tqclipboard.h>
+#include <tqapplication.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqprogressdialog.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqbuffer.h>
#include <stdlib.h>
@@ -142,14 +142,14 @@ using namespace KSpell2;
/******************************************************************/
class TableInfo {
public:
- TableInfo( const QValueList<KWFrameView*>& selectedFrames ) {
+ TableInfo( const TQValueList<KWFrameView*>& selectedFrames ) {
m_protectContent = false;
//m_views = selectedFrames;
int amountSelected = 0;
m_cell = 0;
- QMap<KWTableFrameSet*, QValueList<unsigned int> > tableRows, tableCols;
+ TQMap<KWTableFrameSet*, TQValueList<unsigned int> > tableRows, tableCols;
- QValueList<KWFrameView*>::const_iterator framesIterator = selectedFrames.begin();
+ TQValueList<KWFrameView*>::const_iterator framesIterator = selectedFrames.begin();
for(;framesIterator != selectedFrames.end(); ++framesIterator) {
KWFrameView *view = *framesIterator;
if(!view->selected()) continue;
@@ -161,21 +161,21 @@ class TableInfo {
if(cell->protectContent())
m_protectContent=true;
- if(! tableRows.contains(fs->groupmanager())) { // create empty lists.
- QValueList<unsigned int> rows;
+ if(! tableRows.tqcontains(fs->groupmanager())) { // create empty lists.
+ TQValueList<unsigned int> rows;
for(unsigned int i=fs->groupmanager()->getRows(); i != 0; i--)
rows.append(0);
tableRows.insert(fs->groupmanager(), rows);
- QValueList<unsigned int> cols;
+ TQValueList<unsigned int> cols;
for(unsigned int i=fs->groupmanager()->getColumns(); i != 0; i--)
cols.append(0);
tableCols.insert(fs->groupmanager(), cols);
}
- QValueList<unsigned int> rows = tableRows[fs->groupmanager()];
+ TQValueList<unsigned int> rows = tableRows[fs->groupmanager()];
for(unsigned int r=cell->firstRow(); r <= cell->lastRow(); r++)
rows[r] = rows[r] + 1;
tableRows[fs->groupmanager()] = rows;
- QValueList<unsigned int> columns = tableCols[fs->groupmanager()];
+ TQValueList<unsigned int> columns = tableCols[fs->groupmanager()];
for(unsigned int c=cell->firstColumn(); c <= cell->lastColumn(); c++)
columns[c] = columns[c] + 1;
tableCols[fs->groupmanager()] = columns;
@@ -190,16 +190,16 @@ class TableInfo {
m_oneCellSelected = amountSelected == 1;
if(amountSelected == 0) return;
- for(QMapIterator<KWTableFrameSet*, QValueList<unsigned int> > iter = tableRows.begin();
+ for(TQMapIterator<KWTableFrameSet*, TQValueList<unsigned int> > iter = tableRows.begin();
iter != tableRows.end(); ++iter) {
- QValueList<unsigned int> rows = iter.data();
- QValueListIterator<unsigned int> rowsIter = rows.begin();
+ TQValueList<unsigned int> rows = iter.data();
+ TQValueListIterator<unsigned int> rowsIter = rows.begin();
for(int x=0;rowsIter != rows.end(); ++rowsIter, x++)
if(*rowsIter == iter.key()->getColumns())
m_rows.append(x);
- QValueList<unsigned int> columns = tableCols[iter.key()];
- QValueListIterator<unsigned int> colsIter = columns.begin();
+ TQValueList<unsigned int> columns = tableCols[iter.key()];
+ TQValueListIterator<unsigned int> colsIter = columns.begin();
for(int x=0;colsIter != columns.end(); ++colsIter, x++)
if(*colsIter == iter.key()->getRows())
m_columns.append(x);
@@ -211,21 +211,21 @@ class TableInfo {
int amountColumnsSelected() { return m_columns.count(); }
bool oneCellSelected() { return m_oneCellSelected; }
bool protectContentEnabled() { return m_protectContent; }
- QValueList<uint> selectedRows() { return m_rows; }
- QValueList<uint> selectedColumns() { return m_columns; }
+ TQValueList<uint> selectedRows() { return m_rows; }
+ TQValueList<uint> selectedColumns() { return m_columns; }
KWTableFrameSet::Cell *firstSelectedCell() { return m_cell; }
private:
- //QValueList<KWFrameView*> m_views;
+ //TQValueList<KWFrameView*> m_views;
bool m_oneCellSelected, m_selected, m_protectContent;
- QValueList<uint> m_rows, m_columns;
+ TQValueList<uint> m_rows, m_columns;
KWTableFrameSet::Cell *m_cell;
};
/******************************************************************/
/* Class: KWView */
/******************************************************************/
-KWView::KWView( const QString& viewMode, QWidget *parent, const char *name, KWDocument* doc )
- : KoView( doc, parent, name )
+KWView::KWView( const TQString& viewMode, TQWidget *tqparent, const char *name, KWDocument* doc )
+ : KoView( doc, tqparent, name )
{
m_doc = doc;
m_gui = 0;
@@ -267,8 +267,8 @@ KWView::KWView( const QString& viewMode, QWidget *parent, const char *name, KWDo
setXMLFile( "kword.rc" );
- QObject::connect( this, SIGNAL( embeddImage( const QString & ) ),
- this, SLOT( slotEmbedImage( const QString & ) ) );
+ TQObject::connect( TQT_TQOBJECT(this), TQT_SIGNAL( embeddImage( const TQString & ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotEmbedImage( const TQString & ) ) );
setKeyCompression( TRUE );
setAcceptDrops( TRUE );
@@ -287,77 +287,77 @@ KWView::KWView( const QString& viewMode, QWidget *parent, const char *name, KWDo
m_sbUnitLabel = 0;
if ( KStatusBar* sb = statusBar() ) // No statusbar in e.g. konqueror
{
- m_sbPageLabel = new KStatusBarLabel( QString::null, 0, sb );
- m_sbPageLabel->setAlignment( AlignLeft | AlignVCenter );
+ m_sbPageLabel = new KStatusBarLabel( TQString(), 0, sb );
+ m_sbPageLabel->tqsetAlignment( AlignLeft | AlignVCenter );
addStatusBarItem( m_sbPageLabel, 0 );
m_sbModifiedLabel = new KStatusBarLabel( " ", 0, sb );
- m_sbModifiedLabel->setAlignment( AlignLeft | AlignVCenter );
+ m_sbModifiedLabel->tqsetAlignment( AlignLeft | AlignVCenter );
addStatusBarItem( m_sbModifiedLabel, 0 );
- m_sbFramesLabel = new KStatusBarLabel( QString::null, 0, sb );
- m_sbFramesLabel->setAlignment( AlignLeft | AlignVCenter );
+ m_sbFramesLabel = new KStatusBarLabel( TQString(), 0, sb );
+ m_sbFramesLabel->tqsetAlignment( AlignLeft | AlignVCenter );
addStatusBarItem( m_sbFramesLabel, 1 );
m_sbOverwriteLabel = new KStatusBarLabel( ' ' + i18n( "INSRT" ) + ' ', 0, sb );
- m_sbOverwriteLabel->setAlignment( AlignHCenter | AlignVCenter );
+ m_sbOverwriteLabel->tqsetAlignment( AlignHCenter | AlignVCenter );
addStatusBarItem( m_sbOverwriteLabel, 0 );
- m_sbZoomLabel = new KStatusBarLabel( ' ' + QString::number( m_doc->zoom() ) + "% ", 0, sb );
- m_sbZoomLabel->setAlignment( AlignHCenter | AlignVCenter );
+ m_sbZoomLabel = new KStatusBarLabel( ' ' + TQString::number( m_doc->zoom() ) + "% ", 0, sb );
+ m_sbZoomLabel->tqsetAlignment( AlignHCenter | AlignVCenter );
addStatusBarItem( m_sbZoomLabel, 0 );
m_sbUnitLabel = new KStatusBarLabel( ' ' + KoUnit::unitDescription( m_doc->unit() ) + ' ', 0, sb );
- m_sbUnitLabel->setAlignment( AlignHCenter | AlignVCenter );
+ m_sbUnitLabel->tqsetAlignment( AlignHCenter | AlignVCenter );
addStatusBarItem( m_sbUnitLabel, 0 );
}
- connect( m_doc, SIGNAL( modified( bool ) ),
- this, SLOT( documentModified( bool )) );
+ connect( m_doc, TQT_SIGNAL( modified( bool ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( documentModified( bool )) );
- connect( m_doc, SIGNAL( numPagesChanged() ),
- this, SLOT( numPagesChanged()) );
+ connect( m_doc, TQT_SIGNAL( numPagesChanged() ),
+ TQT_TQOBJECT(this), TQT_SLOT( numPagesChanged()) );
- connect( m_doc, SIGNAL( pageLayoutChanged( const KoPageLayout& ) ),
- this, SLOT( slotPageLayoutChanged( const KoPageLayout& )) );
+ connect( m_doc, TQT_SIGNAL( pageLayoutChanged( const KoPageLayout& ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotPageLayoutChanged( const KoPageLayout& )) );
- connect( m_doc, SIGNAL( docStructureChanged(int) ),
- this, SLOT( docStructChanged(int)) );
+ connect( m_doc, TQT_SIGNAL( docStructureChanged(int) ),
+ TQT_TQOBJECT(this), TQT_SLOT( docStructChanged(int)) );
- connect( m_doc, SIGNAL( unitChanged(KoUnit::Unit) ),
- this, SLOT( slotUnitChanged(KoUnit::Unit) ) );
+ connect( m_doc, TQT_SIGNAL( unitChanged(KoUnit::Unit) ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotUnitChanged(KoUnit::Unit) ) );
- connect( m_doc, SIGNAL( sig_refreshMenuCustomVariable()),
- this, SLOT( refreshCustomMenu()));
+ connect( m_doc, TQT_SIGNAL( sig_refreshMenuCustomVariable()),
+ TQT_TQOBJECT(this), TQT_SLOT( refreshCustomMenu()));
- connect( m_doc, SIGNAL( completed() ),
- this, SLOT( slotDocumentLoadingCompleted() ) );
+ connect( m_doc, TQT_SIGNAL( completed() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotDocumentLoadingCompleted() ) );
- connect( frameViewManager(), SIGNAL(sigFrameSelectionChanged()),
- this, SLOT( frameSelectedChanged()));
+ connect( frameViewManager(), TQT_SIGNAL(sigFrameSelectionChanged()),
+ TQT_TQOBJECT(this), TQT_SLOT( frameSelectedChanged()));
- connect( frameViewManager(), SIGNAL(sigFrameSetRenamed()),
- this, SLOT( updateFrameStatusBarItem()));
+ connect( frameViewManager(), TQT_SIGNAL(sigFrameSetRenamed()),
+ TQT_TQOBJECT(this), TQT_SLOT( updateFrameStatusBarItem()));
- connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
- this, SLOT( clipboardDataChanged() ) );
+ connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ),
+ TQT_TQOBJECT(this), TQT_SLOT( clipboardDataChanged() ) );
- connect( m_gui->canvasWidget(), SIGNAL(currentFrameSetEditChanged()),
- this, SLOT(slotFrameSetEditChanged()) );
+ connect( m_gui->canvasWidget(), TQT_SIGNAL(currentFrameSetEditChanged()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotFrameSetEditChanged()) );
- connect( m_gui->canvasWidget(), SIGNAL( currentMouseModeChanged(int) ),
- this, SLOT( showMouseMode(int) ) );
+ connect( m_gui->canvasWidget(), TQT_SIGNAL( currentMouseModeChanged(int) ),
+ TQT_TQOBJECT(this), TQT_SLOT( showMouseMode(int) ) );
- connect( m_gui->canvasWidget(), SIGNAL( overwriteModeChanged( bool ) ),
- this, SLOT( changeOverwriteMode( bool ) ) );
+ connect( m_gui->canvasWidget(), TQT_SIGNAL( overwriteModeChanged( bool ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( changeOverwriteMode( bool ) ) );
// Cut and copy are directly connected to the selectionChanged signal
if ( m_doc->isReadWrite() )
{
- connect( m_gui->canvasWidget(), SIGNAL(selectionChanged(bool)),
- this, SLOT(slotChangeCutState(bool )) );
- connect (m_gui->canvasWidget(), SIGNAL(selectionChanged(bool)),
- this, SLOT(slotChangeCaseState(bool )));
+ connect( m_gui->canvasWidget(), TQT_SIGNAL(selectionChanged(bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotChangeCutState(bool )) );
+ connect (m_gui->canvasWidget(), TQT_SIGNAL(selectionChanged(bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotChangeCaseState(bool )));
}
else
{
@@ -365,28 +365,28 @@ KWView::KWView( const QString& viewMode, QWidget *parent, const char *name, KWDo
m_actionChangeCase->setEnabled( false );
}
- connect( m_gui->canvasWidget(), SIGNAL(selectionChanged(bool)),
- m_actionEditCopy, SLOT(setEnabled(bool)) );
+ connect( m_gui->canvasWidget(), TQT_SIGNAL(selectionChanged(bool)),
+ m_actionEditCopy, TQT_SLOT(setEnabled(bool)) );
- //connect (m_gui->canvasWidget(), SIGNAL(selectionChanged(bool)),
- // m_actionCreateStyleFromSelection, SLOT(setEnabled(bool)));
+ //connect (m_gui->canvasWidget(), TQT_SIGNAL(selectionChanged(bool)),
+ // m_actionCreateStyleFromSelection, TQT_SLOT(setEnabled(bool)));
- connect (m_gui->canvasWidget(), SIGNAL(selectionChanged(bool)),
- m_actionConvertToTextBox, SLOT(setEnabled(bool)));
- connect (m_gui->canvasWidget(), SIGNAL(selectionChanged(bool)),
- m_actionAddPersonalExpression, SLOT(setEnabled(bool )));
- connect (m_gui->canvasWidget(), SIGNAL(selectionChanged(bool)),
- m_actionSortText, SLOT(setEnabled(bool )));
+ connect (m_gui->canvasWidget(), TQT_SIGNAL(selectionChanged(bool)),
+ m_actionConvertToTextBox, TQT_SLOT(setEnabled(bool)));
+ connect (m_gui->canvasWidget(), TQT_SIGNAL(selectionChanged(bool)),
+ m_actionAddPersonalExpression, TQT_SLOT(setEnabled(bool )));
+ connect (m_gui->canvasWidget(), TQT_SIGNAL(selectionChanged(bool)),
+ m_actionSortText, TQT_SLOT(setEnabled(bool )));
- connect( m_gui->canvasWidget(), SIGNAL(docStructChanged(int)),
- this, SLOT(docStructChanged(int)));
+ connect( m_gui->canvasWidget(), TQT_SIGNAL(docStructChanged(int)),
+ TQT_TQOBJECT(this), TQT_SLOT(docStructChanged(int)));
- connect( m_gui->canvasWidget(), SIGNAL(updateRuler()),
- this, SLOT(slotUpdateRuler()));
+ connect( m_gui->canvasWidget(), TQT_SIGNAL(updateRuler()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotUpdateRuler()));
if ( shell() )
{
- connect( shell(), SIGNAL( documentSaved()), m_doc,SLOT(slotDocumentInfoModifed() ) );
+ connect( shell(), TQT_SIGNAL( documentSaved()), m_doc,TQT_SLOT(slotDocumentInfoModifed() ) );
changeNbOfRecentFiles( m_doc->maxRecentFiles() );
}
@@ -404,9 +404,9 @@ KWView::KWView( const QString& viewMode, QWidget *parent, const char *name, KWDo
// Determine initial scroll position
// We do this delayed, so that the GUI has been fully constructed
- // (and e.g. the statusbar can repaint).
- QTimer::singleShot( 0, this, SLOT( slotSetInitialPosition() ) );
- QTimer::singleShot( 0, this, SLOT( updateZoom() ) );
+ // (and e.g. the statusbar can tqrepaint).
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetInitialPosition() ) );
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( updateZoom() ) );
}
KWView::~KWView()
@@ -421,7 +421,7 @@ KWView::~KWView()
if ( m_specialCharDlg )
m_specialCharDlg->closeDialog(); // will call slotSpecialCharDlgClosed
- // Abort any find/replace
+ // Abort any tqfind/tqreplace
delete m_findReplace;
// Delete gui while we still exist ( it needs documentDeleted() )
delete m_gui;
@@ -489,7 +489,7 @@ void KWView::initGui()
m_actionFormatDecreaseIndent->setEnabled(false);
//setNoteType(m_doc->getNoteType(), false);
- m_actionFormatColor->setCurrentColor( Qt::black );
+ m_actionFormatColor->setCurrentColor( TQt::black );
updateGridButton();
@@ -545,7 +545,7 @@ void KWView::initGUIButton()
m_actionAllowAutoFormat->setChecked( m_doc->allowAutoFormat() );
if ( !m_doc->isEmbedded() ) {
- QString mode = viewMode()->type();
+ TQString mode = viewMode()->type();
if (mode=="ModePreview")
m_actionViewPreviewMode->setChecked(true);
else if (mode=="ModeText")
@@ -563,72 +563,72 @@ void KWView::setupActions()
// -------------- File menu
m_actionExtraCreateTemplate = new KAction( i18n( "&Create Template From Document..." ), 0,
- this, SLOT( extraCreateTemplate() ),
+ TQT_TQOBJECT(this), TQT_SLOT( extraCreateTemplate() ),
actionCollection(), "extra_template" );
m_actionExtraCreateTemplate->setToolTip( i18n( "Save this document and use it later as a template" ) );
m_actionExtraCreateTemplate->setWhatsThis( i18n( "You can save this document as a template.<br><br>You can use this new template as a starting point for another document." ) );
- m_actionFileStatistics = new KAction( i18n( "Statistics" ), 0, this, SLOT( fileStatistics() ), actionCollection(), "file_statistics" );
+ m_actionFileStatistics = new KAction( i18n( "Statistics" ), 0, TQT_TQOBJECT(this), TQT_SLOT( fileStatistics() ), actionCollection(), "file_statistics" );
m_actionFileStatistics->setToolTip( i18n( "Sentence, word and letter counts for this document" ) );
m_actionFileStatistics->setWhatsThis( i18n( "Information on the number of letters, words, syllables and sentences for this document.<p>Evaluates readability using the Flesch reading score." ) );
// -------------- Edit actions
- m_actionEditCut = KStdAction::cut( this, SLOT( editCut() ), actionCollection(), "edit_cut" );
- m_actionEditCopy = KStdAction::copy( this, SLOT( editCopy() ), actionCollection(), "edit_copy" );
- m_actionEditPaste = KStdAction::paste( this, SLOT( editPaste() ), actionCollection(), "edit_paste" );
- m_actionEditFind = KStdAction::find( this, SLOT( editFind() ), actionCollection(), "edit_find" );
- m_actionEditFindNext = KStdAction::findNext( this, SLOT( editFindNext() ), actionCollection(), "edit_findnext" );
- m_actionEditFindPrevious = KStdAction::findPrev( this, SLOT( editFindPrevious() ), actionCollection(), "edit_findprevious" );
- m_actionEditReplace = KStdAction::replace( this, SLOT( editReplace() ), actionCollection(), "edit_replace" );
- m_actionEditSelectAll = KStdAction::selectAll( this, SLOT( editSelectAll() ), actionCollection(), "edit_selectall" );
- new KAction( i18n( "Select All Frames" ), 0, this, SLOT( editSelectAllFrames() ), actionCollection(), "edit_selectallframes" );
+ m_actionEditCut = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT( editCut() ), actionCollection(), "edit_cut" );
+ m_actionEditCopy = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( editCopy() ), actionCollection(), "edit_copy" );
+ m_actionEditPaste = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT( editPaste() ), actionCollection(), "edit_paste" );
+ m_actionEditFind = KStdAction::find( TQT_TQOBJECT(this), TQT_SLOT( editFind() ), actionCollection(), "edit_tqfind" );
+ m_actionEditFindNext = KStdAction::findNext( TQT_TQOBJECT(this), TQT_SLOT( editFindNext() ), actionCollection(), "edit_findnext" );
+ m_actionEditFindPrevious = KStdAction::findPrev( TQT_TQOBJECT(this), TQT_SLOT( editFindPrevious() ), actionCollection(), "edit_findprevious" );
+ m_actionEditReplace = KStdAction::replace( TQT_TQOBJECT(this), TQT_SLOT( editReplace() ), actionCollection(), "edit_tqreplace" );
+ m_actionEditSelectAll = KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT( editSelectAll() ), actionCollection(), "edit_selectall" );
+ new KAction( i18n( "Select All Frames" ), 0, TQT_TQOBJECT(this), TQT_SLOT( editSelectAllFrames() ), actionCollection(), "edit_selectallframes" );
m_actionEditSelectCurrentFrame = new KAction( i18n( "Select Frame" ), 0,
- 0, this, SLOT( editSelectCurrentFrame() ),
+ 0, TQT_TQOBJECT(this), TQT_SLOT( editSelectCurrentFrame() ),
actionCollection(), "edit_selectcurrentframe" );
- m_actionSpellCheck = KStdAction::spelling( this, SLOT( slotSpellCheck() ), actionCollection(), "extra_spellcheck" );
+ m_actionSpellCheck = KStdAction::spelling( TQT_TQOBJECT(this), TQT_SLOT( slotSpellCheck() ), actionCollection(), "extra_spellcheck" );
m_actionDeletePage = new KAction( i18n( "Delete Page" ), "delslide", 0,
- this, SLOT( deletePage() ),
+ TQT_TQOBJECT(this), TQT_SLOT( deletePage() ),
actionCollection(), "delete_page" );
kdDebug() << m_doc->pageCount() << " " << (m_doc->processingType() == KWDocument::DTP) << endl;
(void) new KAction( i18n( "Configure Mai&l Merge..." ), "configure",0,
- this, SLOT( editMailMergeDataBase() ),
+ TQT_TQOBJECT(this), TQT_SLOT( editMailMergeDataBase() ),
actionCollection(), "edit_sldatabase" );
(void) new KWMailMergeLabelAction::KWMailMergeLabelAction( i18n("Drag Mail Merge Variable"), 0,
- this, SLOT(editMailMergeDataBase()), actionCollection(), "mailmerge_draglabel" );
+ TQT_TQOBJECT(this), TQT_SLOT(editMailMergeDataBase()), actionCollection(), "mailmerge_draglabel" );
-// (void) new KWMailMergeComboAction::KWMailMergeComboAction(i18n("Insert Mailmerge Var"),0,this,SLOT(JWJWJW()),actionCollection(),"mailmerge_varchooser");
+// (void) new KWMailMergeComboAction::KWMailMergeComboAction(i18n("Insert Mailmerge Var"),0,TQT_TQOBJECT(this), TQT_SLOT(JWJWJW()),actionCollection(),"mailmerge_varchooser");
// -------------- Frame menu
m_actionEditDelFrame = new KAction( i18n( "&Delete Frame" ), 0,
- this, SLOT( editDeleteFrame() ),
+ TQT_TQOBJECT(this), TQT_SLOT( editDeleteFrame() ),
actionCollection(), "edit_delframe" );
m_actionEditDelFrame->setToolTip( i18n( "Delete the currently selected frame(s)." ) );
m_actionEditDelFrame->setWhatsThis( i18n( "Delete the currently selected frame(s)." ) );
- m_actionCreateLinkedFrame = new KAction( i18n( "Create Linked Copy" ), 0, this, SLOT( createLinkedFrame() ), actionCollection(), "create_linked_frame" );
+ m_actionCreateLinkedFrame = new KAction( i18n( "Create Linked Copy" ), 0, TQT_TQOBJECT(this), TQT_SLOT( createLinkedFrame() ), actionCollection(), "create_linked_frame" );
m_actionCreateLinkedFrame->setToolTip( i18n( "Create a copy of the current frame, always showing the same contents" ) );
m_actionCreateLinkedFrame->setWhatsThis( i18n("Create a copy of the current frame, that remains linked to it. This means they always show the same contents: modifying the contents in such a frame will update all its linked copies.") );
m_actionRaiseFrame = new KAction( i18n( "Ra&ise Frame" ), "raise",
- Qt::CTRL +Qt::SHIFT+ Qt::Key_R, this, SLOT( raiseFrame() ),
+ TQt::CTRL +TQt::SHIFT+ TQt::Key_R, TQT_TQOBJECT(this), TQT_SLOT( raiseFrame() ),
actionCollection(), "raiseframe" );
m_actionRaiseFrame->setToolTip( i18n( "Raise the currently selected frame so that it appears above all the other frames" ) );
m_actionRaiseFrame->setWhatsThis( i18n( "Raise the currently selected frame so that it appears above all the other frames. This is only useful if frames overlap each other. If multiple frames are selected they are all raised in turn." ) );
m_actionLowerFrame = new KAction( i18n( "&Lower Frame" ), "lower",
- Qt::CTRL +Qt::SHIFT+ Qt::Key_L, this, SLOT( lowerFrame() ),
+ TQt::CTRL +TQt::SHIFT+ TQt::Key_L, TQT_TQOBJECT(this), TQT_SLOT( lowerFrame() ),
actionCollection(), "lowerframe" );
m_actionLowerFrame->setToolTip( i18n( "Lower the currently selected frame so that it disappears under any frame that overlaps it" ) );
m_actionLowerFrame->setWhatsThis( i18n( "Lower the currently selected frame so that it disappears under any frame that overlaps it. If multiple frames are selected they are all lowered in turn." ) );
m_actionBringToFront= new KAction( i18n( "Bring to Front" ), "bring_forward",
- 0, this, SLOT( bringToFront() ),
+ 0, TQT_TQOBJECT(this), TQT_SLOT( bringToFront() ),
actionCollection(), "bring_tofront_frame" );
m_actionSendBackward= new KAction( i18n( "Send to Back" ), "send_backward",
- 0, this, SLOT( sendToBack() ),
+ 0, TQT_TQOBJECT(this), TQT_SLOT( sendToBack() ),
actionCollection(), "send_toback_frame" );
@@ -637,14 +637,14 @@ void KWView::setupActions()
if ( !m_doc->isEmbedded() ) {
m_actionViewTextMode = new KToggleAction( i18n( "Text Mode" ), 0,
- this, SLOT( viewTextMode() ),
+ TQT_TQOBJECT(this), TQT_SLOT( viewTextMode() ),
actionCollection(), "view_textmode" );
m_actionViewTextMode->setToolTip( i18n( "Only show the text of the document." ) );
- m_actionViewTextMode->setWhatsThis( i18n( "Do not show any pictures, formatting or layout. KWord will display only the text for editing." ) );
+ m_actionViewTextMode->setWhatsThis( i18n( "Do not show any pictures, formatting or tqlayout. KWord will display only the text for editing." ) );
m_actionViewTextMode->setExclusiveGroup( "viewmodes" );
m_actionViewPageMode = new KToggleAction( i18n( "&Page Mode" ), 0,
- this, SLOT( viewPageMode() ),
+ TQT_TQOBJECT(this), TQT_SLOT( viewPageMode() ),
actionCollection(), "view_pagemode" );
m_actionViewPageMode->setWhatsThis( i18n( "Switch to page mode.<br><br> Page mode is designed to make editing your text easy.<br><br>This function is most frequently used to return to text editing after switching to preview mode." ) );
m_actionViewPageMode->setToolTip( i18n( "Switch to page editing mode." ) );
@@ -652,7 +652,7 @@ void KWView::setupActions()
m_actionViewPageMode->setExclusiveGroup( "viewmodes" );
m_actionViewPageMode->setChecked( true );
m_actionViewPreviewMode = new KToggleAction( i18n( "Pre&view Mode" ), 0,
- this, SLOT( viewPreviewMode() ),
+ TQT_TQOBJECT(this), TQT_SLOT( viewPreviewMode() ),
actionCollection(), "view_previewmode" );
m_actionViewPreviewMode->setWhatsThis( i18n( "Zoom out from your document to get a look at several pages of your document.<br><br>The number of pages per line can be customized." ) );
m_actionViewPreviewMode->setToolTip( i18n( "Zoom out to a multiple page view." ) );
@@ -667,26 +667,26 @@ void KWView::setupActions()
}
m_actionViewFormattingChars = new KToggleAction( i18n( "&Formatting Characters" ), 0,
- this, SLOT( slotViewFormattingChars() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotViewFormattingChars() ),
actionCollection(), "view_formattingchars" );
m_actionViewFormattingChars->setToolTip( i18n( "Toggle the display of non-printing characters." ) );
m_actionViewFormattingChars->setWhatsThis( i18n( "Toggle the display of non-printing characters.<br><br>When this is enabled, KWord shows you tabs, spaces, carriage returns and other non-printing characters." ) );
m_actionViewFrameBorders = new KToggleAction( i18n( "Frame &Borders" ), 0,
- this, SLOT( slotViewFrameBorders() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotViewFrameBorders() ),
actionCollection(), "view_frameborders" );
m_actionViewFrameBorders->setToolTip( i18n( "Turns the border display on and off." ) );
m_actionViewFrameBorders->setWhatsThis( i18n( "Turns the border display on and off.<br><br>The borders are never printed. This option is useful to see how the document will appear on the printed page." ) );
m_actionViewHeader = new KToggleAction( i18n( "Enable Document &Headers" ), 0,
- this, SLOT( viewHeader() ),
+ TQT_TQOBJECT(this), TQT_SLOT( viewHeader() ),
actionCollection(), "format_header" );
m_actionViewHeader->setCheckedState(i18n("Disable Document &Headers"));
m_actionViewHeader->setToolTip( i18n( "Shows and hides header display." ) );
m_actionViewHeader->setWhatsThis( i18n( "Selecting this option toggles the display of headers in KWord.<br><br>Headers are special frames at the top of each page which can contain page numbers or other information." ) );
m_actionViewFooter = new KToggleAction( i18n( "Enable Document Foo&ters" ), 0,
- this, SLOT( viewFooter() ),
+ TQT_TQOBJECT(this), TQT_SLOT( viewFooter() ),
actionCollection(), "format_footer" );
m_actionViewFooter->setCheckedState(i18n("Disable Document Foo&ters"));
m_actionViewFooter->setToolTip( i18n( "Shows and hides footer display." ) );
@@ -695,21 +695,21 @@ void KWView::setupActions()
m_actionViewZoom = new KSelectAction( i18n( "Zoom" ), "viewmag", 0,
actionCollection(), "view_zoom" );
- connect( m_actionViewZoom, SIGNAL( activated( const QString & ) ),
- this, SLOT( viewZoom( const QString & ) ) );
+ connect( m_actionViewZoom, TQT_SIGNAL( activated( const TQString & ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( viewZoom( const TQString & ) ) );
m_actionViewZoom->setEditable(true);
changeZoomMenu( );
// -------------- Insert menu
m_actionInsertSpecialChar = new KAction( i18n( "Sp&ecial Character..." ), "char",
- Qt::ALT + Qt::SHIFT + Qt::Key_C,
- this, SLOT( insertSpecialChar() ),
+ TQt::ALT + TQt::SHIFT + TQt::Key_C,
+ TQT_TQOBJECT(this), TQT_SLOT( insertSpecialChar() ),
actionCollection(), "insert_specialchar" );
m_actionInsertSpecialChar->setToolTip( i18n( "Insert one or more symbols or letters not found on the keyboard." ) );
m_actionInsertSpecialChar->setWhatsThis( i18n( "Insert one or more symbols or letters not found on the keyboard." ) );
- m_actionInsertFrameBreak = new KAction( QString::null, Qt::CTRL + Qt::Key_Return,
- this, SLOT( insertFrameBreak() ),
+ m_actionInsertFrameBreak = new KAction( TQString(), TQt::CTRL + TQt::Key_Return,
+ TQT_TQOBJECT(this), TQT_SLOT( insertFrameBreak() ),
actionCollection(), "insert_framebreak" );
if ( m_doc->processingType() == KWDocument::WP ) {
m_actionInsertFrameBreak->setText( i18n( "Page Break" ) );
@@ -722,45 +722,45 @@ void KWView::setupActions()
}
/*actionInsertPage =*/ new KAction( m_doc->processingType() == KWDocument::WP ? i18n( "Page" ) : i18n( "Page..." ), "page", 0,
- this, SLOT( insertPage() ),
+ TQT_TQOBJECT(this), TQT_SLOT( insertPage() ),
actionCollection(), "insert_page" );
m_actionInsertLink = new KAction( i18n( "Link..." ), 0,
- this, SLOT( insertLink() ),
+ TQT_TQOBJECT(this), TQT_SLOT( insertLink() ),
actionCollection(), "insert_link" );
m_actionInsertLink->setToolTip( i18n( "Insert a Web address, email address or hyperlink to a file." ) );
m_actionInsertLink->setWhatsThis( i18n( "Insert a Web address, email address or hyperlink to a file." ) );
m_actionInsertComment = new KAction( i18n( "Comment..." ), 0,
- this, SLOT( insertComment() ),
+ TQT_TQOBJECT(this), TQT_SLOT( insertComment() ),
actionCollection(), "insert_comment" );
m_actionInsertComment->setToolTip( i18n( "Insert a comment about the selected text." ) );
m_actionInsertComment->setWhatsThis( i18n( "Insert a comment about the selected text. These comments are not designed to appear on the final page." ) );
m_actionEditComment = new KAction( i18n("Edit Comment..."), 0,
- this,SLOT(editComment()),
+ TQT_TQOBJECT(this), TQT_SLOT(editComment()),
actionCollection(), "edit_comment");
m_actionEditComment->setToolTip( i18n( "Change the content of a comment." ) );
m_actionEditComment->setWhatsThis( i18n( "Change the content of a comment." ) );
m_actionRemoveComment = new KAction( i18n("Remove Comment"), 0,
- this,SLOT(removeComment()),
+ TQT_TQOBJECT(this), TQT_SLOT(removeComment()),
actionCollection(), "remove_comment");
m_actionRemoveComment->setToolTip( i18n( "Remove the selected document comment." ) );
m_actionRemoveComment->setWhatsThis( i18n( "Remove the selected document comment." ) );
m_actionCopyTextOfComment = new KAction( i18n("Copy Text of Comment..."), 0,
- this,SLOT(copyTextOfComment()),
+ TQT_TQOBJECT(this), TQT_SLOT(copyTextOfComment()),
actionCollection(), "copy_text_comment");
m_actionInsertFootEndNote = new KAction( i18n( "&Footnote/Endnote..." ), 0,
- this, SLOT( insertFootNote() ),
+ TQT_TQOBJECT(this), TQT_SLOT( insertFootNote() ),
actionCollection(), "insert_footendnote" );
m_actionInsertFootEndNote->setToolTip( i18n( "Insert a footnote referencing the selected text." ) );
m_actionInsertFootEndNote->setWhatsThis( i18n( "Insert a footnote referencing the selected text." ) );
m_actionInsertContents = new KAction( i18n( "Table of &Contents" ), 0,
- this, SLOT( insertContents() ),
+ TQT_TQOBJECT(this), TQT_SLOT( insertContents() ),
actionCollection(), "insert_contents" );
m_actionInsertContents->setToolTip( i18n( "Insert table of contents at the current cursor position." ) );
m_actionInsertContents->setWhatsThis( i18n( "Insert table of contents at the current cursor position." ) );
@@ -780,13 +780,13 @@ void KWView::setupActions()
actionCollection(), "insert_custom" );
actionInsertVariable->insert(m_actionInsertCustom);
- //addVariableActions( VT_CUSTOM, KWCustomVariable::actionTexts(), actionInsertVariable, QString::null );
+ //addVariableActions( VT_CUSTOM, KWCustomVariable::actionTexts(), actionInsertVariable, TQString() );
- addVariableActions( VT_MAILMERGE, KoMailMergeVariable::actionTexts(), actionInsertVariable, QString::null );
+ addVariableActions( VT_MAILMERGE, KoMailMergeVariable::actionTexts(), actionInsertVariable, TQString() );
actionInsertVariable->popupMenu()->insertSeparator();
m_actionRefreshAllVariable = new KAction( i18n( "&Refresh All Variables" ), 0,
- this, SLOT( refreshAllVariable() ),
+ TQT_TQOBJECT(this), TQT_SLOT( refreshAllVariable() ),
actionCollection(), "refresh_all_variable" );
m_actionRefreshAllVariable->setToolTip( i18n( "Update all variables to current values." ) );
m_actionRefreshAllVariable->setWhatsThis( i18n( "Update all variables in the document to current values.<br><br>This will update page numbers, dates or any other variables that need updating." ) );
@@ -797,91 +797,91 @@ void KWView::setupActions()
actionCollection(), "insert_expression" );
loadexpressionActions( m_actionInsertExpression);
- m_actionToolsCreateText = new KToggleAction( i18n( "Te&xt Frame" ), "frame_text", Qt::Key_F10 /*same as kpr*/,
- this, SLOT( toolsCreateText() ),
+ m_actionToolsCreateText = new KToggleAction( i18n( "Te&xt Frame" ), "frame_text", TQt::Key_F10 /*same as kpr*/,
+ TQT_TQOBJECT(this), TQT_SLOT( toolsCreateText() ),
actionCollection(), "tools_createtext" );
m_actionToolsCreateText->setToolTip( i18n( "Create a new text frame." ) );
m_actionToolsCreateText->setWhatsThis( i18n( "Create a new text frame." ) );
m_actionToolsCreateText->setExclusiveGroup( "tools" );
- m_actionInsertFormula = new KAction( i18n( "For&mula" ), "frame_formula", Qt::Key_F4,
- this, SLOT( insertFormula() ),
+ m_actionInsertFormula = new KAction( i18n( "For&mula" ), "frame_formula", TQt::Key_F4,
+ TQT_TQOBJECT(this), TQT_SLOT( insertFormula() ),
actionCollection(), "tools_formula" );
m_actionInsertFormula->setToolTip( i18n( "Insert a formula into a new frame." ) );
m_actionInsertFormula->setWhatsThis( i18n( "Insert a formula into a new frame." ) );
m_actionInsertTable = new KAction( i18n( "&Table..." ), "inline_table",
- Qt::Key_F5,
- this, SLOT( insertTable() ),
+ TQt::Key_F5,
+ TQT_TQOBJECT(this), TQT_SLOT( insertTable() ),
actionCollection(), "insert_table" );
m_actionInsertTable->setToolTip( i18n( "Create a table." ) );
m_actionInsertTable->setWhatsThis( i18n( "Create a table.<br><br>The table can either exist in a frame of its own or inline." ) );
m_actionToolsCreatePix = new KToggleAction( i18n( "P&icture..." ), "frame_image", // or inline_image ?
- Qt::SHIFT + Qt::Key_F5 /*same as kpr*/,
- this, SLOT( insertPicture() ),
+ TQt::SHIFT + TQt::Key_F5 /*same as kpr*/,
+ TQT_TQOBJECT(this), TQT_SLOT( insertPicture() ),
actionCollection(), "insert_picture" );
m_actionToolsCreatePix->setToolTip( i18n( "Create a new frame for a picture." ) );
m_actionToolsCreatePix->setWhatsThis( i18n( "Create a new frame for a picture or diagram." ) );
m_actionToolsCreatePix->setExclusiveGroup( "tools" );
m_actionToolsCreatePart = new KoPartSelectAction( i18n( "&Object Frame" ), "frame_query",
- this, SLOT( toolsPart() ),
+ TQT_TQOBJECT(this), TQT_SLOT( toolsPart() ),
actionCollection(), "tools_part" );
m_actionToolsCreatePart->setToolTip( i18n( "Insert an object into a new frame." ) );
m_actionToolsCreatePart->setWhatsThis( i18n( "Insert an object into a new frame." ) );
m_actionInsertFile = new KAction( i18n( "Fi&le..." ), 0,
- this, SLOT( insertFile() ),
+ TQT_TQOBJECT(this), TQT_SLOT( insertFile() ),
actionCollection(), "insert_file" );
// ------------------------- Format menu
- m_actionFormatFont = new KAction( i18n( "&Font..." ), Qt::ALT + Qt::CTRL + Qt::Key_F,
- this, SLOT( formatFont() ),
+ m_actionFormatFont = new KAction( i18n( "&Font..." ), TQt::ALT + TQt::CTRL + TQt::Key_F,
+ TQT_TQOBJECT(this), TQT_SLOT( formatFont() ),
actionCollection(), "format_font" );
m_actionFormatFont->setToolTip( i18n( "Change character size, font, boldface, italics etc." ) );
m_actionFormatFont->setWhatsThis( i18n( "Change the attributes of the currently selected characters." ) );
- m_actionFormatParag = new KAction( i18n( "&Paragraph..." ), Qt::ALT + Qt::CTRL + Qt::Key_P,
- this, SLOT( formatParagraph() ),
+ m_actionFormatParag = new KAction( i18n( "&Paragraph..." ), TQt::ALT + TQt::CTRL + TQt::Key_P,
+ TQT_TQOBJECT(this), TQT_SLOT( formatParagraph() ),
actionCollection(), "format_paragraph" );
m_actionFormatParag->setToolTip( i18n( "Change paragraph margins, text flow, borders, bullets, numbering etc." ) );
m_actionFormatParag->setWhatsThis( i18n( "Change paragraph margins, text flow, borders, bullets, numbering etc.<p>Select text in multiple paragraphs to change the formatting of all selected paragraphs.<p>If no text is selected, the paragraph where the cursor is located will be changed." ) );
m_actionFormatFrameSet = new KAction( i18n( "F&rame/Frameset Properties" ), 0,
- this, SLOT( formatFrameSet() ),
+ TQT_TQOBJECT(this), TQT_SLOT( formatFrameSet() ),
actionCollection(), "format_frameset" );
m_actionFormatFrameSet->setToolTip( i18n( "Alter frameset properties." ) );
m_actionFormatFrameSet->setWhatsThis( i18n( "Alter frameset properties.<p>Currently you can change the frame background." ) );
m_actionFormatPage = new KAction( i18n( "Page &Layout..." ), 0,
- this, SLOT( formatPage() ),
+ TQT_TQOBJECT(this), TQT_SLOT( formatPage() ),
actionCollection(), "format_page" );
m_actionFormatPage->setToolTip( i18n( "Change properties of entire page." ) );
m_actionFormatPage->setWhatsThis( i18n( "Change properties of the entire page.<p>Currently you can change paper size, paper orientation, header and footer sizes, and column settings." ) );
m_actionFormatFrameStylist = new KAction( i18n( "&Frame Style Manager" ), 0 /*shortcut?*/,
- this, SLOT( extraFrameStylist() ),
+ TQT_TQOBJECT(this), TQT_SLOT( extraFrameStylist() ),
actionCollection(), "frame_stylist" );
m_actionFormatFrameStylist->setToolTip( i18n( "Change attributes of framestyles." ) );
m_actionFormatFrameStylist->setWhatsThis( i18n( "Change background and borders of framestyles.<p>Multiple framestyles can be changed using the dialog box." ) );
- m_actionFormatStylist = new KAction( i18n( "&Style Manager" ), Qt::ALT + Qt::CTRL + Qt::Key_S,
- this, SLOT( extraStylist() ),
+ m_actionFormatStylist = new KAction( i18n( "&Style Manager" ), TQt::ALT + TQt::CTRL + TQt::Key_S,
+ TQT_TQOBJECT(this), TQT_SLOT( extraStylist() ),
actionCollection(), "format_stylist" );
m_actionFormatStylist->setToolTip( i18n( "Change attributes of styles." ) );
m_actionFormatStylist->setWhatsThis( i18n( "Change font and paragraph attributes of styles.<p>Multiple styles can be changed using the dialog box." ) );
m_actionFormatFontSize = new KFontSizeAction( i18n( "Font Size" ), 0,
actionCollection(), "format_fontsize" );
- connect( m_actionFormatFontSize, SIGNAL( fontSizeChanged( int ) ),
- this, SLOT( textSizeSelected( int ) ) );
+ connect( m_actionFormatFontSize, TQT_SIGNAL( fontSizeChanged( int ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( textSizeSelected( int ) ) );
- m_actionFontSizeIncrease = new KAction( i18n("Increase Font Size"), "fontsizeup", Qt::CTRL + Qt::Key_Greater, this, SLOT( increaseFontSize() ), actionCollection(), "increase_fontsize" );
- m_actionFontSizeDecrease = new KAction( i18n("Decrease Font Size"), "fontsizedown", Qt::CTRL + Qt::Key_Less, this, SLOT( decreaseFontSize() ), actionCollection(), "decrease_fontsize" );
+ m_actionFontSizeIncrease = new KAction( i18n("Increase Font Size"), "fontsizeup", TQt::CTRL + TQt::Key_Greater, TQT_TQOBJECT(this), TQT_SLOT( increaseFontSize() ), actionCollection(), "increase_fontsize" );
+ m_actionFontSizeDecrease = new KAction( i18n("Decrease Font Size"), "fontsizedown", TQt::CTRL + TQt::Key_Less, TQT_TQOBJECT(this), TQT_SLOT( decreaseFontSize() ), actionCollection(), "decrease_fontsize" );
#ifdef KFONTACTION_HAS_CRITERIA_ARG
m_actionFormatFontFamily = new KFontAction( KFontChooser::SmoothScalableFonts,
@@ -891,8 +891,8 @@ void KWView::setupActions()
m_actionFormatFontFamily = new KFontAction( i18n( "Font Family" ), 0,
actionCollection(), "format_fontfamily" );
#endif
- connect( m_actionFormatFontFamily, SIGNAL( activated( const QString & ) ),
- this, SLOT( textFontSelected( const QString & ) ) );
+ connect( m_actionFormatFontFamily, TQT_SIGNAL( activated( const TQString & ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( textFontSelected( const TQString & ) ) );
m_actionFormatStyleMenu = new KActionMenu( i18n( "St&yle" ), 0,
actionCollection(), "format_stylemenu" );
@@ -900,89 +900,89 @@ void KWView::setupActions()
actionCollection(), "format_style" );
// In fact, binding a key to this action will simply re-apply the current style. Why not.
//m_actionFormatStyle->setShortcutConfigurable( false );
- connect( m_actionFormatStyle, SIGNAL( activated( int ) ),
- this, SLOT( textStyleSelected( int ) ) );
+ connect( m_actionFormatStyle, TQT_SIGNAL( activated( int ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( textStyleSelected( int ) ) );
updateStyleList();
m_actionFormatDefault=new KAction( i18n( "Default Format" ), 0,
- this, SLOT( textDefaultFormat() ),
+ TQT_TQOBJECT(this), TQT_SLOT( textDefaultFormat() ),
actionCollection(), "text_default" );
m_actionFormatDefault->setToolTip( i18n( "Change font and paragraph attributes to their default values." ) );
m_actionFormatDefault->setWhatsThis( i18n( "Change font and paragraph attributes to their default values." ) );
// ----------------------- More format actions, for the toolbar only
- m_actionFormatBold = new KToggleAction( i18n( "&Bold" ), "text_bold", Qt::CTRL + Qt::Key_B,
- this, SLOT( textBold() ),
+ m_actionFormatBold = new KToggleAction( i18n( "&Bold" ), "text_bold", TQt::CTRL + TQt::Key_B,
+ TQT_TQOBJECT(this), TQT_SLOT( textBold() ),
actionCollection(), "format_bold" );
- m_actionFormatItalic = new KToggleAction( i18n( "&Italic" ), "text_italic", Qt::CTRL + Qt::Key_I,
- this, SLOT( textItalic() ),
+ m_actionFormatItalic = new KToggleAction( i18n( "&Italic" ), "text_italic", TQt::CTRL + TQt::Key_I,
+ TQT_TQOBJECT(this), TQT_SLOT( textItalic() ),
actionCollection(), "format_italic" );
- m_actionFormatUnderline = new KToggleAction( i18n( "&Underline" ), "text_under", Qt::CTRL + Qt::Key_U,
- this, SLOT( textUnderline() ),
+ m_actionFormatUnderline = new KToggleAction( i18n( "&Underline" ), "text_under", TQt::CTRL + TQt::Key_U,
+ TQT_TQOBJECT(this), TQT_SLOT( textUnderline() ),
actionCollection(), "format_underline" );
m_actionFormatStrikeOut = new KToggleAction( i18n( "&Strike Out" ), "text_strike", 0 ,
- this, SLOT( textStrikeOut() ),
+ TQT_TQOBJECT(this), TQT_SLOT( textStrikeOut() ),
actionCollection(), "format_strike" );
- m_actionFormatAlignLeft = new KToggleAction( i18n( "Align &Left" ), "text_left", Qt::CTRL + Qt::Key_L,
- this, SLOT( textAlignLeft() ),
+ m_actionFormatAlignLeft = new KToggleAction( i18n( "Align &Left" ), "text_left", TQt::CTRL + TQt::Key_L,
+ TQT_TQOBJECT(this), TQT_SLOT( textAlignLeft() ),
actionCollection(), "format_alignleft" );
m_actionFormatAlignLeft->setExclusiveGroup( "align" );
m_actionFormatAlignLeft->setChecked( TRUE );
- m_actionFormatAlignCenter = new KToggleAction( i18n( "Align &Center" ), "text_center", Qt::CTRL + Qt::ALT + Qt::Key_C,
- this, SLOT( textAlignCenter() ),
+ m_actionFormatAlignCenter = new KToggleAction( i18n( "Align &Center" ), "text_center", TQt::CTRL + TQt::ALT + TQt::Key_C,
+ TQT_TQOBJECT(this), TQT_SLOT( textAlignCenter() ),
actionCollection(), "format_aligncenter" );
m_actionFormatAlignCenter->setExclusiveGroup( "align" );
- m_actionFormatAlignRight = new KToggleAction( i18n( "Align &Right" ), "text_right", Qt::CTRL + Qt::ALT + Qt::Key_R,
- this, SLOT( textAlignRight() ),
+ m_actionFormatAlignRight = new KToggleAction( i18n( "Align &Right" ), "text_right", TQt::CTRL + TQt::ALT + TQt::Key_R,
+ TQT_TQOBJECT(this), TQT_SLOT( textAlignRight() ),
actionCollection(), "format_alignright" );
m_actionFormatAlignRight->setExclusiveGroup( "align" );
- m_actionFormatAlignBlock = new KToggleAction( i18n( "Align &Block" ), "text_block", Qt::CTRL + Qt::Key_J,
- this, SLOT( textAlignBlock() ),
+ m_actionFormatAlignBlock = new KToggleAction( i18n( "Align &Block" ), "text_block", TQt::CTRL + TQt::Key_J,
+ TQT_TQOBJECT(this), TQT_SLOT( textAlignBlock() ),
actionCollection(), "format_alignblock" );
m_actionFormatAlignBlock->setExclusiveGroup( "align" );
- m_actionFormatSpacingSingle = new KToggleAction( i18n( "Line Spacing &1" ), "spacesimple", Qt::CTRL + Qt::Key_1,
- this, SLOT( textSpacingSingle() ),
+ m_actionFormatSpacingSingle = new KToggleAction( i18n( "Line Spacing &1" ), "spacesimple", TQt::CTRL + TQt::Key_1,
+ TQT_TQOBJECT(this), TQT_SLOT( textSpacingSingle() ),
actionCollection(), "format_spacingsingle" );
m_actionFormatSpacingSingle->setExclusiveGroup( "spacing" );
- m_actionFormatSpacingOneAndHalf = new KToggleAction( i18n( "Line Spacing 1.&5" ), "spacedouble", Qt::CTRL + Qt::Key_5,
- this, SLOT( textSpacingOneAndHalf() ),
+ m_actionFormatSpacingOneAndHalf = new KToggleAction( i18n( "Line Spacing 1.&5" ), "spacedouble", TQt::CTRL + TQt::Key_5,
+ TQT_TQOBJECT(this), TQT_SLOT( textSpacingOneAndHalf() ),
actionCollection(), "format_spacing15" );
m_actionFormatSpacingOneAndHalf->setExclusiveGroup( "spacing" );
- m_actionFormatSpacingDouble = new KToggleAction( i18n( "Line Spacing &2" ), "spacetriple", Qt::CTRL + Qt::Key_2,
- this, SLOT( textSpacingDouble() ),
+ m_actionFormatSpacingDouble = new KToggleAction( i18n( "Line Spacing &2" ), "spacetriple", TQt::CTRL + TQt::Key_2,
+ TQT_TQOBJECT(this), TQT_SLOT( textSpacingDouble() ),
actionCollection(), "format_spacingdouble" );
m_actionFormatSpacingDouble->setExclusiveGroup( "spacing" );
m_actionFormatSuper = new KToggleAction( i18n( "Superscript" ), "super", 0,
- this, SLOT( textSuperScript() ),
+ TQT_TQOBJECT(this), TQT_SLOT( textSuperScript() ),
actionCollection(), "format_super" );
//m_actionFormatSuper->setExclusiveGroup( "valign" );
m_actionFormatSub = new KToggleAction( i18n( "Subscript" ), "sub", 0,
- this, SLOT( textSubScript() ),
+ TQT_TQOBJECT(this), TQT_SLOT( textSubScript() ),
actionCollection(), "format_sub" );
//m_actionFormatSub->setExclusiveGroup( "valign" );
m_actionFormatIncreaseIndent= new KAction( i18n( "Increase Indent" ),
- QApplication::reverseLayout() ? "format_decreaseindent" : "format_increaseindent", 0,
- this, SLOT( textIncreaseIndent() ),
+ TQApplication::reverseLayout() ? "format_decreaseindent" : "format_increaseindent", 0,
+ TQT_TQOBJECT(this), TQT_SLOT( textIncreaseIndent() ),
actionCollection(), "format_increaseindent" );
m_actionFormatDecreaseIndent= new KAction( i18n( "Decrease Indent" ),
- QApplication::reverseLayout() ? "format_increaseindent" :"format_decreaseindent", 0,
- this, SLOT( textDecreaseIndent() ),
+ TQApplication::reverseLayout() ? "format_increaseindent" :"format_decreaseindent", 0,
+ TQT_TQOBJECT(this), TQT_SLOT( textDecreaseIndent() ),
actionCollection(), "format_decreaseindent" );
m_actionFormatColor = new TKSelectColorAction( i18n( "Text Color..." ), TKSelectColorAction::TextColor,
- this, SLOT( textColor() ),
+ TQT_TQOBJECT(this), TQT_SLOT( textColor() ),
actionCollection(), "format_color", true );
- m_actionFormatColor->setDefaultColor(QColor());
+ m_actionFormatColor->setDefaultColor(TQColor());
//actionFormatList = new KToggleAction( i18n( "List" ), "enumList", 0,
- // this, SLOT( textList() ),
+ // TQT_TQOBJECT(this), TQT_SLOT( textList() ),
// actionCollection(), "format_list" );
//actionFormatList->setExclusiveGroup( "style" );
@@ -992,15 +992,15 @@ void KWView::setupActions()
m_actionFormatBullet = new KActionMenu( i18n( "Bullet" ),
"unsortedList", actionCollection(), "format_bullet" );
m_actionFormatBullet->setDelayed( false );
- QPtrList<KoCounterStyleWidget::StyleRepresenter> stylesList;
+ TQPtrList<KoCounterStyleWidget::StyleRepresenter> stylesList;
KoCounterStyleWidget::makeCounterRepresenterList( stylesList );
- QPtrListIterator<KoCounterStyleWidget::StyleRepresenter> styleIt( stylesList );
+ TQPtrListIterator<KoCounterStyleWidget::StyleRepresenter> styleIt( stylesList );
for ( ; styleIt.current() ; ++styleIt ) {
// Dynamically create toggle-actions for each list style.
// This approach allows to edit toolbars and extract separate actions from this menu
KToggleAction* act = new KToggleAction( styleIt.current()->name(), /*TODO icon,*/
- 0, this, SLOT( slotCounterStyleSelected() ),
- actionCollection(), QString("counterstyle_%1").arg( styleIt.current()->style() ).latin1() );
+ 0, TQT_TQOBJECT(this), TQT_SLOT( slotCounterStyleSelected() ),
+ actionCollection(), TQString("counterstyle_%1").tqarg( styleIt.current()->style() ).latin1() );
act->setExclusiveGroup( "counterstyle" );
// Add to the right menu: both for "none", bullet for bullets, numbers otherwise
if ( styleIt.current()->style() == KoParagCounter::STYLE_NONE ) {
@@ -1018,23 +1018,23 @@ void KWView::setupActions()
actionCollection(), "frame_stylemenu" );
m_actionFrameStyle = new KSelectAction( i18n( "Framest&yle" ), 0,
actionCollection(), "frame_style" );
- connect( m_actionFrameStyle, SIGNAL( activated( int ) ),
- this, SLOT( frameStyleSelected( int ) ) );
+ connect( m_actionFrameStyle, TQT_SIGNAL( activated( int ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( frameStyleSelected( int ) ) );
updateFrameStyleList();
m_actionBorderOutline = new KToggleAction( i18n( "Border Outline" ), "borderoutline",
- 0, this, SLOT( borderOutline() ), actionCollection(), "border_outline" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT( borderOutline() ), actionCollection(), "border_outline" );
m_actionBorderLeft = new KToggleAction( i18n( "Border Left" ), "borderleft",
- 0, this, SLOT( borderLeft() ), actionCollection(), "border_left" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT( borderLeft() ), actionCollection(), "border_left" );
m_actionBorderRight = new KToggleAction( i18n( "Border Right" ), "borderright",
- 0, this, SLOT( borderRight() ), actionCollection(), "border_right" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT( borderRight() ), actionCollection(), "border_right" );
m_actionBorderTop = new KToggleAction( i18n( "Border Top" ), "bordertop",
- 0, this, SLOT( borderTop() ), actionCollection(), "border_top" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT( borderTop() ), actionCollection(), "border_top" );
m_actionBorderBottom = new KToggleAction( i18n( "Border Bottom" ), "borderbottom",
- 0, this, SLOT( borderBottom() ), actionCollection(), "border_bottom" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT( borderBottom() ), actionCollection(), "border_bottom" );
m_actionBorderStyle = new KSelectAction( i18n( "Border Style" ),
0, actionCollection(), "border_style" );
- QStringList lst;
+ TQStringList lst;
lst << KoBorder::getStyle( KoBorder::SOLID );
lst << KoBorder::getStyle( KoBorder::DASH );
lst << KoBorder::getStyle( KoBorder::DOT );
@@ -1046,67 +1046,67 @@ void KWView::setupActions()
actionCollection(), "border_width" );
lst.clear();
for ( unsigned int i = 1; i < 10; i++ )
- lst << QString::number( i );
+ lst << TQString::number( i );
m_actionBorderWidth->setItems( lst );
m_actionBorderWidth->setCurrentItem( 0 );
m_actionBorderColor = new TKSelectColorAction( i18n("Border Color"), TKSelectColorAction::LineColor, actionCollection(), "border_color", true );
- m_actionBorderColor->setDefaultColor(QColor());
+ m_actionBorderColor->setDefaultColor(TQColor());
m_actionBackgroundColor = new TKSelectColorAction( i18n( "Text Background Color..." ), TKSelectColorAction::FillColor, actionCollection(),"border_backgroundcolor", true);
m_actionBackgroundColor->setToolTip( i18n( "Change background color for currently selected text." ) );
m_actionBackgroundColor->setWhatsThis( i18n( "Change background color for currently selected text." ) );
- connect(m_actionBackgroundColor,SIGNAL(activated()),SLOT(backgroundColor() ));
- m_actionBackgroundColor->setDefaultColor(QColor());
+ connect(m_actionBackgroundColor,TQT_SIGNAL(activated()),TQT_SLOT(backgroundColor() ));
+ m_actionBackgroundColor->setDefaultColor(TQColor());
// ---------------------- Table menu
m_actionTablePropertiesMenu = new KAction( i18n( "&Properties" ), 0,
- this, SLOT( tableProperties() ),
+ TQT_TQOBJECT(this), TQT_SLOT( tableProperties() ),
actionCollection(), "table_propertiesmenu" );
m_actionTablePropertiesMenu->setToolTip( i18n( "Adjust properties of the current table." ) );
m_actionTablePropertiesMenu->setWhatsThis( i18n( "Adjust properties of the current table." ) );
m_actionTableInsertRow = new KAction( i18n( "&Insert Row..." ), "insert_table_row", 0,
- this, SLOT( tableInsertRow() ),
+ TQT_TQOBJECT(this), TQT_SLOT( tableInsertRow() ),
actionCollection(), "table_insrow" );
m_actionTableInsertRow->setToolTip( i18n( "Insert one or more rows at cursor location." ) );
m_actionTableInsertRow->setWhatsThis( i18n( "Insert one or more rows at current cursor location." ) );
m_actionTableInsertCol = new KAction( i18n( "I&nsert Column..." ), "insert_table_col", 0,
- this, SLOT( tableInsertCol() ),
+ TQT_TQOBJECT(this), TQT_SLOT( tableInsertCol() ),
actionCollection(), "table_inscol" );
m_actionTableInsertCol->setToolTip( i18n( "Insert one or more columns into the current table." ) );
m_actionTableInsertCol->setWhatsThis( i18n( "Insert one or more columns into the current table." ) );
m_actionTableDelRow = new KAction( 0, "delete_table_row", 0,
- this, SLOT( tableDeleteRow() ),
+ TQT_TQOBJECT(this), TQT_SLOT( tableDeleteRow() ),
actionCollection(), "table_delrow" );
m_actionTableDelRow->setToolTip( i18n( "Delete selected rows from the current table." ) );
m_actionTableDelRow->setWhatsThis( i18n( "Delete selected rows from the current table." ) );
m_actionTableDelCol = new KAction( 0, "delete_table_col", 0,
- this, SLOT( tableDeleteCol() ),
+ TQT_TQOBJECT(this), TQT_SLOT( tableDeleteCol() ),
actionCollection(), "table_delcol" );
m_actionTableDelCol->setToolTip( i18n( "Delete selected columns from the current table." ) );
m_actionTableDelCol->setWhatsThis( i18n( "Delete selected columns from the current table." ) );
m_actionTableResizeCol = new KAction( i18n( "Resize Column..." ), 0,
- this, SLOT( tableResizeCol() ),
+ TQT_TQOBJECT(this), TQT_SLOT( tableResizeCol() ),
actionCollection(), "table_resizecol" );
m_actionTableResizeCol->setToolTip( i18n( "Change the width of the currently selected column." ) );
m_actionTableResizeCol->setWhatsThis( i18n( "Change the width of the currently selected column." ) );
m_actionTableJoinCells = new KAction( i18n( "&Join Cells" ), 0,
- this, SLOT( tableJoinCells() ),
+ TQT_TQOBJECT(this), TQT_SLOT( tableJoinCells() ),
actionCollection(), "table_joincells" );
m_actionTableJoinCells->setToolTip( i18n( "Join two or more cells into one large cell." ) );
m_actionTableJoinCells->setWhatsThis( i18n( "Join two or more cells into one large cell.<p>This is a good way to create titles and labels within a table." ) );
m_actionTableSplitCells= new KAction( i18n( "&Split Cell..." ), 0,
- this, SLOT( tableSplitCells() ),
+ TQT_TQOBJECT(this), TQT_SLOT( tableSplitCells() ),
actionCollection(), "table_splitcells" );
m_actionTableSplitCells->setToolTip( i18n( "Split one cell into two or more cells." ) );
m_actionTableSplitCells->setWhatsThis( i18n( "Split one cell into two or more cells.<p>Cells can be split horizontally, vertically or both directions at once." ) );
@@ -1114,26 +1114,26 @@ void KWView::setupActions()
m_actionTableProtectCells= new KToggleAction( i18n( "Protect Cells" ), 0, 0, 0,
actionCollection(), "table_protectcells" );
m_actionTableProtectCells->setToolTip( i18n( "Prevent changes to content of selected cells." ) );
- connect (m_actionTableProtectCells, SIGNAL( toggled(bool) ), this,
- SLOT( tableProtectCells(bool) ));
+ connect (m_actionTableProtectCells, TQT_SIGNAL( toggled(bool) ), this,
+ TQT_SLOT( tableProtectCells(bool) ));
m_actionTableProtectCells->setWhatsThis( i18n( "Toggles cell protection on and off.<br><br>When cell protection is on, the user can not alter the content or formatting of the text within the cell." ) );
m_actionTableUngroup = new KAction( i18n( "&Ungroup Table" ), 0,
- this, SLOT( tableUngroupTable() ),
+ TQT_TQOBJECT(this), TQT_SLOT( tableUngroupTable() ),
actionCollection(), "table_ungroup" );
m_actionTableUngroup->setToolTip( i18n( "Break a table into individual frames." ) );
m_actionTableUngroup->setWhatsThis( i18n( "Break a table into individual frames<p>Each frame can be moved independently around the page." ) );
m_actionTableDelete = new KAction( i18n( "Delete &Table" ), 0,
- this, SLOT( tableDelete() ),
+ TQT_TQOBJECT(this), TQT_SLOT( tableDelete() ),
actionCollection(), "table_delete" );
m_actionTableDelete->setToolTip( i18n( "Delete the entire table." ) );
m_actionTableDelete->setWhatsThis( i18n( "Deletes all cells and the content within the cells of the currently selected table." ) );
m_actionTableStylist = new KAction( i18n( "T&able Style Manager" ), 0,
- this, SLOT( tableStylist() ),
+ TQT_TQOBJECT(this), TQT_SLOT( tableStylist() ),
actionCollection(), "table_stylist" );
m_actionTableStylist->setToolTip( i18n( "Change attributes of tablestyles." ) );
m_actionTableStylist->setWhatsThis( i18n( "Change textstyle and framestyle of the tablestyles.<p>Multiple tablestyles can be changed using the dialog box." ) );
@@ -1142,19 +1142,19 @@ void KWView::setupActions()
actionCollection(), "table_stylemenu" );
m_actionTableStyle = new KSelectAction( i18n( "Table&style" ), 0,
actionCollection(), "table_style" );
- connect( m_actionTableStyle, SIGNAL( activated( int ) ),
- this, SLOT( tableStyleSelected( int ) ) );
+ connect( m_actionTableStyle, TQT_SIGNAL( activated( int ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( tableStyleSelected( int ) ) );
updateTableStyleList();
m_actionConvertTableToText = new KAction( i18n( "Convert Table to Text" ), 0,
- this, SLOT( convertTableToText() ),
+ TQT_TQOBJECT(this), TQT_SLOT( convertTableToText() ),
actionCollection(), "convert_table_to_text" );
m_actionSortText= new KAction( i18n( "Sort Text..." ), 0,
- this, SLOT( sortText() ),
+ TQT_TQOBJECT(this), TQT_SLOT( sortText() ),
actionCollection(), "sort_text" );
m_actionAddPersonalExpression= new KAction( i18n( "Add Expression" ), 0,
- this, SLOT( addPersonalExpression() ),
+ TQT_TQOBJECT(this), TQT_SLOT( addPersonalExpression() ),
actionCollection(), "add_personal_expression" );
@@ -1162,89 +1162,89 @@ void KWView::setupActions()
m_actionAllowAutoFormat = new KToggleAction( i18n( "Enable Autocorrection" ), 0,
- this, SLOT( slotAllowAutoFormat() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotAllowAutoFormat() ),
actionCollection(), "enable_autocorrection" );
m_actionAllowAutoFormat->setCheckedState(i18n("Disable Autocorrection"));
m_actionAllowAutoFormat->setToolTip( i18n( "Toggle autocorrection on and off." ) );
m_actionAllowAutoFormat->setWhatsThis( i18n( "Toggle autocorrection on and off." ) );
m_actionAutoFormat = new KAction( i18n( "Configure &Autocorrection..." ), 0,
- this, SLOT( extraAutoFormat() ),
+ TQT_TQOBJECT(this), TQT_SLOT( extraAutoFormat() ),
actionCollection(), "configure_autocorrection" );
m_actionAutoFormat->setToolTip( i18n( "Change autocorrection options." ) );
m_actionAutoFormat->setWhatsThis( i18n( "Change autocorrection options including:<p> <UL><LI><P>exceptions to autocorrection</P> <LI><P>add/remove autocorrection replacement text</P> <LI><P>and basic autocorrection options</P>." ) );
m_actionEditCustomVarsEdit = new KAction( i18n( "Custom &Variables..." ), 0,
- this, SLOT( editCustomVars() ), // TODO: new dialog w add etc.
+ TQT_TQOBJECT(this), TQT_SLOT( editCustomVars() ), // TODO: new dialog w add etc.
actionCollection(), "custom_vars" );
m_actionEditPersonnalExpr=new KAction( i18n( "Edit &Personal Expressions..." ), 0,
- this, SLOT( editPersonalExpr() ),
+ TQT_TQOBJECT(this), TQT_SLOT( editPersonalExpr() ),
actionCollection(), "personal_expr" );
m_actionEditPersonnalExpr->setToolTip( i18n( "Add or change one or more personal expressions." ) );
m_actionEditPersonnalExpr->setWhatsThis( i18n( "Add or change one or more personal expressions.<p>Personal expressions are a way to quickly insert commonly used phrases or text into your document." ) );
m_actionChangeCase=new KAction( i18n( "Change Case..." ), 0,
- this, SLOT( changeCaseOfText() ),
+ TQT_TQOBJECT(this), TQT_SLOT( changeCaseOfText() ),
actionCollection(), "change_case" );
m_actionChangeCase->setToolTip( i18n( "Alter the capitalization of selected text." ) );
m_actionChangeCase->setWhatsThis( i18n( "Alter the capitalization of selected text to one of five pre-defined patterns.<p>You can also switch all letters from upper case to lower case and from lower case to upper case in one move." ) );
//------------------------ Settings menu
- m_actionConfigure = KStdAction::preferences(this, SLOT(configure()), actionCollection(), "configure" );
+ m_actionConfigure = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(configure()), actionCollection(), "configure" );
//------------------------ Menu frameSet
KAction *actionChangePicture=new KAction( i18n( "Change Picture..." ),"frame_image",0,
- this, SLOT( changePicture() ),
+ TQT_TQOBJECT(this), TQT_SLOT( changePicture() ),
actionCollection(), "change_picture" );
actionChangePicture->setToolTip( i18n( "Change the picture in the currently selected frame." ) );
actionChangePicture->setWhatsThis( i18n( "You can specify a different picture in the current frame.<br><br>KWord automatically resizes the new picture to fit within the old frame." ) );
m_actionConfigureHeaderFooter=new KAction( i18n( "Configure Header/Footer..." ), 0,
- this, SLOT( configureHeaderFooter() ),
+ TQT_TQOBJECT(this), TQT_SLOT( configureHeaderFooter() ),
actionCollection(), "configure_headerfooter" );
m_actionConfigureHeaderFooter->setToolTip( i18n( "Configure the currently selected header or footer." ) );
m_actionConfigureHeaderFooter->setWhatsThis( i18n( "Configure the currently selected header or footer." ) );
m_actionInlineFrame = new KToggleAction( i18n( "Inline Frame" ), 0,
- this, SLOT( inlineFrame() ),
+ TQT_TQOBJECT(this), TQT_SLOT( inlineFrame() ),
actionCollection(), "inline_frame" );
m_actionInlineFrame->setToolTip( i18n( "Convert current frame to an inline frame." ) );
m_actionInlineFrame->setWhatsThis( i18n( "Convert the current frame to an inline frame.<br><br>Place the inline frame within the text at the point nearest to the frames current position." ) );
m_actionOpenLink = new KAction( i18n( "Open Link" ), 0,
- this, SLOT( openLink() ),
+ TQT_TQOBJECT(this), TQT_SLOT( openLink() ),
actionCollection(), "open_link" );
m_actionOpenLink->setToolTip( i18n( "Open the link with the appropriate application." ) );
m_actionOpenLink->setWhatsThis( i18n( "Open the link with the appropriate application.<br><br>Web addresses are opened in a browser.<br>Email addresses begin a new message addressed to the link.<br>File links are opened by the appropriate viewer or editor." ) );
m_actionChangeLink=new KAction( i18n("Change Link..."), 0,
- this,SLOT(changeLink()),
+ TQT_TQOBJECT(this), TQT_SLOT(changeLink()),
actionCollection(), "change_link");
m_actionChangeLink->setToolTip( i18n( "Change the content of the currently selected link." ) );
m_actionChangeLink->setWhatsThis( i18n( "Change the details of the currently selected link." ) );
m_actionCopyLink = new KAction( i18n( "Copy Link" ), 0,
- this, SLOT( copyLink() ),
+ TQT_TQOBJECT(this), TQT_SLOT( copyLink() ),
actionCollection(), "copy_link" );
m_actionAddLinkToBookmak = new KAction( i18n( "Add to Bookmark" ), 0,
- this, SLOT( addToBookmark() ),
+ TQT_TQOBJECT(this), TQT_SLOT( addToBookmark() ),
actionCollection(), "add_to_bookmark" );
m_actionRemoveLink = new KAction( i18n( "Remove Link" ), 0,
- this, SLOT( removeLink() ),
+ TQT_TQOBJECT(this), TQT_SLOT( removeLink() ),
actionCollection(), "remove_link" );
m_actionShowDocStruct = new KToggleAction( i18n( "Show Doc Structure" ), 0,
- this, SLOT( showDocStructure() ),
+ TQT_TQOBJECT(this), TQT_SLOT( showDocStructure() ),
actionCollection(), "show_docstruct" );
m_actionShowDocStruct->setCheckedState(i18n("Hide Doc Structure"));
m_actionShowDocStruct->setToolTip( i18n( "Open document structure sidebar." ) );
m_actionShowDocStruct->setWhatsThis( i18n( "Open document structure sidebar.<p>This sidebar helps you organize your document and quickly find pictures, tables etc." ) );
m_actionShowRuler = new KToggleAction( i18n( "Show Rulers" ), 0,
- this, SLOT( showRuler() ),
+ TQT_TQOBJECT(this), TQT_SLOT( showRuler() ),
actionCollection(), "show_ruler" );
m_actionShowRuler->setCheckedState(i18n("Hide Rulers"));
m_actionShowRuler->setToolTip( i18n( "Shows or hides rulers." ) );
@@ -1254,149 +1254,149 @@ void KWView::setupActions()
"the rulers from being displayed." ) );
m_actionViewShowGrid = new KToggleAction( i18n( "Show Grid" ), 0,
- this, SLOT( viewGrid() ),
+ TQT_TQOBJECT(this), TQT_SLOT( viewGrid() ),
actionCollection(), "view_grid" );
m_actionViewShowGrid->setCheckedState(i18n("Hide Grid"));
m_actionViewSnapToGrid= new KToggleAction( i18n( "Snap to Grid" ), 0,
- this, SLOT(viewSnapToGrid() ),
+ TQT_TQOBJECT(this), TQT_SLOT(viewSnapToGrid() ),
actionCollection(), "view_snaptogrid" );
m_actionConfigureCompletion = new KAction( i18n( "Configure C&ompletion..." ), 0,
- this, SLOT( configureCompletion() ),
+ TQT_TQOBJECT(this), TQT_SLOT( configureCompletion() ),
actionCollection(), "configure_completion" );
m_actionConfigureCompletion->setToolTip( i18n( "Change the words and options for autocompletion." ) );
m_actionConfigureCompletion->setWhatsThis( i18n( "Add words or change the options for autocompletion." ) );
// ------------------- Actions with a key binding and no GUI item
- new KAction( i18n( "Insert Non-Breaking Space" ), Qt::CTRL+Qt::Key_Space,
- this, SLOT( slotNonbreakingSpace() ), actionCollection(), "nonbreaking_space" );
- new KAction( i18n( "Insert Non-Breaking Hyphen" ), Qt::CTRL+Qt::SHIFT+Qt::Key_Minus,
- this, SLOT( slotNonbreakingHyphen() ), actionCollection(), "nonbreaking_hyphen" );
- new KAction( i18n( "Insert Soft Hyphen" ), Qt::CTRL+Qt::Key_Minus,
- this, SLOT( slotSoftHyphen() ), actionCollection(), "soft_hyphen" );
- new KAction( i18n( "Line Break" ), Qt::SHIFT+Qt::Key_Return,
- this, SLOT( slotLineBreak() ), actionCollection(), "line_break" );
+ new KAction( i18n( "Insert Non-Breaking Space" ), TQt::CTRL+TQt::Key_Space,
+ TQT_TQOBJECT(this), TQT_SLOT( slotNonbreakingSpace() ), actionCollection(), "nonbreaking_space" );
+ new KAction( i18n( "Insert Non-Breaking Hyphen" ), TQt::CTRL+TQt::SHIFT+TQt::Key_Minus,
+ TQT_TQOBJECT(this), TQT_SLOT( slotNonbreakingHyphen() ), actionCollection(), "nonbreaking_hyphen" );
+ new KAction( i18n( "Insert Soft Hyphen" ), TQt::CTRL+TQt::Key_Minus,
+ TQT_TQOBJECT(this), TQT_SLOT( slotSoftHyphen() ), actionCollection(), "soft_hyphen" );
+ new KAction( i18n( "Line Break" ), TQt::SHIFT+TQt::Key_Return,
+ TQT_TQOBJECT(this), TQT_SLOT( slotLineBreak() ), actionCollection(), "line_break" );
- new KAction( i18n( "Completion" ), KStdAccel::shortcut(KStdAccel::TextCompletion), this, SLOT( slotCompletion() ), actionCollection(), "completion" );
+ new KAction( i18n( "Completion" ), KStdAccel::shortcut(KStdAccel::TextCompletion), TQT_TQOBJECT(this), TQT_SLOT( slotCompletion() ), actionCollection(), "completion" );
- new KAction( i18n( "Increase Numbering Level" ), Qt::ALT+Qt::Key_Right,
- this, SLOT( slotIncreaseNumberingLevel() ), actionCollection(), "increase_numbering_level" );
- new KAction( i18n( "Decrease Numbering Level" ), Qt::ALT+Qt::Key_Left,
- this, SLOT( slotDecreaseNumberingLevel() ), actionCollection(), "decrease_numbering_level" );
+ new KAction( i18n( "Increase Numbering Level" ), TQt::ALT+TQt::Key_Right,
+ TQT_TQOBJECT(this), TQT_SLOT( slotIncreaseNumberingLevel() ), actionCollection(), "increase_numbering_level" );
+ new KAction( i18n( "Decrease Numbering Level" ), TQt::ALT+TQt::Key_Left,
+ TQT_TQOBJECT(this), TQT_SLOT( slotDecreaseNumberingLevel() ), actionCollection(), "decrease_numbering_level" );
// --------
m_actionEditCustomVars = new KAction( i18n( "Edit Variable..." ), 0,
- this, SLOT( editCustomVariable() ),
+ TQT_TQOBJECT(this), TQT_SLOT( editCustomVariable() ),
actionCollection(), "edit_customvars" );
m_actionApplyAutoFormat= new KAction( i18n( "Apply Autocorrection" ), 0,
- this, SLOT( applyAutoFormat() ),
+ TQT_TQOBJECT(this), TQT_SLOT( applyAutoFormat() ),
actionCollection(), "apply_autoformat" );
m_actionApplyAutoFormat->setToolTip( i18n( "Manually force KWord to scan the entire document and apply autocorrection." ) );
m_actionApplyAutoFormat->setWhatsThis( i18n( "Manually force KWord to scan the entire document and apply autocorrection." ) );
m_actionCreateStyleFromSelection = new KAction( i18n( "Create Style From Selection..." ), 0,
- this, SLOT( createStyleFromSelection()),
+ TQT_TQOBJECT(this), TQT_SLOT( createStyleFromSelection()),
actionCollection(), "create_style" );
m_actionCreateStyleFromSelection->setToolTip( i18n( "Create a new style based on the currently selected text." ) );
m_actionCreateStyleFromSelection->setWhatsThis( i18n( "Create a new style based on the currently selected text." ) ); // ## "on the current paragraph, taking the formatting from where the cursor is. Selecting text isn't even needed."
m_actionConfigureFootEndNote = new KAction( i18n( "&Footnote..." ), 0,
- this, SLOT( configureFootEndNote()),
+ TQT_TQOBJECT(this), TQT_SLOT( configureFootEndNote()),
actionCollection(), "format_footendnote" );
m_actionConfigureFootEndNote->setToolTip( i18n( "Change the look of footnotes." ) );
m_actionConfigureFootEndNote->setWhatsThis( i18n( "Change the look of footnotes." ) );
m_actionEditFootEndNote= new KAction( i18n("Edit Footnote"), 0,
- this, SLOT( editFootEndNote()),
+ TQT_TQOBJECT(this), TQT_SLOT( editFootEndNote()),
actionCollection(), "edit_footendnote" );
m_actionEditFootEndNote->setToolTip( i18n( "Change the content of the currently selected footnote." ) );
m_actionEditFootEndNote->setWhatsThis( i18n( "Change the content of the currently selected footnote." ) );
m_actionChangeFootNoteType = new KAction( i18n("Change Footnote/Endnote Parameter"), 0,
- this, SLOT( changeFootNoteType() ),
+ TQT_TQOBJECT(this), TQT_SLOT( changeFootNoteType() ),
actionCollection(), "change_footendtype");
m_actionSavePicture= new KAction( i18n("Save Picture As..."), 0,
- this, SLOT( savePicture() ),
+ TQT_TQOBJECT(this), TQT_SLOT( savePicture() ),
actionCollection(), "save_picture");
m_actionSavePicture->setToolTip( i18n( "Save the picture in a separate file." ) );
m_actionSavePicture->setWhatsThis( i18n( "Save the picture in the currently selected frame in a separate file, outside the KWord document." ) );
m_actionAllowBgSpellCheck = new KToggleAction( i18n( "Autospellcheck" ), 0,
- this, SLOT( autoSpellCheck() ),
+ TQT_TQOBJECT(this), TQT_SLOT( autoSpellCheck() ),
actionCollection(), "tool_auto_spellcheck" );
- m_actionGoToFootEndNote = new KAction( QString::null /*set dynamically*/, 0,
- this, SLOT( goToFootEndNote() ),
+ m_actionGoToFootEndNote = new KAction( TQString() /*set dynamically*/, 0,
+ TQT_TQOBJECT(this), TQT_SLOT( goToFootEndNote() ),
actionCollection(), "goto_footendnote" );
// Document Structure Area popup menu.
m_actionDocStructEdit = new KAction( i18n( "Edit Text" ), 0,
- this, SLOT( docStructEdit() ),
+ TQT_TQOBJECT(this), TQT_SLOT( docStructEdit() ),
actionCollection(), "docstruct_edit" );
m_actionDocStructSpeak = new KAction( i18n("Speak Text" ), 0,
- this, SLOT( docStructSpeak() ),
+ TQT_TQOBJECT(this), TQT_SLOT( docStructSpeak() ),
actionCollection(), "docstruct_speak" );
m_actionDocStructSelect = new KAction( i18n( "Show" ), 0,
- this, SLOT( docStructSelect() ),
+ TQT_TQOBJECT(this), TQT_SLOT( docStructSelect() ),
actionCollection(), "docstruct_select" );
m_actionDocStructDelete = new KAction( i18n( "Delete Frame" ), 0,
- this, SLOT( docStructDelete() ),
+ TQT_TQOBJECT(this), TQT_SLOT( docStructDelete() ),
actionCollection(), "docstruct_delete" );
m_actionDocStructProperties = new KAction( i18n( "Properties" ), 0,
- this, SLOT( docStructProperties() ),
+ TQT_TQOBJECT(this), TQT_SLOT( docStructProperties() ),
actionCollection(), "docstruct_properties" );
m_actionAddBookmark= new KAction( i18n( "&Bookmark..." ), 0,
- this, SLOT( addBookmark() ),
+ TQT_TQOBJECT(this), TQT_SLOT( addBookmark() ),
actionCollection(), "add_bookmark" );
m_actionSelectBookmark= new KAction( i18n( "Select &Bookmark..." ), 0,
- this, SLOT( selectBookmark() ),
+ TQT_TQOBJECT(this), TQT_SLOT( selectBookmark() ),
actionCollection(), "select_bookmark" );
m_actionImportStyle= new KAction( i18n( "Import Styles..." ), 0,
- this, SLOT( importStyle() ),
+ TQT_TQOBJECT(this), TQT_SLOT( importStyle() ),
actionCollection(), "import_style" );
m_actionCreateFrameStyle = new KAction( i18n( "&Create Framestyle From Frame..." ), 0,
- this, SLOT( createFrameStyle()),
+ TQT_TQOBJECT(this), TQT_SLOT( createFrameStyle()),
actionCollection(), "create_framestyle" );
m_actionCreateFrameStyle->setToolTip( i18n( "Create a new style based on the currently selected frame." ) );
m_actionCreateFrameStyle->setWhatsThis( i18n( "Create a new framestyle based on the currently selected frame." ) );
#if 0 // re-enable after fixing
m_actionInsertDirectCursor = new KToggleAction( i18n( "Type Anywhere Cursor" ), 0,
- this, SLOT( insertDirectCursor() ),
+ TQT_TQOBJECT(this), TQT_SLOT( insertDirectCursor() ),
actionCollection(), "direct_cursor" );
#endif
m_actionConvertToTextBox = new KAction( i18n( "Convert to Text Box" ), 0,
- this, SLOT( convertToTextBox() ),
+ TQT_TQOBJECT(this), TQT_SLOT( convertToTextBox() ),
actionCollection(), "convert_to_text_box" );
m_actionSpellIgnoreAll = new KAction( i18n( "Ignore All" ), 0,
- this, SLOT( slotAddIgnoreAllWord() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotAddIgnoreAllWord() ),
actionCollection(), "ignore_all" );
m_actionAddWordToPersonalDictionary=new KAction( i18n( "Add Word to Dictionary" ),0,
- this, SLOT( addWordToDictionary() ),
+ TQT_TQOBJECT(this), TQT_SLOT( addWordToDictionary() ),
actionCollection(), "add_word_to_dictionary" );
m_actionEmbeddedStoreInternal=new KToggleAction( i18n( "Store Document Internally" ),0,
- this, SLOT( embeddedStoreInternal() ),
+ TQT_TQOBJECT(this), TQT_SLOT( embeddedStoreInternal() ),
actionCollection(), "embedded_store_internal" );
m_actionGoToDocumentStructure=new KAction( i18n( "Go to Document Structure" ), KShortcut("Alt+1"),
- this, SLOT( goToDocumentStructure() ),
+ TQT_TQOBJECT(this), TQT_SLOT( goToDocumentStructure() ),
actionCollection(), "goto_document_structure" );
m_actionGoToDocument=new KAction( i18n( "Go to Document" ), KShortcut("Alt+2"),
- this, SLOT( goToDocument() ),
+ TQT_TQOBJECT(this), TQT_SLOT( goToDocument() ),
actionCollection(), "goto_document" );
// For RMB inside a cell, see KWFrameView::showPopup
@@ -1420,79 +1420,79 @@ void KWView::updateGridButton()
m_actionViewSnapToGrid->setChecked ( m_doc->snapToGrid() );
}
-void KWView::loadexpressionActions( KActionMenu * parentMenu)
+void KWView::loadexpressionActions( KActionMenu * tqparentMenu)
{
KActionPtrList lst = actionCollection()->actions("expression-action");
- QValueList<KAction *> actions = lst;
- QValueList<KAction *>::ConstIterator it = lst.begin();
- QValueList<KAction *>::ConstIterator end = lst.end();
+ TQValueList<KAction *> actions = lst;
+ TQValueList<KAction *>::ConstIterator it = lst.begin();
+ TQValueList<KAction *>::ConstIterator end = lst.end();
// Delete all actions but keep their shortcuts in mind
- QMap<QString, KShortcut> personalShortCuts;
+ TQMap<TQString, KShortcut> personalShortCuts;
for (; it != end; ++it )
{
personalShortCuts.insert( (*it)->text(), (*it)->shortcut() );
delete *it;
}
- parentMenu->popupMenu()->clear();
- QStringList path = m_doc->personalExpressionPath();
- QStringList files;
- for ( QStringList::Iterator it = path.begin(); it != path.end(); ++it )
+ tqparentMenu->popupMenu()->clear();
+ TQStringList path = m_doc->personalExpressionPath();
+ TQStringList files;
+ for ( TQStringList::Iterator it = path.begin(); it != path.end(); ++it )
{
- QDir dir( *it );
+ TQDir dir( *it );
if ( dir.exists() )
{
- QStringList tmp = dir.entryList("*.xml");
- for ( QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2 )
- files.append( QString( (*it) + (*it2) ));
+ TQStringList tmp = dir.entryList("*.xml");
+ for ( TQStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2 )
+ files.append( TQString( (*it) + (*it2) ));
}
}
- //QStringList files = KWFactory::instance()->dirs()->findAllResources( "expression", "*.xml", TRUE );
+ //TQStringList files = KWFactory::instance()->dirs()->findAllResources( "expression", "*.xml", TRUE );
int i = 0;
int nbFile = 0;
- for( QStringList::Iterator it = files.begin(); it != files.end(); ++it,nbFile++ )
- createExpressionActions( parentMenu,*it, i,(nbFile<(int)files.count()-1), personalShortCuts );
+ for( TQStringList::Iterator it = files.begin(); it != files.end(); ++it,nbFile++ )
+ createExpressionActions( tqparentMenu,*it, i,(nbFile<(int)files.count()-1), personalShortCuts );
}
-void KWView::createExpressionActions( KActionMenu * parentMenu,const QString& filename,int &i, bool insertSepar, const QMap<QString, KShortcut>& personalShortCut )
+void KWView::createExpressionActions( KActionMenu * tqparentMenu,const TQString& filename,int &i, bool insertSepar, const TQMap<TQString, KShortcut>& personalShortCut )
{
- QFile file( filename );
+ TQFile file( filename );
if ( !file.exists() || !file.open( IO_ReadOnly ) )
return;
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &file );
file.close();
bool expressionExist =false;
- QDomNode n = doc.documentElement().firstChild();
+ TQDomNode n = doc.documentElement().firstChild();
for( ; !n.isNull(); n = n.nextSibling() )
{
if ( n.isElement() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "Type" )
{
expressionExist =true;
- QString group = i18n( e.namedItem( "TypeName" ).toElement().text().utf8() );
+ TQString group = i18n( e.namedItem( "TypeName" ).toElement().text().utf8() );
KActionMenu * subMenu = new KActionMenu( group, actionCollection() );
- parentMenu->insert( subMenu );
+ tqparentMenu->insert( subMenu );
- QDomNode n2 = e.firstChild();
+ TQDomNode n2 = e.firstChild();
for( ; !n2.isNull(); n2 = n2.nextSibling() )
{
if ( n2.isElement() )
{
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if ( e2.tagName() == "Expression" )
{
- QString text = i18n( e2.namedItem( "Text" ).toElement().text().utf8() );
- KAction * act = new KAction( text, 0, this, SLOT( insertExpression() ),
+ TQString text = i18n( e2.namedItem( "Text" ).toElement().text().utf8() );
+ KAction * act = new KAction( text, 0, TQT_TQOBJECT(this), TQT_SLOT( insertExpression() ),
actionCollection(),
- QString("expression-action_%1").arg(i).latin1() );
- if ( personalShortCut.contains(text) )
+ TQString("expression-action_%1").tqarg(i).latin1() );
+ if ( personalShortCut.tqcontains(text) )
act->setShortcut( personalShortCut[text] );
i++;
act->setGroup("expression-action");
@@ -1504,7 +1504,7 @@ void KWView::createExpressionActions( KActionMenu * parentMenu,const QString& fi
}
}
if(expressionExist && insertSepar)
- parentMenu->popupMenu()->insertSeparator();
+ tqparentMenu->popupMenu()->insertSeparator();
}
void KWView::insertExpression()
@@ -1512,24 +1512,24 @@ void KWView::insertExpression()
KWTextFrameSetEdit * edit = currentTextEdit();
if ( edit )
{
- KAction * act = (KAction *)(sender());
+ KAction * act = (KAction *)(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())));
edit->insertExpression(act->text());
}
}
-void KWView::addVariableActions( int type, const QStringList & texts,
- KActionMenu * parentMenu, const QString & menuText )
+void KWView::addVariableActions( int type, const TQStringList & texts,
+ KActionMenu * tqparentMenu, const TQString & menuText )
{
- // Single items go directly into parentMenu.
+ // Single items go directly into tqparentMenu.
// For multiple items we create a submenu.
if ( texts.count() > 1 && !menuText.isEmpty() )
{
KActionMenu * subMenu = new KActionMenu( menuText, actionCollection() );
- parentMenu->insert( subMenu );
- parentMenu = subMenu;
+ tqparentMenu->insert( subMenu );
+ tqparentMenu = subMenu;
}
- QStringList::ConstIterator it = texts.begin();
+ TQStringList::ConstIterator it = texts.begin();
for ( int i = 0; it != texts.end() ; ++it, ++i )
{
if ( !(*it).isEmpty() ) // in case of removed subtypes or placeholders
@@ -1537,14 +1537,14 @@ void KWView::addVariableActions( int type, const QStringList & texts,
VariableDef v;
v.type = type;
v.subtype = i;
- QCString actionName;
+ TQCString actionName;
actionName.sprintf( "var-action-%d-%d", type, i );
- KAction * act = new KAction( (*it), 0, this, SLOT( insertVariable() ),
+ KAction * act = new KAction( (*it), 0, TQT_TQOBJECT(this), TQT_SLOT( insertVariable() ),
actionCollection(), actionName );
// Mainly for KEditToolbar
- act->setToolTip( i18n( "Insert variable \"%1\" into the text" ).arg( *it ) );
+ act->setToolTip( i18n( "Insert variable \"%1\" into the text" ).tqarg( *it ) );
m_variableDefMap.insert( act, v );
- parentMenu->insert( act );
+ tqparentMenu->insert( act );
}
}
}
@@ -1552,10 +1552,10 @@ void KWView::addVariableActions( int type, const QStringList & texts,
void KWView::refreshCustomMenu()
{
KActionPtrList lst2 = actionCollection()->actions("custom-variable-action");
- QValueList<KAction *> actions = lst2;
- QValueList<KAction *>::ConstIterator it2 = lst2.begin();
- QValueList<KAction *>::ConstIterator end = lst2.end();
- QMap<QString, KShortcut> shortCuts;
+ TQValueList<KAction *> actions = lst2;
+ TQValueList<KAction *>::ConstIterator it2 = lst2.begin();
+ TQValueList<KAction *>::ConstIterator end = lst2.end();
+ TQMap<TQString, KShortcut> shortCuts;
for (; it2 != end; ++it2 )
{
@@ -1569,10 +1569,10 @@ void KWView::refreshCustomMenu()
actionInsertVariable->insert(m_actionInsertCustom, 0);
m_actionInsertCustom->popupMenu()->clear();
- QPtrListIterator<KoVariable> it( m_doc->variableCollection()->getVariables() );
+ TQPtrListIterator<KoVariable> it( m_doc->variableCollection()->getVariables() );
KAction * act=0;
- QStringList lst;
- QString varName;
+ TQStringList lst;
+ TQString varName;
int i = 0;
for ( ; it.current() ; ++it )
{
@@ -1580,11 +1580,11 @@ void KWView::refreshCustomMenu()
if ( var->type() == VT_CUSTOM )
{
varName=( (KoCustomVariable*) var )->name();
- if ( !lst.contains( varName) )
+ if ( !lst.tqcontains( varName) )
{
lst.append( varName );
- QCString name = QString("custom-action_%1").arg(i).latin1();
- act = new KAction( varName, shortCuts[varName], this, SLOT( insertCustomVariable() ),actionCollection(), name );
+ TQCString name = TQString("custom-action_%1").tqarg(i).latin1();
+ act = new KAction( varName, shortCuts[varName], TQT_TQOBJECT(this), TQT_SLOT( insertCustomVariable() ),actionCollection(), name );
act->setGroup( "custom-variable-action" );
m_actionInsertCustom->insert( act );
i++;
@@ -1595,7 +1595,7 @@ void KWView::refreshCustomMenu()
if(state)
m_actionInsertCustom->popupMenu()->insertSeparator();
- act = new KAction( i18n("New..."), 0, this, SLOT( insertNewCustomVariable() ), actionCollection(),QString("custom-action_%1").arg(i).latin1());
+ act = new KAction( i18n("New..."), 0, TQT_TQOBJECT(this), TQT_SLOT( insertNewCustomVariable() ), actionCollection(),TQString("custom-action_%1").tqarg(i).latin1());
act->setGroup( "custom-variable-action" );
@@ -1611,7 +1611,7 @@ void KWView::insertCustomVariable()
KWTextFrameSetEdit * edit = currentTextEdit();
if ( edit )
{
- KAction * act = (KAction *)(sender());
+ KAction * act = (KAction *)(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())));
edit->insertCustomVariable(act->text());
}
}
@@ -1645,23 +1645,23 @@ void KWView::updatePageInfo()
m_currentPage = m_doc->pageManager()->page(view->frame());
}
/*kdDebug() << (void*)this << " KWView::updatePageInfo "
- << " edit: " << edit << " " << ( edit?edit->frameSet()->name():QString::null)
+ << " edit: " << edit << " " << ( edit?edit->frameSet()->name():TQString())
<< " currentFrame: " << (edit?edit->currentFrame():0L)
<< " m_currentPage=" << currentPage() << " m_sbPageLabel=" << m_sbPageLabel
<< endl;*/
- QString oldText = m_sbPageLabel->text();
- QString newText;
+ TQString oldText = m_sbPageLabel->text();
+ TQString newText;
if ( viewMode()->hasPages() )
- newText = ' ' + i18n( "Page %1 of %2" ).arg(m_currentPage->pageNumber())
- .arg(m_doc->pageCount()) + ' ';
+ newText = ' ' + i18n( "Page %1 of %2" ).tqarg(m_currentPage->pageNumber())
+ .tqarg(m_doc->pageCount()) + ' ';
if ( newText != oldText )
{
m_sbPageLabel->setText( newText );
- // Need to repaint immediately. Otherwise when deleting 100 pages
+ // Need to tqrepaint immediately. Otherwise when deleting 100 pages
// at once, there's no feedback.
- m_sbPageLabel->repaint();
+ m_sbPageLabel->tqrepaint();
}
}
slotUpdateRuler();
@@ -1685,25 +1685,25 @@ void KWView::updateFrameStatusBarItem()
if ( nbFrame == 1 )
{
KoUnit::Unit unit = m_doc->unit();
- QString unitName = m_doc->unitName();
+ TQString unitName = m_doc->unitName();
KWFrame * frame = frameViewManager()->selectedFrames()[0]->frame();
m_sbFramesLabel->setText( ' ' + i18n( "Statusbar info", "%1: %2, %3 - %4, %5 (width: %6, height: %7)" )
- .arg( frame->frameSet()->name() )
- .arg( KoUnit::toUserStringValue( frame->left(), unit ) )
- .arg( KoUnit::toUserStringValue( frame->top() - m_doc->pageManager()->topOfPage(
+ .tqarg( frame->frameSet()->name() )
+ .tqarg( KoUnit::toUserStringValue( frame->left(), unit ) )
+ .tqarg( KoUnit::toUserStringValue( frame->top() - m_doc->pageManager()->topOfPage(
m_doc->pageManager()->pageNumber(frame->rect()) ), unit) )
- .arg( KoUnit::toUserStringValue( frame->right(), unit ) )
- .arg( KoUnit::toUserStringValue( frame->bottom(), unit ) )
- .arg( KoUnit::toUserStringValue( frame->width(), unit ) )
- .arg( KoUnit::toUserStringValue( frame->height(), unit ) ) );
+ .tqarg( KoUnit::toUserStringValue( frame->right(), unit ) )
+ .tqarg( KoUnit::toUserStringValue( frame->bottom(), unit ) )
+ .tqarg( KoUnit::toUserStringValue( frame->width(), unit ) )
+ .tqarg( KoUnit::toUserStringValue( frame->height(), unit ) ) );
} else
- m_sbFramesLabel->setText( ' ' + i18n( "%1 frames selected" ).arg( nbFrame ) );
+ m_sbFramesLabel->setText( ' ' + i18n( "%1 frames selected" ).tqarg( nbFrame ) );
}
else if ( sb && m_sbFramesLabel )
- m_sbFramesLabel->setText( QString::null );
+ m_sbFramesLabel->setText( TQString() );
}
-void KWView::setTemporaryStatusBarText(const QString &text)
+void KWView::setTemporaryStatusBarText(const TQString &text)
{
if ( statusBar() && m_sbFramesLabel )
m_sbFramesLabel->setText( text );
@@ -1718,12 +1718,12 @@ void KWView::clipboardDataChanged()
}
KWFrameSetEdit * edit = m_gui->canvasWidget()->currentFrameSetEdit();
// Is there plain text in the clipboard ?
- if ( edit && !QApplication::clipboard()->text().isEmpty() )
+ if ( edit && !TQApplication::tqclipboard()->text().isEmpty() )
{
m_actionEditPaste->setEnabled(true);
return;
}
- QMimeSource *data = QApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::tqclipboard()->data();
const int provides = checkClipboard( data );
if ( provides & ( ProvidesImage | ProvidesOasis | ProvidesFormula ) )
m_actionEditPaste->setEnabled( true );
@@ -1734,21 +1734,21 @@ void KWView::clipboardDataChanged()
}
}
-int KWView::checkClipboard( QMimeSource *data )
+int KWView::checkClipboard( TQMimeSource *data )
{
int provides = 0;
- QValueList<QCString> formats;
+ TQValueList<TQCString> formats;
const char* fmt;
for (int i=0; (fmt = data->format(i)); i++)
- formats.append( QCString( fmt ) );
+ formats.append( TQCString( fmt ) );
- if ( QImageDrag::canDecode( data ) )
+ if ( TQImageDrag::canDecode( data ) )
provides |= ProvidesImage;
- if ( formats.findIndex( KFormula::MimeSource::selectionMimeType() ) != -1 )
+ if ( formats.tqfindIndex( KFormula::MimeSource::selectionMimeType() ) != -1 )
provides |= ProvidesFormula;
- if ( formats.findIndex( "text/plain" ) != -1 )
+ if ( formats.tqfindIndex( "text/plain" ) != -1 )
provides |= ProvidesPlainText;
- QCString returnedTypeMime = KoTextObject::providesOasis( data );
+ TQCString returnedTypeMime = KoTextObject::providesOasis( data );
if ( !returnedTypeMime.isEmpty() )
provides |= ProvidesOasis;
//kdDebug(32001) << "KWView::checkClipboard provides=" << provides << endl;
@@ -1789,7 +1789,7 @@ void KWView::print( KPrinter &prt )
m_doc->recalcVariables( VT_ALL );
}
-// Don't repaint behind the print dialog until we're done zooming/unzooming the doc
+// Don't tqrepaint behind the print dialog until we're done zooming/unzooming the doc
m_gui->canvasWidget()->setUpdatesEnabled(false);
m_gui->canvasWidget()->viewport()->setCursor( waitCursor );
@@ -1799,7 +1799,7 @@ void KWView::print( KPrinter &prt )
// No koffice app supports zooming in paintContent currently.
// Disable in ALL cases now
bool doZoom = false;
- /*QPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
+ /*TQPtrListIterator<KWFrameSet> fit = m_doc->framesetsIterator();
for ( ; fit.current() && doZoom ; ++fit )
if ( fit.current()->type() == FT_PART )
doZoom = false;*/
@@ -1807,14 +1807,14 @@ void KWView::print( KPrinter &prt )
int oldZoom = m_doc->zoom();
// We don't get valid metrics from the printer - and we want a better resolution
// anyway (it's the PS driver that takes care of the printer resolution).
- QPaintDeviceMetrics metrics( &prt );
+ TQPaintDeviceMetrics metrics( &prt );
//int dpiX = metrics.logicalDpiX();
//int dpiY = metrics.logicalDpiY();
int dpiX = doZoom ? 300 : KoGlobal::dpiX();
int dpiY = doZoom ? 300 : KoGlobal::dpiY();
///////// Changing the dpiX/dpiY is very wrong nowadays. This has no effect on the font size
- ///////// that we give Qt, anymore, so it leads to minuscule fonts in the printout => doZoom==false.
+ ///////// that we give TQt, anymore, so it leads to minuscule fonts in the printout => doZoom==false.
m_doc->setZoomAndResolution( 100, dpiX, dpiY );
m_doc->newZoomAndResolution( false, true /* for printing*/ );
//kdDebug() << "KWView::print metrics: " << metrics.logicalDpiX() << "," << metrics.logicalDpiY() << endl;
@@ -1822,7 +1822,7 @@ void KWView::print( KPrinter &prt )
bool serialLetter = FALSE;
- QPtrList<KoVariable> vars = m_doc->variableCollection()->getVariables();
+ TQPtrList<KoVariable> vars = m_doc->variableCollection()->getVariables();
KoVariable *v = 0;
for ( v = vars.first(); v; v = vars.next() ) {
if ( v->type() == VT_MAILMERGE ) {
@@ -1856,7 +1856,7 @@ void KWView::print( KPrinter &prt )
m_doc->setPageLayout( pgLayout, cl, hf, false );
}
- QPainter painter;
+ TQPainter painter;
painter.begin( &prt );
kdDebug(32001) << "KWView::print scaling by " << (double)metrics.logicalDpiX() / (double)dpiX
@@ -1866,8 +1866,8 @@ void KWView::print( KPrinter &prt )
bool canceled = false;
// Breaks wysiwyg, obviously - trying without
-//#define KW_PASS_PAINTER_TO_QRT
-#ifdef KW_PASS_PAINTER_TO_QRT
+//#define KW_PASS_PAINTER_TO_TQRT
+#ifdef KW_PASS_PAINTER_TO_TQRT
int paragraphs = 0;
fit.toFirst();
for ( ; fit.current() ; ++fit )
@@ -1876,14 +1876,14 @@ void KWView::print( KPrinter &prt )
kdDebug() << "KWView::print total paragraphs: " << paragraphs << endl;
// This can take a lot of time (reformatting everything), so a progress dialog is needed
- QProgressDialog progress( i18n( "Printing..." ), i18n( "Cancel" ), paragraphs, this );
+ TQProgressDialog progress( i18n( "Printing..." ), i18n( "Cancel" ), paragraphs, this );
progress.setProgress( 0 );
int processedParags = 0;
fit.toFirst();
for ( ; fit.current() ; ++fit )
if ( fit.current()->isVisible() )
{
- qApp->processEvents();
+ tqApp->processEvents();
if ( progress.wasCancelled() ) {
canceled = true;
break;
@@ -1914,7 +1914,7 @@ void KWView::print( KPrinter &prt )
if ( pgLayout.format == PG_SCREEN )
m_doc->setPageLayout( oldPGLayout, cl, hf, false );
-#ifdef KW_PASS_PAINTER_TO_QRT
+#ifdef KW_PASS_PAINTER_TO_TQRT
fit.toFirst();
for ( ; fit.current() ; ++fit )
if ( fit.current()->isVisible() )
@@ -1927,7 +1927,7 @@ void KWView::print( KPrinter &prt )
m_gui->canvasWidget()->setUpdatesEnabled(true);
m_gui->canvasWidget()->viewport()->setCursor( ibeamCursor );
- m_doc->repaintAllViews();
+ m_doc->tqrepaintAllViews();
if ( displayFieldCode )
{
@@ -1938,7 +1938,7 @@ void KWView::print( KPrinter &prt )
m_doc->variableCollection()->recalcVariables(VT_MAILMERGE);
painter.end(); // this is what triggers the printing
- m_doc->variableCollection()->variableSetting()->setLastPrintingDate(QDateTime::currentDateTime());
+ m_doc->variableCollection()->variableSetting()->setLastPrintingDate(TQDateTime::tqcurrentDateTime());
m_doc->recalcVariables( VT_DATE );
}
@@ -1954,9 +1954,9 @@ void KWView::showFormat( const KoTextFormat &currentFormat )
m_actionFormatItalic->setChecked( currentFormat.font().italic() );
m_actionFormatUnderline->setChecked( currentFormat.underline());
m_actionFormatStrikeOut->setChecked( currentFormat.strikeOut());
- QColor col=currentFormat.textBackgroundColor();
+ TQColor col=currentFormat.textBackgroundColor();
//m_actionBackgroundColor->setEnabled(true);
- m_actionBackgroundColor->setCurrentColor( col.isValid() ? col : QApplication::palette().color( QPalette::Active, QColorGroup::Base ));
+ m_actionBackgroundColor->setCurrentColor( col.isValid() ? col : TQApplication::palette().color( TQPalette::Active, TQColorGroup::Base ));
if ( m_gui /* if not in constructor */ && frameViewManager()->selectedFrames().count() > 0)
m_actionBackgroundColor->setText(i18n("Frame Background Color..."));
@@ -2002,19 +2002,21 @@ void KWView::showRulerIndent( double leftMargin, double firstLine, double rightM
void KWView::showAlign( int align ) {
switch ( align ) {
- case Qt::AlignAuto: // In left-to-right mode it's align left. TODO: alignright if text->isRightToLeft()
+#ifndef USE_QT4
+ case TQt::AlignAuto: // In left-to-right mode it's align left. TODO: alignright if text->isRightToLeft()
kdWarning() << k_funcinfo << "shouldn't be called with AlignAuto" << endl;
// fallthrough
- case Qt::AlignLeft:
+#endif // USE_QT4
+ case TQt::AlignLeft:
m_actionFormatAlignLeft->setChecked( TRUE );
break;
- case Qt::AlignHCenter:
+ case TQt::AlignHCenter:
m_actionFormatAlignCenter->setChecked( TRUE );
break;
- case Qt::AlignRight:
+ case TQt::AlignRight:
m_actionFormatAlignRight->setChecked( TRUE );
break;
- case Qt::AlignJustify:
+ case TQt::AlignJustify:
m_actionFormatAlignBlock->setChecked( TRUE );
break;
}
@@ -2041,8 +2043,8 @@ void KWView::showSpacing( int spacing ) {
void KWView::showCounter( KoParagCounter &c )
{
- QString styleStr("counterstyle_");
- styleStr += QString::number( c.style() );
+ TQString styleStr("counterstyle_");
+ styleStr += TQString::number( c.style() );
//kdDebug() << "KWView::showCounter styleStr=" << styleStr << endl;
KToggleAction* act = static_cast<KToggleAction *>( actionCollection()->action( styleStr.latin1() ) );
Q_ASSERT( act );
@@ -2083,11 +2085,11 @@ void KWView::updateBorderButtons( const KoBorder& left, const KoBorder& right,
void KWView::updateReadWrite( bool readwrite )
{
// First disable or enable everything
- QValueList<KAction*> actions = actionCollection()->actions();
+ TQValueList<KAction*> actions = actionCollection()->actions();
// Also grab actions from the document
actions += m_doc->actionCollection()->actions();
- QValueList<KAction*>::ConstIterator aIt = actions.begin();
- QValueList<KAction*>::ConstIterator aEnd = actions.end();
+ TQValueList<KAction*>::ConstIterator aIt = actions.begin();
+ TQValueList<KAction*>::ConstIterator aEnd = actions.end();
for (; aIt != aEnd; ++aIt )
(*aIt)->setEnabled( readwrite );
@@ -2120,7 +2122,7 @@ void KWView::updateReadWrite( bool readwrite )
act->setEnabled( true );
// In fact the new view could be readwrite, so this is too dangerous
- // (e.g. during spellchecking or during search-n-replace)
+ // (e.g. during spellchecking or during search-n-tqreplace)
//act = actionCollection()->action("view_newview");
//if (act)
// act->setEnabled( true );
@@ -2172,7 +2174,7 @@ void KWView::showMouseMode( int mouseMode )
m_actionConvertTableToText->setEnabled( false );
}
-void KWView::showStyle( const QString & styleName )
+void KWView::showStyle( const TQString & styleName )
{
KoParagStyle* style = m_doc->styleCollection()->findStyle( styleName );
if ( style ) {
@@ -2180,7 +2182,7 @@ void KWView::showStyle( const QString & styleName )
// Select style in combo
m_actionFormatStyle->setCurrentItem( pos );
// Check the appropriate action among the m_actionFormatStyleMenu actions
- KToggleAction* act = dynamic_cast<KToggleAction *>(actionCollection()->action(style->name().utf8()));
+ KToggleAction* act = dynamic_cast<KToggleAction *>(actionCollection()->action(style->name().utf8().data()));
if ( act )
act->setChecked( true );
}
@@ -2193,10 +2195,10 @@ static const char* TABLESTYLE_ACTION_PREFIX = "tablestyle_";
void KWView::updateStyleList()
{
- QString currentStyle = m_actionFormatStyle->currentText();
+ TQString currentStyle = m_actionFormatStyle->currentText();
// Generate list of styles
- const QStringList lst = m_doc->styleCollection()->displayNameList();
- const int pos = lst.findIndex( currentStyle );
+ const TQStringList lst = m_doc->styleCollection()->displayNameList();
+ const int pos = lst.tqfindIndex( currentStyle );
// Fill the combo - using a KSelectAction
m_actionFormatStyle->setItems( lst );
if ( pos > -1 )
@@ -2204,31 +2206,31 @@ void KWView::updateStyleList()
// Fill the menu - using a KActionMenu, so that it's possible to bind keys
// to individual actions
- QStringList lstWithAccels;
+ TQStringList lstWithAccels;
// Generate unique accelerators for the menu items
KAccelGen::generate( lst, lstWithAccels );
- QMap<QString, KShortcut> shortCuts;
+ TQMap<TQString, KShortcut> shortCuts;
KActionPtrList lst2 = actionCollection()->actions("styleList");
- QValueList<KAction *> actions = lst2;
- QValueList<KAction *>::ConstIterator it = lst2.begin();
- const QValueList<KAction *>::ConstIterator end = lst2.end();
+ TQValueList<KAction *> actions = lst2;
+ TQValueList<KAction *>::ConstIterator it = lst2.begin();
+ const TQValueList<KAction *>::ConstIterator end = lst2.end();
for (; it != end; ++it )
{
- shortCuts.insert( QString::fromUtf8( (*it)->name() ), (*it)->shortcut() );
+ shortCuts.insert( TQString::fromUtf8( (*it)->name() ), (*it)->shortcut() );
m_actionFormatStyleMenu->remove( *it );
delete *it;
}
uint i = 0;
- for ( QStringList::Iterator it = lstWithAccels.begin(); it != lstWithAccels.end(); ++it, ++i )
+ for ( TQStringList::Iterator it = lstWithAccels.begin(); it != lstWithAccels.end(); ++it, ++i )
{
// The list lst was created (unsorted) from the style collection, so we have still the same order.
KoParagStyle *style = m_doc->styleCollection()->styleAt( i );
if ( style )
{
- QString name = PARAGSTYLE_ACTION_PREFIX + style->name();
+ TQString name = PARAGSTYLE_ACTION_PREFIX + style->name();
KToggleAction* act = new KToggleAction( (*it),
- shortCuts[name], this, SLOT( slotStyleSelected() ),
+ shortCuts[name], TQT_TQOBJECT(this), TQT_SLOT( slotStyleSelected() ),
actionCollection(), name.utf8() );
act->setGroup( "styleList" );
act->setExclusiveGroup( "styleListAction" );
@@ -2243,8 +2245,8 @@ void KWView::updateStyleList()
// Called when selecting a style in the Format / Style menu
void KWView::slotStyleSelected()
{
- QString actionName = QString::fromUtf8(sender()->name());
- const QString prefix = PARAGSTYLE_ACTION_PREFIX;
+ TQString actionName = TQString::fromUtf8(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name());
+ const TQString prefix = PARAGSTYLE_ACTION_PREFIX;
if ( actionName.startsWith( prefix ) ) {
actionName = actionName.mid( prefix.length() );
kdDebug(32001) << "KWView::slotStyleSelected " << actionName << endl;
@@ -2256,10 +2258,10 @@ void KWView::updateFrameStyleList()
{
// Remember selected style (by name; better would be by pointer, but what if it got deleted?)
// This is all in case the index of the selected style has changed.
- const QString currentStyle = m_actionFrameStyle->currentText();
+ const TQString currentStyle = m_actionFrameStyle->currentText();
// Generate list of styles
- const QStringList lst = m_doc->frameStyleCollection()->displayNameList();
- const int pos = lst.findIndex( currentStyle );
+ const TQStringList lst = m_doc->frameStyleCollection()->displayNameList();
+ const int pos = lst.tqfindIndex( currentStyle );
// Fill the combo
m_actionFrameStyle->setItems( lst );
if ( pos > -1 )
@@ -2267,34 +2269,34 @@ void KWView::updateFrameStyleList()
// Fill the menu - using a KActionMenu, so that it's possible to bind keys
// to individual actions
- QStringList lstWithAccels;
+ TQStringList lstWithAccels;
// Generate unique accelerators for the menu items
KAccelGen::generate( lst, lstWithAccels );
- QMap<QString, KShortcut> shortCuts; // style (internal) name -> shortcut
+ TQMap<TQString, KShortcut> shortCuts; // style (internal) name -> shortcut
KActionPtrList lst2 = actionCollection()->actions("frameStyleList");
- QValueList<KAction *> actions = lst2;
- QValueList<KAction *>::ConstIterator it = lst2.begin();
- QValueList<KAction *>::ConstIterator end = lst2.end();
+ TQValueList<KAction *> actions = lst2;
+ TQValueList<KAction *>::ConstIterator it = lst2.begin();
+ TQValueList<KAction *>::ConstIterator end = lst2.end();
for (; it != end; ++it )
{
- shortCuts.insert( QString::fromUtf8( (*it)->name() ), (*it)->shortcut() );
+ shortCuts.insert( TQString::fromUtf8( (*it)->name() ), (*it)->shortcut() );
m_actionFrameStyleMenu->remove( *it );
delete *it;
}
uint i = 0;
- for ( QStringList::Iterator it = lstWithAccels.begin(); it != lstWithAccels.end(); ++it, ++i )
+ for ( TQStringList::Iterator it = lstWithAccels.begin(); it != lstWithAccels.end(); ++it, ++i )
{
// The list lst was created (unsorted) from the frame style collection, so we have still the same order.
KWFrameStyle *style = m_doc->frameStyleCollection()->frameStyleAt( i );
if ( style )
{
- QString name = FRAMESTYLE_ACTION_PREFIX + style->name();
+ TQString name = FRAMESTYLE_ACTION_PREFIX + style->name();
KToggleAction* act = new KToggleAction( (*it),
shortCuts[name], // KDE4: use value()
- this, SLOT( slotFrameStyleSelected() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotFrameStyleSelected() ),
actionCollection(), name.utf8() /*KDE4: remove conversion*/ );
act->setGroup( "frameStyleList" );
act->setExclusiveGroup( "frameStyleList" );
@@ -2309,10 +2311,10 @@ void KWView::updateFrameStyleList()
void KWView::updateTableStyleList()
{
- const QString currentStyle = m_actionTableStyle->currentText();
+ const TQString currentStyle = m_actionTableStyle->currentText();
// Generate list of styles
- const QStringList lst = m_doc->tableStyleCollection()->displayNameList();
- const int pos = lst.findIndex( currentStyle );
+ const TQStringList lst = m_doc->tableStyleCollection()->displayNameList();
+ const int pos = lst.tqfindIndex( currentStyle );
// Fill the combo
m_actionTableStyle->setItems( lst );
if ( pos > -1 )
@@ -2320,31 +2322,31 @@ void KWView::updateTableStyleList()
// Fill the menu - using a KActionMenu, so that it's possible to bind keys
// to individual actions
- QStringList lstWithAccels;
+ TQStringList lstWithAccels;
// Generate unique accelerators for the menu items
KAccelGen::generate( lst, lstWithAccels );
- QMap<QString, KShortcut> shortCuts;
+ TQMap<TQString, KShortcut> shortCuts;
- QValueList<KAction *> actions = actionCollection()->actions("tableStyleList");
- QValueList<KAction *>::ConstIterator it = actions.begin();
- const QValueList<KAction *>::ConstIterator end = actions.end();
+ TQValueList<KAction *> actions = actionCollection()->actions("tableStyleList");
+ TQValueList<KAction *>::ConstIterator it = actions.begin();
+ const TQValueList<KAction *>::ConstIterator end = actions.end();
for (; it != end; ++it )
{
- shortCuts.insert( QString::fromUtf8( (*it)->name() ), (*it)->shortcut() );
+ shortCuts.insert( TQString::fromUtf8( (*it)->name() ), (*it)->shortcut() );
m_actionTableStyleMenu->remove( *it );
delete *it;
}
uint i = 0;
- for ( QStringList::Iterator it = lstWithAccels.begin(); it != lstWithAccels.end(); ++it, ++i )
+ for ( TQStringList::Iterator it = lstWithAccels.begin(); it != lstWithAccels.end(); ++it, ++i )
{
// The list lst was created (unsorted) from the table style collection, so we have still the same order.
KWTableStyle *style = m_doc->tableStyleCollection()->tableStyleAt( i );
if ( style )
{
- QString name = TABLESTYLE_ACTION_PREFIX + style->name();
+ TQString name = TABLESTYLE_ACTION_PREFIX + style->name();
KToggleAction* act = new KToggleAction( (*it),
- shortCuts[name], this, SLOT( slotTableStyleSelected() ),
+ shortCuts[name], TQT_TQOBJECT(this), TQT_SLOT( slotTableStyleSelected() ),
actionCollection(), name.utf8() );
act->setExclusiveGroup( "tableStyleList" );
act->setGroup( "tableStyleList" );
@@ -2362,8 +2364,8 @@ void KWView::editCut()
if ( edit )
edit->cut();
else {
- QDragObject *drag = m_doc->dragSelected( frameViewManager()->selectedFrames() );
- QApplication::clipboard()->setData( drag );
+ TQDragObject *drag = m_doc->dragSelected( frameViewManager()->selectedFrames() );
+ TQApplication::tqclipboard()->setData( drag );
deleteFrame(false);
}
}
@@ -2374,19 +2376,19 @@ void KWView::editCopy()
if ( edit )
edit->copy();
else {
- QDragObject *drag = m_doc->dragSelected( frameViewManager()->selectedFrames() );
- QApplication::clipboard()->setData( drag );
+ TQDragObject *drag = m_doc->dragSelected( frameViewManager()->selectedFrames() );
+ TQApplication::tqclipboard()->setData( drag );
}
}
void KWView::editPaste()
{
- QMimeSource *data = QApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::tqclipboard()->data();
pasteData( data, false );
}
// paste or drop
-void KWView::pasteData( QMimeSource* data, bool drop )
+void KWView::pasteData( TQMimeSource* data, bool drop )
{
int provides = checkClipboard( data );
Q_ASSERT( provides != 0 );
@@ -2407,11 +2409,11 @@ void KWView::pasteData( QMimeSource* data, bool drop )
// let the user select paste format if the clipboard contains an image URL
if ( (provides & ProvidesImage) && (provides & ProvidesPlainText) && !( provides & ProvidesOasis ) )
{
- QStringList list;
+ TQStringList list;
list.append( i18n("Image") );
list.append( i18n("Plain text") );
bool ok;
- QString result = KInputDialog::getItem( i18n("Paste"), i18n("Select paste format:"), list, 0, false, &ok );
+ TQString result = KInputDialog::getItem( i18n("Paste"), i18n("Select paste format:"), list, 0, false, &ok );
if (!ok)
return;
if ( result == list.first() )
@@ -2421,25 +2423,25 @@ void KWView::pasteData( QMimeSource* data, bool drop )
provides = ProvidesPlainText;
}
if ( !drop ) // get it again, to avoid crashes
- data = QApplication::clipboard()->data();
+ data = TQApplication::tqclipboard()->data();
}
KWTextFrameSetEdit * edit = currentTextEdit();
if ( edit && ( provides & ProvidesPlainText ) ) {
edit->pasteData( data, provides, drop );
} else if ( provides & ProvidesOasis ) {
// Not editing a frameset? We can't paste plain text then... only entire frames.
- QCString returnedTypeMime = KoTextObject::providesOasis( data );
+ TQCString returnedTypeMime = KoTextObject::providesOasis( data );
if ( !returnedTypeMime.isEmpty() )
{
- const QByteArray arr = data->encodedData( returnedTypeMime );
+ const TQByteArray arr = data->tqencodedData( returnedTypeMime );
if( !arr.isEmpty() )
{
- QBuffer buffer( arr );
- KoStore * store = KoStore::createStore( &buffer, KoStore::Read );
+ TQBuffer buffer( arr );
+ KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read );
KWOasisLoader oasisLoader( m_doc );
- QValueList<KWFrame *> frames = oasisLoader.insertOasisData( store, 0 /* no cursor */ );
+ TQValueList<KWFrame *> frames = oasisLoader.insertOasisData( store, 0 /* no cursor */ );
delete store;
- QValueList<KWFrame *>::ConstIterator it = frames.begin();
+ TQValueList<KWFrame *>::ConstIterator it = frames.begin();
KMacroCommand* macroCmd = 0L;
for ( ; it != frames.end() ; ++it )
{
@@ -2501,8 +2503,8 @@ void KWView::editFind()
bool hasSelection = edit && edit->textFrameSet()->hasSelection();
bool hasCursor = edit != 0L;
- KoSearchDia dialog( m_gui->canvasWidget(), "find", m_searchEntry, hasSelection, hasCursor );
- if ( dialog.exec() == QDialog::Accepted )
+ KoSearchDia dialog( m_gui->canvasWidget(), "tqfind", m_searchEntry, hasSelection, hasCursor );
+ if ( dialog.exec() == TQDialog::Accepted )
{
delete m_findReplace;
m_findReplace = new KWFindReplace( m_gui->canvasWidget(), &dialog, m_gui->canvasWidget()->kWordDocument()->visibleTextObjects(viewMode()), edit);
@@ -2521,8 +2523,8 @@ void KWView::editReplace()
bool hasSelection = edit && edit->textFrameSet()->hasSelection();
bool hasCursor = edit != 0L;
- KoReplaceDia dialog( m_gui->canvasWidget(), "replace", m_searchEntry, m_replaceEntry, hasSelection, hasCursor );
- if ( dialog.exec() == QDialog::Accepted )
+ KoReplaceDia dialog( m_gui->canvasWidget(), "tqreplace", m_searchEntry, m_replaceEntry, hasSelection, hasCursor );
+ if ( dialog.exec() == TQDialog::Accepted )
{
delete m_findReplace;
m_findReplace = new KWFindReplace( m_gui->canvasWidget(), &dialog, m_gui->canvasWidget()->kWordDocument()->visibleTextObjects(viewMode()), edit);
@@ -2553,20 +2555,20 @@ void KWView::editFindPrevious()
void KWView::adjustZOrderOfSelectedFrames(MoveFrameType moveType) {
KMacroCommand* macroCmd = 0L;
// For each selected frame...
- QValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
+ TQValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
if(selectedFrames.count()==0) return;
KWPage *page = m_doc->pageManager()->page(selectedFrames[0]->frame());
- QPtrList<KWFrame> frames;
- QValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQPtrList<KWFrame> frames;
+ TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
while(framesIterator != selectedFrames.end()) {
// include all frames in case of table.
frames.append((*framesIterator)->frame());
KWFrameSet *table = (*framesIterator)->frame()->frameSet()->groupmanager();
if(table) {
- for (QPtrListIterator<KWFrame> cellIt(table->frameIterator() ); cellIt.current() ; ++cellIt ) {
+ for (TQPtrListIterator<KWFrame> cellIt(table->frameIterator() ); cellIt.current() ; ++cellIt ) {
KWFrame *frame = cellIt.current();
- if(page->rect().contains(*frame) && !frames.contains(frame))
+ if(page->rect().tqcontains(*frame) && !frames.tqcontains(frame))
frames.append(frame);
}
}
@@ -2574,7 +2576,7 @@ void KWView::adjustZOrderOfSelectedFrames(MoveFrameType moveType) {
}
int lowestZOrder=10000;
- QString actionName;
+ TQString actionName;
framesIterator = selectedFrames.begin();
while(framesIterator != selectedFrames.end()) {
KWFrame* frame = (*framesIterator)->frame();
@@ -2599,13 +2601,13 @@ void KWView::adjustZOrderOfSelectedFrames(MoveFrameType moveType) {
}
if ( newZOrder != frame->zOrder() ) { // only if changed.
- lowestZOrder=QMIN(lowestZOrder, newZOrder);
+ lowestZOrder=TQMIN(lowestZOrder, newZOrder);
KWFrame* frameCopy = frame->getCopy();
frame->setZOrder( newZOrder );
frame->frameStack()->update();
- KWFramePropertiesCommand* cmd = new KWFramePropertiesCommand( QString::null, frameCopy, frame);
+ KWFramePropertiesCommand* cmd = new KWFramePropertiesCommand( TQString(), frameCopy, frame);
if(!macroCmd)
macroCmd = new KMacroCommand( actionName );
macroCmd->addCommand(cmd);
@@ -2613,7 +2615,7 @@ void KWView::adjustZOrderOfSelectedFrames(MoveFrameType moveType) {
frameCopy = frame->getCopy();
frame->setZOrder( newZOrder );
- cmd = new KWFramePropertiesCommand( QString::null, frameCopy, frame );
+ cmd = new KWFramePropertiesCommand( TQString(), frameCopy, frame );
if(!macroCmd)
macroCmd = new KMacroCommand( actionName );
macroCmd->addCommand(cmd);
@@ -2627,8 +2629,8 @@ void KWView::adjustZOrderOfSelectedFrames(MoveFrameType moveType) {
// Calling updateFrames() on the selected frames' framesets isn't enough,
// we also need other framesets to notice the new frames on top.
m_doc->updateAllFrames();
- m_doc->layout();
- m_doc->repaintAllViews();
+ m_doc->tqlayout();
+ m_doc->tqrepaintAllViews();
}
if(lowestZOrder != 10000 && m_doc->processingType() == KWDocument::WP) {
@@ -2637,10 +2639,10 @@ void KWView::adjustZOrderOfSelectedFrames(MoveFrameType moveType) {
}
// Make room for refZOrder, by raising all z-orders above it by 1
-void KWView::increaseAllZOrdersAbove(int refZOrder, int pageNum, const QPtrList<KWFrame>& frameSelection) {
- QPtrList<KWFrame> framesInPage = m_doc->framesInPage( pageNum, false );
- for ( QPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
- if(frameSelection.contains(frameIt.current()) > 0) continue; // ignore frames we selected.
+void KWView::increaseAllZOrdersAbove(int refZOrder, int pageNum, const TQPtrList<KWFrame>& frameSelection) {
+ TQPtrList<KWFrame> framesInPage = m_doc->framesInPage( pageNum, false );
+ for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
+ if(frameSelection.tqcontains(frameIt.current()) > 0) continue; // ignore frames we selected.
if(frameIt.current()->zOrder() >= refZOrder) {
frameIt.current()->setZOrder( frameIt.current()->zOrder() + 1 );
}
@@ -2648,76 +2650,76 @@ void KWView::increaseAllZOrdersAbove(int refZOrder, int pageNum, const QPtrList<
}
// Make room for refZOrder, by lowering all z-orders below it by 1
-void KWView::decreaseAllZOrdersUnder(int refZOrder, int pageNum, const QPtrList<KWFrame>& frameSelection) {
- QPtrList<KWFrame> framesInPage = m_doc->framesInPage( pageNum, false );
- for ( QPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
- if(frameSelection.contains(frameIt.current()) > 0) continue; // ignore frames we selected.
+void KWView::decreaseAllZOrdersUnder(int refZOrder, int pageNum, const TQPtrList<KWFrame>& frameSelection) {
+ TQPtrList<KWFrame> framesInPage = m_doc->framesInPage( pageNum, false );
+ for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
+ if(frameSelection.tqcontains(frameIt.current()) > 0) continue; // ignore frames we selected.
if(frameIt.current()->zOrder() <= refZOrder) {
frameIt.current()->setZOrder( frameIt.current()->zOrder() - 1 );
}
}
}
-int KWView::raiseFrame(const QPtrList<KWFrame>& frameSelection, const KWFrame *frame) {
+int KWView::raiseFrame(const TQPtrList<KWFrame>& frameSelection, const KWFrame *frame) {
int newZOrder = 10000;
- QValueList<int> zorders;
- QPtrList<KWFrame> framesInPage = m_doc->framesInPage( frame->pageNumber(), false );
- for ( QPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
- if(frameSelection.contains(frameIt.current()) > 0) continue; // ignore other frames we selected.
+ TQValueList<int> zorders;
+ TQPtrList<KWFrame> framesInPage = m_doc->framesInPage( frame->pageNumber(), false );
+ for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
+ if(frameSelection.tqcontains(frameIt.current()) > 0) continue; // ignore other frames we selected.
if(! frameIt.current()->intersects(*frame)) continue; // only frames that I intersect with.
int z = frameIt.current()->zOrder();
if(z > frame->zOrder()) {
- newZOrder=QMIN(newZOrder, z + 1);
+ newZOrder=TQMIN(newZOrder, z + 1);
}
zorders.append( z );
}
if(newZOrder==10000) return frame->zOrder();
// Ensure that newZOrder is "free"
- if ( zorders.find( newZOrder ) != zorders.end() )
+ if ( zorders.tqfind( newZOrder ) != zorders.end() )
increaseAllZOrdersAbove( newZOrder, frame->pageNumber(), frameSelection );
return newZOrder;
}
-int KWView::lowerFrame(const QPtrList<KWFrame>& frameSelection, const KWFrame *frame) {
+int KWView::lowerFrame(const TQPtrList<KWFrame>& frameSelection, const KWFrame *frame) {
int newZOrder = -10000;
- QValueList<int> zorders;
- QPtrList<KWFrame> framesInPage = m_doc->framesInPage( frame->pageNumber(), false );
- for ( QPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
- if(frameSelection.contains(frameIt.current()) > 0) continue; // ignore other frames we selected.
+ TQValueList<int> zorders;
+ TQPtrList<KWFrame> framesInPage = m_doc->framesInPage( frame->pageNumber(), false );
+ for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
+ if(frameSelection.tqcontains(frameIt.current()) > 0) continue; // ignore other frames we selected.
if(frameIt.current()->frameSet()->isMainFrameset()) continue; // ignore main frameset.
if(! frameIt.current()->intersects(*frame)) continue; // only frames that I intersect with.
int z = frameIt.current()->zOrder();
if(z < frame->zOrder()) {
- newZOrder=QMAX(newZOrder, z -1);
+ newZOrder=TQMAX(newZOrder, z -1);
}
zorders.append( z );
}
if(newZOrder==-10000) return frame->zOrder();
// Ensure that newZOrder is "free"
- if ( zorders.find( newZOrder ) != zorders.end() )
+ if ( zorders.tqfind( newZOrder ) != zorders.end() )
decreaseAllZOrdersUnder( newZOrder, frame->pageNumber(), frameSelection );
return newZOrder;
}
-int KWView::bringToFront(const QPtrList<KWFrame>& frameSelection, const KWFrame *frame) {
+int KWView::bringToFront(const TQPtrList<KWFrame>& frameSelection, const KWFrame *frame) {
int newZOrder = frame->zOrder();
- QPtrList<KWFrame> framesInPage = m_doc->framesInPage( frame->pageNumber(), false );
- for ( QPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
- if(frameSelection.contains(frameIt.current()) > 0) continue; // ignore other frames we selected.
+ TQPtrList<KWFrame> framesInPage = m_doc->framesInPage( frame->pageNumber(), false );
+ for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
+ if(frameSelection.tqcontains(frameIt.current()) > 0) continue; // ignore other frames we selected.
if(! frameIt.current()->intersects(*frame)) continue; // only frames that I intersect with.
- newZOrder=QMAX(newZOrder, frameIt.current()->zOrder()+1);
+ newZOrder=TQMAX(newZOrder, frameIt.current()->zOrder()+1);
}
return newZOrder;
}
-int KWView::sendToBack(const QPtrList<KWFrame>& frameSelection, const KWFrame *frame) {
+int KWView::sendToBack(const TQPtrList<KWFrame>& frameSelection, const KWFrame *frame) {
int newZOrder = frame->zOrder();
- QPtrList<KWFrame> framesInPage = m_doc->framesInPage( frame->pageNumber(), false );
- for ( QPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
- if(frameSelection.contains(frameIt.current()) > 0) continue; // ignore other frames we selected.
+ TQPtrList<KWFrame> framesInPage = m_doc->framesInPage( frame->pageNumber(), false );
+ for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
+ if(frameSelection.tqcontains(frameIt.current()) > 0) continue; // ignore other frames we selected.
if(frameIt.current()->frameSet()->isMainFrameset()) continue; // ignore main frameset.
if(! frameIt.current()->intersects(*frame)) continue; // only frames that I intersect with.
- newZOrder=QMIN(newZOrder, frameIt.current()->zOrder()-1);
+ newZOrder=TQMIN(newZOrder, frameIt.current()->zOrder()-1);
}
return newZOrder;
}
@@ -2732,7 +2734,7 @@ void KWView::deleteFrame( bool warning )
if ( !m_doc->isReadWrite() )
return;
- QValueList<KWFrameView*> frames = frameViewManager()->selectedFrames();
+ TQValueList<KWFrameView*> frames = frameViewManager()->selectedFrames();
if( frames.count() < 1) {
kdWarning() << "KWView::deleteFrame: no frame selected" << endl;
return;
@@ -2782,7 +2784,7 @@ void KWView::deleteFrame( bool warning )
"Frameset '%1'. "
"The contents of this Frameset will not appear "
"anymore!\n"
- "Are you sure you want to do that?").arg(fs->name()),
+ "Are you sure you want to do that?").tqarg(fs->name()),
i18n("Delete Frame"), KStdGuiItem::del());
if (result != KMessageBox::Continue)
@@ -2830,11 +2832,11 @@ void KWView::deleteFrame( bool warning )
void KWView::createLinkedFrame()
{
- QValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
+ TQValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
if (selectedFrames.count() != 1)
return; // action is disabled in such a case
KWFrame* frame = selectedFrames[0]->frame();
- KWFrame* newFrame = new KWFrame(0L, frame->x() + m_gui->getVertRuler()->minimumSizeHint().width(), frame->y() + m_gui->getHorzRuler()->minimumSizeHint().height(), frame->width(), frame->height() );
+ KWFrame* newFrame = new KWFrame(0L, frame->x() + m_gui->getVertRuler()->tqminimumSizeHint().width(), frame->y() + m_gui->getHorzRuler()->tqminimumSizeHint().height(), frame->width(), frame->height() );
newFrame->setZOrder( m_doc->maxZOrder( newFrame->pageNumber(m_doc) ) + 1 ); // make sure it's on top
newFrame->setCopy(true);
newFrame->setNewFrameBehavior( KWFrame::Copy );
@@ -2856,7 +2858,7 @@ void KWView::editCustomVariable()
KoCustomVariable *var = static_cast<KoCustomVariable *>(edit->variable());
if (var)
{
- QString oldvalue = var->value();
+ TQString oldvalue = var->value();
KoCustomVarDialog dia( this, var );
if ( dia.exec() )
{
@@ -2874,8 +2876,8 @@ void KWView::editCustomVariable()
void KWView::editCustomVars()
{
KoCustomVariablesDia dia( this, m_doc->variableCollection()->getVariables() );
- QStringList listOldCustomValue;
- QPtrListIterator<KoVariable> oldIt( m_doc->variableCollection()->getVariables() );
+ TQStringList listOldCustomValue;
+ TQPtrListIterator<KoVariable> oldIt( m_doc->variableCollection()->getVariables() );
for ( ; oldIt.current() ; ++oldIt )
{
if(oldIt.current()->type()==VT_CUSTOM)
@@ -2885,7 +2887,7 @@ void KWView::editCustomVars()
{
m_doc->recalcVariables( VT_CUSTOM );
//temporaly hack, for the moment we can't undo/redo change custom variables
- QPtrListIterator<KoVariable> it( m_doc->variableCollection()->getVariables() );
+ TQPtrListIterator<KoVariable> it( m_doc->variableCollection()->getVariables() );
KMacroCommand * macroCommand = 0L;
int i=0;
for ( ; it.current() ; ++it )
@@ -2914,7 +2916,7 @@ void KWView::editMailMergeDataBase()
KWMailMergeEditor *dia = new KWMailMergeEditor( this, m_doc->mailMergeDataBase() );
dia->exec();
// Don't know if we really need this so it's commented out (SL)
- // m_gui->canvasWidget()->repaintAll( FALSE );
+ // m_gui->canvasWidget()->tqrepaintAll( FALSE );
delete dia;
#endif
}
@@ -2941,7 +2943,7 @@ void KWView::viewTextMode()
{
case KoZoomMode::ZOOM_WIDTH:
m_doc->setZoomMode(KoZoomMode::ZOOM_WIDTH);
- QTimer::singleShot( 0, this, SLOT( updateZoom() ) );
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( updateZoom() ) );
break;
case KoZoomMode::ZOOM_PAGE: // no break
m_zoomViewModeNormal.m_zoomMode = KoZoomMode::ZOOM_CONSTANT;
@@ -2977,11 +2979,11 @@ void KWView::viewPageMode()
{
case KoZoomMode::ZOOM_WIDTH:
m_doc->setZoomMode(KoZoomMode::ZOOM_WIDTH);
- QTimer::singleShot( 0, this, SLOT( updateZoom() ) );
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( updateZoom() ) );
break;
case KoZoomMode::ZOOM_PAGE:
m_doc->setZoomMode(KoZoomMode::ZOOM_PAGE);
- QTimer::singleShot( 0, this, SLOT( updateZoom() ) );
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( updateZoom() ) );
break;
case KoZoomMode::ZOOM_CONSTANT:
m_doc->setZoomMode(KoZoomMode::ZOOM_CONSTANT);
@@ -3005,11 +3007,11 @@ void KWView::viewPreviewMode()
{
case KoZoomMode::ZOOM_WIDTH:
m_doc->setZoomMode(KoZoomMode::ZOOM_WIDTH);
- QTimer::singleShot( 0, this, SLOT( updateZoom() ) );
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( updateZoom() ) );
break;
case KoZoomMode::ZOOM_PAGE:
m_doc->setZoomMode(KoZoomMode::ZOOM_PAGE);
- QTimer::singleShot( 0, this, SLOT( updateZoom() ) );
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( updateZoom() ) );
break;
case KoZoomMode::ZOOM_CONSTANT:
m_doc->setZoomMode(KoZoomMode::ZOOM_CONSTANT);
@@ -3040,82 +3042,82 @@ void KWView::updateZoomControls()
void KWView::changeZoomMenu( int zoom )
{
- QString mode;
+ TQString mode;
if ( m_gui && m_gui->canvasWidget() && viewMode())
mode = viewMode()->type();
- QStringList lst;
+ TQStringList lst;
lst << KoZoomMode::toString(KoZoomMode::ZOOM_WIDTH);
if ( mode!="ModeText" )
lst << KoZoomMode::toString(KoZoomMode::ZOOM_PAGE);
if(zoom>0)
{
- QValueList<int> list;
+ TQValueList<int> list;
bool ok;
- const QStringList itemsList ( m_actionViewZoom->items() );
- QRegExp regexp("(\\d+)"); // "Captured" non-empty sequence of digits
+ const TQStringList itemsList ( m_actionViewZoom->items() );
+ TQRegExp regexp("(\\d+)"); // "Captured" non-empty sequence of digits
- for (QStringList::ConstIterator it = itemsList.begin() ; it != itemsList.end() ; ++it)
+ for (TQStringList::ConstIterator it = itemsList.begin() ; it != itemsList.end() ; ++it)
{
regexp.search(*it);
const int val=regexp.cap(1).toInt(&ok);
//zoom : limit inferior=10
- if(ok && val>9 && list.contains(val)==0)
+ if(ok && val>9 && list.tqcontains(val)==0)
list.append( val );
}
//necessary at the beginning when we read config
//this value is not in combo list
- if(list.contains(zoom)==0)
+ if(list.tqcontains(zoom)==0)
list.append( zoom );
qHeapSort( list );
- for (QValueList<int>::Iterator it = list.begin() ; it != list.end() ; ++it)
- lst.append( i18n("%1%").arg(*it) );
+ for (TQValueList<int>::Iterator it = list.begin() ; it != list.end() ; ++it)
+ lst.append( i18n("%1%").tqarg(*it) );
}
else
{
- lst << i18n("%1%").arg("33");
- lst << i18n("%1%").arg("50");
- lst << i18n("%1%").arg("75");
- lst << i18n("%1%").arg("100");
- lst << i18n("%1%").arg("125");
- lst << i18n("%1%").arg("150");
- lst << i18n("%1%").arg("200");
- lst << i18n("%1%").arg("250");
- lst << i18n("%1%").arg("350");
- lst << i18n("%1%").arg("400");
- lst << i18n("%1%").arg("450");
- lst << i18n("%1%").arg("500");
+ lst << i18n("%1%").tqarg("33");
+ lst << i18n("%1%").tqarg("50");
+ lst << i18n("%1%").tqarg("75");
+ lst << i18n("%1%").tqarg("100");
+ lst << i18n("%1%").tqarg("125");
+ lst << i18n("%1%").tqarg("150");
+ lst << i18n("%1%").tqarg("200");
+ lst << i18n("%1%").tqarg("250");
+ lst << i18n("%1%").tqarg("350");
+ lst << i18n("%1%").tqarg("400");
+ lst << i18n("%1%").tqarg("450");
+ lst << i18n("%1%").tqarg("500");
}
m_actionViewZoom->setItems( lst );
}
void KWView::showZoom( int zoom )
{
- QStringList list = m_actionViewZoom->items();
- QString zoomStr( i18n("%1%").arg( zoom ) );
- m_actionViewZoom->setCurrentItem( list.findIndex(zoomStr) );
+ TQStringList list = m_actionViewZoom->items();
+ TQString zoomStr( i18n("%1%").tqarg( zoom ) );
+ m_actionViewZoom->setCurrentItem( list.tqfindIndex(zoomStr) );
}
-void KWView::showZoom( const QString& zoom )
+void KWView::showZoom( const TQString& zoom )
{
- QStringList list = m_actionViewZoom->items();
- m_actionViewZoom->setCurrentItem( list.findIndex( zoom ) );
+ TQStringList list = m_actionViewZoom->items();
+ m_actionViewZoom->setCurrentItem( list.tqfindIndex( zoom ) );
}
void KWView::slotViewFormattingChars()
{
m_doc->setViewFormattingChars(m_actionViewFormattingChars->isChecked());
- m_doc->layout(); // Due to the different formatting when this option is activated
- m_doc->repaintAllViews();
+ m_doc->tqlayout(); // Due to the different formatting when this option is activated
+ m_doc->tqrepaintAllViews();
}
void KWView::slotViewFrameBorders()
{
setViewFrameBorders(m_actionViewFrameBorders->isChecked());
- m_gui->canvasWidget()->repaintAll();
+ m_gui->canvasWidget()->tqrepaintAll();
}
void KWView::viewHeader()
@@ -3216,7 +3218,7 @@ void KWView::updateZoom( ) {
viewZoom(m_actionViewZoom->currentText());
}
-void KWView::viewZoom( const QString &s )
+void KWView::viewZoom( const TQString &s )
{
bool ok=false;
KWCanvas * canvas = m_gui->canvasWidget();
@@ -3225,12 +3227,12 @@ void KWView::viewZoom( const QString &s )
if ( s == KoZoomMode::toString(KoZoomMode::ZOOM_WIDTH) )
{
m_doc->setZoomMode(KoZoomMode::ZOOM_WIDTH);
- zoom = qRound( static_cast<double>(canvas->visibleWidth() * 100 ) / (m_doc->resolutionX() * m_currentPage->width() ) ) - 1;
+ zoom = tqRound( static_cast<double>(canvas->visibleWidth() * 100 ) / (m_doc->resolutionX() * m_currentPage->width() ) ) - 1;
if(zoom != m_doc->zoom() && !canvas->verticalScrollBar() ||
!canvas->verticalScrollBar()->isVisible()) { // has no vertical scrollbar
// we have to do this twice to take into account a possibly appearing vertical scrollbar
- QTimer::singleShot( 0, this, SLOT( updateZoom() ) );
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( updateZoom() ) );
}
ok = true;
}
@@ -3239,15 +3241,15 @@ void KWView::viewZoom( const QString &s )
m_doc->setZoomMode(KoZoomMode::ZOOM_PAGE);
double height = m_doc->resolutionY() * m_currentPage->height();
double width = m_doc->resolutionX() * m_currentPage->width();
- zoom = QMIN( qRound( static_cast<double>(canvas->visibleHeight() * 100 ) / height ),
- qRound( static_cast<double>(canvas->visibleWidth() * 100 ) / width ) ) - 1;
+ zoom = TQMIN( tqRound( static_cast<double>(canvas->visibleHeight() * 100 ) / height ),
+ tqRound( static_cast<double>(canvas->visibleWidth() * 100 ) / width ) ) - 1;
ok = true;
}
else
{
m_doc->setZoomMode(KoZoomMode::ZOOM_CONSTANT);
- QRegExp regexp("(\\d+)"); // "Captured" non-empty sequence of digits
+ TQRegExp regexp("(\\d+)"); // "Captured" non-empty sequence of digits
regexp.search(s);
zoom=regexp.cap(1).toInt(&ok);
}
@@ -3283,7 +3285,7 @@ void KWView::setZoom( int zoom, bool updateViews )
m_doc->updateZoomRuler();
if ( statusBar() )
- m_sbZoomLabel->setText( ' ' + QString::number( zoom ) + "% " );
+ m_sbZoomLabel->setText( ' ' + TQString::number( zoom ) + "% " );
// Also set the zoom in KoView (for embedded views)
kdDebug() << "KWView::setZoom " << zoom << " setting koview zoom to " << m_doc->zoomedResolutionY() << endl;
@@ -3295,7 +3297,7 @@ void KWView::insertPicture()
if ( m_actionToolsCreatePix->isChecked() )
{
KWInsertPicDia dia( this,m_gui->canvasWidget()->pictureInline(),m_gui->canvasWidget()->pictureKeepRatio(),m_doc );
- if ( dia.exec() == QDialog::Accepted && !dia.picture().isNull() )
+ if ( dia.exec() == TQDialog::Accepted && !dia.picture().isNull() )
{
insertPicture( dia.picture(), dia.makeInline(), dia.keepRatio(), 0, 0 );
m_gui->canvasWidget()->setPictureInline( dia.makeInline());
@@ -3312,7 +3314,7 @@ void KWView::insertPicture()
}
-void KWView::slotEmbedImage( const QString &filename )
+void KWView::slotEmbedImage( const TQString &filename )
{
KoPicture picture;
KoPictureKey key;
@@ -3324,9 +3326,9 @@ void KWView::slotEmbedImage( const QString &filename )
void KWView::insertPicture( const KoPicture& picture, const bool makeInline, const bool keepRatio, int suggestedWidth, int suggestedHeight )
{
- QSize pixmapSize( picture.getOriginalSize() );
+ TQSize pixmapSize( picture.getOriginalSize() );
if ( suggestedWidth > 0 && suggestedHeight > 0 )
- pixmapSize = QSize( suggestedWidth, suggestedHeight );
+ pixmapSize = TQSize( suggestedWidth, suggestedHeight );
if ( makeInline )
{
@@ -3335,14 +3337,14 @@ void KWView::insertPicture( const KoPicture& picture, const bool makeInline, con
const double heightLimit = m_currentPage->height() - m_currentPage->topMargin() -
m_currentPage->bottomMargin() - 10;
m_fsInline = 0;
- KWPictureFrameSet *frameset = new KWPictureFrameSet( m_doc, QString::null );
+ KWPictureFrameSet *frameset = new KWPictureFrameSet( m_doc, TQString() );
frameset->insertPicture( picture );
// This ensures 1-1 at 100% on screen, but allows zooming and printing with correct DPI values
- // ### TODO/FIXME: is the qRound really necessary?
- double width = m_doc->unzoomItX( qRound( (double)pixmapSize.width() * m_doc->zoomedResolutionX() / POINT_TO_INCH( KoGlobal::dpiX() ) ) );
- double height = m_doc->unzoomItY( qRound( (double)pixmapSize.height() * m_doc->zoomedResolutionY() / POINT_TO_INCH( KoGlobal::dpiY() ) ) );
+ // ### TODO/FIXME: is the tqRound really necessary?
+ double width = m_doc->unzoomItX( tqRound( (double)pixmapSize.width() * m_doc->zoomedResolutionX() / POINT_TO_INCH( KoGlobal::dpiX() ) ) );
+ double height = m_doc->unzoomItY( tqRound( (double)pixmapSize.height() * m_doc->zoomedResolutionY() / POINT_TO_INCH( KoGlobal::dpiY() ) ) );
frameset->setKeepAspectRatio( keepRatio);
@@ -3445,15 +3447,15 @@ void KWView::insertSpecialChar()
KWTextFrameSetEdit *edit=currentTextEdit();
if ( !edit )
return;
- QString f = edit->textFontFamily();
- QChar c=' ';
+ TQString f = edit->textFontFamily();
+ TQChar c=' ';
if (m_specialCharDlg==0)
{
m_specialCharDlg = new KoCharSelectDia( this, "insert special char", f, c, false );
- connect( m_specialCharDlg, SIGNAL(insertChar(QChar,const QString &)),
- this, SLOT(slotSpecialChar(QChar,const QString &)));
- connect( m_specialCharDlg, SIGNAL( finished() ),
- this, SLOT( slotSpecialCharDlgClosed() ) );
+ connect( m_specialCharDlg, TQT_SIGNAL(insertChar(TQChar,const TQString &)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotSpecialChar(TQChar,const TQString &)));
+ connect( m_specialCharDlg, TQT_SIGNAL( finished() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotSpecialCharDlgClosed() ) );
}
m_specialCharDlg->show();
}
@@ -3462,16 +3464,16 @@ void KWView::slotSpecialCharDlgClosed()
{
if ( m_specialCharDlg )
{
- disconnect( m_specialCharDlg, SIGNAL(insertChar(QChar,const QString &)),
- this, SLOT(slotSpecialChar(QChar,const QString &)));
- disconnect( m_specialCharDlg, SIGNAL( finished() ),
- this, SLOT( slotSpecialCharDlgClosed() ) );
+ disconnect( m_specialCharDlg, TQT_SIGNAL(insertChar(TQChar,const TQString &)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotSpecialChar(TQChar,const TQString &)));
+ disconnect( m_specialCharDlg, TQT_SIGNAL( finished() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotSpecialCharDlgClosed() ) );
m_specialCharDlg->deleteLater();
m_specialCharDlg = 0L;
}
}
-void KWView::slotSpecialChar(QChar c, const QString &font)
+void KWView::slotSpecialChar(TQChar c, const TQString &font)
{
KWTextFrameSetEdit *edit=currentTextEdit();
if ( !edit )
@@ -3523,12 +3525,12 @@ void KWView::insertLink()
KWTextFrameSetEdit *edit=currentTextEdit();
if ( !edit )
return;
- QString link;
- QString ref;
+ TQString link;
+ TQString ref;
if ( edit->textFrameSet()->hasSelection() )
{
- QString selectedText = edit->textFrameSet()->textObject()->selectedText();
- if ( edit->textFrameSet()->textObject()->selectionHasCustomItems() || selectedText.contains('\n') )
+ TQString selectedText = edit->textFrameSet()->textObject()->selectedText();
+ if ( edit->textFrameSet()->textObject()->selectionHasCustomItems() || selectedText.tqcontains('\n') )
return;
if ( selectedText.startsWith( "mailto:/" ) ||
selectedText.startsWith( "ftp:/" ) ||
@@ -3556,7 +3558,7 @@ void KWView::insertComment()
KWTextFrameSetEdit *edit=currentTextEdit();
if ( !edit )
return;
- QString authorName;
+ TQString authorName;
KoDocumentInfo * info = m_doc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
@@ -3564,7 +3566,7 @@ void KWView::insertComment()
else
authorName = authorPage->fullName();
- KoCommentDia *commentDia = new KoCommentDia( this, QString::null,authorName );
+ KoCommentDia *commentDia = new KoCommentDia( this, TQString(),authorName );
if( commentDia->exec() )
{
edit->insertComment(commentDia->commentText());
@@ -3578,8 +3580,8 @@ void KWView::insertVariable()
KWTextFrameSetEdit * edit = currentTextEdit();
if ( edit )
{
- KAction * act = (KAction *)(sender());
- VariableDefMap::Iterator it = m_variableDefMap.find( act );
+ KAction * act = (KAction *)(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())));
+ VariableDefMap::Iterator it = m_variableDefMap.tqfind( act );
if ( it == m_variableDefMap.end() )
kdWarning() << "Action not found in m_variableDefMap." << endl;
else
@@ -3605,8 +3607,8 @@ void KWView::insertFootNote()
"endnotes into the first frameset."),
i18n("Insert Footnote"));
} else {
- KWFootNoteDia dia( m_gui->canvasWidget()->footNoteType(), m_gui->canvasWidget()->numberingFootNoteType(), QString::null, this, m_doc, 0 );
- QPtrListIterator<KoTextCustomItem> it( edit->textDocument()->allCustomItems() );
+ KWFootNoteDia dia( m_gui->canvasWidget()->footNoteType(), m_gui->canvasWidget()->numberingFootNoteType(), TQString(), this, m_doc, 0 );
+ TQPtrListIterator<KoTextCustomItem> it( edit->textDocument()->allCustomItems() );
for ( ; it.current() ; ++it )
{
KWFootNoteVariable *fnv = dynamic_cast<KWFootNoteVariable *>( it.current() );
@@ -3626,7 +3628,7 @@ void KWView::insertFootNote()
void KWView::updateTocActionText(bool hasToc)
{
KActionCollection * coll = actionCollection();
- QString name= hasToc ? i18n("Update Table of &Contents"):i18n("Table of &Contents");
+ TQString name= hasToc ? i18n("Update Table of &Contents"):i18n("Table of &Contents");
coll->action("insert_contents")->setText(name);
}
@@ -3649,8 +3651,8 @@ void KWView::formatFont()
, m_broker
, this, "" );
- connect( m_fontDlg, SIGNAL( applyFont() ),
- this, SLOT( slotApplyFont() ) );
+ connect( m_fontDlg, TQT_SIGNAL( applyFont() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotApplyFont() ) );
m_fontDlg->exec();
delete m_fontDlg;
@@ -3665,8 +3667,8 @@ void KWView::slotApplyFont()
if ( flags )
{
KMacroCommand *globalCmd = new KMacroCommand(i18n("Change Font"));
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
for ( ; it.current() ; ++it )
{
KoTextFormat newFormat = m_fontDlg->newFormat();
@@ -3713,7 +3715,7 @@ void KWView::showParagraphDialog( int initialPage, double initialTabPos )
if ( initialPage == KoParagDia::PD_TABS )
m_paragDlg->tabulatorsWidget()->setCurrentTab( initialTabPos );
}
- connect( m_paragDlg, SIGNAL( applyParagStyle() ), this, SLOT( slotApplyParag()));
+ connect( m_paragDlg, TQT_SIGNAL( applyParagStyle() ), TQT_TQOBJECT(this), TQT_SLOT( slotApplyParag()));
m_paragDlg->exec();
delete m_paragDlg;
@@ -3731,7 +3733,7 @@ void KWView::slotApplyParag()
KCommand *cmd=0L;
if(m_paragDlg->isLeftMarginChanged())
{
- cmd=edit->setMarginCommand( QStyleSheetItem::MarginLeft, m_paragDlg->leftIndent() );
+ cmd=edit->setMarginCommand( TQStyleSheetItem::MarginLeft, m_paragDlg->leftIndent() );
if(cmd)
{
if ( !macroCommand )
@@ -3744,7 +3746,7 @@ void KWView::slotApplyParag()
if(m_paragDlg->isRightMarginChanged())
{
- cmd=edit->setMarginCommand( QStyleSheetItem::MarginRight, m_paragDlg->rightIndent() );
+ cmd=edit->setMarginCommand( TQStyleSheetItem::MarginRight, m_paragDlg->rightIndent() );
if(cmd)
{
if ( !macroCommand )
@@ -3755,7 +3757,7 @@ void KWView::slotApplyParag()
}
if(m_paragDlg->isSpaceBeforeChanged())
{
- cmd=edit->setMarginCommand( QStyleSheetItem::MarginTop, m_paragDlg->spaceBeforeParag() );
+ cmd=edit->setMarginCommand( TQStyleSheetItem::MarginTop, m_paragDlg->spaceBeforeParag() );
if(cmd)
{
if ( !macroCommand )
@@ -3765,7 +3767,7 @@ void KWView::slotApplyParag()
}
if(m_paragDlg->isSpaceAfterChanged())
{
- cmd=edit->setMarginCommand( QStyleSheetItem::MarginBottom, m_paragDlg->spaceAfterParag() );
+ cmd=edit->setMarginCommand( TQStyleSheetItem::MarginBottom, m_paragDlg->spaceAfterParag() );
if(cmd)
{
if ( !macroCommand )
@@ -3775,7 +3777,7 @@ void KWView::slotApplyParag()
}
if(m_paragDlg->isFirstLineChanged())
{
- cmd=edit->setMarginCommand( QStyleSheetItem::MarginFirstLine, m_paragDlg->firstLineIndent());
+ cmd=edit->setMarginCommand( TQStyleSheetItem::MarginFirstLine, m_paragDlg->firstLineIndent());
if(cmd)
{
if ( !macroCommand )
@@ -3897,7 +3899,7 @@ void KWView::slotHRulerDoubleClicked( double ptpos )
// This does _not_ handle Tabulators!
void KWView::slotHRulerDoubleClicked()
{
- QString mode = viewMode()->type();
+ TQString mode = viewMode()->type();
bool state = (mode!="ModeText");
if ( !state )
return;
@@ -3917,7 +3919,7 @@ void KWView::formatPage()
{
if( !m_doc->isReadWrite())
return;
- QString mode = viewMode()->type();
+ TQString mode = viewMode()->type();
bool state = (mode!="ModeText");
if ( !state )
return;
@@ -3979,7 +3981,7 @@ void KWView::slotSpellCheck()
//m_doc->setReadWrite(false); // prevent editing text - not anymore
m_spell.macroCmdSpellCheck = 0L;
m_spell.replaceAll.clear();
- QValueList<KoTextObject *> objects;
+ TQValueList<KoTextObject *> objects;
KWTextFrameSetEdit * edit = currentTextEdit();
if (!edit)
return;
@@ -4011,7 +4013,7 @@ void KWView::extraFrameStylist()
KWTextFrameSetEdit * edit = currentTextEdit();
if ( edit )
edit->hideCursor();
- KWFrameStyleManager * frameStyleManager = new KWFrameStyleManager( this, m_doc, QString::null );
+ KWFrameStyleManager * frameStyleManager = new KWFrameStyleManager( this, m_doc, TQString() );
frameStyleManager->exec();
delete frameStyleManager;
if ( edit )
@@ -4021,7 +4023,7 @@ void KWView::extraFrameStylist()
void KWView::createFrameStyle()
{
- QValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
+ TQValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
if (selectedFrames.count() != 1)
return;
@@ -4040,7 +4042,7 @@ void KWView::createFrameStyle()
void KWView::extraStylist()
{
KWTextFrameSetEdit * edit = currentTextEdit();
- QString activeStyleName = QString::null;
+ TQString activeStyleName = TQString();
if ( edit )
{
edit->hideCursor();
@@ -4058,9 +4060,9 @@ void KWView::extraCreateTemplate()
{
int width = 60;
int height = 60;
- QPixmap pix = m_doc->generatePreview(QSize(width, height));
+ TQPixmap pix = m_doc->generatePreview(TQSize(width, height));
- KTempFile tempFile( QString::null, ".odt" );
+ KTempFile tempFile( TQString(), ".odt" );
tempFile.setAutoDelete(true);
m_doc->saveNativeFormat( tempFile.name() );
@@ -4097,23 +4099,23 @@ void KWView::insertTable()
canvas->tableTemplateName(),
canvas->tableFormat());
tableDia->setCaption( i18n( "Insert Table" ) );
- if ( tableDia->exec() == QDialog::Rejected )
+ if ( tableDia->exec() == TQDialog::Rejected )
canvas->setMouseMode( KWCanvas::MM_EDIT );
delete tableDia;
}
-void KWView::insertFormula( QMimeSource* source )
+void KWView::insertFormula( TQMimeSource* source )
{
KWTextFrameSetEdit *edit = currentTextEdit();
if (edit)
{
- KWFormulaFrameSet *frameset = new KWFormulaFrameSet( m_doc, QString::null );
+ KWFormulaFrameSet *frameset = new KWFormulaFrameSet( m_doc, TQString() );
m_doc->addFrameSet( frameset, false ); // done first since the frame number is stored in the undo/redo
if ( source ) {
- QByteArray data = source->encodedData( KFormula::MimeSource::selectionMimeType() );
- QDomDocument formula;
+ TQByteArray data = source->tqencodedData( KFormula::MimeSource::selectionMimeType() );
+ TQDomDocument formula;
formula.setContent( data );
- QDomElement formulaElem = formula.namedItem("math").toElement();
+ TQDomElement formulaElem = formula.namedItem("math").toElement();
frameset->paste( formulaElem );
}
KWFrame *frame = new KWFrame(frameset, 0, 0, 10, 10 );
@@ -4125,7 +4127,7 @@ void KWView::insertFormula( QMimeSource* source )
m_gui->canvasWidget()->editFrameSet( frameset );
frameset->setChanged();
- m_gui->canvasWidget()->repaintChanged( frameset, true );
+ m_gui->canvasWidget()->tqrepaintChanged( frameset, true );
}
}
@@ -4135,7 +4137,7 @@ void KWView::toolsPart()
}
-int KWView::tableSelectCell(const QString &tableName, uint row, uint col)
+int KWView::tableSelectCell(const TQString &tableName, uint row, uint col)
{
if(!m_doc || !m_gui)
return -1;
@@ -4157,7 +4159,7 @@ int KWView::tableSelectCell(const QString &tableName, uint row, uint col)
return 0;
}
-int KWView::tableDeleteRow(const QValueList<uint>& rows, KWTableFrameSet *table )
+int KWView::tableDeleteRow(const TQValueList<uint>& rows, KWTableFrameSet *table )
{
if(!table)
table = m_gui->canvasWidget()->getCurrentTable();
@@ -4183,7 +4185,7 @@ int KWView::tableDeleteRow(const QValueList<uint>& rows, KWTableFrameSet *table
return 0;
}
-int KWView::tableDeleteCol(const QValueList<uint>& cols, KWTableFrameSet *table)
+int KWView::tableDeleteCol(const TQValueList<uint>& cols, KWTableFrameSet *table)
{
if(!table)
table = m_gui->canvasWidget()->getCurrentTable();
@@ -4225,7 +4227,7 @@ void KWView::tableProperties()
canvas->tableTemplateName(),
canvas->tableFormat());
tableDia->setCaption( i18n( "Adjust Table" ) );
- if ( tableDia->exec() == QDialog::Rejected )
+ if ( tableDia->exec() == TQDialog::Rejected )
canvas->setMouseMode( KWCanvas::MM_EDIT );
delete tableDia;
}
@@ -4329,8 +4331,8 @@ void KWView::tableResizeCol()
void KWView::tableJoinCells()
{
KWTableFrameSet *table = 0;
- QValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
- QValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
+ TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
unsigned int x1=10000, y1=10000, x2=0, y2=0;
for(;framesIterator != selectedFrames.end(); ++framesIterator) {
KWFrameView *view = *framesIterator;
@@ -4368,7 +4370,7 @@ void KWView::tableJoinCells()
return;
}
m_doc->addCommand(cmd);
- m_doc->layout();
+ m_doc->tqlayout();
}
void KWView::tableSplitCells() {
@@ -4403,7 +4405,7 @@ void KWView::tableSplitCells(int cols, int rows)
}
m_doc->addCommand(cmd);
m_doc->updateAllFrames();
- m_doc->layout();
+ m_doc->tqlayout();
frameViewManager()->view(cell->frame(0))->setSelected(true);
}
@@ -4421,11 +4423,11 @@ void KWView::tableUngroupTable()
if ( table->isFloating() )
{
- KWFrameSetInlineCommand *cmd = new KWFrameSetInlineCommand( QString::null, table, false );
+ KWFrameSetInlineCommand *cmd = new KWFrameSetInlineCommand( TQString(), table, false );
macroCmd->addCommand(cmd);
}
- KWUngroupTableCommand *cmd = new KWUngroupTableCommand( QString::null, table );
+ KWUngroupTableCommand *cmd = new KWUngroupTableCommand( TQString(), table );
macroCmd->addCommand( cmd );
m_doc->addCommand( macroCmd );
macroCmd->execute(); // do it all
@@ -4455,8 +4457,8 @@ void KWView::tableStylist()
void KWView::tableProtectCells(bool on)
{
KMacroCommand *macro = 0;
- QValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
- QValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
+ TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
for(;framesIterator != selectedFrames.end(); ++framesIterator) {
KWFrameView *view = *framesIterator;
KWFrameSet *fs = view->frame()->frameSet();
@@ -4489,12 +4491,12 @@ void KWView::textStyleSelected( KoParagStyle *sty )
}
else
{ // it might be that a frame (or several frames) are selected
- QValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
+ TQValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
if (selectedFrames.count() <= 0)
return; // nope, no frames are selected.
// yes, indeed frames are selected.
- QValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
KMacroCommand *globalCmd = 0L;
while(framesIterator != selectedFrames.end()) {
KWFrame *curFrame = (*framesIterator)->frame();
@@ -4530,8 +4532,8 @@ void KWView::textStyleSelected( int index )
// Slot is called when selecting a framestyle in the Frames / Framestyle menu
void KWView::slotFrameStyleSelected()
{
- QString actionName = QString::fromUtf8(sender()->name());
- const QString prefix = FRAMESTYLE_ACTION_PREFIX;
+ TQString actionName = TQString::fromUtf8(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name());
+ const TQString prefix = FRAMESTYLE_ACTION_PREFIX;
if ( actionName.startsWith( prefix ) ) {
actionName = actionName.mid( prefix.length() );
frameStyleSelected( m_doc->frameStyleCollection()->findStyle( actionName ) );
@@ -4564,14 +4566,14 @@ void KWView::frameStyleSelected( KWFrameStyle *sty )
}
else
{ // it might be that a frame (or several frames) are selected
- QValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
+ TQValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
if (selectedFrames.count() <= 0)
return; // nope, no frames are selected.
// yes, indeed frames are selected.
KMacroCommand *globalCmd = new KMacroCommand( selectedFrames.count() == 1 ? i18n("Apply Framestyle to Frame") : i18n("Apply Framestyle to Frames"));
- QValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
while(framesIterator != selectedFrames.end()) {
KWFrame *curFrame = (*framesIterator)->frame();
KCommand *cmd = new KWFrameStyleCommand( i18n("Apply Framestyle"), curFrame, sty );
@@ -4583,14 +4585,14 @@ void KWView::frameStyleSelected( KWFrameStyle *sty )
globalCmd->execute();
}
- m_gui->canvasWidget()->repaintAll();
+ m_gui->canvasWidget()->tqrepaintAll();
m_gui->canvasWidget()->setFocus(); // the combo keeps focus...*/
// Adjust GUI
const int pos = m_doc->frameStyleCollection()->indexOf( sty );
Q_ASSERT( pos >= 0 );
m_actionFrameStyle->setCurrentItem( pos );
- KToggleAction* act = dynamic_cast<KToggleAction *>(actionCollection()->action( sty->name().utf8() ));
+ KToggleAction* act = dynamic_cast<KToggleAction *>(actionCollection()->action( sty->name().utf8().data() ));
if ( act )
act->setChecked( true );
}
@@ -4599,8 +4601,8 @@ void KWView::frameStyleSelected( KWFrameStyle *sty )
// Called when selecting a tablestyle in the Table / Tablestyle menu
void KWView::slotTableStyleSelected()
{
- QString actionName = QString::fromUtf8(sender()->name());
- const QString prefix = TABLESTYLE_ACTION_PREFIX;
+ TQString actionName = TQString::fromUtf8(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name());
+ const TQString prefix = TABLESTYLE_ACTION_PREFIX;
if ( actionName.startsWith( prefix ) ) {
actionName = actionName.mid( prefix.length() );
tableStyleSelected( m_doc->tableStyleCollection()->findStyle( actionName ) );
@@ -4632,13 +4634,13 @@ void KWView::tableStyleSelected( KWTableStyle *sty )
}
else
{
- QValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
+ TQValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
if (selectedFrames.count() <= 0)
return; // nope, no frames are selected.
KMacroCommand *globalCmd = new KMacroCommand( selectedFrames.count() == 1 ? i18n("Apply Tablestyle to Frame") : i18n("Apply Tablestyle to Frames"));
- QValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
while(framesIterator != selectedFrames.end() ) {
KWFrame *curFrame = (*framesIterator)->frame();
if(dynamic_cast<KWTextFrameSet*>(curFrame->frameSet())) {
@@ -4653,13 +4655,13 @@ void KWView::tableStyleSelected( KWTableStyle *sty )
globalCmd->execute();
}
- m_gui->canvasWidget()->repaintAll();
+ m_gui->canvasWidget()->tqrepaintAll();
m_gui->canvasWidget()->setFocus(); // the combo keeps focus...*/
// Adjust GUI
int pos = m_doc->tableStyleCollection()->indexOf( sty );
m_actionTableStyle->setCurrentItem( pos );
- KToggleAction* act = dynamic_cast<KToggleAction *>(actionCollection()->action( sty->name().utf8() ));
+ KToggleAction* act = dynamic_cast<KToggleAction *>(actionCollection()->action( sty->name().utf8().data() ));
if ( act )
act->setChecked( true );
}
@@ -4682,8 +4684,8 @@ void KWView::decreaseFontSize()
void KWView::textSizeSelected( int size )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand *globalCmd = new KMacroCommand(i18n("Change Text Size"));
for ( ; it.current() ; ++it )
{
@@ -4695,11 +4697,11 @@ void KWView::textSizeSelected( int size )
m_gui->canvasWidget()->setFocus(); // the combo keeps focus...
}
-void KWView::textFontSelected( const QString & font )
+void KWView::textFontSelected( const TQString & font )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
@@ -4716,9 +4718,9 @@ void KWView::textFontSelected( const QString & font )
m_gui->canvasWidget()->setFocus(); // the combo keeps focus...
}
-QPtrList<KoTextFormatInterface> KWView::applicableTextInterfaces() const
+TQPtrList<KoTextFormatInterface> KWView::applicableTextInterfaces() const
{
- QPtrList<KoTextFormatInterface> lst;
+ TQPtrList<KoTextFormatInterface> lst;
if (currentTextEdit())
{
if ( !currentTextEdit()->textObject()->protectContent())
@@ -4728,8 +4730,8 @@ QPtrList<KoTextFormatInterface> KWView::applicableTextInterfaces() const
//kdDebug() << "text frame name: " << currentTextEdit()->textFrameSet()->name() << endl;
KWCollectFramesetsVisitor visitor;
currentTextEdit()->textDocument()->visitSelection( KoTextDocument::Standard, &visitor ); //find all framesets in the selection
- const QValueList<KWFrameSet *>& frameset = visitor.frameSets();
- for ( QValueList<KWFrameSet *>::ConstIterator it = frameset.begin(); it != frameset.end(); ++it )
+ const TQValueList<KWFrameSet *>& frameset = visitor.frameSets();
+ for ( TQValueList<KWFrameSet *>::ConstIterator it = frameset.begin(); it != frameset.end(); ++it )
{
if ( (*it)->type() == FT_TABLE )
{
@@ -4757,11 +4759,11 @@ QPtrList<KoTextFormatInterface> KWView::applicableTextInterfaces() const
else
{ // it might be that a frame (or several frames) are selected
// in that case, list the text framesets behind them
- QValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
- QValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
+ TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
while(framesIterator != selectedFrames.end()) {
KWTextFrameSet* fs = dynamic_cast<KWTextFrameSet *>( (*framesIterator)->frame()->frameSet() );
- if ( fs && !lst.contains( fs )&& !fs->protectContent() )
+ if ( fs && !lst.tqcontains( fs )&& !fs->protectContent() )
lst.append( fs );
++framesIterator;
}
@@ -4771,9 +4773,9 @@ QPtrList<KoTextFormatInterface> KWView::applicableTextInterfaces() const
void KWView::textBold()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
@@ -4792,8 +4794,8 @@ void KWView::textBold()
void KWView::textItalic()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
@@ -4811,8 +4813,8 @@ void KWView::textItalic()
void KWView::textUnderline()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
@@ -4831,8 +4833,8 @@ void KWView::textUnderline()
void KWView::textStrikeOut()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
@@ -4850,15 +4852,15 @@ void KWView::textStrikeOut()
void KWView::textColor()
{
- /* QColor color = edit->textColor();
+ /* TQColor color = edit->textColor();
if ( KColorDialog::getColor( color ) ) {
m_actionFormatColor->setColor( color );
edit->setTextColor( color );
}
*/
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
@@ -4878,12 +4880,12 @@ void KWView::textAlignLeft()
{
if ( m_actionFormatAlignLeft->isChecked() )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
- KCommand *cmd = it.current()->setAlignCommand( Qt::AlignLeft );
+ KCommand *cmd = it.current()->setAlignCommand( TQt::AlignLeft );
if (cmd)
{
if ( !macroCmd)
@@ -4902,12 +4904,12 @@ void KWView::textAlignCenter()
{
if ( m_actionFormatAlignCenter->isChecked() )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
- KCommand *cmd = it.current()->setAlignCommand( Qt::AlignHCenter );
+ KCommand *cmd = it.current()->setAlignCommand( TQt::AlignHCenter );
if (cmd)
{
if ( !macroCmd )
@@ -4926,12 +4928,12 @@ void KWView::textAlignRight()
{
if ( m_actionFormatAlignRight->isChecked() )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
- KCommand *cmd = it.current()->setAlignCommand( Qt::AlignRight );
+ KCommand *cmd = it.current()->setAlignCommand( TQt::AlignRight );
if ( cmd )
{
if (!macroCmd )
@@ -4950,12 +4952,12 @@ void KWView::textAlignBlock()
{
if ( m_actionFormatAlignBlock->isChecked() )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
- KCommand *cmd = it.current()->setAlignCommand( Qt::AlignJustify );
+ KCommand *cmd = it.current()->setAlignCommand( TQt::AlignJustify );
if ( cmd )
{
if ( !macroCmd )
@@ -4970,18 +4972,18 @@ void KWView::textAlignBlock()
m_actionFormatAlignBlock->setChecked( true );
}
-void KWView::setSpacing( KoParagLayout::SpacingType spacing, const QString& commandName)
+void KWView::setSpacing( KoParagLayout::SpacingType spacing, const TQString& commandName)
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
- KoParagLayout layout( *it.current()->currentParagLayoutFormat() );
- layout.lineSpacingType = spacing;
+ KoParagLayout tqlayout( *it.current()->currentParagLayoutFormat() );
+ tqlayout.lineSpacingType = spacing;
- KCommand *cmd = it.current()->setParagLayoutFormatCommand( &layout, KoParagLayout::LineSpacing );
+ KCommand *cmd = it.current()->setParagLayoutFormatCommand( &tqlayout, KoParagLayout::LineSpacing );
if (cmd)
{
if ( !macroCmd )
@@ -5019,8 +5021,8 @@ void KWView::textSpacingDouble()
void KWView::slotCounterStyleSelected()
{
- QString actionName = QString::fromLatin1(sender()->name());
- QString styleStr = actionName.mid(13);
+ TQString actionName = TQString::tqfromLatin1(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name());
+ TQString styleStr = actionName.mid(13);
//kdDebug() << "KWView::slotCounterStyleSelected styleStr=" << styleStr << endl;
KoParagCounter::Style style = (KoParagCounter::Style)(styleStr.toInt());
KoParagCounter c;
@@ -5030,7 +5032,7 @@ void KWView::slotCounterStyleSelected()
c.setNumbering( KoParagCounter::NUM_LIST );
c.setStyle( style );
if ( c.isBullet() )
- c.setSuffix( QString::null );
+ c.setSuffix( TQString() );
else
c.setSuffix( "." );
// TODO save this setting, to use the last one selected in the dialog?
@@ -5045,8 +5047,8 @@ void KWView::slotCounterStyleSelected()
}
}
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
@@ -5064,9 +5066,9 @@ void KWView::slotCounterStyleSelected()
void KWView::textSuperScript()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
@@ -5086,9 +5088,9 @@ void KWView::textSuperScript()
void KWView::textSubScript()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
@@ -5108,9 +5110,9 @@ void KWView::textSubScript()
void KWView::changeCaseOfText()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KoChangeCaseDia *caseDia=new KoChangeCaseDia( this,"change case" );
if(caseDia->exec())
{
@@ -5142,18 +5144,18 @@ void KWView::editPersonalExpr()
void KWView::textIncreaseIndent()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
double leftMargin=0.0;
if(!lst.isEmpty())
- leftMargin=lst.first()->currentParagLayoutFormat()->margins[QStyleSheetItem::MarginLeft];
+ leftMargin=lst.first()->currentParagLayoutFormat()->margins[TQStyleSheetItem::MarginLeft];
double indent = m_doc->indentValue();
double newVal = leftMargin + indent;
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
- KCommand *cmd = it.current()->setMarginCommand( QStyleSheetItem::MarginLeft, newVal );
+ KCommand *cmd = it.current()->setMarginCommand( TQStyleSheetItem::MarginLeft, newVal );
if (cmd)
{
if ( !macroCmd )
@@ -5165,8 +5167,8 @@ void KWView::textIncreaseIndent()
m_doc->addCommand(macroCmd);
if(!lst.isEmpty())
{
- const KoParagLayout *layout=lst.first()->currentParagLayoutFormat();
- showRulerIndent( layout->margins[QStyleSheetItem::MarginLeft], layout->margins[QStyleSheetItem::MarginFirstLine], layout->margins[QStyleSheetItem::MarginRight], lst.first()->rtl());
+ const KoParagLayout *tqlayout=lst.first()->currentParagLayoutFormat();
+ showRulerIndent( tqlayout->margins[TQStyleSheetItem::MarginLeft], tqlayout->margins[TQStyleSheetItem::MarginFirstLine], tqlayout->margins[TQStyleSheetItem::MarginRight], lst.first()->rtl());
}
#if 0
@@ -5181,7 +5183,7 @@ void KWView::textIncreaseIndent()
// a frame anywhere, even closer to the edges than left/right border allows (DF).
//if( newVal <= (m_doc->ptPaperWidth()-m_doc->ptRightBorder()-m_doc->ptLeftBorder()))
{
- KCommand *cmd=edit->setMarginCommand( QStyleSheetItem::MarginLeft, newVal );
+ KCommand *cmd=edit->setMarginCommand( TQStyleSheetItem::MarginLeft, newVal );
if(cmd)
m_doc->addCommand(cmd);
}
@@ -5191,18 +5193,18 @@ void KWView::textIncreaseIndent()
void KWView::textDecreaseIndent()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
double leftMargin=0.0;
if(!lst.isEmpty())
- leftMargin=lst.first()->currentParagLayoutFormat()->margins[QStyleSheetItem::MarginLeft];
+ leftMargin=lst.first()->currentParagLayoutFormat()->margins[TQStyleSheetItem::MarginLeft];
double indent = m_doc->indentValue();
double newVal = leftMargin - indent;
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
- KCommand *cmd = it.current()->setMarginCommand( QStyleSheetItem::MarginLeft, QMAX( newVal, 0 ) );
+ KCommand *cmd = it.current()->setMarginCommand( TQStyleSheetItem::MarginLeft, TQMAX( newVal, 0 ) );
if (cmd)
{
if ( !macroCmd )
@@ -5214,8 +5216,8 @@ void KWView::textDecreaseIndent()
m_doc->addCommand(macroCmd);
if(!lst.isEmpty())
{
- const KoParagLayout *layout=lst.first()->currentParagLayoutFormat();
- showRulerIndent( layout->margins[QStyleSheetItem::MarginLeft], layout->margins[QStyleSheetItem::MarginFirstLine], layout->margins[QStyleSheetItem::MarginRight], lst.first()->rtl());
+ const KoParagLayout *tqlayout=lst.first()->currentParagLayoutFormat();
+ showRulerIndent( tqlayout->margins[TQStyleSheetItem::MarginLeft], tqlayout->margins[TQStyleSheetItem::MarginFirstLine], tqlayout->margins[TQStyleSheetItem::MarginRight], lst.first()->rtl());
}
@@ -5228,7 +5230,7 @@ void KWView::textDecreaseIndent()
{
double indent = m_doc->indentValue();
double newVal = leftMargin - indent;
- KCommand *cmd=edit->setMarginCommand( QStyleSheetItem::MarginLeft, QMAX( newVal, 0 ) );
+ KCommand *cmd=edit->setMarginCommand( TQStyleSheetItem::MarginLeft, TQMAX( newVal, 0 ) );
if(cmd)
m_doc->addCommand(cmd);
}
@@ -5239,9 +5241,9 @@ void KWView::textDecreaseIndent()
void KWView::textDefaultFormat()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
@@ -5301,7 +5303,7 @@ void KWView::borderChanged(KoBorder::BorderType type) {
border.color = m_actionBorderColor->color();
border.setStyle( KoBorder::getStyle( m_actionBorderStyle->currentText() ) );
bool enabled = false;
- QString comment;
+ TQString comment;
switch(type) {
case KoBorder::LeftBorder:
enabled = m_actionBorderLeft->isChecked();
@@ -5342,10 +5344,10 @@ void KWView::borderChanged(KoBorder::BorderType type) {
cmd=edit->setBordersCommand( left, right, top, bottom );
}
else {
- QPtrList<FrameIndex> indexes;
- QPtrList<KWFrameBorderCommand::FrameBorderTypeStruct> borders;
- QValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
- QValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQPtrList<FrameIndex> indexes;
+ TQPtrList<KWFrameBorderCommand::FrameBorderTypeStruct> borders;
+ TQValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
+ TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
for(;framesIterator != selectedFrames.end(); ++framesIterator) {
if( !(*framesIterator)->selected() ) continue;
KWFrame *frame = (*framesIterator)->frame();
@@ -5378,7 +5380,7 @@ void KWView::borderChanged(KoBorder::BorderType type) {
void KWView::backgroundColor()
{
- QColor backColor = m_actionBackgroundColor->color();
+ TQColor backColor = m_actionBackgroundColor->color();
// ### TODO port to applicableTextInterfaces ? Hmm, careful with the "frame" case.
KWTextFrameSetEdit *edit = currentTextEdit();
if ( m_gui)
@@ -5394,13 +5396,13 @@ void KWView::backgroundColor()
}
}
-void KWView::resizeEvent( QResizeEvent *e )
+void KWView::resizeEvent( TQResizeEvent *e )
{
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
if ( m_gui )
{
m_gui->resize( width(), height() );
- QString s = m_actionViewZoom->currentText();
+ TQString s = m_actionViewZoom->currentText();
if ( !KoZoomMode::isConstant(s) )
viewZoom( s );
}
@@ -5412,8 +5414,8 @@ void KWView::guiActivateEvent( KParts::GUIActivateEvent *ev )
{
initGui();
if (m_doc->isEmbedded() ) {
- // Get zoom level from KoView, i.e. from the parent view
- const int zoom = qRound( KoView::zoom() * 100 );
+ // Get zoom level from KoView, i.e. from the tqparent view
+ const int zoom = tqRound( KoView::zoom() * 100 );
setZoom( zoom, true );
showZoom( zoom );
}
@@ -5425,9 +5427,9 @@ void KWView::tabListChanged( const KoTabulatorList & tabList )
{
if(!m_doc->isReadWrite())
return;
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
@@ -5443,9 +5445,9 @@ void KWView::tabListChanged( const KoTabulatorList & tabList )
m_doc->addCommand(macroCmd);
}
-void KWView::newPageLayout( const KoPageLayout &layout )
+void KWView::newPageLayout( const KoPageLayout &tqlayout )
{
- QString mode = viewMode()->type();
+ TQString mode = viewMode()->type();
bool state = (mode!="ModeText");
if ( !state )
return;
@@ -5455,14 +5457,14 @@ void KWView::newPageLayout( const KoPageLayout &layout )
KoKWHeaderFooter hf;
m_doc->getPageLayout( pgLayout, cl, hf );
- if(layout==pgLayout)
+ if(tqlayout==pgLayout)
return;
KWPageLayoutStruct oldLayout( pgLayout, cl, hf );
- m_doc->setPageLayout( layout, cl, hf );
+ m_doc->setPageLayout( tqlayout, cl, hf );
- KWPageLayoutStruct newLayout( layout, cl, hf );
+ KWPageLayoutStruct newLayout( tqlayout, cl, hf );
KWTextFrameSetEdit *edit = currentTextEdit();
if (edit)
@@ -5471,24 +5473,24 @@ void KWView::newPageLayout( const KoPageLayout &layout )
m_doc->addCommand(cmd);
}
-void KWView::slotPageLayoutChanged( const KoPageLayout& layout )
+void KWView::slotPageLayoutChanged( const KoPageLayout& tqlayout )
{
// This is connected to a signal of KWDocument, so that when the
- // above method, or any other way of changing the page layout happens,
+ // above method, or any other way of changing the page tqlayout happens,
// the rulers are updated in all views.
- viewMode()->setPageLayout( m_gui->getHorzRuler(), m_gui->getVertRuler(), layout );
- m_gui->canvasWidget()->repaintAll();
+ viewMode()->setPageLayout( m_gui->getHorzRuler(), m_gui->getVertRuler(), tqlayout );
+ m_gui->canvasWidget()->tqrepaintAll();
}
void KWView::newFirstIndent( double firstIndent )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
- KCommand *cmd = it.current()->setMarginCommand( QStyleSheetItem::MarginFirstLine, firstIndent );
+ KCommand *cmd = it.current()->setMarginCommand( TQStyleSheetItem::MarginFirstLine, firstIndent );
if (cmd)
{
if ( !macroCmd )
@@ -5502,13 +5504,13 @@ void KWView::newFirstIndent( double firstIndent )
void KWView::newLeftIndent( double leftIndent )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
- KCommand *cmd = it.current()->setMarginCommand( QStyleSheetItem::MarginLeft, leftIndent );
+ KCommand *cmd = it.current()->setMarginCommand( TQStyleSheetItem::MarginLeft, leftIndent );
if (cmd)
{
if ( !macroCmd )
@@ -5524,13 +5526,13 @@ void KWView::newLeftIndent( double leftIndent )
void KWView::newRightIndent( double rightIndent)
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it )
{
- KCommand *cmd = it.current()->setMarginCommand( QStyleSheetItem::MarginRight, rightIndent );
+ KCommand *cmd = it.current()->setMarginCommand( TQStyleSheetItem::MarginRight, rightIndent );
if (cmd)
{
if ( !macroCmd )
@@ -5542,7 +5544,7 @@ void KWView::newRightIndent( double rightIndent)
m_doc->addCommand(macroCmd);
}
-QPopupMenu * KWView::popupMenu( const QString& name )
+TQPopupMenu * KWView::popupMenu( const TQString& name )
{
// factory() is 0 when right-clicking on the kword document while
// an embedded object is active. KoPartManager lets the click through,
@@ -5551,14 +5553,14 @@ QPopupMenu * KWView::popupMenu( const QString& name )
partManager()->setActivePart( m_doc, this );
Q_ASSERT( factory() );
if ( factory() )
- return ((QPopupMenu*)factory()->container( name, this ));
+ return ((TQPopupMenu*)factory()->container( name, this ));
return 0;
}
void KWView::startKSpell()
{
if ( !m_spell.kospell )
- m_spell.kospell = new KoSpell( m_broker, this );
+ m_spell.kospell = new KoSpell( m_broker, TQT_TQOBJECT(this) );
// Spell-check the next paragraph
Q_ASSERT( m_spell.textIterator );
@@ -5568,22 +5570,22 @@ void KWView::startKSpell()
m_spell.dlg = new KSpell2::Dialog( m_spell.kospell, this );
m_spell.dlg->activeAutoCorrect( true );
- QObject::connect( m_spell.dlg, SIGNAL(misspelling(const QString&, int)),
- this, SLOT(spellCheckerMisspelling(const QString&, int)) );
- QObject::connect( m_spell.dlg, SIGNAL(replace(const QString&, int, const QString&)),
- this, SLOT(spellCheckerCorrected(const QString&, int, const QString&)) );
- QObject::connect( m_spell.dlg, SIGNAL(done(const QString&) ),
- this, SLOT(spellCheckerDone(const QString&)) );
- QObject::connect( m_spell.dlg, SIGNAL(cancel() ),
- this, SLOT( spellCheckerCancel() ) );
- QObject::connect( m_spell.dlg, SIGNAL(autoCorrect(const QString &, const QString & ) ),
- this, SLOT( spellAddAutoCorrect (const QString &, const QString &) ) );
+ TQObject::connect( m_spell.dlg, TQT_SIGNAL(misspelling(const TQString&, int)),
+ TQT_TQOBJECT(this), TQT_SLOT(spellCheckerMisspelling(const TQString&, int)) );
+ TQObject::connect( m_spell.dlg, TQT_SIGNAL(tqreplace(const TQString&, int, const TQString&)),
+ TQT_TQOBJECT(this), TQT_SLOT(spellCheckerCorrected(const TQString&, int, const TQString&)) );
+ TQObject::connect( m_spell.dlg, TQT_SIGNAL(done(const TQString&) ),
+ TQT_TQOBJECT(this), TQT_SLOT(spellCheckerDone(const TQString&)) );
+ TQObject::connect( m_spell.dlg, TQT_SIGNAL(cancel() ),
+ TQT_TQOBJECT(this), TQT_SLOT( spellCheckerCancel() ) );
+ TQObject::connect( m_spell.dlg, TQT_SIGNAL(autoCorrect(const TQString &, const TQString & ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( spellAddAutoCorrect (const TQString &, const TQString &) ) );
m_spell.dlg->show();
//clearSpellChecker();
}
-void KWView::spellCheckerMisspelling( const QString &old, int pos )
+void KWView::spellCheckerMisspelling( const TQString &old, int pos )
{
//kdDebug(32001) << "KWView::spellCheckerMisspelling old=" << old << " pos=" << pos << endl;
KoTextObject* textobj = m_spell.kospell->currentTextObject();
@@ -5599,7 +5601,7 @@ void KWView::spellCheckerMisspelling( const QString &old, int pos )
textdoc->textFrameSet()->highlightPortion( parag, pos, old.length(), m_gui->canvasWidget() );
}
-void KWView::spellCheckerCorrected( const QString &old, int pos , const QString &corr )
+void KWView::spellCheckerCorrected( const TQString &old, int pos , const TQString &corr )
{
//kdDebug(32001) << "KWView::spellCheckerCorrected old=" << old << " corr=" << corr << " pos=" << pos << endl;
KoTextObject* textobj = m_spell.kospell->currentTextObject();
@@ -5619,10 +5621,10 @@ void KWView::spellCheckerCorrected( const QString &old, int pos , const QString
if(!m_spell.macroCmdSpellCheck)
m_spell.macroCmdSpellCheck=new KMacroCommand(i18n("Correct Misspelled Word"));
m_spell.macroCmdSpellCheck->addCommand(textobj->replaceSelectionCommand(
- &cursor, corr, QString::null, KoTextDocument::HighlightSelection));
+ &cursor, corr, TQString(), KoTextDocument::HighlightSelection));
}
-void KWView::spellCheckerDone( const QString & )
+void KWView::spellCheckerDone( const TQString & )
{
//kdDebug(32001) << "KWView::spellCheckerDone" << endl;
KWTextDocument *textdoc=static_cast<KWTextDocument *>( m_spell.kospell->textDocument() );
@@ -5680,7 +5682,7 @@ void KWView::spellCheckerRemoveHighlight()
edit->drawCursor( TRUE );
}
-void KWView::spellAddAutoCorrect (const QString & originalword, const QString & newword)
+void KWView::spellAddAutoCorrect (const TQString & originalword, const TQString & newword)
{
m_doc->autoFormat()->addAutoFormatEntry( originalword, newword );
}
@@ -5807,7 +5809,7 @@ void KWView::changeFootEndNoteState()
{
bool rw = koDocument()->isReadWrite();
KWTextFrameSetEdit * edit = currentTextEdit();
- QString mode = viewMode()->type();
+ TQString mode = viewMode()->type();
bool isEditableFrameset = edit && edit->frameSet() && edit->frameSet()->isMainFrameset();
bool ok = rw && isEditableFrameset && (mode!="ModeText");
@@ -5824,7 +5826,7 @@ void KWView::changeFootNoteMenuItem( bool footnote)
void KWView::slotUpdateRuler()
{
KWCanvas* canvas = m_gui->canvasWidget();
- QRect r( canvas->viewMode()->rulerFrameRect() );
+ TQRect r( canvas->viewMode()->rulerFrameRect() );
if ( !r.isNull() )
{
m_gui->getHorzRuler()->setFrameStartEnd( r.left(), r.right() );
@@ -5836,7 +5838,7 @@ void KWView::slotUpdateRuler()
void KWView::frameSelectedChanged()
{
bool rw = koDocument()->isReadWrite();
- QValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
+ TQValueList<KWFrameView*> selectedFrames = frameViewManager()->selectedFrames();
m_actionFormatFrameSet->setEnabled( selectedFrames.count() >= 1 );
if ( rw && selectedFrames.count() >= 1 )
@@ -5849,7 +5851,7 @@ void KWView::frameSelectedChanged()
bool containsCellFrame = false;
bool containsMainFrame = false;
- QValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
while(framesIterator != selectedFrames.end() && (okForDelete || okForLowerRaise ||
okForChangeParagStyle || okForChangeInline) ) {
// Check we selected no footer nor header
@@ -5905,7 +5907,7 @@ void KWView::frameSelectedChanged()
bool frameDifferentOfPart=false;
if(selectedFrames.count() >= 1)
{
- QValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
while(framesIterator != selectedFrames.end()) {
if ( (*framesIterator)->frame()->frameSet()->type()!=FT_PART &&
(*framesIterator)->frame()->frameSet()->type()!= FT_PICTURE) {
@@ -5921,9 +5923,9 @@ void KWView::frameSelectedChanged()
if ( frameDifferentOfPart ) {
KWFrame *frame = selectedFrames[0]->frame();
- QColor frameCol=frame->backgroundColor().color();
+ TQColor frameCol=frame->backgroundColor().color();
//m_actionBackgroundColor->setText(i18n("Frame Background Color..."));
- m_actionBackgroundColor->setCurrentColor( frameCol.isValid()? frame->backgroundColor().color() : QApplication::palette().color( QPalette::Active, QColorGroup::Base ));
+ m_actionBackgroundColor->setCurrentColor( frameCol.isValid()? frame->backgroundColor().color() : TQApplication::palette().color( TQPalette::Active, TQColorGroup::Base ));
}
m_actionCreateFrameStyle->setEnabled( selectedFrames.count()==1 );
@@ -5933,10 +5935,10 @@ void KWView::frameSelectedChanged()
updatePageInfo(); // takes care of slotUpdateRuler()
updateFrameStatusBarItem();
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( !lst.isEmpty() )
{
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KoTextFormat format=*(lst.first()->currentFormat());
showFormat( format );
@@ -5945,19 +5947,19 @@ void KWView::frameSelectedChanged()
if(paragLayout->counter)
counter = *(paragLayout->counter);
showCounter( counter );
- int align = paragLayout->alignment;
- if ( align == Qt::AlignAuto )
- align = Qt::AlignLeft; // ## seems hard to detect RTL here
+ int align = paragLayout->tqalignment;
+ if ( align == TQt::AlignAuto )
+ align = TQt::AlignLeft; // ## seems hard to detect RTL here
showAlign( align );
KoParagLayout::SpacingType spacing=paragLayout->lineSpacingType;
showSpacing( spacing );
}
- m_gui->canvasWidget()->repaintAll(false);
+ m_gui->canvasWidget()->tqrepaintAll(false);
}
-void KWView::updateTableActions( QValueList<KWFrameView*> selectedFrames)
+void KWView::updateTableActions( TQValueList<KWFrameView*> selectedFrames)
{
TableInfo ti(selectedFrames);
KWTableFrameSet *table = m_gui->canvasWidget()->getCurrentTable();
@@ -6032,11 +6034,11 @@ bool KWView::doubleClickActivation() const
return TRUE;
}
-QWidget* KWView::canvas() const
+TQWidget* KWView::canvas() const
{
// used to be ->viewport(), but this makes no sense.
// active embedded objects must be positioned relative to the real view,
- // to scroll around with it, instead of being children of the fixed viewport.
+ // to scroll around with it, instead of being tqchildren of the fixed viewport.
return m_gui->canvasWidget();
}
@@ -6052,8 +6054,8 @@ int KWView::canvasYOffset() const
void KWView::canvasAddChild( KoViewChild * child )
{
- connect( m_gui->canvasWidget(), SIGNAL( viewTransformationsChanged() ),
- child, SLOT( reposition() ) );
+ connect( m_gui->canvasWidget(), TQT_SIGNAL( viewTransformationsChanged() ),
+ child, TQT_SLOT( reposition() ) );
// Not necessary anymore
//m_gui->canvasWidget()->addChild( child->frame() );
}
@@ -6066,10 +6068,10 @@ void KWView::changePicture()
return;
KWPictureFrameSet *frameset = static_cast<KWPictureFrameSet *>(frame->frameSet());
KoPictureKey oldKey ( frameset->picture().getKey() );
- QString oldFile ( oldKey.filename() );
+ TQString oldFile ( oldKey.filename() );
KURL url;
url.setPath( oldFile );
- if (!QDir(url.directory()).exists())
+ if (!TQDir(url.directory()).exists())
oldFile = url.fileName();
KoPicture picture ( KWInsertPicDia::selectPictureDia( oldFile, this ) );
@@ -6093,32 +6095,32 @@ void KWView::savePicture()
if ( frame )//test for dcop call
{
KWPictureFrameSet *frameset = static_cast<KWPictureFrameSet *>(frame->frameSet());
- QString oldFile = frameset->picture().getKey().filename();
+ TQString oldFile = frameset->picture().getKey().filename();
KURL url;
url.setPath( oldFile );
- if ( !QDir(url.directory()).exists() )
+ if ( !TQDir(url.directory()).exists() )
oldFile = url.fileName();
KoPicture picture( frameset->picture() );
- QString mimetype = picture.getMimeType();
+ TQString mimetype = picture.getMimeType();
kdDebug() << "Picture has mime type: " << mimetype << endl;
- QStringList mimetypes;
+ TQStringList mimetypes;
mimetypes << mimetype;
- KFileDialog fd( oldFile, QString::null, this, 0, TRUE );
+ KFileDialog fd( oldFile, TQString(), this, 0, TRUE );
fd.setMimeFilter( mimetypes );
fd.setCaption(i18n("Save Picture"));
fd.setOperationMode(KFileDialog::Saving);
- if ( fd.exec() == QDialog::Accepted )
+ if ( fd.exec() == TQDialog::Accepted )
{
url = fd.selectedURL();
if ( url.isValid() )
{
if ( url.isLocalFile() )
{
- QFile file( url.path() );
+ TQFile file( url.path() );
if ( file.open( IO_ReadWrite ) )
{
- picture.save( &file );
+ picture.save( TQT_TQIODEVICE(&file) );
file.close();
}
else
@@ -6134,15 +6136,15 @@ void KWView::savePicture()
tempFile.setAutoDelete( true );
if ( tempFile.status() == 0 )
{
- QFile file( tempFile.name() );
+ TQFile file( tempFile.name() );
if ( file.open( IO_ReadWrite ) )
{
- picture.save( &file );
+ picture.save( TQT_TQIODEVICE(&file) );
file.close();
if ( !KIO::NetAccess::upload( tempFile.name(), url, this ) )
{
KMessageBox::sorry( this, i18n(
- "Unable to save the file to '%1'. %2.").arg( url.prettyURL() ).arg( KIO::NetAccess::lastErrorString() ),
+ "Unable to save the file to '%1'. %2.").tqarg( url.prettyURL() ).tqarg( KIO::NetAccess::lastErrorString() ),
i18n("Save Failed") );
}
}
@@ -6153,12 +6155,12 @@ void KWView::savePicture()
}
else
KMessageBox::sorry( this, i18n(
- "Error during saving. Could not create temporary file: %1.").arg( strerror( tempFile.status() ) ),
+ "Error during saving. Could not create temporary file: %1.").tqarg( strerror( tempFile.status() ) ),
i18n("Save Picture") );
}
}
else
- KMessageBox::sorry( this, i18n("URL %1 is invalid.").arg( url.prettyURL() ), i18n("Save Picture") );
+ KMessageBox::sorry( this, i18n("URL %1 is invalid.").tqarg( url.prettyURL() ), i18n("Save Picture") );
}
}
}
@@ -6201,18 +6203,18 @@ void KWView::inlineFrame()
if( !frame)
return;
KWFrameSet * fs = frame->frameSet();
- KWFrameSet * parentFs = fs->groupmanager() ? fs->groupmanager() : fs;
+ KWFrameSet * tqparentFs = fs->groupmanager() ? fs->groupmanager() : fs;
if(m_actionInlineFrame->isChecked())
{
KMacroCommand* macroCmd = new KMacroCommand( i18n("Make Frameset Inline") );
- QValueList<FrameIndex> frameindexList;
- QValueList<FrameMoveStruct> frameindexMove;
+ TQValueList<FrameIndex> frameindexList;
+ TQValueList<FrameMoveStruct> frameindexMove;
KoPoint initialPos = frame->topLeft();
// turn non-floating frame into floating frame
- KWFrameSetInlineCommand *cmd = new KWFrameSetInlineCommand( i18n("Make Frameset Inline"), parentFs, true );
+ KWFrameSetInlineCommand *cmd = new KWFrameSetInlineCommand( i18n("Make Frameset Inline"), tqparentFs, true );
cmd->execute();
frameindexList.append( FrameIndex( frame ) );
@@ -6226,7 +6228,7 @@ void KWView::inlineFrame()
}
else
{
- KWFrameSetInlineCommand *cmd = new KWFrameSetInlineCommand( i18n("Make Frameset Non-Inline"), parentFs, false );
+ KWFrameSetInlineCommand *cmd = new KWFrameSetInlineCommand( i18n("Make Frameset Non-Inline"), tqparentFs, false );
m_doc->addCommand(cmd);
cmd->execute();
}
@@ -6247,10 +6249,10 @@ void KWView::changeLink()
KoLinkVariable * var=edit->linkVariable();
if(var)
{
- QString oldhref= var->url();
- QString oldLinkName=var->value();
- QString link=oldLinkName;
- QString ref=oldhref;
+ TQString oldhref= var->url();
+ TQString oldLinkName=var->value();
+ TQString link=oldLinkName;
+ TQString ref=oldhref;
if(KoInsertLinkDia::createLinkDia(link, ref, m_doc->listOfBookmarkName(0), true, this))
{
if(!link.isEmpty() && !ref.isEmpty())
@@ -6298,14 +6300,14 @@ void KWView::showDocStructure()
{
m_doc->setShowDocStruct(m_actionShowDocStruct->isChecked());
m_doc->reorganizeGUI();
- QTimer::singleShot( 0, this, SLOT( updateZoom() ) );
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( updateZoom() ) );
}
void KWView::showRuler()
{
m_doc->setShowRuler( m_actionShowRuler->isChecked());
m_doc->reorganizeGUI();
- QTimer::singleShot( 0, this, SLOT( updateZoom() ) );
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( updateZoom() ) );
}
void KWView::viewGrid()
@@ -6313,7 +6315,7 @@ void KWView::viewGrid()
m_doc->setShowGrid( m_actionViewShowGrid->isChecked() );
m_doc->setModified( true );
m_doc->updateGridButton();
- m_doc->repaintAllViews(false);
+ m_doc->tqrepaintAllViews(false);
}
void KWView::viewSnapToGrid()
@@ -6398,15 +6400,15 @@ void KWView::editComment()
KoNoteVariable * var = dynamic_cast<KoNoteVariable *>(tmpVar);
if(var)
{
- QString authorName;
+ TQString authorName;
KoDocumentInfo * info = m_doc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
kdWarning() << "Author information not found in documentInfo !" << endl;
else
authorName = authorPage->fullName();
- QString oldValue = var->note();
- QString createDate = var->createdNote();
+ TQString oldValue = var->note();
+ TQString createDate = var->createdNote();
KoCommentDia *commentDia = new KoCommentDia( this, oldValue, authorName, createDate);
if( commentDia->exec() )
{
@@ -6459,8 +6461,8 @@ void KWView::applyAutoFormat()
{
m_doc->autoFormat()->readConfig();
KMacroCommand *macro = 0L;
- QValueList<KoTextObject *> list(m_doc->visibleTextObjects(viewMode()));
- QValueList<KoTextObject *>::Iterator fit = list.begin();
+ TQValueList<KoTextObject *> list(m_doc->visibleTextObjects(viewMode()));
+ TQValueList<KoTextObject *>::Iterator fit = list.begin();
for ( ; fit != list.end() ; ++fit )
{
KCommand *cmd = m_doc->autoFormat()->applyAutoFormat( *fit );
@@ -6481,10 +6483,10 @@ void KWView::createStyleFromSelection()
if ( edit )
{
KoStyleCollection* coll = m_doc->styleCollection();
- KoCreateStyleDia *dia = new KoCreateStyleDia( QStringList(), this, 0 );
+ KoCreateStyleDia *dia = new KoCreateStyleDia( TQStringList(), this, 0 );
if ( dia->exec() )
{
- QString name = dia->nameOfNewStyle();
+ TQString name = dia->nameOfNewStyle();
KoParagStyle* style = coll->findStyleByDisplayName( name );
if ( style ) // update existing style
{
@@ -6510,7 +6512,7 @@ void KWView::switchModeView()
slotUpdateRuler();
// Now update the actions appropriately
- QString mode = canvas->viewMode()->type();
+ TQString mode = canvas->viewMode()->type();
bool isTextMode = mode == "ModeText";
bool state = !isTextMode;
m_actionToolsCreateText->setEnabled(state);
@@ -6584,7 +6586,7 @@ void KWView::switchModeView()
updateZoomControls();
updatePageInfo();
- // set page layout in rulers
+ // set page tqlayout in rulers
canvas->viewMode()->setPageLayout( m_gui->getHorzRuler(), m_gui->getVertRuler(), m_doc->pageLayout() );
}
@@ -6620,8 +6622,8 @@ void KWView::changeFootNoteType()
KWFootNoteVariable * var = dynamic_cast<KWFootNoteVariable *>(tmpVar);
if(var && var->frameSet())
{
- KWFootNoteDia dia( var->noteType(), var->numberingType(), (var->numberingType()==KWFootNoteVariable::Auto) ? QString::null : var->manualString(), this, m_doc, 0 );
- QPtrListIterator<KoTextCustomItem> it( edit->textDocument()->allCustomItems() );
+ KWFootNoteDia dia( var->noteType(), var->numberingType(), (var->numberingType()==KWFootNoteVariable::Auto) ? TQString() : var->manualString(), this, m_doc, 0 );
+ TQPtrListIterator<KoTextCustomItem> it( edit->textDocument()->allCustomItems() );
for ( ; it.current() ; ++it )
{
KWFootNoteVariable *fnv = dynamic_cast<KWFootNoteVariable *>( it.current() );
@@ -6670,7 +6672,7 @@ void KWView::goToFootEndNote()
}
}
-void KWView::openDocStructurePopupMenu( const QPoint &p, KWFrameSet *frameset, KWTextParag *parag)
+void KWView::openDocStructurePopupMenu( const TQPoint &p, KWFrameSet *frameset, KWTextParag *parag)
{
bool rw = koDocument()->isReadWrite();
bool kttsdInstalled = KoSpeaker::isKttsdInstalled();
@@ -6683,7 +6685,7 @@ void KWView::openDocStructurePopupMenu( const QPoint &p, KWFrameSet *frameset, K
!frameset->isFootEndNote() && !frameset->isHeaderOrFooter()) );
m_actionDocStructSpeak->setEnabled( hasText && kttsdInstalled );
- QPopupMenu* popup = static_cast<QPopupMenu *>(factory()->container("docstruct_popup",this));
+ TQPopupMenu* popup = static_cast<TQPopupMenu *>(factory()->container("docstruct_popup",this));
if ( popup )
popup->exec(p);
}
@@ -6732,11 +6734,11 @@ void KWView::docStructSpeak()
void KWView::insertFile()
{
- KFileDialog fd( QString::null, QString::null, this, 0, TRUE );
+ KFileDialog fd( TQString(), TQString(), this, 0, TRUE );
fd.setMimeFilter( "application/x-kword" );
fd.setCaption(i18n("Insert File"));
KURL url;
- if ( fd.exec() != QDialog::Accepted )
+ if ( fd.exec() != TQDialog::Accepted )
return;
url = fd.selectedURL();
if( url.isEmpty() )
@@ -6759,7 +6761,7 @@ void KWView::insertFile(const KURL& url)
// ###### All of this should be ported to use the pasting code instead.
- QString maindoc = "maindoc.xml";
+ TQString maindoc = "maindoc.xml";
if ( store )
{
// We need to load the pictures before we treat framesets
@@ -6774,9 +6776,9 @@ void KWView::insertFile(const KURL& url)
return;
}
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( store->device() );
- QDomElement word = doc.documentElement();
+ TQDomElement word = doc.documentElement();
m_doc->loadPictureMap( word );
store->close();
@@ -6793,14 +6795,14 @@ void KWView::insertFile(const KURL& url)
delete store;
return;
}
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( store->device() );
- QDomElement word = doc.documentElement();
+ TQDomElement word = doc.documentElement();
- QDomElement framesets = word.namedItem( "FRAMESETS" ).toElement();
+ TQDomElement framesets = word.namedItem( "FRAMESETS" ).toElement();
if ( !framesets.isNull() )
{
- QDomElement framesetElem = framesets.firstChild().toElement();
+ TQDomElement framesetElem = framesets.firstChild().toElement();
// just in case
while ( !framesetElem.isNull() && framesetElem.tagName() != "FRAMESET" )
framesetElem = framesetElem.nextSibling().toElement();
@@ -6815,49 +6817,49 @@ void KWView::insertFile(const KURL& url)
insertionCursor = *edit->cursor();
}
// Handle the main textframeset special - concatenate the text
- QDomDocument domDoc( "PARAGRAPHS" );
- QDomElement paragsElem = domDoc.createElement( "PARAGRAPHS" );
+ TQDomDocument domDoc( "PARAGRAPHS" );
+ TQDomElement paragsElem = domDoc.createElement( "PARAGRAPHS" );
domDoc.appendChild( paragsElem );
// Need an intermediate list otherwise nextSibling doesn't work after moving the node
// to the other DOM tree ;)
- QValueList<QDomElement> paragList;
- QValueList<QString> inlineFsNames;
- QDomElement fsElem;
+ TQValueList<TQDomElement> paragList;
+ TQValueList<TQString> inlineFsNames;
+ TQDomElement fsElem;
- QDomNode n = framesetElem.firstChild().toElement();
+ TQDomNode n = framesetElem.firstChild().toElement();
while( !n.isNull() )
{
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if ( !e.isNull() && e.tagName() == "PARAGRAPH" )
{
paragList.append( e );
// Handle inline framesets
- QDomElement formatsElem = e.namedItem( "FORMATS" ).toElement();
+ TQDomElement formatsElem = e.namedItem( "FORMATS" ).toElement();
if ( !formatsElem.isNull() )
{
// Get references to inline framesets
- QDomElement formatElem = formatsElem.firstChild().toElement();
+ TQDomElement formatElem = formatsElem.firstChild().toElement();
for ( ; !formatElem.isNull() ; formatElem = formatElem.nextSibling().toElement() )
{
- QDomElement anchorElem = formatElem.namedItem( "ANCHOR" ).toElement();
+ TQDomElement anchorElem = formatElem.namedItem( "ANCHOR" ).toElement();
if ( !anchorElem.isNull() )
{
- QString type = anchorElem.attribute( "type" );
+ TQString type = anchorElem.attribute( "type" );
if ( type == "grpMgr" /* old syntax */ || type == "frameset" )
{
- QString iName = anchorElem.attribute( "instance" );
+ TQString iName = anchorElem.attribute( "instance" );
inlineFsNames.append( iName );
// inline framsets shall appear after the paragraph
- QString tableName;
- QDomElement table;
+ TQString tableName;
+ TQDomElement table;
fsElem = framesetElem.nextSibling().toElement();
for ( ; !fsElem.isNull() ; fsElem = fsElem.nextSibling().toElement() )
{
if ( fsElem.tagName() == "FRAMESET" )
{
- QString name = fsElem.attribute( "name" );
- QString grpMgr = fsElem.attribute( "grpMgr" );
+ TQString name = fsElem.attribute( "name" );
+ TQString grpMgr = fsElem.attribute( "grpMgr" );
if ( name == iName )
{
paragList.append( fsElem );
@@ -6894,8 +6896,8 @@ void KWView::insertFile(const KURL& url)
n = n.nextSibling();
}
- QValueList<QDomElement>::Iterator it = paragList.begin();
- QValueList<QDomElement>::Iterator end = paragList.end();
+ TQValueList<TQDomElement>::Iterator it = paragList.begin();
+ TQValueList<TQDomElement>::Iterator end = paragList.end();
for ( ; it!= end ; ++it )
{
//kdDebug()<<k_funcinfo<<" paragList tag: "<<(*it).tagName()<<" name: "<<(*it).attribute( "name" )<<" grpMgr: "<<(*it).attribute( "grpMgr" )<<endl;
@@ -6905,13 +6907,13 @@ void KWView::insertFile(const KURL& url)
// The fixed framesets
// doctype SELECTION is used for fixed framesets
- QDomDocument domDocFrames( "SELECTION" ); // see KWCanvas::copySelectedFrames
- QDomElement topElem = domDocFrames.createElement( "SELECTION" );
+ TQDomDocument domDocFrames( "SELECTION" ); // see KWCanvas::copySelectedFrames
+ TQDomElement topElem = domDocFrames.createElement( "SELECTION" );
domDocFrames.appendChild( topElem );
- QString tableName;
- QDomElement table;
- QValueList<QString> fsInHeader;
- QValueList<QDomElement> framesetsList;
+ TQString tableName;
+ TQDomElement table;
+ TQValueList<TQString> fsInHeader;
+ TQValueList<TQDomElement> framesetsList;
framesetElem = framesetElem.nextSibling().toElement();
for ( ; !framesetElem.isNull() ; framesetElem = framesetElem.nextSibling().toElement() )
@@ -6930,9 +6932,9 @@ void KWView::insertFile(const KURL& url)
)
fsInHeader += getInlineFramesets( framesetElem );
- QString name = framesetElem.attribute( "name" );
- QString grpMgr = framesetElem.attribute( "grpMgr" );
- if ( !inlineFsNames.contains(name) && !inlineFsNames.contains(grpMgr) )
+ TQString name = framesetElem.attribute( "name" );
+ TQString grpMgr = framesetElem.attribute( "grpMgr" );
+ if ( !inlineFsNames.tqcontains(name) && !inlineFsNames.tqcontains(grpMgr) )
{ // fixed frameset
if ( !grpMgr.isEmpty() )
{ // Table cell
@@ -6968,10 +6970,10 @@ void KWView::insertFile(const KURL& url)
framesetElem = (*it);
FrameSetType frameSetType = static_cast<FrameSetType>( KWDocument::getAttribute( framesetElem, "frameType", FT_BASE ) );
KWFrameSet::Info info = static_cast<KWFrameSet::Info>( framesetElem.attribute("frameInfo").toInt() );
- QString name = framesetElem.attribute("name");
- QString grpMgr = framesetElem.attribute( "grpMgr" );
+ TQString name = framesetElem.attribute("name");
+ TQString grpMgr = framesetElem.attribute( "grpMgr" );
// We skip headers, footers and framsets/tables inside theese
- if ( !fsInHeader.contains(name) && !fsInHeader.contains(grpMgr) &&
+ if ( !fsInHeader.tqcontains(name) && !fsInHeader.tqcontains(grpMgr) &&
!( frameSetType == FT_TEXT &&
(info == KWFrameSet::FI_FIRST_HEADER ||
info == KWFrameSet::FI_EVEN_HEADER ||
@@ -6986,12 +6988,12 @@ void KWView::insertFile(const KURL& url)
}
}
// Embedded documents
- QDomDocument embeddedDoc( "SELECTION" );
- QDomElement selElem = embeddedDoc.createElement( "SELECTION" );
+ TQDomDocument embeddedDoc( "SELECTION" );
+ TQDomElement selElem = embeddedDoc.createElement( "SELECTION" );
embeddedDoc.appendChild( selElem );
- QValueList<QDomElement> embeddedList;
- QDomElement embeddedElem = word.namedItem( "EMBEDDED" ).toElement();
+ TQValueList<TQDomElement> embeddedList;
+ TQDomElement embeddedElem = word.namedItem( "EMBEDDED" ).toElement();
for ( ; !embeddedElem.isNull() ; embeddedElem = embeddedElem.nextSibling().toElement() )
{
if ( embeddedElem.tagName() == "EMBEDDED" )
@@ -7046,30 +7048,30 @@ void KWView::insertFile(const KURL& url)
delete store;
}
-QValueList<QString> KWView::getInlineFramesets( const QDomNode &framesetElem)
+TQValueList<TQString> KWView::getInlineFramesets( const TQDomNode &framesetElem)
{
//kdDebug()<<k_funcinfo<<" Frameset: "<<framesetElem.toElement().attribute("name")<<endl;
- QValueList<QString> list;
- QDomNode n = framesetElem.firstChild().toElement();
+ TQValueList<TQString> list;
+ TQDomNode n = framesetElem.firstChild().toElement();
for( ; !n.isNull(); n = n.nextSibling() )
{
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if ( !e.isNull() && e.tagName() == "PARAGRAPH" )
{
- QDomElement formatsElem = e.namedItem( "FORMATS" ).toElement();
+ TQDomElement formatsElem = e.namedItem( "FORMATS" ).toElement();
if ( !formatsElem.isNull() )
{
// Get references to inline framesets
- QDomElement formatElem = formatsElem.firstChild().toElement();
+ TQDomElement formatElem = formatsElem.firstChild().toElement();
for ( ; !formatElem.isNull() ; formatElem = formatElem.nextSibling().toElement() )
{
- QDomElement anchorElem = formatElem.namedItem( "ANCHOR" ).toElement();
+ TQDomElement anchorElem = formatElem.namedItem( "ANCHOR" ).toElement();
if ( !anchorElem.isNull() )
{
- QString type = anchorElem.attribute( "type" );
+ TQString type = anchorElem.attribute( "type" );
if ( type == "grpMgr" /* old syntax */ || type == "frameset" )
{
- QString iName = anchorElem.attribute( "instance" );
+ TQString iName = anchorElem.attribute( "instance" );
list.append( iName );
//kdDebug()<<k_funcinfo<<" added: "<<iName<<endl;
}
@@ -7089,7 +7091,7 @@ void KWView::addBookmark()
//don't create list against viewmode. We must list all bookmarks.
KWCreateBookmarkDia dia( m_doc->listOfBookmarkName(0L), this, 0 );
if ( dia.exec() ) {
- QString bookName = dia.bookmarkName();
+ TQString bookName = dia.bookmarkName();
KoTextCursor start, end;
if ( edit->textDocument()->hasSelection( KoTextDocument::Standard ) ) {
start = edit->textDocument()->selectionStartCursor( KoTextDocument::Standard );
@@ -7109,7 +7111,7 @@ void KWView::selectBookmark()
{
KWSelectBookmarkDia dia( m_doc->listOfBookmarkName(viewMode()), m_doc, this, 0 );
if ( dia.exec() ) {
- QString bookName = dia.bookmarkSelected();
+ TQString bookName = dia.bookmarkSelected();
const KoTextBookmark * book = m_doc->bookmarkByName( bookName );
Q_ASSERT( book );
if ( book )
@@ -7165,7 +7167,7 @@ void KWView::updateRulerInProtectContentMode()
hRuler->changeFlags(KoRuler::F_INDENTS | KoRuler::F_TABS);
else
hRuler->changeFlags(0);
- hRuler->repaint();
+ hRuler->tqrepaint();
}
}
@@ -7199,7 +7201,7 @@ void KWView::convertTableToText()
KWTableFrameSet *table = canvas->getCurrentTable();
if ( table && table->isFloating() )
{
- const QByteArray arr = table->convertTableToText();
+ const TQByteArray arr = table->convertTableToText();
KWAnchor * anchor = table->findAnchor( 0 );
if ( anchor && arr.size() )
{
@@ -7239,7 +7241,7 @@ void KWView::convertToTextBox()
textfs->textDocument()->copySelection( oasisSaver.bodyWriter(), oasisSaver.savingContext(), KoTextDocument::Standard );
if ( !oasisSaver.finish() )
return;
- const QByteArray arr = oasisSaver.data();
+ const TQByteArray arr = oasisSaver.data();
if ( !arr.size() )
return;
@@ -7261,7 +7263,7 @@ void KWView::convertToTextBox()
if ( cmd )
macro->addCommand( cmd );
// Auto-resize the frame from its contents
- edit->textFrameSet()->layout();
+ edit->textFrameSet()->tqlayout();
}
m_doc->addCommand( macro );
}
@@ -7281,7 +7283,7 @@ void KWView::sortText()
KWSortDia dlg( this, "sort dia" );
if ( dlg.exec() )
{
- const QByteArray arr = edit->textFrameSet()->sortText(dlg.getSortType());
+ const TQByteArray arr = edit->textFrameSet()->sortText(dlg.getSortType());
if ( arr.size() )
{
KCommand *cmd = edit->textFrameSet()->pasteOasis( edit->cursor(), arr, true );
@@ -7298,40 +7300,40 @@ void KWView::addPersonalExpression()
if ( !(edit && edit->textFrameSet()->hasSelection()))
return;
- QString newExpression = edit->textFrameSet()->textObject()->selectedText();
+ TQString newExpression = edit->textFrameSet()->textObject()->selectedText();
//load file !!!
- QString tmp=locateLocal("data","kword/expression/perso.xml");
- QFile file( tmp );
+ TQString tmp=locateLocal("data","kword/expression/perso.xml");
+ TQFile file( tmp );
if ( !file.open( IO_ReadOnly ) )
return;
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &file );
file.close();
- QString group;
- QMap<QString, QStringList>lstOfPersonalExp;
- QStringList list;
- QDomNode n = doc.documentElement().firstChild();
+ TQString group;
+ TQMap<TQString, TQStringList>lstOfPersonalExp;
+ TQStringList list;
+ TQDomNode n = doc.documentElement().firstChild();
for( ; !n.isNull(); n = n.nextSibling() )
{
if ( n.isElement() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "Type" )
{
list.clear();
group = i18n( e.namedItem( "TypeName" ).toElement().text().utf8() );
- QDomNode n2 = e.firstChild();
+ TQDomNode n2 = e.firstChild();
for( ; !n2.isNull(); n2 = n2.nextSibling() )
{
if ( n2.isElement() )
{
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if ( e2.tagName() == "Expression" )
{
- QString text = i18n( e2.namedItem( "Text" ).toElement().text().utf8() );
+ TQString text = i18n( e2.namedItem( "Text" ).toElement().text().utf8() );
list<<text;
}
}
@@ -7342,15 +7344,15 @@ void KWView::addPersonalExpression()
}
}
//save
- doc = QDomDocument( "KWordExpression" );
- QDomElement begin = doc.createElement( "KWordExpression" );
+ doc = TQDomDocument( "KWordExpression" );
+ TQDomElement begin = doc.createElement( "KWordExpression" );
doc.appendChild( begin );
- QMapIterator<QString, QStringList> itPersonalExp = lstOfPersonalExp.find(i18n("Normal"));
+ TQMapIterator<TQString, TQStringList> itPersonalExp = lstOfPersonalExp.tqfind(i18n("Normal"));
if ( itPersonalExp != lstOfPersonalExp.end())
{
list = itPersonalExp.data();
list<<newExpression;
- lstOfPersonalExp.replace( i18n("Normal"), list);
+ lstOfPersonalExp.tqreplace( i18n("Normal"), list);
}
else
{
@@ -7363,22 +7365,22 @@ void KWView::addPersonalExpression()
itPersonalExp = lstOfPersonalExp.begin();
for ( ; itPersonalExp != lstOfPersonalExp.end(); ++itPersonalExp )
{
- QDomElement type = doc.createElement( "Type" );
+ TQDomElement type = doc.createElement( "Type" );
begin.appendChild( type );
- QDomElement typeName = doc.createElement( "TypeName" );
+ TQDomElement typeName = doc.createElement( "TypeName" );
type.appendChild( typeName );
typeName.appendChild( doc.createTextNode(itPersonalExp.key() ) );
list=itPersonalExp.data();
for( uint i=0;i<list.count();i++ )
{
- QDomElement expr = doc.createElement( "Expression" );
+ TQDomElement expr = doc.createElement( "Expression" );
type.appendChild( expr );
- QDomElement text = doc.createElement( "Text" );
+ TQDomElement text = doc.createElement( "Text" );
expr.appendChild( text );
text.appendChild( doc.createTextNode(list[i] ) );
}
}
- QCString s = doc.toCString();
+ TQCString s = doc.toCString();
if ( !file.open( IO_WriteOnly ) )
{
@@ -7395,7 +7397,7 @@ void KWView::addWordToDictionary()
KWTextFrameSetEdit* edit = currentTextEdit();
if ( edit )
{
- QString word = edit->wordUnderCursor( *edit->cursor() );
+ TQString word = edit->wordUnderCursor( *edit->cursor() );
if ( !word.isEmpty() )
m_doc->addWordToDictionary( word );
}
@@ -7434,21 +7436,21 @@ void KWView::deleteFrameSet( KWFrameSet * frameset)
}
}
-QPtrList<KAction> KWView::listOfResultOfCheckWord( const QString &word )
+TQPtrList<KAction> KWView::listOfResultOfCheckWord( const TQString &word )
{
- QPtrList<KAction> listAction;
+ TQPtrList<KAction> listAction;
DefaultDictionary *dict = m_broker->defaultDictionary();
- const QStringList lst = dict->suggest( word );
- if ( !lst.contains( word ) )
+ const TQStringList lst = dict->suggest( word );
+ if ( !lst.tqcontains( word ) )
{
- QStringList::ConstIterator it = lst.begin();
- const QStringList::ConstIterator end = lst.end();
+ TQStringList::ConstIterator it = lst.begin();
+ const TQStringList::ConstIterator end = lst.end();
for ( ; it != end ; ++it )
{
if ( !(*it).isEmpty() ) // in case of removed subtypes or placeholders
{
KAction * act = new KAction( *it );
- connect( act, SIGNAL(activated()), this, SLOT(slotCorrectWord()) );
+ connect( act, TQT_SIGNAL(activated()), TQT_TQOBJECT(this), TQT_SLOT(slotCorrectWord()) );
listAction.append( act );
}
}
@@ -7458,7 +7460,7 @@ QPtrList<KAction> KWView::listOfResultOfCheckWord( const QString &word )
void KWView::slotCorrectWord()
{
- KAction * act = (KAction *)(sender());
+ KAction * act = (KAction *)(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())));
KWTextFrameSetEdit* edit = currentTextEdit();
if ( edit )
{
@@ -7470,7 +7472,7 @@ void KWView::slotCorrectWord()
void KWView::slotChildActivated( bool a )
{
// Same hack as in KoView
- KoViewChild* ch = child( (KoView*)sender() );
+ KoViewChild* ch = child( (KoView*)TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())) );
if ( !ch )
return;
KWDocumentChild* kwchild = static_cast<KWDocumentChild *>( ch->documentChild() );
@@ -7506,7 +7508,7 @@ KWFrameViewManager* KWView::frameViewManager() const {
void KWView::deleteSelectedFrames() {
int nbCommand=0;
- int docItem=0; // bitmask for changed doc items.
+ int docItem=0; // bittqmask for changed doc items.
KMacroCommand * macroCmd = new KMacroCommand( i18n("Delete Frames") );
KWFrameViewManager *fvMgr = frameViewManager();
@@ -7566,30 +7568,30 @@ void KWView::deleteSelectedFrames() {
/******************************************************************/
/* Class: KWViewWidget */
/******************************************************************/
-KWViewWidget::KWViewWidget( QWidget *parent, KWView *view )
- : QWidget( parent ),
+KWViewWidget::KWViewWidget( TQWidget *tqparent, KWView *view )
+ : TQWidget( tqparent ),
m_view ( view )
{
}
-void KWViewWidget::resizeEvent( QResizeEvent *e )
+void KWViewWidget::resizeEvent( TQResizeEvent *e )
{
// Update zoom if width changes and fit width is used
if ( ( e->size().width() != e->oldSize().width() )
&& ( m_view->kWordDocument()->zoomMode() == KoZoomMode::ZOOM_WIDTH ) )
{
- QTimer::singleShot( 0, m_view, SLOT( updateZoom() ) );
+ TQTimer::singleShot( 0, m_view, TQT_SLOT( updateZoom() ) );
}
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
}
/******************************************************************/
/* Class: KWGUI */
/******************************************************************/
-KWGUI::KWGUI( const QString& viewMode, QWidget *parent, KWView *daView )
- : QHBox( parent, "" ),
+KWGUI::KWGUI( const TQString& viewMode, TQWidget *tqparent, KWView *daView )
+ : TQHBox( tqparent, "" ),
m_view ( daView )
{
@@ -7599,7 +7601,7 @@ KWGUI::KWGUI( const QString& viewMode, QWidget *parent, KWView *daView )
m_vertRuler = 0;
// The splitter
- m_panner = new QSplitter( Qt::Horizontal, this );
+ m_panner = new TQSplitter( Qt::Horizontal, this );
// The left side
m_docStruct = new KWDocStruct( m_panner, doc, this );
@@ -7607,28 +7609,28 @@ KWGUI::KWGUI( const QString& viewMode, QWidget *parent, KWView *daView )
// The right side
m_right = new KWViewWidget( m_panner, m_view );
- QGridLayout *gridLayout = new QGridLayout( m_right, 2, 2 );
+ TQGridLayout *gridLayout = new TQGridLayout( m_right, 2, 2 );
m_canvas = new KWCanvas( viewMode, m_right, doc, this );
gridLayout->addWidget( m_canvas, 1, 1 );
- QValueList<int> l;
+ TQValueList<int> l;
l << 10;
l << 90;
m_panner->setSizes( l );
- KoPageLayout layout = doc->pageLayout();
+ KoPageLayout tqlayout = doc->pageLayout();
m_tabChooser = new KoTabChooser( m_right, KoTabChooser::TAB_ALL );
m_tabChooser->setReadWrite(doc->isReadWrite());
gridLayout->addWidget( m_tabChooser, 0, 0 );
- m_horRuler = new KoRuler( m_right, m_canvas->viewport(), Qt::Horizontal, layout,
+ m_horRuler = new KoRuler( m_right, m_canvas->viewport(), Qt::Horizontal, tqlayout,
KoRuler::F_INDENTS | KoRuler::F_TABS,
doc->unit(), m_tabChooser );
m_horRuler->setReadWrite(doc->isReadWrite());
gridLayout->addWidget( m_horRuler, 0, 1 );
- m_vertRuler = new KoRuler( m_right, m_canvas->viewport(), Qt::Vertical, layout,
+ m_vertRuler = new KoRuler( m_right, m_canvas->viewport(), Qt::Vertical, tqlayout,
0, doc->unit() );
m_vertRuler->setReadWrite(doc->isReadWrite());
gridLayout->addWidget( m_vertRuler, 1, 0 );
@@ -7638,17 +7640,17 @@ KWGUI::KWGUI( const QString& viewMode, QWidget *parent, KWView *daView )
m_horRuler->setGridSize(doc->gridX());
- connect( m_horRuler, SIGNAL( newPageLayout( const KoPageLayout & ) ), m_view, SLOT( newPageLayout( const KoPageLayout & ) ) );
- connect( m_horRuler, SIGNAL( newLeftIndent( double ) ), m_view, SLOT( newLeftIndent( double ) ) );
- connect( m_horRuler, SIGNAL( newFirstIndent( double ) ), m_view, SLOT( newFirstIndent( double ) ) );
- connect( m_horRuler, SIGNAL( newRightIndent( double ) ), m_view, SLOT( newRightIndent( double ) ) );
+ connect( m_horRuler, TQT_SIGNAL( newPageLayout( const KoPageLayout & ) ), m_view, TQT_SLOT( newPageLayout( const KoPageLayout & ) ) );
+ connect( m_horRuler, TQT_SIGNAL( newLeftIndent( double ) ), m_view, TQT_SLOT( newLeftIndent( double ) ) );
+ connect( m_horRuler, TQT_SIGNAL( newFirstIndent( double ) ), m_view, TQT_SLOT( newFirstIndent( double ) ) );
+ connect( m_horRuler, TQT_SIGNAL( newRightIndent( double ) ), m_view, TQT_SLOT( newRightIndent( double ) ) );
- connect( m_horRuler, SIGNAL( doubleClicked() ), m_view, SLOT( slotHRulerDoubleClicked() ) );
- connect( m_horRuler, SIGNAL( doubleClicked(double) ), m_view, SLOT( slotHRulerDoubleClicked(double) ) );
- connect( m_horRuler, SIGNAL( unitChanged( KoUnit::Unit ) ), this, SLOT( unitChanged( KoUnit::Unit ) ) );
- connect( m_vertRuler, SIGNAL( newPageLayout( const KoPageLayout & ) ), m_view, SLOT( newPageLayout( const KoPageLayout & ) ) );
- connect( m_vertRuler, SIGNAL( doubleClicked() ), m_view, SLOT( formatPage() ) );
- connect( m_vertRuler, SIGNAL( unitChanged( KoUnit::Unit ) ), this, SLOT( unitChanged( KoUnit::Unit ) ) );
+ connect( m_horRuler, TQT_SIGNAL( doubleClicked() ), m_view, TQT_SLOT( slotHRulerDoubleClicked() ) );
+ connect( m_horRuler, TQT_SIGNAL( doubleClicked(double) ), m_view, TQT_SLOT( slotHRulerDoubleClicked(double) ) );
+ connect( m_horRuler, TQT_SIGNAL( unitChanged( KoUnit::Unit ) ), TQT_TQOBJECT(this), TQT_SLOT( unitChanged( KoUnit::Unit ) ) );
+ connect( m_vertRuler, TQT_SIGNAL( newPageLayout( const KoPageLayout & ) ), m_view, TQT_SLOT( newPageLayout( const KoPageLayout & ) ) );
+ connect( m_vertRuler, TQT_SIGNAL( doubleClicked() ), m_view, TQT_SLOT( formatPage() ) );
+ connect( m_vertRuler, TQT_SIGNAL( unitChanged( KoUnit::Unit ) ), TQT_TQOBJECT(this), TQT_SLOT( unitChanged( KoUnit::Unit ) ) );
m_horRuler->hide();
m_vertRuler->hide();
@@ -7657,12 +7659,12 @@ KWGUI::KWGUI( const QString& viewMode, QWidget *parent, KWView *daView )
reorganize();
- connect( m_horRuler, SIGNAL( tabListChanged( const KoTabulatorList & ) ), m_view,
- SLOT( tabListChanged( const KoTabulatorList & ) ) );
+ connect( m_horRuler, TQT_SIGNAL( tabListChanged( const KoTabulatorList & ) ), m_view,
+ TQT_SLOT( tabListChanged( const KoTabulatorList & ) ) );
setKeyCompression( TRUE );
setAcceptDrops( TRUE );
- setFocusPolicy( QWidget::NoFocus );
+ setFocusPolicy( TQ_NoFocus );
}
void KWGUI::showGUI()
@@ -7670,16 +7672,16 @@ void KWGUI::showGUI()
reorganize();
}
-void KWGUI::resizeEvent( QResizeEvent *e )
+void KWGUI::resizeEvent( TQResizeEvent *e )
{
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
reorganize();
}
void KWGUI::reorganize()
{
- int hSpace = m_vertRuler->minimumSizeHint().width();
- int vSpace = m_horRuler->minimumSizeHint().height();
+ int hSpace = m_vertRuler->tqminimumSizeHint().width();
+ int vSpace = m_horRuler->tqminimumSizeHint().height();
if(m_view->kWordDocument()->showRuler())
{
m_vertRuler->show();
@@ -7700,7 +7702,7 @@ void KWGUI::reorganize()
if(m_docStruct->isHidden()) {
m_docStruct->show();
if(m_panner->sizes()[0] < 50) {
- QValueList<int> l;
+ TQValueList<int> l;
l << 100;
l << width()-100;
m_panner->setSizes( l );
@@ -7719,13 +7721,13 @@ void KWGUI::reorganize()
if ( m_view->kWordDocument()->showScrollBar())
{
- m_canvas->setVScrollBarMode(QScrollView::Auto);
- m_canvas->setHScrollBarMode(QScrollView::Auto);
+ m_canvas->setVScrollBarMode(TQScrollView::Auto);
+ m_canvas->setHScrollBarMode(TQScrollView::Auto);
}
else
{
- m_canvas->setVScrollBarMode(QScrollView::AlwaysOff);
- m_canvas->setHScrollBarMode(QScrollView::AlwaysOff);
+ m_canvas->setVScrollBarMode(TQScrollView::AlwaysOff);
+ m_canvas->setHScrollBarMode(TQScrollView::AlwaysOff);
}
}
@@ -7734,14 +7736,14 @@ void KWGUI::unitChanged( KoUnit::Unit u )
m_view->kWordDocument()->setUnit( u );
}
-QPoint KWView::applyViewTransformations( const QPoint& p ) const
+TQPoint KWView::applyViewTransformations( const TQPoint& p ) const
{
return viewMode()->normalToView( m_doc->zoomPoint( KoPoint( p ) ) );
}
-QPoint KWView::reverseViewTransformations( const QPoint& p ) const
+TQPoint KWView::reverseViewTransformations( const TQPoint& p ) const
{
- return m_doc->unzoomPoint( viewMode()->viewToNormal( p ) ).toQPoint();
+ return m_doc->unzoomPoint( viewMode()->viewToNormal( p ) ).toTQPoint();
}
int KWView::currentPage() const {
diff --git a/kword/KWView.h b/kword/KWView.h
index 7463435a..7f84334f 100644
--- a/kword/KWView.h
+++ b/kword/KWView.h
@@ -37,8 +37,8 @@
#include <kshortcut.h>
#include <KoZoomMode.h>
-#include <qbrush.h>
-#include <qhbox.h>
+#include <tqbrush.h>
+#include <tqhbox.h>
class KWPage;
class KWViewMode;
@@ -79,8 +79,8 @@ class KSelectAction;
class KToggleAction;
class KFontSizeAction;
class KFontAction;
-class QResizeEvent;
-class QSplitter;
+class TQResizeEvent;
+class TQSplitter;
#include <kspell2/broker.h>
namespace KSpell2 {
@@ -95,9 +95,10 @@ namespace KSpell2 {
class KWView : public KoView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWView( const QString& viewMode, QWidget *parent, const char *name, KWDocument *doc );
+ KWView( const TQString& viewMode, TQWidget *tqparent, const char *name, KWDocument *doc );
virtual ~KWView();
virtual DCOPObject* dcopObject();
@@ -118,10 +119,10 @@ public:
void updateBorderButtons( const KoBorder& left, const KoBorder& right,
const KoBorder& top, const KoBorder& bottom );
- void showStyle( const QString & styleName );
+ void showStyle( const TQString & styleName );
void showRulerIndent( double leftMargin, double firstLine, double rightMargin, bool rtl );
void showZoom( int zoom ); // show a zoom value in the combo
- void showZoom( const QString& zoom ); // show a zoom value in the combo
+ void showZoom( const TQString& zoom ); // show a zoom value in the combo
void setZoom( int zoom, bool updateViews ); // change the zoom value
bool viewFrameBorders() const { return m_viewFrameBorders; }
@@ -154,7 +155,7 @@ public:
/**
* Overloaded from View
*/
- QWidget* canvas() const;
+ TQWidget* canvas() const;
/**
* Overloaded from View
*/
@@ -171,8 +172,8 @@ public:
virtual void setupPrinter( KPrinter &printer );
virtual void print( KPrinter &printer );
- virtual QPoint applyViewTransformations( const QPoint& ) const;
- virtual QPoint reverseViewTransformations( const QPoint& ) const;
+ virtual TQPoint applyViewTransformations( const TQPoint& ) const;
+ virtual TQPoint reverseViewTransformations( const TQPoint& ) const;
void changeNbOfRecentFiles(int nb);
@@ -184,11 +185,11 @@ public:
void deleteFrame(bool warning=true);
- QPopupMenu * popupMenu( const QString& name );
+ TQPopupMenu * popupMenu( const TQString& name );
- QPtrList<KAction> &dataToolActionList() { return m_actionList; }
- QPtrList<KAction> &variableActionList() { return m_variableActionList; }
- QPtrList<KAction> &tableActions() { return m_tableActionList; }
+ TQPtrList<KAction> &dataToolActionList() { return m_actionList; }
+ TQPtrList<KAction> &variableActionList() { return m_variableActionList; }
+ TQPtrList<KAction> &tableActions() { return m_tableActionList; }
enum { // bitfield
ProvidesImage = 1,
@@ -196,7 +197,7 @@ public:
ProvidesOasis = 4,
ProvidesFormula = 8
};
- static int checkClipboard( QMimeSource *data );
+ static int checkClipboard( TQMimeSource *data );
bool insertInlinePicture();
@@ -220,15 +221,15 @@ public:
void deleteFrameSet( KWFrameSet *);
- QPtrList<KAction> listOfResultOfCheckWord( const QString &word );
+ TQPtrList<KAction> listOfResultOfCheckWord( const TQString &word );
- int tableSelectCell(const QString &tableName, uint row, uint col);
+ int tableSelectCell(const TQString &tableName, uint row, uint col);
void tableInsertRow(uint row, KWTableFrameSet *table = 0);
void tableInsertCol(uint col, KWTableFrameSet *table = 0);
- int tableDeleteRow(const QValueList<uint>& rows, KWTableFrameSet *table = 0);
- int tableDeleteCol(const QValueList<uint>& cols, KWTableFrameSet *table = 0);
+ int tableDeleteRow(const TQValueList<uint>& rows, KWTableFrameSet *table = 0);
+ int tableDeleteCol(const TQValueList<uint>& cols, KWTableFrameSet *table = 0);
- void pasteData( QMimeSource* data, bool drop );
+ void pasteData( TQMimeSource* data, bool drop );
KWFrameViewManager* frameViewManager() const;
@@ -257,7 +258,7 @@ public slots:
void slotViewFrameBorders();
void viewHeader();
void viewFooter();
- void viewZoom( const QString &s );
+ void viewZoom( const TQString &s );
void updateZoom();
void insertTable();
@@ -287,7 +288,7 @@ public slots:
void extraCreateTemplate();
void toolsCreateText();
- void insertFormula( QMimeSource* source=0 );
+ void insertFormula( TQMimeSource* source=0 );
void toolsPart();
void tableProperties();
@@ -316,7 +317,7 @@ public slots:
void textSizeSelected( int );
void increaseFontSize();
void decreaseFontSize();
- void textFontSelected( const QString & );
+ void textFontSelected( const TQString & );
void textBold();
void textItalic();
void textUnderline();
@@ -349,7 +350,7 @@ public slots:
void configure();
void configureCompletion();
- void newPageLayout( const KoPageLayout &layout );
+ void newPageLayout( const KoPageLayout &tqlayout );
void newLeftIndent( double leftIndent);
void newFirstIndent( double firstIndent);
void newRightIndent( double rightIndent);
@@ -359,9 +360,9 @@ public slots:
void updatePageInfo();
void updateFrameStatusBarItem();
- void setTemporaryStatusBarText(const QString &text);
+ void setTemporaryStatusBarText(const TQString &text);
- void slotSpecialChar(QChar , const QString &);
+ void slotSpecialChar(TQChar , const TQString &);
void slotFrameSetEditChanged();
void showMouseMode( int /*KWCanvas::MouseMode*/ mouseMode );
void frameSelectedChanged();
@@ -383,7 +384,7 @@ public slots:
void editPersonalExpr();
void slotUpdateRuler();
- void slotEmbedImage( const QString &filename );
+ void slotEmbedImage( const TQString &filename );
void insertCustomVariable();
void insertNewCustomVariable();
@@ -448,7 +449,7 @@ public slots:
void docStructSelect();
void docStructDelete();
void docStructProperties();
- void openDocStructurePopupMenu( const QPoint &p, KWFrameSet *frameset, KWTextParag *parag);
+ void openDocStructurePopupMenu( const TQPoint &p, KWFrameSet *frameset, KWTextParag *parag);
void insertFile();
@@ -478,15 +479,15 @@ protected slots:
virtual void slotChildActivated( bool a ); ///< from KoView
void slotSetInitialPosition();
- void spellCheckerMisspelling( const QString &, int );
- void spellCheckerCorrected( const QString &, int, const QString & );
- void spellCheckerDone( const QString & );
+ void spellCheckerMisspelling( const TQString &, int );
+ void spellCheckerCorrected( const TQString &, int, const TQString & );
+ void spellCheckerDone( const TQString & );
void spellCheckerCancel();
- void spellAddAutoCorrect (const QString & originalword, const QString & newword);
+ void spellAddAutoCorrect (const TQString & originalword, const TQString & newword);
void slotApplyFont();
void slotApplyParag();
- void slotPageLayoutChanged( const KoPageLayout& layout );
+ void slotPageLayoutChanged( const KoPageLayout& tqlayout );
void slotChangeCaseState(bool b);
void slotChangeCutState(bool b);
void slotCorrectWord();
@@ -495,23 +496,23 @@ protected slots:
void slotDocumentLoadingCompleted();
protected:
- void addVariableActions( int type, const QStringList & texts,
- KActionMenu * parentMenu, const QString & menuText );
+ void addVariableActions( int type, const TQStringList & texts,
+ KActionMenu * tqparentMenu, const TQString & menuText );
- void loadexpressionActions( KActionMenu * parentMenu);
+ void loadexpressionActions( KActionMenu * tqparentMenu);
- void createExpressionActions( KActionMenu * parentMenu,const QString& filename,int &i , bool insertSepar, const QMap<QString, KShortcut>& personalShortCut );
+ void createExpressionActions( KActionMenu * tqparentMenu,const TQString& filename,int &i , bool insertSepar, const TQMap<TQString, KShortcut>& personalShortCut );
void showParagraphDialog( int initialPage = -1, double initialTabPos = 0.0 );
KWTextFrameSetEdit *currentTextEdit() const;
/** The current text-edit if there is one, otherwise the selected text objects
* This is what the "bold", "italic" etc. buttons apply to. */
- QPtrList<KoTextFormatInterface> applicableTextInterfaces() const;
+ TQPtrList<KoTextFormatInterface> applicableTextInterfaces() const;
void setupActions();
- virtual void resizeEvent( QResizeEvent *e );
+ virtual void resizeEvent( TQResizeEvent *e );
virtual void guiActivateEvent( KParts::GUIActivateEvent *ev );
virtual void updateReadWrite( bool readwrite );
@@ -520,23 +521,23 @@ protected:
* @param selectFrames a list of selected frames
* @see KWFrameViewManager::selectedFrames()
*/
- void updateTableActions( QValueList<KWFrameView*> selectFrames);
+ void updateTableActions( TQValueList<KWFrameView*> selectFrames);
void startKSpell();
void clearSpellChecker(bool cancelSpellCheck = false );
- QValueList<QString> getInlineFramesets( const QDomNode &framesetElem );
+ TQValueList<TQString> getInlineFramesets( const TQDomNode &framesetElem );
// Helper stuff for the frame adjustment;
enum MoveFrameType { RaiseFrame, LowerFrame, BringToFront, SendToBack };
void adjustZOrderOfSelectedFrames(MoveFrameType moveType);
- void increaseAllZOrdersAbove(int refZOrder, int pageNum, const QPtrList<KWFrame>& frameSelection);
- void decreaseAllZOrdersUnder(int refZOrder, int pageNum, const QPtrList<KWFrame>& frameSelection);
- int raiseFrame(const QPtrList<KWFrame>& frameSelection, const KWFrame *frame);
- int lowerFrame(const QPtrList<KWFrame>& frameSelection, const KWFrame *frame);
- int bringToFront(const QPtrList<KWFrame>& frameSelection, const KWFrame *frame);
- int sendToBack(const QPtrList<KWFrame>& frameSelection, const KWFrame *frame);
+ void increaseAllZOrdersAbove(int refZOrder, int pageNum, const TQPtrList<KWFrame>& frameSelection);
+ void decreaseAllZOrdersUnder(int refZOrder, int pageNum, const TQPtrList<KWFrame>& frameSelection);
+ int raiseFrame(const TQPtrList<KWFrame>& frameSelection, const KWFrame *frame);
+ int lowerFrame(const TQPtrList<KWFrame>& frameSelection, const KWFrame *frame);
+ int bringToFront(const TQPtrList<KWFrame>& frameSelection, const KWFrame *frame);
+ int sendToBack(const TQPtrList<KWFrame>& frameSelection, const KWFrame *frame);
void textStyleSelected( KoParagStyle *sty );
void frameStyleSelected( KWFrameStyle *sty );
void tableStyleSelected( KWTableStyle *sty );
@@ -545,7 +546,7 @@ protected:
void spellCheckerRemoveHighlight();
- void setSpacing( KoParagLayout::SpacingType spacing, const QString &commandName );
+ void setSpacing( KoParagLayout::SpacingType spacing, const TQString &commandName );
private: // methods
void deleteSelectedFrames();
@@ -612,7 +613,7 @@ private: // variables
int type;
int subtype;
};
- typedef QMap<KAction *, VariableDef> VariableDefMap;
+ typedef TQMap<KAction *, VariableDef> VariableDefMap;
KActionMenu *m_actionInsertExpression;
KActionMenu *m_actionInsertCustom;
@@ -769,9 +770,9 @@ private: // variables
KoSearchContext *m_searchEntry, *m_replaceEntry;
KWFindReplace *m_findReplace;
- QPtrList<KAction> m_actionList; // for the kodatatools
- QPtrList<KAction> m_variableActionList;
- QPtrList<KAction> m_tableActionList;
+ TQPtrList<KAction> m_actionList; // for the kodatatools
+ TQPtrList<KAction> m_variableActionList;
+ TQPtrList<KAction> m_tableActionList;
KWPage *m_currentPage; ///< current page number
@@ -797,7 +798,7 @@ private: // variables
struct {
KoSpell *kospell;
KMacroCommand * macroCmdSpellCheck;
- QStringList replaceAll;
+ TQStringList replaceAll;
KoTextIterator * textIterator;
KSpell2::Dialog *dlg;
} m_spell;
@@ -815,15 +816,16 @@ private: // variables
/******************************************************************/
/* Class: KWViewWidget */
/******************************************************************/
-class KWViewWidget : public QWidget
+class KWViewWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWViewWidget( QWidget *parent, KWView *view );
+ KWViewWidget( TQWidget *tqparent, KWView *view );
protected:
- void resizeEvent( QResizeEvent *e );
+ void resizeEvent( TQResizeEvent *e );
// A pointer to the view.
KWView *m_view;
@@ -833,12 +835,13 @@ protected:
/* Class: KWGUI */
/******************************************************************/
-class KWGUI : public QHBox
+class KWGUI : public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWGUI( const QString& viewMode, QWidget *parent, KWView *view );
+ KWGUI( const TQString& viewMode, TQWidget *tqparent, KWView *view );
void showGUI();
@@ -856,7 +859,7 @@ protected slots:
void unitChanged( KoUnit::Unit );
protected:
- void resizeEvent( QResizeEvent *e );
+ void resizeEvent( TQResizeEvent *e );
// A pointer to the view.
KWView *m_view;
@@ -865,14 +868,14 @@ protected:
KWDocStruct *m_docStruct;
// The right side
- QWidget *m_right; // The layout widget.
+ TQWidget *m_right; // The tqlayout widget.
KoTabChooser *m_tabChooser;
KoRuler *m_vertRuler;
KoRuler *m_horRuler;
KWCanvas *m_canvas;
- QSplitter *m_panner;
+ TQSplitter *m_panner;
};
diff --git a/kword/KWViewMode.cpp b/kword/KWViewMode.cpp
index df6c8ed1..6967e968 100644
--- a/kword/KWViewMode.cpp
+++ b/kword/KWViewMode.cpp
@@ -29,25 +29,25 @@
#include "KWPage.h"
#include "KWFrameViewManager.h"
#include "KWFrameView.h"
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kdebug.h>
const unsigned short KWViewMode::s_shadowOffset = 3;
-QSize KWViewMode::availableSizeForText( KWTextFrameSet* textfs )
+TQSize KWViewMode::availableSizeForText( KWTextFrameSet* textfs )
{
KWFrame* frame = textfs->frameIterator().getLast();
return m_doc->zoomSize( KoSize( frame->innerWidth(), frame->internalY() + frame->innerHeight() ) );
}
-void KWViewMode::drawOnePageBorder( QPainter * painter, const QRect & crect, const QRect & _pageRect,
- const QRegion & emptySpaceRegion )
+void KWViewMode::drawOnePageBorder( TQPainter * painter, const TQRect & crect, const TQRect & _pageRect,
+ const TQRegion & emptySpaceRegion )
{
if ( !crect.intersects( _pageRect ) )
return;
- QRect pageRect( _pageRect );
+ TQRect pageRect( _pageRect );
//kdDebug() << "KWViewMode::drawOnePageBorder drawing page rect " << pageRect << endl;
painter->drawRect( pageRect );
// Exclude page border line, to get the page contents rect (avoids flicker)
@@ -56,40 +56,40 @@ void KWViewMode::drawOnePageBorder( QPainter * painter, const QRect & crect, con
pageRect.rRight() -= 1;
pageRect.rBottom() -= 1;
// The empty space to clear up inside this page
- QRect pagecrect = pageRect.intersect( crect );
+ TQRect pagecrect = pageRect.intersect( crect );
if ( !pagecrect.isEmpty() )
{
//kdDebug() << "KWViewMode::drawOnePageBorder : pagecrect=" << pagecrect << " emptySpaceRegion: " << emptySpaceRegion << endl;
- QRegion pageEmptyRegion = emptySpaceRegion.intersect( pagecrect );
+ TQRegion pageEmptyRegion = emptySpaceRegion.intersect( pagecrect );
//kdDebug() << "RESULT: pageEmptyRegion: " << pageEmptyRegion << endl;
if ( !pageEmptyRegion.isEmpty() )
- m_doc->eraseEmptySpace( painter, pageEmptyRegion, QApplication::palette().active().brush( QColorGroup::Base ) );
+ m_doc->eraseEmptySpace( painter, pageEmptyRegion, TQApplication::tqpalette().active().brush( TQColorGroup::Base ) );
}
}
-QRect KWViewMode::drawRightShadow( QPainter * painter, const QRect & crect, const QRect & pageRect, int topOffset )
+TQRect KWViewMode::drawRightShadow( TQPainter * painter, const TQRect & crect, const TQRect & pageRect, int topOffset )
{
- QRect shadowRect( pageRect.right() + 1, pageRect.top() + topOffset, s_shadowOffset, pageRect.height() - topOffset );
+ TQRect shadowRect( pageRect.right() + 1, pageRect.top() + topOffset, s_shadowOffset, pageRect.height() - topOffset );
shadowRect &= crect; // intersect
if ( !shadowRect.isEmpty() )
{
painter->fillRect( shadowRect,
- QApplication::palette().active().brush( QColorGroup::Shadow ) );
+ TQApplication::tqpalette().active().brush( TQColorGroup::Shadow ) );
}
return shadowRect;
}
-QRect KWViewMode::drawBottomShadow( QPainter * painter, const QRect & crect, const QRect & pageRect, int leftOffset )
+TQRect KWViewMode::drawBottomShadow( TQPainter * painter, const TQRect & crect, const TQRect & pageRect, int leftOffset )
{
- QRect shadowRect( pageRect.left() + leftOffset, pageRect.bottom() + 1, pageRect.width(), s_shadowOffset );
+ TQRect shadowRect( pageRect.left() + leftOffset, pageRect.bottom() + 1, pageRect.width(), s_shadowOffset );
shadowRect &= crect; // intersect
if ( !shadowRect.isEmpty() )
painter->fillRect( shadowRect,
- QApplication::palette().active().brush( QColorGroup::Shadow ) );
+ TQApplication::tqpalette().active().brush( TQColorGroup::Shadow ) );
return shadowRect;
}
-QPoint KWViewMode::pageCorner()
+TQPoint KWViewMode::pageCorner()
{
// Same code as KWView::slotUpdateRuler
KWFrame * frame = 0L;
@@ -104,15 +104,15 @@ QPoint KWViewMode::pageCorner()
int pageNum = 0;
if ( frame )
pageNum = frame->pageNumber();
- QPoint nPoint( 0, m_doc->pageTop(pageNum) + 1 );
- QPoint cPoint( normalToView( nPoint ) );
+ TQPoint nPoint( 0, m_doc->pageTop(pageNum) + 1 );
+ TQPoint cPoint( normalToView( nPoint ) );
/*kdDebug() << "KWViewMode::pageCorner frame=" << frame << " pagenum=" << pageNum
<< " nPoint=" << nPoint.x() << "," << nPoint.y()
<< " cPoint=" << cPoint.x() << "," << cPoint.y() << endl;*/
return cPoint;
}
-QRect KWViewMode::rulerFrameRect()
+TQRect KWViewMode::rulerFrameRect()
{
// Set the "frame start" in the ruler (tabs are relative to that position)
KWFrameSetEdit * edit = m_canvas->currentFrameSetEdit();
@@ -130,28 +130,28 @@ QRect KWViewMode::rulerFrameRect()
}
if ( frame )
{
- QRect r = normalToView( m_doc->zoomRect( frame->innerRect() ) );
+ TQRect r = normalToView( m_doc->zoomRect( frame->innerRect() ) );
// Calculate page corner (see pageCorner above)
int pageNum = frame->pageNumber();
- QPoint nPoint( 0, m_doc->pageTop(pageNum) + 1 );
- QPoint cPoint( normalToView( nPoint ) );
+ TQPoint nPoint( 0, m_doc->pageTop(pageNum) + 1 );
+ TQPoint cPoint( normalToView( nPoint ) );
// Frame start/end is relative to page corner.
r.moveBy( -cPoint.x(), -cPoint.y() );
return r;
}
- return QRect();
+ return TQRect();
}
-void KWViewMode::setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& layout )
+void KWViewMode::setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& tqlayout )
{
- hRuler->setPageLayout( layout );
- vRuler->setPageLayout( layout );
+ hRuler->setPageLayout( tqlayout );
+ vRuler->setPageLayout( tqlayout );
}
// static
-KWViewMode * KWViewMode::create( const QString & viewModeType, KWDocument *doc, KWCanvas* canvas )
+KWViewMode * KWViewMode::create( const TQString & viewModeType, KWDocument *doc, KWCanvas* canvas )
{
Q_ASSERT(doc);
if(viewModeType=="ModeNormal")
@@ -180,33 +180,33 @@ KWViewMode * KWViewMode::create( const QString & viewModeType, KWDocument *doc,
////
-QSize KWViewModeNormal::contentsSize()
+TQSize KWViewModeNormal::contentsSize()
{
- return QSize( m_doc->paperWidth(m_doc->startPage()),
+ return TQSize( m_doc->paperWidth(m_doc->startPage()),
m_doc->zoomItY( m_doc->pageManager()->bottomOfPage(m_doc->lastPage()) ) );
}
-QRect KWViewModeNormal::viewPageRect( int pgNum )
+TQRect KWViewModeNormal::viewPageRect( int pgNum )
{
KWPage* page = m_doc->pageManager()->page( pgNum );
- QRect r = page->zoomedRect( m_doc );
+ TQRect r = page->zoomedRect( m_doc );
r.moveBy( xOffset( page ), 0 );
return r;
}
-QPoint KWViewModeNormal::normalToView( const QPoint & nPoint )
+TQPoint KWViewModeNormal::normalToView( const TQPoint & nPoint )
{
double unzoomedY = m_doc->unzoomItY( nPoint.y() );
KWPage *page = m_doc->pageManager()->page(unzoomedY); // quotient
if( !page) {
kdWarning(31001) << "KWViewModeNormal::normalToView request for conversion out of the document! Check your input data.. ("<< nPoint << ")" << endl;
- return QPoint(0,0);
+ return TQPoint(0,0);
}
Q_ASSERT(canvas());
- return QPoint( xOffset(page) + nPoint.x(), nPoint.y() );
+ return TQPoint( xOffset(page) + nPoint.x(), nPoint.y() );
}
-QPoint KWViewModeNormal::viewToNormal( const QPoint & vPoint )
+TQPoint KWViewModeNormal::viewToNormal( const TQPoint & vPoint )
{
// Opposite of the above
// The Y is unchanged by the centering so we can use it to get the page.
@@ -214,10 +214,10 @@ QPoint KWViewModeNormal::viewToNormal( const QPoint & vPoint )
KWPage *page = m_doc->pageManager()->page(unzoomedY); // quotient
if( !page) {
kdWarning(31001) << "KWViewModeNormal::normalToView request for conversion out of the document! Check your input data.. ("<< vPoint << ")" << endl;
- return QPoint(-1,-1); // yes this is an ugly way to mark this as an excetional state...
+ return TQPoint(-1,-1); // yes this is an ugly way to mark this as an excetional state...
}
Q_ASSERT(canvas());
- return QPoint( vPoint.x() - xOffset(page), vPoint.y() );
+ return TQPoint( vPoint.x() - xOffset(page), vPoint.y() );
}
int KWViewModeNormal::xOffset(KWPage *page, int canvasWidth /* = -1 */) {
@@ -227,12 +227,12 @@ int KWViewModeNormal::xOffset(KWPage *page, int canvasWidth /* = -1 */) {
return kMax( 0, ( canvasWidth - m_doc->zoomItX( page->width() ) ) / 2 );
}
-void KWViewModeNormal::drawPageBorders( QPainter * painter, const QRect & crect, const QRegion & emptySpaceRegion )
+void KWViewModeNormal::drawPageBorders( TQPainter * painter, const TQRect & crect, const TQRegion & emptySpaceRegion )
{
painter->save();
- painter->setPen( QApplication::palette().active().color( QColorGroup::Dark ) );
- painter->setBrush( Qt::NoBrush );
- QRect pageRect;
+ painter->setPen( TQApplication::tqpalette().active().color( TQColorGroup::Dark ) );
+ painter->setBrush( TQt::NoBrush );
+ TQRect pageRect;
int lastPage = m_doc->lastPage();
Q_ASSERT(canvas());
@@ -250,24 +250,24 @@ void KWViewModeNormal::drawPageBorders( QPainter * painter, const QRect & crect,
// Center horizontally
int x = xOffset(page, canvasWidth);
// Draw page border (and erase empty area inside page)
- pageRect = QRect( x, topOfPage, pageWidth, pageHeight );
+ pageRect = TQRect( x, topOfPage, pageWidth, pageHeight );
drawOnePageBorder( painter, crect, pageRect, emptySpaceRegion );
// The area on the left of the page
- QRect leftArea( 0, topOfPage, x, pageHeight );
+ TQRect leftArea( 0, topOfPage, x, pageHeight );
leftArea &= crect;
if ( !leftArea.isEmpty() ) {
painter->fillRect( leftArea,
- QApplication::palette().active().brush( QColorGroup::Mid ) );
+ TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) );
}
// The area on the right of the page
- QRect rightArea( x + pageWidth, topOfPage, crect.right() - pageWidth + 1, pageHeight );
+ TQRect rightArea( x + pageWidth, topOfPage, crect.right() - pageWidth + 1, pageHeight );
rightArea &= crect;
if ( !rightArea.isEmpty() )
{
painter->fillRect( rightArea,
- QApplication::palette().active().brush( QColorGroup::Mid ) );
+ TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) );
// Draw a shadow
int topOffset = ( page==0 ) ? s_shadowOffset : 0; // leave a few pixels on top, only for first page
@@ -279,12 +279,12 @@ void KWViewModeNormal::drawPageBorders( QPainter * painter, const QRect & crect,
// Take care of the area at the bottom of the last page
if ( crect.bottom() > topOfPage )
{
- QRect bottomArea( 0, topOfPage, crect.right() + 1, crect.bottom() - topOfPage + 1 );
- QRect repaintRect = bottomArea.intersect( crect );
- if ( !repaintRect.isEmpty() )
+ TQRect bottomArea( 0, topOfPage, crect.right() + 1, crect.bottom() - topOfPage + 1 );
+ TQRect tqrepaintRect = bottomArea.intersect( crect );
+ if ( !tqrepaintRect.isEmpty() )
{
- painter->fillRect( repaintRect,
- QApplication::palette().active().brush( QColorGroup::Mid ) );
+ painter->fillRect( tqrepaintRect,
+ TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) );
// Draw a shadow
drawBottomShadow( painter, crect, pageRect, s_shadowOffset );
}
@@ -294,7 +294,7 @@ void KWViewModeNormal::drawPageBorders( QPainter * painter, const QRect & crect,
////
-QRect KWViewModeEmbedded::viewPageRect( int pgNum )
+TQRect KWViewModeEmbedded::viewPageRect( int pgNum )
{
// Only one page makes sense in embedded mode though
return m_doc->pageManager()->page( pgNum )->zoomedRect( m_doc );
@@ -342,23 +342,23 @@ int KWViewModePreview::numRows() const
return ( m_doc->pageCount() ) / m_pagesPerRow + 1;
}
-QSize KWViewModePreview::contentsSize()
+TQSize KWViewModePreview::contentsSize()
{
int pages = m_doc->pageCount();
int rows = (pages-1) / m_pagesPerRow + 1;
int hPages = rows > 1 ? m_pagesPerRow : pages;
- return QSize( m_spacing + hPages * ( m_doc->paperWidth(m_doc->startPage()) + m_spacing ),
+ return TQSize( m_spacing + hPages * ( m_doc->paperWidth(m_doc->startPage()) + m_spacing ),
m_spacing + rows * ( m_doc->paperHeight(m_doc->startPage()) + m_spacing ) /* bottom of last row */ );
}
-QPoint KWViewModePreview::normalToView( const QPoint & nPoint )
+TQPoint KWViewModePreview::normalToView( const TQPoint & nPoint )
{
// Can't use nPoint.y() / m_doc->paperHeight() since this would be a rounding problem
double unzoomedY = m_doc->unzoomItY( nPoint.y() );
KWPage *page = m_doc->pageManager()->page(unzoomedY); // quotient
if( !page) {
kdWarning(31001) << "KWViewModePreview::normalToView request for conversion out of the document! Check your input data.. ("<< nPoint << ")" << endl;
- return QPoint(0,0);
+ return TQPoint(0,0);
}
double yInPagePt = unzoomedY - page->offsetInDocument();// and rest
@@ -368,48 +368,48 @@ QPoint KWViewModePreview::normalToView( const QPoint & nPoint )
<< " unzoomedY=" << unzoomedY
<< " page=" << page->pageNumber() << " row=" << row << " col=" << col
<< " yInPagePt=" << yInPagePt << endl;*/
- return QPoint( leftSpacing() + col * ( m_doc->paperWidth(page->pageNumber()) +
+ return TQPoint( leftSpacing() + col * ( m_doc->paperWidth(page->pageNumber()) +
m_spacing ) + nPoint.x(),
topSpacing() + row * ( m_doc->paperHeight(page->pageNumber()) +
m_spacing ) + m_doc->zoomItY( yInPagePt ) );
}
-QRect KWViewModePreview::viewPageRect( int pgNum )
+TQRect KWViewModePreview::viewPageRect( int pgNum )
{
int row = (pgNum - m_doc->startPage()) / m_pagesPerRow;
int col = (pgNum - m_doc->startPage()) % m_pagesPerRow;
const int paperWidth = m_doc->paperWidth( pgNum );
const int paperHeight = m_doc->paperHeight( pgNum );
- return QRect( leftSpacing() + col * ( paperWidth + m_spacing ),
+ return TQRect( leftSpacing() + col * ( paperWidth + m_spacing ),
topSpacing() + row * ( paperHeight + m_spacing ),
paperWidth,
paperHeight );
}
-QPoint KWViewModePreview::viewToNormal( const QPoint & vPoint )
+TQPoint KWViewModePreview::viewToNormal( const TQPoint & vPoint )
{
// Well, just the opposite of the above.... hmm.... headache....
int paperWidth = m_doc->paperWidth(m_doc->startPage());
int paperHeight = m_doc->paperHeight(m_doc->startPage());
- QPoint p( vPoint.x() - leftSpacing(), vPoint.y() - topSpacing() );
+ TQPoint p( vPoint.x() - leftSpacing(), vPoint.y() - topSpacing() );
int col = static_cast<int>( p.x() / ( paperWidth + m_spacing ) );
int xInPage = p.x() - col * ( paperWidth + m_spacing );
int row = static_cast<int>( p.y() / ( paperHeight + m_spacing ) );
int yInPage = p.y() - row * ( paperHeight + m_spacing );
int page = row * m_pagesPerRow + col + m_doc->startPage();
if ( page > m_doc->lastPage() ) // [this happens when moving frames around and going out of the pages]
- return QPoint( paperWidth, m_doc->pageTop( m_doc->lastPage() ) );
+ return TQPoint( paperWidth, m_doc->pageTop( m_doc->lastPage() ) );
else // normal case
- return QPoint( xInPage, yInPage + m_doc->pageTop( page ) );
+ return TQPoint( xInPage, yInPage + m_doc->pageTop( page ) );
}
-void KWViewModePreview::drawPageBorders( QPainter * painter, const QRect & crect, const QRegion & emptySpaceRegion )
+void KWViewModePreview::drawPageBorders( TQPainter * painter, const TQRect & crect, const TQRegion & emptySpaceRegion )
{
painter->save();
- painter->setPen( QApplication::palette().active().color( QColorGroup::Dark ) );
- painter->setBrush( Qt::NoBrush );
+ painter->setPen( TQApplication::tqpalette().active().color( TQColorGroup::Dark ) );
+ painter->setBrush( TQt::NoBrush );
//kdDebug() << "KWViewModePreview::drawPageBorders crect=" << DEBUGRECT( crect ) << endl;
- QRegion grayRegion( crect );
+ TQRegion grayRegion( crect );
int pageCount = m_doc->pageCount();
for ( int counter = 0; counter < pageCount; counter++ )
{
@@ -418,7 +418,7 @@ void KWViewModePreview::drawPageBorders( QPainter * painter, const QRect & crect
int page = m_doc->startPage() + counter;
int paperWidth = m_doc->paperWidth(page);
int paperHeight = m_doc->paperHeight(page);
- QRect pageRect( leftSpacing() + col * ( paperWidth + m_spacing ),
+ TQRect pageRect( leftSpacing() + col * ( paperWidth + m_spacing ),
topSpacing() + row * ( paperHeight + m_spacing ),
paperWidth, paperHeight );
drawOnePageBorder( painter, crect, pageRect, emptySpaceRegion );
@@ -426,10 +426,10 @@ void KWViewModePreview::drawPageBorders( QPainter * painter, const QRect & crect
break;
if ( pageRect.intersects( crect ) )
grayRegion -= pageRect;
- QRect rightShadow = drawRightShadow( painter, crect, pageRect, s_shadowOffset );
+ TQRect rightShadow = drawRightShadow( painter, crect, pageRect, s_shadowOffset );
if ( !rightShadow.isEmpty() )
grayRegion -= rightShadow;
- QRect bottomShadow = drawBottomShadow( painter, crect, pageRect, s_shadowOffset );
+ TQRect bottomShadow = drawBottomShadow( painter, crect, pageRect, s_shadowOffset );
if ( !bottomShadow.isEmpty() )
grayRegion -= bottomShadow;
@@ -439,7 +439,7 @@ void KWViewModePreview::drawPageBorders( QPainter * painter, const QRect & crect
if ( !grayRegion.isEmpty() )
{
//kdDebug() << "KWViewModePreview::drawPageBorders grayRegion's bounding Rect = " << DEBUGRECT( grayRegion.boundingRect() ) << endl;
- m_doc->eraseEmptySpace( painter, grayRegion, QApplication::palette().active().brush( QColorGroup::Mid ) );
+ m_doc->eraseEmptySpace( painter, grayRegion, TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) );
}
painter->restore();
}
@@ -485,38 +485,38 @@ KWTextFrameSet * KWViewModeText::determineTextFrameSet( KWDocument* doc ) // sta
return fs;
}
-QPoint KWViewModeText::normalToView( const QPoint & nPoint )
+TQPoint KWViewModeText::normalToView( const TQPoint & nPoint )
{
- QPoint r (nPoint);
+ TQPoint r (nPoint);
r.setX(r.x() + OFFSET);
return r;
}
-QPoint KWViewModeText::viewToNormal( const QPoint & vPoint )
+TQPoint KWViewModeText::viewToNormal( const TQPoint & vPoint )
{
- QPoint r (vPoint);
+ TQPoint r (vPoint);
r.setX(r.x() - OFFSET);
return r;
}
-QSize KWViewModeText::contentsSize()
+TQSize KWViewModeText::contentsSize()
{
if (!textFrameSet())
- return QSize();
+ return TQSize();
// The actual contents only depend on the amount of text.
// The width is the one from the text, so that the placement of tabs makes a bit of sense, etc.
// The minimum height is the one of a normal page though.
- int width = m_doc->layoutUnitToPixelX( m_textFrameSet->textDocument()->width() );
+ int width = m_doc->tqlayoutUnitToPixelX( m_textFrameSet->textDocument()->width() );
- int height = QMAX((int)m_doc->paperHeight(m_doc->startPage()),
- m_doc->layoutUnitToPixelY( m_textFrameSet->textDocument()->height() ) );
+ int height = TQMAX((int)m_doc->paperHeight(m_doc->startPage()),
+ m_doc->tqlayoutUnitToPixelY( m_textFrameSet->textDocument()->height() ) );
//kdDebug() << "KWViewModeText::contentsSize " << width << "x" << height << endl;
- return QSize( width, height );
+ return TQSize( width, height );
}
-QSize KWViewModeText::availableSizeForText( KWTextFrameSet* /*textfs*/ )
+TQSize KWViewModeText::availableSizeForText( KWTextFrameSet* /*textfs*/ )
{
return contentsSize();
}
@@ -526,26 +526,26 @@ bool KWViewModeText::isFrameSetVisible( const KWFrameSet *fs )
if(fs==NULL) return false; // assertion
if(fs==textFrameSet()) return true;
- const KWFrameSet* parentFrameset = fs->groupmanager() ? fs->groupmanager() : fs;
- while ( parentFrameset->isFloating() ) {
- parentFrameset = parentFrameset->anchorFrameset();
- if ( parentFrameset == m_textFrameSet )
+ const KWFrameSet* tqparentFrameset = fs->groupmanager() ? fs->groupmanager() : fs;
+ while ( tqparentFrameset->isFloating() ) {
+ tqparentFrameset = tqparentFrameset->anchorFrameset();
+ if ( tqparentFrameset == m_textFrameSet )
return true;
}
return false;
}
-void KWViewModeText::drawPageBorders( QPainter * painter, const QRect & crect,
- const QRegion & /*emptySpaceRegion*/ )
+void KWViewModeText::drawPageBorders( TQPainter * painter, const TQRect & crect,
+ const TQRegion & /*emptySpaceRegion*/ )
{
painter->save();
- QRegion grayRegion( crect );
+ TQRegion grayRegion( crect );
//kdDebug() << "KWViewModeText::drawPageBorders crect=" << grayRegion << endl;
- painter->setPen( QApplication::palette().active().color( QColorGroup::Dark ) );
- QSize cSize = contentsSize();
+ painter->setPen( TQApplication::tqpalette().active().color( TQColorGroup::Dark ) );
+ TQSize cSize = contentsSize();
// Draw a line on the right -- ## or a shadow?
- // +1 to be out of the contents, and +1 for QRect
- QRect frameRect( OFFSET, 0, cSize.width() + 2, cSize.height() );
+ // +1 to be out of the contents, and +1 for TQRect
+ TQRect frameRect( OFFSET, 0, cSize.width() + 2, cSize.height() );
//kdDebug() << "KWViewModeText::drawPageBorders right line: " << frameRect.topRight() << " " << frameRect.bottomRight()<< endl;
painter->drawLine( frameRect.topRight(), frameRect.bottomRight() );
if ( frameRect.intersects( crect ) )
@@ -557,38 +557,38 @@ void KWViewModeText::drawPageBorders( QPainter * painter, const QRect & crect,
// And draw a line at the bottom -- ## or a shadow?
painter->drawLine( 0, cSize.height(),
cSize.width(), cSize.height() );
- grayRegion -= QRect( 0, cSize.height(),
+ grayRegion -= TQRect( 0, cSize.height(),
cSize.width(), cSize.height() );
}
//kdDebug() << "KWViewModeText::drawPageBorders erasing grayRegion " << grayRegion << endl;
if ( !grayRegion.isEmpty() )
- m_doc->eraseEmptySpace( painter, grayRegion, QApplication::palette().active().brush( QColorGroup::Mid ) );
+ m_doc->eraseEmptySpace( painter, grayRegion, TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) );
painter->restore();
}
-QRect KWViewModeText::rulerFrameRect()
+TQRect KWViewModeText::rulerFrameRect()
{
- return QRect( QPoint(OFFSET, 0), contentsSize() );
+ return TQRect( TQPoint(OFFSET, 0), contentsSize() );
}
-void KWViewModeText::setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& /*layout*/ )
+void KWViewModeText::setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& /*tqlayout*/ )
{
- // Create a dummy page-layout, as if we had a single page englobing the whole text.
- KoPageLayout layout;
- layout.format = PG_CUSTOM;
- layout.orientation = PG_PORTRAIT;
- QSize cSize = contentsSize();
- layout.ptWidth = m_doc->unzoomItX( cSize.width() );
- layout.ptHeight = m_doc->unzoomItY( cSize.height() );
- //kdDebug() << "KWViewModeText::setPageLayout layout size " << layout.ptWidth << "x" << layout.ptHeight << endl;
- layout.ptLeft = OFFSET;
- layout.ptRight = 0;
- layout.ptTop = 0;
- layout.ptBottom = 0;
- layout.ptBindingSide = 0;
- layout.ptPageEdge = 0;
- hRuler->setPageLayout( layout );
- vRuler->setPageLayout( layout );
+ // Create a dummy page-tqlayout, as if we had a single page englobing the whole text.
+ KoPageLayout tqlayout;
+ tqlayout.format = PG_CUSTOM;
+ tqlayout.orientation = PG_PORTRAIT;
+ TQSize cSize = contentsSize();
+ tqlayout.ptWidth = m_doc->unzoomItX( cSize.width() );
+ tqlayout.ptHeight = m_doc->unzoomItY( cSize.height() );
+ //kdDebug() << "KWViewModeText::setPageLayout tqlayout size " << tqlayout.ptWidth << "x" << tqlayout.ptHeight << endl;
+ tqlayout.ptLeft = OFFSET;
+ tqlayout.ptRight = 0;
+ tqlayout.ptTop = 0;
+ tqlayout.ptBottom = 0;
+ tqlayout.ptBindingSide = 0;
+ tqlayout.ptPageEdge = 0;
+ hRuler->setPageLayout( tqlayout );
+ vRuler->setPageLayout( tqlayout );
}
bool KWViewModeText::isTextModeFrameset(KWFrameSet *fs) const {
diff --git a/kword/KWViewMode.h b/kword/KWViewMode.h
index 8afde053..fc78779a 100644
--- a/kword/KWViewMode.h
+++ b/kword/KWViewMode.h
@@ -20,10 +20,10 @@
#ifndef kwviewmode_h
#define kwviewmode_h
-#include <qrect.h>
+#include <tqrect.h>
class KWDocument;
-class QPainter;
-class QRegion;
+class TQPainter;
+class TQRegion;
class KWTextFrameSet;
class KWFrameSet;
class KWCanvas;
@@ -54,42 +54,42 @@ public:
virtual ~KWViewMode() {}
/** Normal coord -> view coord */
- virtual QPoint normalToView( const QPoint & nPoint ) = 0;
+ virtual TQPoint normalToView( const TQPoint & nPoint ) = 0;
/** Normal coord -> view coord */
- QRect normalToView( const QRect & nRect )
- { return QRect( normalToView( nRect.topLeft() ), nRect.size() ); }
+ TQRect normalToView( const TQRect & nRect )
+ { return TQRect( normalToView( nRect.topLeft() ), nRect.size() ); }
/** View coord -> normal coord */
- virtual QPoint viewToNormal( const QPoint & vPoint ) = 0;
+ virtual TQPoint viewToNormal( const TQPoint & vPoint ) = 0;
/** View coord -> normal coord */
- QRect viewToNormal( const QRect & nRect )
- { return QRect( viewToNormal( nRect.topLeft() ), viewToNormal( nRect.bottomRight() ) ); }
+ TQRect viewToNormal( const TQRect & nRect )
+ { return TQRect( viewToNormal( nRect.topLeft() ), viewToNormal( nRect.bottomRight() ) ); }
/** Return view coord for page rect. Avoids rounding problems when doing normalToView(zoomedRect) */
- virtual QRect viewPageRect( int pgNum ) = 0;
+ virtual TQRect viewPageRect( int pgNum ) = 0;
/** Size of the contents area, in pixels */
- virtual QSize contentsSize() = 0;
+ virtual TQSize contentsSize() = 0;
/** Size (in pixels) of the total area available for text in a given textframeset
* This is used by KWTextFrameSet::drawFrame to erase between the bottom of the
* last paragraph and the bottom of the available area. */
- virtual QSize availableSizeForText( KWTextFrameSet* textfs );
+ virtual TQSize availableSizeForText( KWTextFrameSet* textfs );
/** "Topleft of current page" - concept used by the rulers.
* The default implementation is good enough for any page-based viewmode,
* since it calls normalToView. But the textmode has no page concept. */
- virtual QPoint pageCorner();
+ virtual TQPoint pageCorner();
/** The result of this is passed to setFrameStartEnd for both rulers
* (after adjustement with pageCorner()) */
- virtual QRect rulerFrameRect();
- /** Called when the page layout is set, or changes.
+ virtual TQRect rulerFrameRect();
+ /** Called when the page tqlayout is set, or changes.
* Usually this is directly passed to KoRuler (for page-based viewmodes) */
- virtual void setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& layout );
+ virtual void setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& tqlayout );
- virtual void drawPageBorders( QPainter * painter, const QRect & crect, const QRegion & emptySpaceRegion ) = 0;
+ virtual void drawPageBorders( TQPainter * painter, const TQRect & crect, const TQRegion & emptySpaceRegion ) = 0;
/** Config option for KWViewModePreview (a bit of a hack) */
virtual void setPagesPerRow(int) {}
@@ -122,13 +122,13 @@ public:
virtual bool hasPages() { return true; }
/** Return the name of the viewmode, used for loading/saving. */
- virtual const QString type() const = 0;
+ virtual const TQString type() const = 0;
/** Answers the question if argument frameset has to be drawn as a text-mode
* text area if true, or if false as a frame with its own contents. */
virtual bool isTextModeFrameset(KWFrameSet *) const { return false; }
- static KWViewMode *create( const QString& viewModeType, KWDocument* doc, KWCanvas* canvas );
+ static KWViewMode *create( const TQString& viewModeType, KWDocument* doc, KWCanvas* canvas );
KWCanvas * canvas() const { return m_canvas; }
@@ -140,10 +140,10 @@ protected:
* @param emptySpaceRegion the empty space to clear up inside the page (in view pixels)
* @param painter the painter to paint the border on.
*/
- void drawOnePageBorder( QPainter * painter, const QRect & crect, const QRect & pageRect,
- const QRegion & emptySpaceRegion );
- QRect drawRightShadow( QPainter * painter, const QRect & crect, const QRect & pageRect, int topOffset );
- QRect drawBottomShadow( QPainter * painter, const QRect & crect, const QRect & pageRect, int leftOffset );
+ void drawOnePageBorder( TQPainter * painter, const TQRect & crect, const TQRect & pageRect,
+ const TQRegion & emptySpaceRegion );
+ TQRect drawRightShadow( TQPainter * painter, const TQRect & crect, const TQRect & pageRect, int topOffset );
+ TQRect drawBottomShadow( TQPainter * painter, const TQRect & crect, const TQRect & pageRect, int leftOffset );
static const unsigned short s_shadowOffset;
KWDocument * m_doc;
@@ -159,14 +159,14 @@ public:
: KWViewMode( doc, canvas, drawFrameBorders ) {}
virtual ~KWViewModeNormal() {}
- virtual QPoint normalToView( const QPoint & nPoint );
- virtual QPoint viewToNormal( const QPoint & vPoint );
- virtual QRect viewPageRect( int pgNum );
- virtual QSize contentsSize();
+ virtual TQPoint normalToView( const TQPoint & nPoint );
+ virtual TQPoint viewToNormal( const TQPoint & vPoint );
+ virtual TQRect viewPageRect( int pgNum );
+ virtual TQSize contentsSize();
- virtual const QString type() const { return "ModeNormal"; }
+ virtual const TQString type() const { return "ModeNormal"; }
- virtual void drawPageBorders( QPainter * painter, const QRect & crect, const QRegion & emptySpaceRegion );
+ virtual void drawPageBorders( TQPainter * painter, const TQRect & crect, const TQRegion & emptySpaceRegion );
protected:
virtual int xOffset(KWPage *page, int canvasWidth = -1);
@@ -199,16 +199,16 @@ public:
void setDrawSelections( bool b ) { mDrawSelections = b; }
// This view mode is very easy to implement ;-P
- virtual QPoint normalToView( const QPoint & nPoint ) { return nPoint; }
- virtual QPoint viewToNormal( const QPoint & vPoint ) { return vPoint; }
- virtual QRect viewPageRect( int pgNum );
- virtual QSize contentsSize() { return QSize(); }
+ virtual TQPoint normalToView( const TQPoint & nPoint ) { return nPoint; }
+ virtual TQPoint viewToNormal( const TQPoint & vPoint ) { return vPoint; }
+ virtual TQRect viewPageRect( int pgNum );
+ virtual TQSize contentsSize() { return TQSize(); }
virtual bool hasPages() { return false; }
- virtual void drawPageBorders( QPainter *, const QRect &, const QRegion & ){}
+ virtual void drawPageBorders( TQPainter *, const TQRect &, const TQRegion & ){}
virtual bool drawSelections() { return mDrawSelections; }
- virtual const QString type() const { return "ModeEmbedded"; }
+ virtual const TQString type() const { return "ModeEmbedded"; }
virtual bool drawFrameBackground() { return mDrawFrameBackground; }
private:
@@ -225,15 +225,15 @@ public:
KWViewModePreview( KWDocument * doc, KWCanvas* canvas, bool drawFrameBorders, int _nbPagePerRow );
virtual ~KWViewModePreview() {}
- virtual QPoint normalToView( const QPoint & nPoint );
- virtual QPoint viewToNormal( const QPoint & vPoint );
- virtual QRect viewPageRect( int pgNum );
- virtual QSize contentsSize();
- virtual void drawPageBorders( QPainter * painter, const QRect & crect, const QRegion & emptySpaceRegion );
+ virtual TQPoint normalToView( const TQPoint & nPoint );
+ virtual TQPoint viewToNormal( const TQPoint & vPoint );
+ virtual TQRect viewPageRect( int pgNum );
+ virtual TQSize contentsSize();
+ virtual void drawPageBorders( TQPainter * painter, const TQRect & crect, const TQRegion & emptySpaceRegion );
virtual void setPagesPerRow(int _nb) {m_pagesPerRow=_nb;}
virtual int pagesPerRow() {return m_pagesPerRow;}
- virtual const QString type() const { return "ModePreview"; }
+ virtual const TQString type() const { return "ModePreview"; }
int numRows() const;
@@ -265,18 +265,18 @@ public:
*/
static KWTextFrameSet *determineTextFrameSet( KWDocument* doc );
- virtual QPoint normalToView( const QPoint & nPoint );
- virtual QPoint viewToNormal( const QPoint & vPoint );
- virtual QSize contentsSize();
- virtual QRect viewPageRect( int ) { return QRect(); }
- virtual QSize availableSizeForText( KWTextFrameSet* textfs );
+ virtual TQPoint normalToView( const TQPoint & nPoint );
+ virtual TQPoint viewToNormal( const TQPoint & vPoint );
+ virtual TQSize contentsSize();
+ virtual TQRect viewPageRect( int ) { return TQRect(); }
+ virtual TQSize availableSizeForText( KWTextFrameSet* textfs );
// There is no page concept. Keep everything relative to (0,0)
- virtual QPoint pageCorner() { return QPoint( 0, 0 ); }
- virtual QRect rulerFrameRect();
- virtual void setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& layout );
+ virtual TQPoint pageCorner() { return TQPoint( 0, 0 ); }
+ virtual TQRect rulerFrameRect();
+ virtual void setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& tqlayout );
- virtual void drawPageBorders( QPainter * painter, const QRect & crect, const QRegion & emptySpaceRegion );
- virtual const QString type() const { return "ModeText"; }
+ virtual void drawPageBorders( TQPainter * painter, const TQRect & crect, const TQRegion & emptySpaceRegion );
+ virtual const TQString type() const { return "ModeText"; }
virtual bool shouldFormatVertically() { return false; }
virtual bool shouldAdjustMargins() { return false; }
virtual bool hasFrames() { return false; }
diff --git a/kword/KWordDocIface.cpp b/kword/KWordDocIface.cpp
index f2a1e850..40736b4e 100644
--- a/kword/KWordDocIface.cpp
+++ b/kword/KWordDocIface.cpp
@@ -70,7 +70,7 @@ double KWordDocIface::ptPageTop( int pgNum )const
return doc->pageManager()->topOfPage(pgNum);
}
-QString KWordDocIface::unitName()const
+TQString KWordDocIface::unitName()const
{
return doc->unitName();
}
@@ -86,7 +86,7 @@ void KWordDocIface::recalcVariables(int _var)
doc->recalcVariables(_var);
}
-void KWordDocIface::recalcVariables(const QString &varName)
+void KWordDocIface::recalcVariables(const TQString &varName)
{
if(varName=="VT_DATE")
doc->recalcVariables(0);
@@ -203,7 +203,7 @@ void KWordDocIface::setDisplayLink(bool b)
doc->recalcVariables(VT_LINK);
}
-bool KWordDocIface::setCustomVariableValue(const QString & varname, const QString & value)
+bool KWordDocIface::setCustomVariableValue(const TQString & varname, const TQString & value)
{
bool exist=doc->variableCollection()->customVariableExist(varname);
if(exist)
@@ -217,11 +217,11 @@ bool KWordDocIface::setCustomVariableValue(const QString & varname, const QStrin
}
-QString KWordDocIface::customVariableValue(const QString & varname)const
+TQString KWordDocIface::customVariableValue(const TQString & varname)const
{
if(doc->variableCollection()->customVariableExist(varname))
return doc->variableCollection()->getVariableValue( varname );
- return QString::null;
+ return TQString();
}
void KWordDocIface::initConfig()
@@ -479,17 +479,17 @@ void KWordDocIface::setConfigAutoSuperScript( bool b)
doc->autoFormat()->configAutoSuperScript( b );
}
-void KWordDocIface::addIgnoreWordAll( const QString &word )
+void KWordDocIface::addIgnoreWordAll( const TQString &word )
{
doc->addSpellCheckIgnoreWord( word );
}
void KWordDocIface::clearIgnoreWordAll( )
{
- doc->setSpellCheckIgnoreList( QStringList() );
+ doc->setSpellCheckIgnoreList( TQStringList() );
}
-QStringList KWordDocIface::spellListIgnoreAll() const
+TQStringList KWordDocIface::spellListIgnoreAll() const
{
return doc->spellCheckIgnoreList();
}
@@ -524,10 +524,10 @@ int KWordDocIface::footNoteSeparatorLineLength() const
void KWordDocIface::setFootNoteSeparatorLineLength( int _length)
{
doc->setFootNoteSeparatorLineLength( _length );
- doc->repaintAllViews();
+ doc->tqrepaintAllViews();
}
-void KWordDocIface::setFootNoteSeparatorLinePosition( const QString &pos)
+void KWordDocIface::setFootNoteSeparatorLinePosition( const TQString &pos)
{
SeparatorLinePos tmp=SLP_LEFT;
if ( pos.lower()=="left")
@@ -537,20 +537,20 @@ void KWordDocIface::setFootNoteSeparatorLinePosition( const QString &pos)
else if ( pos.lower()=="right")
tmp=SLP_RIGHT;
doc->setFootNoteSeparatorLinePosition( tmp);
- doc->repaintAllViews();
+ doc->tqrepaintAllViews();
}
-QString KWordDocIface::footNoteSeparatorLinePosition()const
+TQString KWordDocIface::footNoteSeparatorLinePosition()const
{
- QString tmp=QString::null;
+ TQString tmp=TQString();
switch( doc->footNoteSeparatorLinePosition() )
{
case SLP_LEFT:
- return QString("left");
+ return TQString("left");
case SLP_RIGHT:
- return QString("right");
+ return TQString("right");
case SLP_CENTERED:
- return QString("centered");
+ return TQString("centered");
}
return tmp;
}
@@ -563,26 +563,26 @@ double KWordDocIface::footNoteSeparatorLineWidth() const
void KWordDocIface::setFootNoteSeparatorLineWidth( double _width)
{
doc->setFootNoteSeparatorLineWidth( _width );
- doc->repaintAllViews();
+ doc->tqrepaintAllViews();
}
-void KWordDocIface::deleteBookMark(const QString &_name)
+void KWordDocIface::deleteBookMark(const TQString &_name)
{
doc->deleteBookmark( _name );
}
-void KWordDocIface::renameBookMark(const QString &_oldname, const QString &_newName)
+void KWordDocIface::renameBookMark(const TQString &_oldname, const TQString &_newName)
{
doc->renameBookmark( _oldname, _newName);
}
-QStringList KWordDocIface::listOfBookmarkName()const
+TQStringList KWordDocIface::listOfBookmarkName()const
{
//return all list
return doc->listOfBookmarkName(0L);
}
-QString KWordDocIface::configAutoFormatLanguage( )const
+TQString KWordDocIface::configAutoFormatLanguage( )const
{
return doc->autoFormat()->getConfigAutoFormatLanguage( );
}
@@ -620,12 +620,12 @@ double KWordDocIface::gridY() const
void KWordDocIface::setGridX( double _gridX )
{
- doc->setGridX( QMAX( 0.1, _gridX ) );
+ doc->setGridX( TQMAX( 0.1, _gridX ) );
}
void KWordDocIface::setGridY( double _gridY )
{
- doc->setGridY( QMAX( 0.1, _gridY ) );
+ doc->setGridY( TQMAX( 0.1, _gridY ) );
}
void KWordDocIface::setShowGrid( bool _b )
diff --git a/kword/KWordDocIface.h b/kword/KWordDocIface.h
index 40dd6e50..cd914a80 100644
--- a/kword/KWordDocIface.h
+++ b/kword/KWordDocIface.h
@@ -23,8 +23,8 @@
#include <KoDocumentIface.h>
#include <dcopref.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class KWDocument;
class KWordDocIface : public KoDocumentIface
@@ -46,7 +46,7 @@ k_dcop:
virtual double ptPageTop( int pgNum )const;
//configure
- virtual QString unitName()const;
+ virtual TQString unitName()const;
virtual bool showRuler() const;
virtual bool showdocStruct() const;
@@ -77,9 +77,9 @@ k_dcop:
virtual void recalcAllVariables();
virtual void recalcVariables(int _var);
- virtual void recalcVariables(const QString &varName);
- bool setCustomVariableValue(const QString & varname, const QString & value);
- virtual QString customVariableValue(const QString & varname)const;
+ virtual void recalcVariables(const TQString &varName);
+ bool setCustomVariableValue(const TQString & varname, const TQString & value);
+ virtual TQString customVariableValue(const TQString & varname)const;
virtual void setStartingPage(int nb);
virtual int startingPage()const;
@@ -154,9 +154,9 @@ k_dcop:
bool configAutoSuperScript() const;
void setConfigAutoSuperScript( bool b);
- void addIgnoreWordAll( const QString &);
+ void addIgnoreWordAll( const TQString &);
void clearIgnoreWordAll( );
- QStringList spellListIgnoreAll() const;
+ TQStringList spellListIgnoreAll() const;
//init/save config
virtual void initConfig();
@@ -170,19 +170,19 @@ k_dcop:
int footNoteSeparatorLineLength() const;
void setFootNoteSeparatorLineLength( int _length);
- void setFootNoteSeparatorLinePosition( const QString &pos);
- QString footNoteSeparatorLinePosition()const;
+ void setFootNoteSeparatorLinePosition( const TQString &pos);
+ TQString footNoteSeparatorLinePosition()const;
double footNoteSeparatorLineWidth() const;
void setFootNoteSeparatorLineWidth( double _width);
- void deleteBookMark(const QString &_name);
- void renameBookMark(const QString &_oldname, const QString &_newName);
- QStringList listOfBookmarkName()const;
+ void deleteBookMark(const TQString &_name);
+ void renameBookMark(const TQString &_oldname, const TQString &_newName);
+ TQStringList listOfBookmarkName()const;
bool displayFieldCode()const;
void setDisplayFieldCode( bool b);
- QString configAutoFormatLanguage( )const;
+ TQString configAutoFormatLanguage( )const;
bool configCapitalizeNameOfDays() const;
void setConfigCapitalizeNameOfDays( bool b);
diff --git a/kword/KWordFootNoteFrameSetIface.cpp b/kword/KWordFootNoteFrameSetIface.cpp
index d5e2d352..e79095a9 100644
--- a/kword/KWordFootNoteFrameSetIface.cpp
+++ b/kword/KWordFootNoteFrameSetIface.cpp
@@ -28,13 +28,13 @@ KWFootNoteFrameSetIface::KWFootNoteFrameSetIface( KWFootNoteFrameSet *_note )
}
-QString KWFootNoteFrameSetIface::footEndNoteText() const
+TQString KWFootNoteFrameSetIface::footEndNoteText() const
{
KWFootNoteVariable* var = m_footNote->footNoteVariable();
if ( var )
return var->text();
else
- return QString::null;
+ return TQString();
}
bool KWFootNoteFrameSetIface::isFootNote() const
@@ -47,7 +47,7 @@ bool KWFootNoteFrameSetIface::isEndNote() const
return m_footNote->isEndNote();
}
-void KWFootNoteFrameSetIface::setCounterText( const QString& text )
+void KWFootNoteFrameSetIface::setCounterText( const TQString& text )
{
m_footNote->setCounterText( text );
}
diff --git a/kword/KWordFootNoteFrameSetIface.h b/kword/KWordFootNoteFrameSetIface.h
index 0d2a409f..b7afac53 100644
--- a/kword/KWordFootNoteFrameSetIface.h
+++ b/kword/KWordFootNoteFrameSetIface.h
@@ -23,9 +23,9 @@
#include <KoDocumentIface.h>
#include <dcopref.h>
-#include <qstring.h>
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqfont.h>
#include "KWordTextFrameSetIface.h"
class KWFootNoteFrameSet;
@@ -36,10 +36,10 @@ public:
KWFootNoteFrameSetIface( KWFootNoteFrameSet *_note );
k_dcop:
- QString footEndNoteText() const;
+ TQString footEndNoteText() const;
bool isFootNote() const;
bool isEndNote() const;
- void setCounterText( const QString& text );
+ void setCounterText( const TQString& text );
private:
KWFootNoteFrameSet *m_footNote;
diff --git a/kword/KWordFormulaFrameSetEditIface.cpp b/kword/KWordFormulaFrameSetEditIface.cpp
index ebe4cc31..6d882de5 100644
--- a/kword/KWordFormulaFrameSetEditIface.cpp
+++ b/kword/KWordFormulaFrameSetEditIface.cpp
@@ -185,7 +185,7 @@ void KWordFormulaFrameSetEditIface::makeGreek()
m_framesetedit->formulaFrameSet()->kWordDocument()->formulaDocument()->wrapper()->makeGreek();
}
-void KWordFormulaFrameSetEditIface::insertSymbol( const QString &name )
+void KWordFormulaFrameSetEditIface::insertSymbol( const TQString &name )
{
m_framesetedit->formulaFrameSet()->kWordDocument()->formulaDocument()->wrapper()->insertSymbol( name );
}
@@ -265,7 +265,7 @@ void KWordFormulaFrameSetEditIface::eraseSelection( int direction )
m_framesetedit->getFormulaView()->eraseSelection( static_cast<KFormula::Direction>( direction ) );
}
-void KWordFormulaFrameSetEditIface::addText( const QString &str )
+void KWordFormulaFrameSetEditIface::addText( const TQString &str )
{
m_framesetedit->getFormulaView()->addText( str );
}
diff --git a/kword/KWordFormulaFrameSetEditIface.h b/kword/KWordFormulaFrameSetEditIface.h
index aecaedf3..40ace887 100644
--- a/kword/KWordFormulaFrameSetEditIface.h
+++ b/kword/KWordFormulaFrameSetEditIface.h
@@ -23,8 +23,8 @@
#include <KoDocumentIface.h>
#include <dcopref.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
class KWFormulaFrameSetEdit;
class KWordFormulaFrameSetEditIface : public DCOPObject
@@ -67,7 +67,7 @@ k_dcop:
void addGenericUpperIndex();
void removeEnclosing();
void makeGreek();
- void insertSymbol( const QString &name );
+ void insertSymbol( const TQString &name );
void appendColumn();
void insertColumn();
@@ -91,7 +91,7 @@ k_dcop:
bool isEnd() const;
void eraseSelection( int direction );
- void addText( const QString &str );
+ void addText( const TQString &str );
private:
KWFormulaFrameSetEdit *m_framesetedit;
diff --git a/kword/KWordFormulaFrameSetIface.cpp b/kword/KWordFormulaFrameSetIface.cpp
index fde7ef87..f8263d8e 100644
--- a/kword/KWordFormulaFrameSetIface.cpp
+++ b/kword/KWordFormulaFrameSetIface.cpp
@@ -39,7 +39,7 @@ DCOPRef KWordFormulaFrameSetIface::startEditing()
if ( m_formulaFrame->isDeleted() )
return DCOPRef();
KWDocument *doc = m_formulaFrame->kWordDocument();
- QValueList<KWView *> views = doc->getAllViews();
+ TQValueList<KWView *> views = doc->getAllViews();
KWCanvas* canvas = views.first()->getGUI()->canvasWidget();
canvas->editFrameSet( m_formulaFrame );
return DCOPRef( kapp->dcopClient()->appId(),
diff --git a/kword/KWordFormulaFrameSetIface.h b/kword/KWordFormulaFrameSetIface.h
index 36324a0a..d2991c5a 100644
--- a/kword/KWordFormulaFrameSetIface.h
+++ b/kword/KWordFormulaFrameSetIface.h
@@ -23,8 +23,8 @@
#include <KoDocumentIface.h>
#include <dcopref.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
#include "KWordFrameSetIface.h"
class KWFormulaFrameSet;
class KWordViewIface;
diff --git a/kword/KWordFrameSetIface.cpp b/kword/KWordFrameSetIface.cpp
index cee12dfc..928cddb5 100644
--- a/kword/KWordFrameSetIface.cpp
+++ b/kword/KWordFrameSetIface.cpp
@@ -95,15 +95,15 @@ int KWordFrameSetIface::pageNumber() const
return m_frame->frame(0)->pageNumber();
}
-QBrush KWordFrameSetIface::backgroundColor() const
+TQBrush KWordFrameSetIface::backgroundColor() const
{
return m_frame->frame(0)->backgroundColor();
}
-void KWordFrameSetIface::setBackgroundColor( const QString &_color )
+void KWordFrameSetIface::setBackgroundColor( const TQString &_color )
{
- QBrush brush= m_frame->frame(0)->backgroundColor();
- brush.setColor( QColor( _color ));
+ TQBrush brush= m_frame->frame(0)->backgroundColor();
+ brush.setColor( TQColor( _color ));
m_frame->frame(0)->setBackgroundColor( brush );
}
@@ -135,43 +135,43 @@ bool KWordFrameSetIface::isCopy()const
void KWordFrameSetIface::setPtMarginLeft(double val)
{
m_frame->frame( 0 )->setPaddingLeft(val);
- m_frame->kWordDocument()->layout();
+ m_frame->kWordDocument()->tqlayout();
}
void KWordFrameSetIface::setPtMarginRight(double val)
{
m_frame->frame( 0 )->setPaddingRight(val);
- m_frame->kWordDocument()->layout();
+ m_frame->kWordDocument()->tqlayout();
}
void KWordFrameSetIface::setPtMarginTop(double val)
{
m_frame->frame( 0 )->setPaddingTop(val);
- m_frame->kWordDocument()->layout();
+ m_frame->kWordDocument()->tqlayout();
}
void KWordFrameSetIface::setPtMarginBottom(double val)
{
m_frame->frame( 0 )->setPaddingBottom(val);
- m_frame->kWordDocument()->layout();
+ m_frame->kWordDocument()->tqlayout();
}
-QColor KWordFrameSetIface::leftBorderColor() const
+TQColor KWordFrameSetIface::leftBorderColor() const
{
return m_frame->frame( 0 )->leftBorder().color;
}
-QColor KWordFrameSetIface::rightBorderColor() const
+TQColor KWordFrameSetIface::rightBorderColor() const
{
return m_frame->frame( 0 )->rightBorder().color;
}
-QColor KWordFrameSetIface::topBorderColor() const
+TQColor KWordFrameSetIface::topBorderColor() const
{
return m_frame->frame( 0 )->topBorder().color;
}
-QColor KWordFrameSetIface::bottomBorderColor() const
+TQColor KWordFrameSetIface::bottomBorderColor() const
{
return m_frame->frame( 0 )->bottomBorder().color;
}
@@ -186,112 +186,112 @@ void KWordFrameSetIface::setProtectSize( bool _b )
m_frame->setProtectSize( _b );
}
-QString KWordFrameSetIface::bottomBorderStyle() const
+TQString KWordFrameSetIface::bottomBorderStyle() const
{
switch( m_frame->frame( 0 )->bottomBorder().getStyle())
{
case KoBorder::SOLID:
- return QString("SOLID");
+ return TQString("SOLID");
break;
case KoBorder::DASH:
- return QString("DASH");
+ return TQString("DASH");
break;
case KoBorder::DOT:
- return QString("DOT");
+ return TQString("DOT");
break;
case KoBorder::DASH_DOT:
- return QString("DASH DOT");
+ return TQString("DASH DOT");
break;
case KoBorder::DASH_DOT_DOT:
- return QString("DASH DOT DOT");
+ return TQString("DASH DOT DOT");
break;
case KoBorder::DOUBLE_LINE:
- return QString("DOUBLE LINE");
+ return TQString("DOUBLE LINE");
break;
}
- return QString::null;
+ return TQString();
}
-QString KWordFrameSetIface::topBorderStyle() const
+TQString KWordFrameSetIface::topBorderStyle() const
{
switch( m_frame->frame( 0 )->topBorder().getStyle())
{
case KoBorder::SOLID:
- return QString("SOLID");
+ return TQString("SOLID");
break;
case KoBorder::DASH:
- return QString("DASH");
+ return TQString("DASH");
break;
case KoBorder::DOT:
- return QString("DOT");
+ return TQString("DOT");
break;
case KoBorder::DASH_DOT:
- return QString("DASH DOT");
+ return TQString("DASH DOT");
break;
case KoBorder::DASH_DOT_DOT:
- return QString("DASH DOT DOT");
+ return TQString("DASH DOT DOT");
break;
case KoBorder::DOUBLE_LINE:
- return QString("DOUBLE LINE");
+ return TQString("DOUBLE LINE");
break;
}
- return QString::null;
+ return TQString();
}
-QString KWordFrameSetIface::leftBorderStyle() const
+TQString KWordFrameSetIface::leftBorderStyle() const
{
switch( m_frame->frame( 0 )->leftBorder().getStyle())
{
case KoBorder::SOLID:
- return QString("SOLID");
+ return TQString("SOLID");
break;
case KoBorder::DASH:
- return QString("DASH");
+ return TQString("DASH");
break;
case KoBorder::DOT:
- return QString("DOT");
+ return TQString("DOT");
break;
case KoBorder::DASH_DOT:
- return QString("DASH DOT");
+ return TQString("DASH DOT");
break;
case KoBorder::DASH_DOT_DOT:
- return QString("DASH DOT DOT");
+ return TQString("DASH DOT DOT");
break;
case KoBorder::DOUBLE_LINE:
- return QString("DOUBLE LINE");
+ return TQString("DOUBLE LINE");
break;
}
- return QString::null;
+ return TQString();
}
-QString KWordFrameSetIface::rightBorderStyle() const
+TQString KWordFrameSetIface::rightBorderStyle() const
{
switch( m_frame->frame( 0 )->rightBorder().getStyle())
{
case KoBorder::SOLID:
- return QString("SOLID");
+ return TQString("SOLID");
break;
case KoBorder::DASH:
- return QString("DASH");
+ return TQString("DASH");
break;
case KoBorder::DOT:
- return QString("DOT");
+ return TQString("DOT");
break;
case KoBorder::DASH_DOT:
- return QString("DASH DOT");
+ return TQString("DASH DOT");
break;
case KoBorder::DASH_DOT_DOT:
- return QString("DASH DOT DOT");
+ return TQString("DASH DOT DOT");
break;
case KoBorder::DOUBLE_LINE:
- return QString("DOUBLE LINE");
+ return TQString("DOUBLE LINE");
break;
}
- return QString::null;
+ return TQString();
}
double KWordFrameSetIface::rightBorderWidth() const
@@ -341,7 +341,7 @@ void KWordFrameSetIface::setBottomBorderWitdh( double _width )
m_frame->frame( 0 )->setBottomBorder(tmp);
}
-void KWordFrameSetIface::setRightBorderStyle(const QString & _style)
+void KWordFrameSetIface::setRightBorderStyle(const TQString & _style)
{
KoBorder tmp = m_frame->frame( 0 )->rightBorder();
if ( _style.lower()=="solid")
@@ -364,7 +364,7 @@ void KWordFrameSetIface::setRightBorderStyle(const QString & _style)
m_frame->frame( 0 )->setRightBorder(tmp);
}
-void KWordFrameSetIface::setLeftBorderStyle(const QString & _style)
+void KWordFrameSetIface::setLeftBorderStyle(const TQString & _style)
{
KoBorder tmp = m_frame->frame( 0 )->leftBorder();
if ( _style.lower()=="solid")
@@ -388,7 +388,7 @@ void KWordFrameSetIface::setLeftBorderStyle(const QString & _style)
}
-void KWordFrameSetIface::setTopBorderStyle(const QString & _style)
+void KWordFrameSetIface::setTopBorderStyle(const TQString & _style)
{
KoBorder tmp = m_frame->frame( 0 )->topBorder();
@@ -412,7 +412,7 @@ void KWordFrameSetIface::setTopBorderStyle(const QString & _style)
m_frame->frame( 0 )->setTopBorder(tmp);
}
-void KWordFrameSetIface::setBottomBorderStyle(const QString & _style)
+void KWordFrameSetIface::setBottomBorderStyle(const TQString & _style)
{
KoBorder tmp = m_frame->frame( 0 )->bottomBorder();
if ( _style.lower()=="solid")
@@ -440,41 +440,41 @@ bool KWordFrameSetIface::isFootEndNote() const
return m_frame->isFootEndNote();
}
-QString KWordFrameSetIface::frameSetInfo() const
+TQString KWordFrameSetIface::frameSetInfo() const
{
switch( m_frame->frameSetInfo() )
{
case KWFrameSet::FI_BODY:
- return QString("body");
+ return TQString("body");
break;
case KWFrameSet::FI_FIRST_HEADER:
- return QString("First header");
+ return TQString("First header");
break;
case KWFrameSet::FI_ODD_HEADER:
- return QString("First even header");
+ return TQString("First even header");
break;
case KWFrameSet::FI_EVEN_HEADER:
- return QString("First odd header");
+ return TQString("First odd header");
break;
case KWFrameSet::FI_FIRST_FOOTER:
- return QString("First footer");
+ return TQString("First footer");
break;
case KWFrameSet::FI_EVEN_FOOTER:
- return QString("Odd footer");
+ return TQString("Odd footer");
break;
case KWFrameSet::FI_ODD_FOOTER:
- return QString("Even footer");
+ return TQString("Even footer");
break;
case KWFrameSet::FI_FOOTNOTE:
- return QString("FootNote");
+ return TQString("FootNote");
break;
default:
- return QString::null;
+ return TQString();
break;
}
}
-void KWordFrameSetIface::setFrameSetInfo( const QString & _type)
+void KWordFrameSetIface::setFrameSetInfo( const TQString & _type)
{
if ( _type.lower() =="body")
{
diff --git a/kword/KWordFrameSetIface.h b/kword/KWordFrameSetIface.h
index b9dbc8e4..9a5c9238 100644
--- a/kword/KWordFrameSetIface.h
+++ b/kword/KWordFrameSetIface.h
@@ -23,9 +23,9 @@
#include <KoDocumentIface.h>
#include <dcopref.h>
-#include <qstring.h>
-#include <qcolor.h>
-#include <qbrush.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqbrush.h>
class KWFrameSet;
class KWordFrameSetIface : public DCOPObject
@@ -51,8 +51,8 @@ k_dcop:
virtual double ptPosY() const;
virtual int zOrder() const;
virtual int pageNumber() const;
- virtual QBrush backgroundColor() const;
- virtual void setBackgroundColor( const QString &_color );
+ virtual TQBrush backgroundColor() const;
+ virtual void setBackgroundColor( const TQString &_color );
virtual double ptMarginLeft()const;
virtual double ptMarginRight()const;
@@ -64,19 +64,19 @@ k_dcop:
virtual void setPtMarginTop(double val);
virtual void setPtMarginBottom(double val);
- virtual QColor leftBorderColor() const;
- virtual QColor rightBorderColor() const;
- virtual QColor topBorderColor() const;
- virtual QColor bottomBorderColor() const;
+ virtual TQColor leftBorderColor() const;
+ virtual TQColor rightBorderColor() const;
+ virtual TQColor topBorderColor() const;
+ virtual TQColor bottomBorderColor() const;
virtual bool isCopy()const;
virtual bool isProtectSize()const;
virtual void setProtectSize( bool _b );
//it's for frame 0
- QString bottomBorderStyle()const;
- QString topBorderStyle()const;
- QString leftBorderStyle()const;
- QString rightBorderStyle()const;
+ TQString bottomBorderStyle()const;
+ TQString topBorderStyle()const;
+ TQString leftBorderStyle()const;
+ TQString rightBorderStyle()const;
double rightBorderWidth() const;
double topBorderWidth() const;
@@ -88,13 +88,13 @@ k_dcop:
void setLeftBorderWitdh( double _width );
void setRightBorderWitdh( double _width );
- void setBottomBorderStyle(const QString & _style);
- void setTopBorderStyle(const QString & _style);
- void setLeftBorderStyle(const QString & _style);
- void setRightBorderStyle(const QString & _style);
+ void setBottomBorderStyle(const TQString & _style);
+ void setTopBorderStyle(const TQString & _style);
+ void setLeftBorderStyle(const TQString & _style);
+ void setRightBorderStyle(const TQString & _style);
- QString frameSetInfo() const;
- void setFrameSetInfo( const QString & _type);
+ TQString frameSetInfo() const;
+ void setFrameSetInfo( const TQString & _type);
private:
diff --git a/kword/KWordMailMergeDatabaseIface.h b/kword/KWordMailMergeDatabaseIface.h
index fdf18293..49e62f09 100644
--- a/kword/KWordMailMergeDatabaseIface.h
+++ b/kword/KWordMailMergeDatabaseIface.h
@@ -21,7 +21,7 @@
#define __KWordMailMergeDatabaseIface_h__
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
* DCOP interface for the MailMergeDataBase class
*/
@@ -29,12 +29,12 @@ class KWordMailMergeDatabaseIface : public DCOPObject
{
K_DCOP
public:
- KWordMailMergeDatabaseIface(const QCString &name);
+ KWordMailMergeDatabaseIface(const TQCString &name);
~KWordMailMergeDatabaseIface();
k_dcop:
virtual void refresh(bool)=0; //will not be blocked when the configuration dialog is open
- virtual QStringList availablePlugins()=0; //will not be blocked when configuration dialog is open
+ virtual TQStringList availablePlugins()=0; //will not be blocked when configuration dialog is open
virtual bool isConfigDialogShown()=0; // will not be blocked when the configuration dialog is open
/* first parameter plugin name
@@ -45,7 +45,7 @@ k_dcop:
This call will return false, when the plugin couldn't be loaded,
the user rejected to change the datasource or the configuration dialog is open
*/
- virtual bool loadPlugin(const QString &name,const QString &command)=0;
+ virtual bool loadPlugin(const TQString &name,const TQString &command)=0;
};
#endif
diff --git a/kword/KWordPartFrameSetIface.h b/kword/KWordPartFrameSetIface.h
index b22c0fbf..d523c793 100644
--- a/kword/KWordPartFrameSetIface.h
+++ b/kword/KWordPartFrameSetIface.h
@@ -24,8 +24,8 @@
#include "KWordFrameSetIface.h"
#include <dcopref.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
class KWPartFrameSet;
class KWordViewIface;
diff --git a/kword/KWordPictureFrameSetIface.cpp b/kword/KWordPictureFrameSetIface.cpp
index 57ee2857..5609cbc7 100644
--- a/kword/KWordPictureFrameSetIface.cpp
+++ b/kword/KWordPictureFrameSetIface.cpp
@@ -40,7 +40,7 @@ void KWordPictureFrameSetIface::setKeepAspectRatio( bool b )
m_frame->setKeepAspectRatio(b);
}
-void KWordPictureFrameSetIface::loadImage( const QString &image )
+void KWordPictureFrameSetIface::loadImage( const TQString &image )
{
m_frame->loadPicture( image );
m_frame->kWordDocument()->slotRepaintChanged( m_frame );
diff --git a/kword/KWordPictureFrameSetIface.h b/kword/KWordPictureFrameSetIface.h
index aa855e7c..5c4b5f00 100644
--- a/kword/KWordPictureFrameSetIface.h
+++ b/kword/KWordPictureFrameSetIface.h
@@ -24,8 +24,8 @@
#include "KWordFrameSetIface.h"
#include <dcopref.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
class KWPictureFrameSet;
class KWordViewIface;
@@ -38,7 +38,7 @@ public:
k_dcop:
bool keepAspectRatio() const;
void setKeepAspectRatio( bool b );
- void loadImage( const QString &image );
+ void loadImage( const TQString &image );
private:
KWPictureFrameSet *m_frame;
diff --git a/kword/KWordTableFrameSetIface.h b/kword/KWordTableFrameSetIface.h
index d85db10e..65b41430 100644
--- a/kword/KWordTableFrameSetIface.h
+++ b/kword/KWordTableFrameSetIface.h
@@ -24,8 +24,8 @@
#include "KWordFrameSetIface.h"
#include <dcopref.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
class KWTableFrameSet;
class KWordViewIface;
diff --git a/kword/KWordTextFrameSetEditIface.cpp b/kword/KWordTextFrameSetEditIface.cpp
index ff567513..cce0a7a7 100644
--- a/kword/KWordTextFrameSetEditIface.cpp
+++ b/kword/KWordTextFrameSetEditIface.cpp
@@ -29,7 +29,7 @@ KWordTextFrameSetEditIface::KWordTextFrameSetEditIface( KWTextFrameSetEdit *_fra
m_framesetedit = _framesetedit;
}
-void KWordTextFrameSetEditIface::insertExpression(const QString &_c)
+void KWordTextFrameSetEditIface::insertExpression(const TQString &_c)
{
m_framesetedit->insertExpression(_c);
}
@@ -44,12 +44,12 @@ void KWordTextFrameSetEditIface::insertVariable( int type, int subtype )
m_framesetedit->insertVariable(type,subtype);
}
-void KWordTextFrameSetEditIface::insertCustomVariable( const QString &name)
+void KWordTextFrameSetEditIface::insertCustomVariable( const TQString &name)
{
m_framesetedit->insertCustomVariable(name);
}
-void KWordTextFrameSetEditIface::insertLink(const QString &_linkName, const QString & hrefName)
+void KWordTextFrameSetEditIface::insertLink(const TQString &_linkName, const TQString & hrefName)
{
m_framesetedit->insertLink(_linkName,hrefName);
}
@@ -79,7 +79,7 @@ void KWordTextFrameSetEditIface::insertNonbreakingSpace()
m_framesetedit->insertNonbreakingSpace();
}
-void KWordTextFrameSetEditIface::insertVariable( const QString & var)
+void KWordTextFrameSetEditIface::insertVariable( const TQString & var)
{
if( var=="DATE")
m_framesetedit->insertVariable(0,1);
@@ -125,25 +125,25 @@ void KWordTextFrameSetEditIface::insertVariable( const QString & var)
m_framesetedit->insertVariable(8,14);
}
-void KWordTextFrameSetEditIface::insertComment(const QString &_comment)
+void KWordTextFrameSetEditIface::insertComment(const TQString &_comment)
{
m_framesetedit->insertComment(_comment);
}
-void KWordTextFrameSetEditIface::insertAutoFootNote( const QString & type )
+void KWordTextFrameSetEditIface::insertAutoFootNote( const TQString & type )
{
if ( type.lower() =="footnote")
{
- m_framesetedit->insertFootNote( FootNote, KWFootNoteVariable::Auto, QString::null);
+ m_framesetedit->insertFootNote( FootNote, KWFootNoteVariable::Auto, TQString());
}
else if ( type.lower()=="endnote")
{
- m_framesetedit->insertFootNote( EndNote, KWFootNoteVariable::Auto, QString::null);
+ m_framesetedit->insertFootNote( EndNote, KWFootNoteVariable::Auto, TQString());
}
}
-void KWordTextFrameSetEditIface::insertManualFootNote( const QString & type, const QString & noteText )
+void KWordTextFrameSetEditIface::insertManualFootNote( const TQString & type, const TQString & noteText )
{
if ( type.lower() =="footnote")
{
diff --git a/kword/KWordTextFrameSetEditIface.h b/kword/KWordTextFrameSetEditIface.h
index 0ded9ccf..f819940c 100644
--- a/kword/KWordTextFrameSetEditIface.h
+++ b/kword/KWordTextFrameSetEditIface.h
@@ -23,8 +23,8 @@
#include <KoDocumentIface.h>
#include <dcopref.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
#include <KoTextViewIface.h>
class KWTextFrameSetEdit;
@@ -35,20 +35,20 @@ public:
KWordTextFrameSetEditIface( KWTextFrameSetEdit *_frametext );
k_dcop:
- void insertExpression(const QString &_c);
+ void insertExpression(const TQString &_c);
void insertFrameBreak();
void insertVariable( int type, int subtype = 0 );
- void insertVariable( const QString & var);
- void insertCustomVariable( const QString &name);
- void insertLink(const QString &_linkName, const QString & hrefName);
+ void insertVariable( const TQString & var);
+ void insertCustomVariable( const TQString &name);
+ void insertLink(const TQString &_linkName, const TQString & hrefName);
void insertTOC();
void cut();
void copy();
void paste();
void insertNonbreakingSpace();
- void insertComment(const QString &_comment);
- void insertAutoFootNote( const QString & type );
- void insertManualFootNote( const QString & type, const QString & noteText );
+ void insertComment(const TQString &_comment);
+ void insertAutoFootNote( const TQString & type );
+ void insertManualFootNote( const TQString & type, const TQString & noteText );
void selectAll();
private:
KWTextFrameSetEdit *m_framesetedit;
diff --git a/kword/KWordTextFrameSetIface.cpp b/kword/KWordTextFrameSetIface.cpp
index bec7832b..ab814900 100644
--- a/kword/KWordTextFrameSetIface.cpp
+++ b/kword/KWordTextFrameSetIface.cpp
@@ -42,7 +42,7 @@ DCOPRef KWordTextFrameSetIface::startEditing()
if ( m_frametext->isDeleted() )
return DCOPRef();
KWDocument *doc=m_frametext->kWordDocument();
- QValueList<KWView *> views = doc->getAllViews();
+ TQValueList<KWView *> views = doc->getAllViews();
KWCanvas* canvas = views.first()->getGUI()->canvasWidget();
canvas->editFrameSet(m_frametext, true);
return DCOPRef( kapp->dcopClient()->appId(),
@@ -59,12 +59,12 @@ int KWordTextFrameSetIface::numberOfParagraphs()
return m_frametext->paragraphs();
}
-QString KWordTextFrameSetIface::name() const
+TQString KWordTextFrameSetIface::name() const
{
return m_frametext->name();
}
-QString KWordTextFrameSetIface::selectedText() const
+TQString KWordTextFrameSetIface::selectedText() const
{
return m_frametext->selectedText();
}
@@ -109,7 +109,7 @@ void KWordTextFrameSetIface::setStrikeOutText( bool b )
delete cmd;
}
-void KWordTextFrameSetIface::setTextColor( const QColor &col )
+void KWordTextFrameSetIface::setTextColor( const TQColor &col )
{
KCommand *cmd=m_frametext->textObject()->setTextColorCommand(col);
delete cmd;
@@ -139,13 +139,13 @@ void KWordTextFrameSetIface::setTextDefaultFormat()
delete cmd;
}
-void KWordTextFrameSetIface::setTextBackgroundColor(const QColor & col)
+void KWordTextFrameSetIface::setTextBackgroundColor(const TQColor & col)
{
KCommand *cmd=m_frametext->textObject()->setTextBackgroundColorCommand(col);
delete cmd;
}
-void KWordTextFrameSetIface::setUnderlineColor( const QColor & color )
+void KWordTextFrameSetIface::setUnderlineColor( const TQColor & color )
{
KCommand *cmd=m_frametext->textObject()->setUnderlineColorCommand( color );
@@ -153,22 +153,22 @@ void KWordTextFrameSetIface::setUnderlineColor( const QColor & color )
}
-QColor KWordTextFrameSetIface::textColor() const
+TQColor KWordTextFrameSetIface::textColor() const
{
return m_frametext->textObject()->textColor();
}
-QFont KWordTextFrameSetIface::textFont() const
+TQFont KWordTextFrameSetIface::textFont() const
{
return m_frametext->textObject()->textFont();
}
-QString KWordTextFrameSetIface::textFontFamily()const
+TQString KWordTextFrameSetIface::textFontFamily()const
{
return m_frametext->textObject()->textFontFamily();
}
-QColor KWordTextFrameSetIface::textBackgroundColor() const
+TQColor KWordTextFrameSetIface::textBackgroundColor() const
{
return m_frametext->textObject()->textBackgroundColor();
}
@@ -193,7 +193,7 @@ bool KWordTextFrameSetIface::textDoubleUnderline()const
return m_frametext->textObject()->textDoubleUnderline();
}
-QColor KWordTextFrameSetIface::textUnderlineColor() const
+TQColor KWordTextFrameSetIface::textUnderlineColor() const
{
return m_frametext->textObject()->textUnderlineColor();
}
@@ -213,13 +213,13 @@ bool KWordTextFrameSetIface::textSuperScript() const
return m_frametext->textObject()->textSuperScript();
}
-void KWordTextFrameSetIface::setTextFamilyFont(const QString &font)
+void KWordTextFrameSetIface::setTextFamilyFont(const TQString &font)
{
KCommand *cmd=m_frametext->textObject()->setFamilyCommand(font);
delete cmd;
}
-void KWordTextFrameSetIface::changeCaseOfText( const QString & caseType)
+void KWordTextFrameSetIface::changeCaseOfText( const TQString & caseType)
{
KCommand *cmd=0L;
if( caseType.lower() == "uppercase" )
@@ -244,7 +244,7 @@ void KWordTextFrameSetIface::changeCaseOfText( const QString & caseType)
}
else
- kdDebug()<<"Error in void KWordTextFrameSetIface::changeCaseOfText( const QString & caseType) parameter\n";
+ kdDebug()<<"Error in void KWordTextFrameSetIface::changeCaseOfText( const TQString & caseType) parameter\n";
delete cmd;
}
@@ -294,17 +294,17 @@ void KWordTextFrameSetIface::setWordByWord( bool _b )
delete cmd;
}
-QString KWordTextFrameSetIface::fontAttibute()const
+TQString KWordTextFrameSetIface::fontAttibute()const
{
return KoTextFormat::attributeFontToString( m_frametext->textObject()->fontAttribute() );
}
-QString KWordTextFrameSetIface::underlineLineStyle() const
+TQString KWordTextFrameSetIface::underlineLineStyle() const
{
return KoTextFormat::underlineStyleToString( m_frametext->textObject()->underlineStyle() );
}
-QString KWordTextFrameSetIface::strikeOutLineStyle()const
+TQString KWordTextFrameSetIface::strikeOutLineStyle()const
{
return KoTextFormat::strikeOutStyleToString( m_frametext->textObject()->strikeOutStyle() );
}
diff --git a/kword/KWordTextFrameSetIface.h b/kword/KWordTextFrameSetIface.h
index 9411679d..1f59434b 100644
--- a/kword/KWordTextFrameSetIface.h
+++ b/kword/KWordTextFrameSetIface.h
@@ -23,9 +23,9 @@
#include <KoDocumentIface.h>
#include <dcopref.h>
-#include <qstring.h>
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqfont.h>
#include "KWordFrameSetIface.h"
class KWTextFrameSet;
class KWordViewIface;
@@ -41,30 +41,30 @@ k_dcop:
bool hasSelection() const;
int numberOfParagraphs();
int paragraphsSelected();
- QString name() const;
- QString selectedText() const;
+ TQString name() const;
+ TQString selectedText() const;
void selectAll( bool select );
void setBoldText( bool b );
void setItalicText( bool b );
void setUnderlineText( bool b );
void setDoubleUnderlineText(bool on);
void setStrikeOutText( bool b );
- void setTextColor( const QColor &col );
+ void setTextColor( const TQColor &col );
void setTextPointSize( int s );
void setTextSubScript( bool b );
void setTextSuperScript( bool b );
void setTextDefaultFormat();
- void setTextBackgroundColor(const QColor & col);
- void setTextFamilyFont(const QString &font);
- void setUnderlineColor( const QColor & color );
+ void setTextBackgroundColor(const TQColor & col);
+ void setTextFamilyFont(const TQString &font);
+ void setUnderlineColor( const TQColor & color );
- void changeCaseOfText( const QString & caseType);
+ void changeCaseOfText( const TQString & caseType);
- QColor textColor() const;
- QFont textFont() const;
- QString textFontFamily()const;
- QColor textBackgroundColor()const;
- QColor textUnderlineColor() const;
+ TQColor textColor() const;
+ TQFont textFont() const;
+ TQString textFontFamily()const;
+ TQColor textBackgroundColor()const;
+ TQColor textUnderlineColor() const;
bool textItalic() const;
@@ -88,10 +88,10 @@ k_dcop:
bool wordByWord() const;
void setWordByWord( bool _b );
- QString fontAttibute()const;
+ TQString fontAttibute()const;
- QString underlineLineStyle() const;
- QString strikeOutLineStyle()const;
+ TQString underlineLineStyle() const;
+ TQString strikeOutLineStyle()const;
private:
diff --git a/kword/KWordViewIface.cpp b/kword/KWordViewIface.cpp
index 9c4f1b80..246b92e6 100644
--- a/kword/KWordViewIface.cpp
+++ b/kword/KWordViewIface.cpp
@@ -104,7 +104,7 @@ void KWordViewIface::insertPicture()
view->insertPicture();
}
-static KoPicture picture( const QString& fileName )
+static KoPicture picture( const TQString& fileName )
{
KoPicture picture;
KoPictureKey key;
@@ -114,12 +114,12 @@ static KoPicture picture( const QString& fileName )
return picture;
}
-void KWordViewIface::insertPictureFromFile( QString fileName, double x, double y, int w, int h )
+void KWordViewIface::insertPictureFromFile( TQString fileName, double x, double y, int w, int h )
{
- view->getGUI()->canvasWidget()->insertPictureDirect( picture( fileName ), KoPoint( x, y ), QSize(w, h) );
+ view->getGUI()->canvasWidget()->insertPictureDirect( picture( fileName ), KoPoint( x, y ), TQSize(w, h) );
}
-void KWordViewIface::insertInlinePicture( QString fileName, int w, int h )
+void KWordViewIface::insertInlinePicture( TQString fileName, int w, int h )
{
view->insertPicture( picture( fileName ), true /*makeInline*/, true /*keepRatio*/, w, h );
view->getGUI()->canvasWidget()->insertInlinePicture();
@@ -205,7 +205,7 @@ void KWordViewIface::createStyleFromSelection()
view->createStyleFromSelection();
}
-int KWordViewIface::tableSelectCell(const QString &name, uint row, uint col)
+int KWordViewIface::tableSelectCell(const TQString &name, uint row, uint col)
{
return view->tableSelectCell(name, row, col);
}
@@ -242,7 +242,7 @@ void KWordViewIface::tableDeleteRow()
int KWordViewIface::tableDeleteRow(uint row)
{
- QValueList<uint> list;
+ TQValueList<uint> list;
list.append(row);
return view->tableDeleteRow(list);
}
@@ -254,7 +254,7 @@ void KWordViewIface::tableDeleteCol()
int KWordViewIface::tableDeleteCol(uint col)
{
- QValueList<uint> list;
+ TQValueList<uint> list;
list.append(col);
return view->tableDeleteCol(list);
}
@@ -299,12 +299,12 @@ bool KWordViewIface::configTableIsFloating() const
return view->getGUI()->canvasWidget()->tableIsFloating();
}
-QString KWordViewIface::configTableTemplateName() const
+TQString KWordViewIface::configTableTemplateName() const
{
return view->getGUI()->canvasWidget()->tableTemplateName();
}
-void KWordViewIface::setConfigTableTemplateName(const QString &_name)
+void KWordViewIface::setConfigTableTemplateName(const TQString &_name)
{
view->getGUI()->canvasWidget()->setTableTemplateName( _name );
}
@@ -361,7 +361,7 @@ void KWordViewIface::importStyle()
}
// ### TODO: network transparency
-void KWordViewIface::insertFile(const QString & path)
+void KWordViewIface::insertFile(const TQString & path)
{
KURL url;
@@ -394,7 +394,7 @@ bool KWordViewIface::pictureKeepRatio() const
return view->getGUI()->canvasWidget()->pictureKeepRatio();
}
-void KWordViewIface::changeAutoSpellCheckStatus(bool b)
+void KWordViewIface::changeAutoSpellChecktqStatus(bool b)
{
view->autoSpellCheck(b);
}
diff --git a/kword/KWordViewIface.h b/kword/KWordViewIface.h
index 1404a4b4..ea422ad9 100644
--- a/kword/KWordViewIface.h
+++ b/kword/KWordViewIface.h
@@ -22,7 +22,7 @@
#include <KoViewIface.h>
-#include <qstring.h>
+#include <tqstring.h>
class KWView;
@@ -46,7 +46,7 @@ k_dcop:
void stylist();
void createTemplate();
- int tableSelectCell(const QString &name, uint row, uint col);
+ int tableSelectCell(const TQString &name, uint row, uint col);
void insertTable();
void tableInsertRow();
void tableInsertRow(uint row);
@@ -68,12 +68,12 @@ k_dcop:
* Insert an inline picture at the current character position
* TODO
*/
- void insertInlinePicture( QString fileName, int w = 0, int h = 0 );
+ void insertInlinePicture( TQString fileName, int w = 0, int h = 0 );
/**
* Insert a (non-inline) picture at the given position
* If w and h are 0, the default size from the image is used
*/
- void insertPictureFromFile( QString fileName, double x, double y, int w = 0, int h = 0 );
+ void insertPictureFromFile( TQString fileName, double x, double y, int w = 0, int h = 0 );
void toolsPart();
@@ -100,9 +100,9 @@ k_dcop:
int configTableCols() const;
bool configTableIsFloating() const;
- //it can return QString::null if there is any template selected
- QString configTableTemplateName() const;
- void setConfigTableTemplateName(const QString &_name);
+ //it can return TQString() if there is any template selected
+ TQString configTableTemplateName() const;
+ void setConfigTableTemplateName(const TQString &_name);
void selectAllFrames();
void unSelectAllFrames();
@@ -118,7 +118,7 @@ k_dcop:
void tableProperties();
void importStyle();
- void insertFile(const QString & path);
+ void insertFile(const TQString & path);
void createFrameStyle();
void setPictureInline( bool _inline);
@@ -126,7 +126,7 @@ k_dcop:
void setPictureKeepRatio( bool _keep);
bool pictureKeepRatio() const;
- void changeAutoSpellCheckStatus(bool b);
+ void changeAutoSpellChecktqStatus(bool b);
void deselectAllFrames();
int currentPage();
void convertTableToText();
diff --git a/kword/OASIS b/kword/OASIS
index b840b92d..fdbfc016 100644
--- a/kword/OASIS
+++ b/kword/OASIS
@@ -25,7 +25,7 @@ and the page-based DTP mode (page-sequence element).
* Headers and footers
OpenDocument supports odd/even headers and footers using "header" and "header-left".
-But for first page header/footer KWord should create a separate page layout,
+But for first page header/footer KWord should create a separate page tqlayout,
this is not done yet (it uses its own tag instead, as a temporary hack).
Also OpenDocument doesn't allow a different style for header and header-left,
so they must have the same min-size, border, margins...
@@ -60,7 +60,7 @@ List of features that KWord has, but OOo doesn't have, and which are in the Open
List of features that KWord doesn't have, and which OpenDocument has:
(that list would be quite long, but let's list the real-life interoperability problems)
- - lack of section support (changes of page layout, but also changes of column settings
+ - lack of section support (changes of page tqlayout, but also changes of column settings
in the middle of a page)
We could at least keep section styles and section markers (begin/end),
so that load+save preserves it.
diff --git a/kword/defs.h b/kword/defs.h
index ea9d1489..b4b60665 100644
--- a/kword/defs.h
+++ b/kword/defs.h
@@ -20,8 +20,8 @@
#ifndef defs_h
#define defs_h
-#include <qtextstream.h>
-#include <qstring.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
#include <KoGlobal.h>
#include "KWFactory.h"
@@ -31,7 +31,7 @@
#define KWBarIcon( x ) BarIcon( x, KWFactory::instance() )
#define DEBUGRECT(rc) (rc).x() << "," << (rc).y() << " " << (rc).width() << "x" << (rc).height()
-#define DEBUGREGION(reg) { QMemArray<QRect>rs=reg.rects(); for (int i=0;i<rs.size();++i) \
+#define DEBUGREGION(reg) { TQMemArray<TQRect>rs=reg.rects(); for (int i=0;i<rs.size();++i) \
kdDebug()<<" "<<DEBUGRECT(rs[i] )<<endl; }
const unsigned int s_minFrameWidth=4;
diff --git a/kword/demos/framestest.kwd b/kword/demos/framestest.kwd
index c9e7fb03..f673d49c 100644
--- a/kword/demos/framestest.kwd
+++ b/kword/demos/framestest.kwd
@@ -262,7 +262,7 @@
</LAYOUT>
</PARAGRAPH>
<PARAGRAPH>
- <TEXT>acbdefghijklmnopqrstuvwxyz. 1234567890. kofficyet sdfgsdfgsdfgsdfg(libty koffitcecore): KoMainWindow::setRootDocument this = [KoMainWindow pointer (0x813ff28) to widget kword-mainwindow#1, geometry=894x723+0+0] doc = 0x8133470</TEXT>
+ <TEXT>acbdefghijklmnopqrstuvwxyz. 1234567890. kofficyet sdfgsdfgsdfgsdfg(libty koffitcecore): KoMainWindow::setRootDocument this = [KoMainWindow pointer (0x813ff28) to widget kword-mainwindow#1, tqgeometry=894x723+0+0] doc = 0x8133470</TEXT>
<LAYOUT>
<NAME value="Standard" />
<FLOW align="left" />
diff --git a/kword/demos/mars.kwd b/kword/demos/mars.kwd
index 73f345d3..8adeeb15 100644
--- a/kword/demos/mars.kwd
+++ b/kword/demos/mars.kwd
Binary files differ
diff --git a/kword/kwordmailmergedatabaseiface.cpp b/kword/kwordmailmergedatabaseiface.cpp
index d123f2d6..5a7bc89c 100644
--- a/kword/kwordmailmergedatabaseiface.cpp
+++ b/kword/kwordmailmergedatabaseiface.cpp
@@ -20,7 +20,7 @@
#include <dcopobject.h>
#include "KWordMailMergeDatabaseIface.h"
-KWordMailMergeDatabaseIface::KWordMailMergeDatabaseIface(const QCString &name)
+KWordMailMergeDatabaseIface::KWordMailMergeDatabaseIface(const TQCString &name)
:DCOPObject(name)
{
}
diff --git a/kword/mailmerge/KWClassicSerialDataSource.cpp b/kword/mailmerge/KWClassicSerialDataSource.cpp
index 0b3f446f..d539f692 100644
--- a/kword/mailmerge/KWClassicSerialDataSource.cpp
+++ b/kword/mailmerge/KWClassicSerialDataSource.cpp
@@ -22,19 +22,19 @@
#include "KWClassicSerialDataSource.moc"
#include "KWMailMergeDataBase.h"
#include <kinputdialog.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qvalidator.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqvalidator.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
#include <kiconloader.h>
-#include <qheader.h>
+#include <tqheader.h>
#include "KWDocument.h"
#include "defs.h"
@@ -46,8 +46,8 @@
*
******************************************************************/
-KWClassicSerialDataSource::KWClassicSerialDataSource(KInstance *inst,QObject *parent)
- : KWMailMergeDataSource(inst,parent)
+KWClassicSerialDataSource::KWClassicSerialDataSource(KInstance *inst,TQObject *tqparent)
+ : KWMailMergeDataSource(inst,tqparent)
// : doc( doc_ )
{
}
@@ -56,7 +56,7 @@ KWClassicSerialDataSource::~KWClassicSerialDataSource()
{
}
-QString KWClassicSerialDataSource::getValue( const QString &name, int record ) const
+TQString KWClassicSerialDataSource::getValue( const TQString &name, int record ) const
{
int num = record;
/* if ( num == -1 )
@@ -68,7 +68,7 @@ QString KWClassicSerialDataSource::getValue( const QString &name, int record ) c
return db[ num ][ name ];
}
-void KWClassicSerialDataSource::setValue( const QString &name, const QString &value, int record )
+void KWClassicSerialDataSource::setValue( const TQString &name, const TQString &value, int record )
{
int num = record;
/* if ( num == -1 )
@@ -86,7 +86,7 @@ void KWClassicSerialDataSource::appendRecord()
db.append( record );
}
-void KWClassicSerialDataSource::addEntry( const QString &name )
+void KWClassicSerialDataSource::addEntry( const TQString &name )
{
sampleRecord[ name ] = i18n( "No Value" );
Db::Iterator it = db.begin();
@@ -94,7 +94,7 @@ void KWClassicSerialDataSource::addEntry( const QString &name )
( *it )[ name ] = sampleRecord[ name ];
}
-void KWClassicSerialDataSource::removeEntry( const QString &name )
+void KWClassicSerialDataSource::removeEntry( const TQString &name )
{
sampleRecord.remove( name );
Db::Iterator it = db.begin();
@@ -107,63 +107,63 @@ void KWClassicSerialDataSource::removeRecord( int i )
if ( (i < 0) || (i > (int)db.count() - 1) )
return;
- kdDebug()<<QString("Removing record %1").arg(i)<<endl;
+ kdDebug()<<TQString("Removing record %1").tqarg(i)<<endl;
Db::Iterator it = db.at( i);
db.remove( it );
}
-void KWClassicSerialDataSource::save( QDomDocument &doc, QDomElement &parent)
+void KWClassicSerialDataSource::save( TQDomDocument &doc, TQDomElement &tqparent)
{
- QDomElement def=doc.createElement(QString::fromLatin1("DEFINITION"));
- parent.appendChild(def);
+ TQDomElement def=doc.createElement(TQString::tqfromLatin1("DEFINITION"));
+ tqparent.appendChild(def);
for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it)
{
- QDomElement defEnt=doc.createElement(QString::fromLatin1("FIELD"));
- defEnt.setAttribute(QString::fromLatin1("name"),it.key());
+ TQDomElement defEnt=doc.createElement(TQString::tqfromLatin1("FIELD"));
+ defEnt.setAttribute(TQString::tqfromLatin1("name"),it.key());
def.appendChild(defEnt);
}
- QDomElement cont=doc.createElement(QString::fromLatin1("CONTENT"));
- parent.appendChild(cont);
+ TQDomElement cont=doc.createElement(TQString::tqfromLatin1("CONTENT"));
+ tqparent.appendChild(cont);
for (Db::Iterator dbI=db.begin();dbI!=db.end();++dbI)
{
- QDomElement rec=doc.createElement(QString::fromLatin1("RECORD"));
+ TQDomElement rec=doc.createElement(TQString::tqfromLatin1("RECORD"));
cont.appendChild(rec);
for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it)
{
- QDomElement recEnt=doc.createElement(QString::fromLatin1("ITEM"));
- recEnt.setAttribute(QString::fromLatin1("name"),it.key());
- recEnt.setAttribute(QString::fromLatin1("data"),(*dbI)[it.key()]);
+ TQDomElement recEnt=doc.createElement(TQString::tqfromLatin1("ITEM"));
+ recEnt.setAttribute(TQString::tqfromLatin1("name"),it.key());
+ recEnt.setAttribute(TQString::tqfromLatin1("data"),(*dbI)[it.key()]);
rec.appendChild(recEnt);
}
}
}
-void KWClassicSerialDataSource::load( QDomElement& parentElem )
+void KWClassicSerialDataSource::load( TQDomElement& tqparentElem )
{
db.clear();
sampleRecord.clear();
- QDomNode defNd=parentElem.namedItem("DEFINITION");
+ TQDomNode defNd=tqparentElem.namedItem("DEFINITION");
if (defNd.isNull()) return;
- QDomElement def=defNd.toElement();
- for (QDomElement defEnt=def.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
+ TQDomElement def=defNd.toElement();
+ for (TQDomElement defEnt=def.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
{
- sampleRecord[defEnt.attribute(QString::fromLatin1("name"))]=i18n( "No Value" );
+ sampleRecord[defEnt.attribute(TQString::tqfromLatin1("name"))]=i18n( "No Value" );
}
- QDomNode contNd=parentElem.namedItem("CONTENT");
+ TQDomNode contNd=tqparentElem.namedItem("CONTENT");
if (contNd.isNull()) return;
- for (QDomNode rec=contNd.firstChild();!rec.isNull();rec=rec.nextSibling())
+ for (TQDomNode rec=contNd.firstChild();!rec.isNull();rec=rec.nextSibling())
{
appendRecord();
- for (QDomElement recEnt=rec.firstChild().toElement();!recEnt.isNull();recEnt=recEnt.nextSibling().toElement())
+ for (TQDomElement recEnt=rec.firstChild().toElement();!recEnt.isNull();recEnt=recEnt.nextSibling().toElement())
{
- setValue(recEnt.attribute(QString::fromLatin1("name")),
- recEnt.attribute(QString::fromLatin1("data")),db.count()-1);
+ setValue(recEnt.attribute(TQString::tqfromLatin1("name")),
+ recEnt.attribute(TQString::tqfromLatin1("data")),db.count()-1);
}
}
}
-bool KWClassicSerialDataSource::showConfigDialog(QWidget *par,int action)
+bool KWClassicSerialDataSource::showConfigDialog(TQWidget *par,int action)
{
if (action==KWSLCreate)
{
@@ -171,7 +171,7 @@ bool KWClassicSerialDataSource::showConfigDialog(QWidget *par,int action)
sampleRecord.clear();
}
KWClassicMailMergeEditor *dia=new KWClassicMailMergeEditor( par, this );
- bool ret=(dia->exec()==QDialog::Accepted);
+ bool ret=(dia->exec()==TQDialog::Accepted);
delete dia;
return ret;
}
@@ -183,17 +183,17 @@ bool KWClassicSerialDataSource::showConfigDialog(QWidget *par,int action)
*
******************************************************************/
-KWClassicMailMergeEditorListItem::KWClassicMailMergeEditorListItem( QListView *parent )
- : QListViewItem( parent )
+KWClassicMailMergeEditorListItem::KWClassicMailMergeEditorListItem( TQListView *tqparent )
+ : TQListViewItem( tqparent )
{
- editWidget = new QLineEdit( listView()->viewport() );
+ editWidget = new TQLineEdit( listView()->viewport() );
listView()->addChild( editWidget );
}
-KWClassicMailMergeEditorListItem::KWClassicMailMergeEditorListItem( QListView *parent, QListViewItem *after )
- : QListViewItem( parent, after )
+KWClassicMailMergeEditorListItem::KWClassicMailMergeEditorListItem( TQListView *tqparent, TQListViewItem *after )
+ : TQListViewItem( tqparent, after )
{
- editWidget = new QLineEdit( listView()->viewport() );
+ editWidget = new TQLineEdit( listView()->viewport() );
listView()->addChild( editWidget );
}
@@ -202,26 +202,26 @@ KWClassicMailMergeEditorListItem::~KWClassicMailMergeEditorListItem()
delete editWidget;
}
-void KWClassicMailMergeEditorListItem::setText( int i, const QString &text )
+void KWClassicMailMergeEditorListItem::setText( int i, const TQString &text )
{
- QListViewItem::setText( i, text );
+ TQListViewItem::setText( i, text );
if ( i == 1 )
editWidget->setText( text );
}
-QString KWClassicMailMergeEditorListItem::text( int i ) const
+TQString KWClassicMailMergeEditorListItem::text( int i ) const
{
if ( i == 1 )
return editWidget->text();
- return QListViewItem::text( i );
+ return TQListViewItem::text( i );
}
void KWClassicMailMergeEditorListItem::setup()
{
- setHeight( QMAX( listView()->fontMetrics().height(),
- editWidget->sizeHint().height() ) );
- if ( listView()->columnWidth( 1 ) < editWidget->sizeHint().width() )
- listView()->setColumnWidth( 1, editWidget->sizeHint().width() );
+ setHeight( TQMAX( listView()->fontMetrics().height(),
+ editWidget->tqsizeHint().height() ) );
+ if ( listView()->columnWidth( 1 ) < editWidget->tqsizeHint().width() )
+ listView()->setColumnWidth( 1, editWidget->tqsizeHint().width() );
}
void KWClassicMailMergeEditorListItem::update()
@@ -238,24 +238,24 @@ void KWClassicMailMergeEditorListItem::update()
*
******************************************************************/
-KWClassicMailMergeEditorList::KWClassicMailMergeEditorList( QWidget *parent, KWClassicSerialDataSource *db_ )
- : QListView( parent ), db( db_ )
+KWClassicMailMergeEditorList::KWClassicMailMergeEditorList( TQWidget *tqparent, KWClassicSerialDataSource *db_ )
+ : TQListView( tqparent ), db( db_ )
{
setSorting( -1 );
addColumn( i18n( "Name" ) );
addColumn( i18n( "Value" ) );
header()->setMovingEnabled( FALSE );
- connect( header(), SIGNAL( sizeChange( int, int, int ) ),
- this, SLOT( columnSizeChange( int, int, int ) ) );
-// connect( header(), SIGNAL( sectionClicked( int ) ),
-// this, SLOT( sectionClicked( int ) ) );
- disconnect( header(), SIGNAL( sectionClicked( int ) ),
- this, SLOT( changeSortColumn( int ) ) );
+ connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ),
+ this, TQT_SLOT( columnSizeChange( int, int, int ) ) );
+// connect( header(), TQT_SIGNAL( sectionClicked( int ) ),
+// this, TQT_SLOT( sectionClicked( int ) ) );
+ disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ),
+ this, TQT_SLOT( changeSortColumn( int ) ) );
currentRecord = -1;
}
-void KWClassicMailMergeEditorList::invalidateCurrentRecord()
+void KWClassicMailMergeEditorList::tqinvalidateCurrentRecord()
{
currentRecord=-1;
}
@@ -265,10 +265,10 @@ KWClassicMailMergeEditorList::~KWClassicMailMergeEditorList()
if ( currentRecord == -1 )
return;
- QListViewItemIterator lit( this );
- QMap< QString, QString >::ConstIterator it = db->getRecordEntries().begin();
+ TQListViewItemIterator lit( this );
+ TQMap< TQString, TQString >::ConstIterator it = db->getRecordEntries().begin();
for ( ; it != db->getRecordEntries().end(); ++it ) {
- QListViewItem *item = 0;
+ TQListViewItem *item = 0;
item = lit.current();
++lit;
if ( currentRecord != -1 && item )
@@ -289,7 +289,7 @@ void KWClassicMailMergeEditorList::sectionClicked( int )
void KWClassicMailMergeEditorList::updateItems()
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
for ( ; it.current(); ++it )
( (KWClassicMailMergeEditorListItem*)it.current() )->update();
}
@@ -300,11 +300,11 @@ void KWClassicMailMergeEditorList::displayRecord( int i )
return;
bool create = !firstChild();
- QListViewItemIterator lit( this );
- QMap< QString, QString >::ConstIterator it = db->getRecordEntries().begin();
- QListViewItem *after = 0;
+ TQListViewItemIterator lit( this );
+ TQMap< TQString, TQString >::ConstIterator it = db->getRecordEntries().begin();
+ TQListViewItem *after = 0;
for ( ; it != db->getRecordEntries().end(); ++it ) {
- QListViewItem *item = 0;
+ TQListViewItem *item = 0;
if ( create ) {
item = new KWClassicMailMergeEditorListItem( this, after );
item->setText( 0, it.key() );
@@ -329,72 +329,72 @@ void KWClassicMailMergeEditorList::displayRecord( int i )
*
******************************************************************/
-KWClassicMailMergeEditor::KWClassicMailMergeEditor( QWidget *parent, KWClassicSerialDataSource *db_ )
- : KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, parent, "", true ), db( db_ )
+KWClassicMailMergeEditor::KWClassicMailMergeEditor( TQWidget *tqparent, KWClassicSerialDataSource *db_ )
+ : KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, tqparent, "", true ), db( db_ )
{
back = plainPage();
- QVBoxLayout *l = new QVBoxLayout( back );
+ TQVBoxLayout *l = new TQVBoxLayout( back );
l->setAutoAdd(true);
l->setSpacing( KDialog::spacingHint() );
- QHBox *toolbar = new QHBox( back );
+ TQHBox *toolbar = new TQHBox( back );
- first = new QToolButton( toolbar );
+ first = new TQToolButton( toolbar );
first->setIconSet( SmallIconSet( "start" ) );
- first->setFixedSize( first->sizeHint() );
- connect(first, SIGNAL(clicked()), this, SLOT(firstRecord()));
+ first->setFixedSize( first->tqsizeHint() );
+ connect(first, TQT_SIGNAL(clicked()), this, TQT_SLOT(firstRecord()));
- back_ = new QToolButton( toolbar );
+ back_ = new TQToolButton( toolbar );
back_->setIconSet( SmallIconSet( "back" ) );
- back_->setFixedSize( back_->sizeHint() );
- connect(back_, SIGNAL(clicked()), this, SLOT(prevRecord()));
+ back_->setFixedSize( back_->tqsizeHint() );
+ connect(back_, TQT_SIGNAL(clicked()), this, TQT_SLOT(prevRecord()));
- records = new QSpinBox( 1, db->getNumRecords(), 1, toolbar );
- records->setMaximumHeight( records->sizeHint().height() );
- connect( records, SIGNAL( valueChanged( int ) ),
- this, SLOT( changeRecord( int ) ) );
+ records = new TQSpinBox( 1, db->getNumRecords(), 1, toolbar );
+ records->setMaximumHeight( records->tqsizeHint().height() );
+ connect( records, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( changeRecord( int ) ) );
- forward = new QToolButton( toolbar );
+ forward = new TQToolButton( toolbar );
forward->setIconSet( SmallIconSet( "forward" ) );
- forward->setFixedSize( forward->sizeHint() );
- connect(forward, SIGNAL(clicked()), this, SLOT(nextRecord()));
+ forward->setFixedSize( forward->tqsizeHint() );
+ connect(forward, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextRecord()));
- finish = new QToolButton( toolbar );
+ finish = new TQToolButton( toolbar );
finish->setIconSet( SmallIconSet( "finish" ) );
- finish->setFixedSize( finish->sizeHint() );
- connect(finish, SIGNAL(clicked()), this, SLOT(lastRecord()));
+ finish->setFixedSize( finish->tqsizeHint() );
+ connect(finish, TQT_SIGNAL(clicked()), this, TQT_SLOT(lastRecord()));
- QWidget *sep = new QWidget( toolbar );
+ TQWidget *sep = new TQWidget( toolbar );
sep->setMaximumWidth( 10 );
- newRecord = new QToolButton( toolbar );
+ newRecord = new TQToolButton( toolbar );
newRecord->setIconSet( SmallIconSet( "sl_addrecord" ) );
- newRecord->setFixedSize( newRecord->sizeHint() );
- connect( newRecord, SIGNAL( clicked() ),
- this, SLOT( addRecord() ) );
- QToolTip::add( newRecord, i18n( "Add record" ) );
+ newRecord->setFixedSize( newRecord->tqsizeHint() );
+ connect( newRecord, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addRecord() ) );
+ TQToolTip::add( newRecord, i18n( "Add record" ) );
- newEntry = new QToolButton( toolbar );
+ newEntry = new TQToolButton( toolbar );
newEntry->setIconSet( SmallIconSet( "sl_addentry" ) );
- newEntry->setFixedSize( newEntry->sizeHint() );
- connect( newEntry, SIGNAL( clicked() ),
- this, SLOT( addEntry() ) );
- QToolTip::add( newEntry, i18n( "Add entry" ) );
+ newEntry->setFixedSize( newEntry->tqsizeHint() );
+ connect( newEntry, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addEntry() ) );
+ TQToolTip::add( newEntry, i18n( "Add entry" ) );
- deleteRecord = new QToolButton( toolbar );
+ deleteRecord = new TQToolButton( toolbar );
deleteRecord->setIconSet( SmallIconSet( "sl_delrecord" ) );
- deleteRecord->setFixedSize( deleteRecord->sizeHint() );
- connect( deleteRecord, SIGNAL( clicked() ),
- this, SLOT( removeRecord() ) );
- QToolTip::add( deleteRecord, i18n( "Remove record" ) );
+ deleteRecord->setFixedSize( deleteRecord->tqsizeHint() );
+ connect( deleteRecord, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( removeRecord() ) );
+ TQToolTip::add( deleteRecord, i18n( "Remove record" ) );
- deleteEntry = new QToolButton( toolbar );
+ deleteEntry = new TQToolButton( toolbar );
deleteEntry->setIconSet( SmallIconSet( "sl_delentry" ) );
- deleteEntry->setFixedSize( deleteEntry->sizeHint() );
- connect( deleteEntry, SIGNAL( clicked() ),
- this, SLOT( removeEntry() ) );
- QToolTip::add( deleteEntry, i18n( "Remove entry" ) );
+ deleteEntry->setFixedSize( deleteEntry->tqsizeHint() );
+ connect( deleteEntry, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( removeEntry() ) );
+ TQToolTip::add( deleteEntry, i18n( "Remove entry" ) );
dbList = new KWClassicMailMergeEditorList( back, db );
@@ -412,7 +412,7 @@ KWClassicMailMergeEditor::KWClassicMailMergeEditor( QWidget *parent, KWClassicSe
deleteRecord->setEnabled(false);
records->setEnabled(true);
}
- setInitialSize( QSize( 600, 400 ) );
+ setInitialSize( TQSize( 600, 400 ) );
updateButton();
}
@@ -451,7 +451,7 @@ void KWClassicMailMergeEditor::updateButton()
}
-void KWClassicMailMergeEditor::resizeEvent( QResizeEvent *e )
+void KWClassicMailMergeEditor::resizeEvent( TQResizeEvent *e )
{
KDialogBase::resizeEvent( e );
// back->resize( size() );
@@ -465,9 +465,9 @@ void KWClassicMailMergeEditor::changeRecord( int i )
void KWClassicMailMergeEditor::addEntry()
{
bool ok;
- QString value=KInputDialog::getText( i18n("Add Entry"),
+ TQString value=KInputDialog::getText( i18n("Add Entry"),
i18n("Enter entry name:"),
- QString::null,
+ TQString(),
&ok,
this);
if ((ok) && !value.isEmpty())
@@ -503,7 +503,7 @@ void KWClassicMailMergeEditor::addRecord()
void KWClassicMailMergeEditor::removeEntry()
{
- QListViewItem * item = dbList->selectedItem ();
+ TQListViewItem * item = dbList->selectedItem ();
if ( item )
{
db->removeEntry( item->text(0) );
@@ -512,7 +512,7 @@ void KWClassicMailMergeEditor::removeEntry()
dbList->updateItems();
updateButton();
}
-#if defined( Q_CC_GNU )
+#if defined( TQ_CC_GNU )
#warning reimplement
#endif
/*
@@ -521,7 +521,7 @@ void KWClassicMailMergeEditor::removeEntry()
KWMailMergeVariableInsertDia
*dia = new KWMailMergeVariableInsertDia( this, db );
- if ( dia->exec() == QDialog::Accepted ) {
+ if ( dia->exec() == TQDialog::Accepted ) {
dbList->clear();
db->removeEntry( dia->getName() );
changeRecord( records->value() + 1 );
@@ -537,7 +537,7 @@ void KWClassicMailMergeEditor::removeRecord()
return;
db->removeRecord( records->value() - 1 );
- dbList->invalidateCurrentRecord();
+ dbList->tqinvalidateCurrentRecord();
if ( db->getNumRecords() > 0 ) {
records->setRange( records->minValue(), records->maxValue() - 1 );
records->setValue( 1 );
@@ -561,9 +561,9 @@ void KWClassicMailMergeEditor::removeRecord()
}
extern "C" {
- KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_classic(KInstance *inst,QObject *parent)
+ KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_classic(KInstance *inst,TQObject *tqparent)
{
- return new KWClassicSerialDataSource(inst,parent);
+ return new KWClassicSerialDataSource(inst,tqparent);
}
}
diff --git a/kword/mailmerge/KWClassicSerialDataSource.h b/kword/mailmerge/KWClassicSerialDataSource.h
index 4f348dfe..713f41d8 100644
--- a/kword/mailmerge/KWClassicSerialDataSource.h
+++ b/kword/mailmerge/KWClassicSerialDataSource.h
@@ -21,52 +21,53 @@
#ifndef _SERIALLETTER_CLASSIC_PLUGIN_H_
#define _SERIALLETTER_CLASSIC_PLUGIN_H_
-#include <qdom.h>
-#include <qlistview.h>
+#include <tqdom.h>
+#include <tqlistview.h>
#include <kdialogbase.h>
#include <KoCustomVariablesDia.h>
#include "KWMailMergeDataSource.h"
-#include <qspinbox.h>
+#include <tqspinbox.h>
-class QHBox;
-class QVBox;
-class QPushButton;
-class QListBox;
-class QLabel;
-class QLineEdit;
-class QToolButton;
+class TQHBox;
+class TQVBox;
+class TQPushButton;
+class TQListBox;
+class TQLabel;
+class TQLineEdit;
+class TQToolButton;
/******************************************************************
*
* Class: KWClassicSerialDataSource
*
******************************************************************/
-typedef QValueList< DbRecord > Db;
+typedef TQValueList< DbRecord > Db;
class KWClassicSerialDataSource: public KWMailMergeDataSource
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWClassicSerialDataSource(KInstance *inst,QObject *parent);
+ KWClassicSerialDataSource(KInstance *inst,TQObject *tqparent);
~KWClassicSerialDataSource();
- virtual void save( QDomDocument &doc,QDomElement&);
- virtual void load( QDomElement& elem );
- virtual class QString getValue( const class QString &name, int record = -1 ) const;
+ virtual void save( TQDomDocument &doc,TQDomElement&);
+ virtual void load( TQDomElement& elem );
+ virtual class TQString getValue( const class TQString &name, int record = -1 ) const;
virtual int getNumRecords() const {
return (int)db.count();
}
- virtual bool showConfigDialog(QWidget *,int);
+ virtual bool showConfigDialog(TQWidget *,int);
virtual void refresh(bool){};
protected:
friend class KWClassicMailMergeEditor;
friend class KWClassicMailMergeEditorList;
- void setValue( const QString &name, const QString &value, int record = -1 );
+ void setValue( const TQString &name, const TQString &value, int record = -1 );
void appendRecord();
- void addEntry( const QString &name );
- void removeEntry( const QString &name );
+ void addEntry( const TQString &name );
+ void removeEntry( const TQString &name );
void removeRecord( int i );
Db db;
};
@@ -77,20 +78,20 @@ class KWClassicSerialDataSource: public KWMailMergeDataSource
*
******************************************************************/
-class KWClassicMailMergeEditorListItem : public QListViewItem
+class KWClassicMailMergeEditorListItem : public TQListViewItem
{
public:
- KWClassicMailMergeEditorListItem( QListView *parent );
- KWClassicMailMergeEditorListItem( QListView *parent, QListViewItem *after );
+ KWClassicMailMergeEditorListItem( TQListView *tqparent );
+ KWClassicMailMergeEditorListItem( TQListView *tqparent, TQListViewItem *after );
virtual ~KWClassicMailMergeEditorListItem();
- virtual void setText( int i, const QString &text );
- virtual QString text( int i ) const;
+ virtual void setText( int i, const TQString &text );
+ virtual TQString text( int i ) const;
void setup();
void update();
protected:
- QLineEdit *editWidget;
+ TQLineEdit *editWidget;
};
@@ -100,20 +101,21 @@ protected:
*
******************************************************************/
-class KWClassicMailMergeEditorList : public QListView
+class KWClassicMailMergeEditorList : public TQListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWClassicMailMergeEditorList( QWidget *parent, KWClassicSerialDataSource *db_ );
+ KWClassicMailMergeEditorList( TQWidget *tqparent, KWClassicSerialDataSource *db_ );
virtual ~KWClassicMailMergeEditorList();
- void invalidateCurrentRecord();
+ void tqinvalidateCurrentRecord();
void updateItems();
void displayRecord( int i );
void setSorting( int, bool increasing = TRUE ) {
- QListView::setSorting( -1, increasing );
+ TQListView::setSorting( -1, increasing );
}
protected slots:
@@ -135,27 +137,28 @@ protected:
class KWClassicMailMergeEditor : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWClassicMailMergeEditor( QWidget *parent, KWClassicSerialDataSource *db_ );
+ KWClassicMailMergeEditor( TQWidget *tqparent, KWClassicSerialDataSource *db_ );
protected:
- void resizeEvent( QResizeEvent *e );
+ void resizeEvent( TQResizeEvent *e );
void updateButton();
- QSpinBox *records;
+ TQSpinBox *records;
KWClassicMailMergeEditorList *dbList;
- QWidget *back;
+ TQWidget *back;
KWClassicSerialDataSource *db;
- QToolButton *first;
- QToolButton *back_;
- QToolButton *forward;
- QToolButton *finish;
- QToolButton *newRecord;
- QToolButton *newEntry;
- QToolButton *deleteRecord;
- QToolButton *deleteEntry;
+ TQToolButton *first;
+ TQToolButton *back_;
+ TQToolButton *forward;
+ TQToolButton *finish;
+ TQToolButton *newRecord;
+ TQToolButton *newEntry;
+ TQToolButton *deleteRecord;
+ TQToolButton *deleteEntry;
protected slots:
void changeRecord( int i );
diff --git a/kword/mailmerge/kabc/KWMailMergeKABC.cpp b/kword/mailmerge/kabc/KWMailMergeKABC.cpp
index a5df7e73..aeadae4c 100644
--- a/kword/mailmerge/kabc/KWMailMergeKABC.cpp
+++ b/kword/mailmerge/kabc/KWMailMergeKABC.cpp
@@ -33,8 +33,8 @@
#include "KWMailMergeKABC.h"
#include "KWMailMergeKABCConfig.h"
-KWMailMergeKABC::KWMailMergeKABC( KInstance *inst, QObject *parent )
- : KWMailMergeDataSource( inst, parent )
+KWMailMergeKABC::KWMailMergeKABC( KInstance *inst, TQObject *tqparent )
+ : KWMailMergeDataSource( inst, tqparent )
{
_addressBook = KABC::StdAddressBook::self();
_iterator = _addressBook->begin();
@@ -85,12 +85,12 @@ KWMailMergeKABC::KWMailMergeKABC( KInstance *inst, QObject *parent )
sampleRecord[ ("sortString" ) ] = KABC::Addressee::sortStringLabel();
sampleRecord[ ("URL" ) ] = KABC::Addressee::urlLabel();
sampleRecord[ ("Secrecy" ) ] = KABC::Addressee::secrecyLabel();
- sampleRecord[ ("Preferred address: Street" ) ] = QString( "preferedAddressStreet" );
- sampleRecord[ ("Preferred address: Locality" ) ] = QString( "preferedAddressLocality" );
- sampleRecord[ ("Preferred address: Region" ) ] = QString( "preferedAddressRegion" );
- sampleRecord[ ("Preferred address: Postal code" ) ] = QString( "preferedAddressPostalCode" );
- sampleRecord[ ("Preferred address: Country" ) ] = QString( "preferedAddressCountry" );
- sampleRecord[ ("Preferred address: Label" ) ] = QString( "preferedAddressLabel" );
+ sampleRecord[ ("Preferred address: Street" ) ] = TQString( "preferedAddressStreet" );
+ sampleRecord[ ("Preferred address: Locality" ) ] = TQString( "preferedAddressLocality" );
+ sampleRecord[ ("Preferred address: Region" ) ] = TQString( "preferedAddressRegion" );
+ sampleRecord[ ("Preferred address: Postal code" ) ] = TQString( "preferedAddressPostalCode" );
+ sampleRecord[ ("Preferred address: Country" ) ] = TQString( "preferedAddressCountry" );
+ sampleRecord[ ("Preferred address: Label" ) ] = TQString( "preferedAddressLabel" );
}
@@ -100,14 +100,14 @@ KWMailMergeKABC::~KWMailMergeKABC()
}
-void KWMailMergeKABC::addEntry( const QString &uid )
+void KWMailMergeKABC::addEntry( const TQString &uid )
{
_individualUIDs.append( uid );
makeUIDsExclusive();
}
-void KWMailMergeKABC::addList( const QString &id )
+void KWMailMergeKABC::addList( const TQString &id )
{
_lists.append( id );
parseList( id );
@@ -131,7 +131,7 @@ int KWMailMergeKABC::getNumRecords() const
}
-QString KWMailMergeKABC::getValue( const QString &name, int record ) const
+TQString KWMailMergeKABC::getValue( const TQString &name, int record ) const
{
kdDebug() << "KWMailMergeKABC::getValue(" << name << ", " << record << ")" << endl;
if ( record < 0 )
@@ -168,7 +168,7 @@ QString KWMailMergeKABC::getValue( const QString &name, int record ) const
if( !uidAvailable )
{
- return ( i18n ( "KAddressbook entry '%1' not available." ).arg( *_UIDIterator ) );
+ return ( i18n ( "KAddressbook entry '%1' not available." ).tqarg( *_UIDIterator ) );
}
@@ -342,24 +342,24 @@ QString KWMailMergeKABC::getValue( const QString &name, int record ) const
if ( name == "Time zone" )
{
KABC::TimeZone zone = addr.timeZone();
- return QString::number( zone.offset() );
+ return TQString::number( zone.offset() );
}
if ( name == "Geographic position" )
{
KABC::Geo geo = addr.geo();
- QString lat;
- QString longi;
+ TQString lat;
+ TQString longi;
if( geo.latitude()<0 )
- lat = QString( i18n("%1 South") ).arg( -geo.latitude() );
+ lat = TQString( i18n("%1 South") ).tqarg( -geo.latitude() );
else
- lat = QString( i18n("%1 North") ).arg( geo.latitude() );
+ lat = TQString( i18n("%1 North") ).tqarg( geo.latitude() );
if( geo.longitude()<0 )
// There is something going wrong, because "W" is replaced by "q ".
// Needs fix.
- longi = QString( i18n("%1 West") ).arg( -geo.longitude() );
+ longi = TQString( i18n("%1 West") ).tqarg( -geo.longitude() );
else
- longi = QString( i18n("%1 East") ).arg( geo.longitude() );
+ longi = TQString( i18n("%1 East") ).tqarg( geo.longitude() );
return i18n( "Geographic coordinates", "%1, %2" ).arg ( lat, longi );
}
@@ -390,34 +390,34 @@ QString KWMailMergeKABC::getValue( const QString &name, int record ) const
}
-QStringList KWMailMergeKABC::lists() const
+TQStringList KWMailMergeKABC::lists() const
{
return _lists;
}
-void KWMailMergeKABC::load( QDomElement& parentElem )
+void KWMailMergeKABC::load( TQDomElement& tqparentElem )
{
clear();
- QDomNode contentNode=parentElem.namedItem("CONTENT");
+ TQDomNode contentNode=tqparentElem.namedItem("CONTENT");
if( contentNode.isNull() )
return;
- for( QDomNode rec=contentNode.firstChild(); !rec.isNull(); rec=rec.nextSibling() )
+ for( TQDomNode rec=contentNode.firstChild(); !rec.isNull(); rec=rec.nextSibling() )
{
if( rec.nodeName()== "RECORD" )
{
- for( QDomElement recEnt=rec.firstChild().toElement(); !recEnt.isNull();
+ for( TQDomElement recEnt=rec.firstChild().toElement(); !recEnt.isNull();
recEnt=recEnt.nextSibling().toElement() )
{
- addEntry( recEnt.attribute( QString::fromLatin1("uid") ) );
+ addEntry( recEnt.attribute( TQString::tqfromLatin1("uid") ) );
}
}
else if( rec.nodeName() == "LIST" )
{
- for( QDomElement recEnt=rec.firstChild().toElement(); !recEnt.isNull();
+ for( TQDomElement recEnt=rec.firstChild().toElement(); !recEnt.isNull();
recEnt=recEnt.nextSibling().toElement() )
{
- addList( recEnt.attribute( QString::fromLatin1("listid") ) );
+ addList( recEnt.attribute( TQString::tqfromLatin1("listid") ) );
}
}
else
@@ -432,8 +432,8 @@ void KWMailMergeKABC::makeUIDsExclusive()
_exclusiveUIDs.sort();
kdDebug() << "KWMailMergeKABC::makeUIDsExclusive(): before: " << _exclusiveUIDs.join(",")
<< endl;
- QString uid;
- for( QStringList::Iterator it=_exclusiveUIDs.begin();
+ TQString uid;
+ for( TQStringList::Iterator it=_exclusiveUIDs.begin();
it!=_exclusiveUIDs.end(); ++it )
{
if( *it == uid )
@@ -447,7 +447,7 @@ void KWMailMergeKABC::makeUIDsExclusive()
}
-void KWMailMergeKABC::parseList( const QString& listName )
+void KWMailMergeKABC::parseList( const TQString& listName )
{
if( listName.isEmpty() )
return;
@@ -456,7 +456,7 @@ void KWMailMergeKABC::parseList( const QString& listName )
KABC::DistributionListManager dlm ( _addressBook );
dlm.load();
- QStringList::Iterator listIt;
+ TQStringList::Iterator listIt;
KABC::DistributionList* list = dlm.list( listName );
KABC::DistributionList::Entry::List entries = list->entries();
@@ -480,33 +480,33 @@ void KWMailMergeKABC::refresh( bool )
}
-void KWMailMergeKABC::save( QDomDocument& doc, QDomElement& parent)
+void KWMailMergeKABC::save( TQDomDocument& doc, TQDomElement& tqparent)
{
- QDomElement cont=doc.createElement(QString::fromLatin1("CONTENT"));
- parent.appendChild(cont);
+ TQDomElement cont=doc.createElement(TQString::tqfromLatin1("CONTENT"));
+ tqparent.appendChild(cont);
- QValueList<QString>::ConstIterator it = _individualUIDs.begin();
+ TQValueList<TQString>::ConstIterator it = _individualUIDs.begin();
for( ; it != _individualUIDs.end(); ++it )
{
- QDomElement rec=doc.createElement(QString::fromLatin1("RECORD"));
+ TQDomElement rec=doc.createElement(TQString::tqfromLatin1("RECORD"));
cont.appendChild(rec);
- QDomElement recEnt=doc.createElement(QString::fromLatin1("ITEM"));
- recEnt.setAttribute(QString::fromLatin1("uid"),*it);
+ TQDomElement recEnt=doc.createElement(TQString::tqfromLatin1("ITEM"));
+ recEnt.setAttribute(TQString::tqfromLatin1("uid"),*it);
rec.appendChild(recEnt);
}
it = _lists.begin();
for( ; !(it == _lists.end()); ++it )
{
- QDomElement rec=doc.createElement(QString::fromLatin1("LIST"));
+ TQDomElement rec=doc.createElement(TQString::tqfromLatin1("LIST"));
cont.appendChild(rec);
- QDomElement recEnt=doc.createElement(QString::fromLatin1("ITEM"));
- recEnt.setAttribute(QString::fromLatin1("listid"),*it);
+ TQDomElement recEnt=doc.createElement(TQString::tqfromLatin1("ITEM"));
+ recEnt.setAttribute(TQString::tqfromLatin1("listid"),*it);
rec.appendChild(recEnt);
}
}
-bool KWMailMergeKABC::showConfigDialog( QWidget* par, int action )
+bool KWMailMergeKABC::showConfigDialog( TQWidget* par, int action )
{
bool ret=false;
if (action == KWSLCreate )
@@ -518,7 +518,7 @@ bool KWMailMergeKABC::showConfigDialog( QWidget* par, int action )
{
KWMailMergeKABCConfig *dia=new KWMailMergeKABCConfig( par, this );
- ret=( dia->exec() == QDialog::Accepted );
+ ret=( dia->exec() == TQDialog::Accepted );
kdDebug() << "KWMailMergeKABCConfig::Accepted " << ret << endl;
delete dia;
}
@@ -528,7 +528,7 @@ bool KWMailMergeKABC::showConfigDialog( QWidget* par, int action )
}
-QStringList KWMailMergeKABC::singleRecords() const
+TQStringList KWMailMergeKABC::singleRecords() const
{
return _individualUIDs;
}
@@ -537,9 +537,9 @@ QStringList KWMailMergeKABC::singleRecords() const
extern "C"
{
- KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_kabc( KInstance *inst, QObject *parent )
+ KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_kabc( KInstance *inst, TQObject *tqparent )
{
- return new KWMailMergeKABC( inst, parent );
+ return new KWMailMergeKABC( inst, tqparent );
}
}
diff --git a/kword/mailmerge/kabc/KWMailMergeKABC.h b/kword/mailmerge/kabc/KWMailMergeKABC.h
index 2787ac6f..f2754117 100644
--- a/kword/mailmerge/kabc/KWMailMergeKABC.h
+++ b/kword/mailmerge/kabc/KWMailMergeKABC.h
@@ -23,8 +23,8 @@
#ifndef _KWMAILMERGE_KABC_H_
#define _KWMAILMERGE_KABC_H_
-#include <qdom.h>
-#include <qguardedptr.h>
+#include <tqdom.h>
+#include <tqguardedptr.h>
#include <kabc/addressbook.h>
@@ -33,20 +33,21 @@
class KWMailMergeKABC: public KWMailMergeDataSource
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWMailMergeKABC( KInstance *inst, QObject *parent );
+ KWMailMergeKABC( KInstance *inst, TQObject *tqparent );
~KWMailMergeKABC();
/**
Saves the mail merge list to the kword document.
*/
- virtual void save( QDomDocument&, QDomElement& );
+ virtual void save( TQDomDocument&, TQDomElement& );
/**
Loads the mail merge list stored in the kword document.
*/
- virtual void load( QDomElement& );
+ virtual void load( TQDomElement& );
/**
@param name The name of the value e.g. "Family name".
@@ -55,7 +56,7 @@ public:
If @p record equals -1, @p name is returned.
*/
- virtual class QString getValue( const class QString &name, int record = -1 ) const;
+ virtual class TQString getValue( const class TQString &name, int record = -1 ) const;
/**
@return The number of available contacts in mail merge list.
@@ -72,7 +73,7 @@ public:
/**
Shows a KWMailMergeKABCConfig dialog for selecting entries from KAddressbook.
*/
- virtual bool showConfigDialog( QWidget*, int action);
+ virtual bool showConfigDialog( TQWidget*, int action);
protected:
friend class KWMailMergeKABCConfig;
@@ -86,7 +87,7 @@ protected:
@param uid The entry's KABC::Addressee::uid().
*/
- void addEntry( const QString &uid );
+ void addEntry( const TQString &uid );
/**
Adds a distribution list to the mail merge list.
@@ -96,7 +97,7 @@ protected:
@param id The DistributionList::name().
*/
- void addList( const QString &id );
+ void addList( const TQString &id );
/**
Removes all entries and distribution lists from the mail merge list.
@@ -108,7 +109,7 @@ protected:
To be called by KWMailMergeKABCConfig::initSelectedLists()
*/
- virtual QStringList lists() const;
+ virtual TQStringList lists() const;
/**
@return The KABC::Addressee::uid() of all individually selected
@@ -116,7 +117,7 @@ protected:
To be called by KWMailMergeKABCConfig::initSelectedAddressees()
*/
- virtual QStringList singleRecords() const;
+ virtual TQStringList singleRecords() const;
private:
/**
@@ -132,47 +133,47 @@ private:
/**
Just an Iterator.
*/
- mutable QStringList::ConstIterator _UIDIterator;
+ mutable TQStringList::ConstIterator _UIDIterator;
/**
- The "real" mail merge list. A list of QStrings. Each represents
+ The "real" mail merge list. A list of TQStrings. Each represents
the KABC::Addressee::uid() of a KAdressbook entry.
There is no UID twice in this list.
Needed because selected contacts may appear in a selected
distribution list, too. And we don't want to print it multiple.
*/
- QStringList _exclusiveUIDs;
+ TQStringList _exclusiveUIDs;
/**
This list contains all the KABC::Addressee::uid() selected
individually with the KWMailMergeKABCConfig dialog.
*/
- QStringList _individualUIDs;
+ TQStringList _individualUIDs;
/**
This list contains all the KABC::Addressee::uid() from the distribution
lists selected with the KWMailMergeKABCConfig dialog.
*/
- QStringList _listUIDs;
+ TQStringList _listUIDs;
/**
This list contains all the DistributionList::name() selected with the
KWMailMergeKABCConfig dialog.
*/
- QStringList _lists;
+ TQStringList _lists;
/**
Appends all KABC::Addressee::uid() of a distribution list to _listUIDs
and updates the mail merge list.
- To be used by KWMailMergeKABCConfig::addList( const QString &id )
+ To be used by KWMailMergeKABCConfig::addList( const TQString &id )
only.
@param listName The DistributionList::name() of the distribution list.
*/
- void parseList( const QString& listName );
+ void parseList( const TQString& listName );
/**
Removes duplicate entries in the mail merge list.
diff --git a/kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp b/kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp
index dee519c3..1e54d0b9 100644
--- a/kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp
+++ b/kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp
@@ -19,9 +19,9 @@
*/
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -39,13 +39,13 @@
#include "KWMailMergeKABCConfig.h"
-KWMailMergeKABCConfig::KWMailMergeKABCConfig( QWidget *parent, KWMailMergeKABC *db_)
+KWMailMergeKABCConfig::KWMailMergeKABCConfig( TQWidget *tqparent, KWMailMergeKABC *db_)
:KDialogBase( Plain, i18n( "Mail Merge - Editor" ),
- Ok | Cancel, Ok, parent, "", true)
+ Ok | Cancel, Ok, tqparent, "", true)
{
_db = db_;
- (new QVBoxLayout(plainPage()))->setAutoAdd(true);
+ (new TQVBoxLayout(plainPage()))->setAutoAdd(true);
setMainWidget( _ui=new AddressPickerUI( plainPage() ) );
updateAvailable();
@@ -65,13 +65,13 @@ void KWMailMergeKABCConfig::acceptSelection()
{
_db->clear();
- QListViewItem* top = _ui->mSelectedView->firstChild();
+ TQListViewItem* top = _ui->mSelectedView->firstChild();
while(top)
{
kdDebug() << "acceptSelection(): " << top->text(0) << endl;
if( top->text(0) == i18n("Distribution Lists") )
{
- QListViewItem* item = top->firstChild();
+ TQListViewItem* item = top->firstChild();
while(item)
{
kdDebug() << "acceptSelection(): " << item->text(0) << endl;
@@ -81,7 +81,7 @@ void KWMailMergeKABCConfig::acceptSelection()
}
else if( top->text(0) == i18n("Single Entries") )
{
- QListViewItem* item = top->firstChild();
+ TQListViewItem* item = top->firstChild();
while(item)
{
kdDebug() << "acceptSelection(): " << item->text(0) << endl;
@@ -97,16 +97,16 @@ void KWMailMergeKABCConfig::acceptSelection()
void KWMailMergeKABCConfig::addSelectedContacts()
{
- QListViewItemIterator it( _ui->mAvailableView, QListViewItemIterator::Selected );
- QListViewItem* selected = _ui->mSelectedView->findItem(
- i18n("Single Entries"), 0, Qt::ExactMatch );
- QListViewItem* selectedLists = _ui->mSelectedView->findItem(
- i18n("Distribution Lists"), 0, Qt::ExactMatch );
+ TQListViewItemIterator it( _ui->mAvailableView, TQListViewItemIterator::Selected );
+ TQListViewItem* selected = _ui->mSelectedView->tqfindItem(
+ i18n("Single Entries"), 0, TQt::ExactMatch );
+ TQListViewItem* selectedLists = _ui->mSelectedView->tqfindItem(
+ i18n("Distribution Lists"), 0, TQt::ExactMatch );
while ( it.current() )
{
if( it.current()->depth() > 0 )
{
- QString uid = it.current()->text( -1 );
+ TQString uid = it.current()->text( -1 );
kdDebug() << "addSelectedContacts(): uid :" << uid << endl;
if( !uid.isEmpty() )
{
@@ -119,7 +119,7 @@ void KWMailMergeKABCConfig::addSelectedContacts()
destroyAvailableClones( uid );
}
}
- else if( it.current()->parent()->text(0) == i18n("Distribution Lists") )
+ else if( it.current()->tqparent()->text(0) == i18n("Distribution Lists") )
{
if( selectedLists )
{
@@ -134,12 +134,12 @@ void KWMailMergeKABCConfig::addSelectedContacts()
}
-void KWMailMergeKABCConfig::destroyAvailableClones( const QString& uid )
+void KWMailMergeKABCConfig::destroyAvailableClones( const TQString& uid )
{
if( uid.isEmpty() )
return;
- QListViewItemIterator it( _ui->mAvailableView );
+ TQListViewItemIterator it( _ui->mAvailableView );
while ( it.current() )
{
@@ -155,18 +155,18 @@ void KWMailMergeKABCConfig::destroyAvailableClones( const QString& uid )
}
-void KWMailMergeKABCConfig::filterChanged( const QString& txt )
+void KWMailMergeKABCConfig::filterChanged( const TQString& txt )
{
kdDebug() << "KWMailMergeKABCConfig::filterChanged( " << txt << " )" << endl;
bool showAll = txt.isEmpty();
- QListViewItem* category = _ui->mAvailableView->firstChild();
+ TQListViewItem* category = _ui->mAvailableView->firstChild();
while(category)
{
if( category->text(0)!=i18n("Distribution Lists") )
{
- QListViewItem* item = category->firstChild();
+ TQListViewItem* item = category->firstChild();
while(item)
{
if(showAll)
@@ -175,7 +175,7 @@ void KWMailMergeKABCConfig::filterChanged( const QString& txt )
}
else
{
- item->setVisible( item->text(0).contains( txt, false ) );
+ item->setVisible( item->text(0).tqcontains( txt, false ) );
}
item = item->nextSibling();
}
@@ -192,11 +192,11 @@ void KWMailMergeKABCConfig::filterChanged( const QString& txt )
void KWMailMergeKABCConfig::initSelectedAddressees()
{
- QStringList records = _db->singleRecords();
+ TQStringList records = _db->singleRecords();
- QListViewItem* category = _ui->mAvailableView->firstChild();
- QListViewItem* selected = _ui->mSelectedView->findItem(
- i18n("Single Entries"), 0, Qt::ExactMatch );
+ TQListViewItem* category = _ui->mAvailableView->firstChild();
+ TQListViewItem* selected = _ui->mSelectedView->tqfindItem(
+ i18n("Single Entries"), 0, TQt::ExactMatch );
while ( category && (records.count()>0) )
{
if( category->text(0) != i18n("Distribution Lists") )
@@ -210,10 +210,10 @@ void KWMailMergeKABCConfig::initSelectedAddressees()
KWMailMergeKABCConfigListItem* nextItem =
static_cast<KWMailMergeKABCConfigListItem*> ( item->nextSibling() );
- for( QStringList::Iterator itRecords = records.begin();
+ for( TQStringList::Iterator itRecords = records.begin();
itRecords != records.end(); ++itRecords )
{
- QString uid = *itRecords;
+ TQString uid = *itRecords;
if( item->text(-1) == uid )
{
selected->insertItem( item );
@@ -235,24 +235,24 @@ void KWMailMergeKABCConfig::initSelectedAddressees()
void KWMailMergeKABCConfig::initSelectedLists()
{
- QStringList lists = _db->lists();
+ TQStringList lists = _db->lists();
kdDebug() << "::initSelectedLists()" << lists.join(",") << endl;
- QListViewItem* l = _ui->mAvailableView->findItem(
- i18n("Distribution Lists"), 0, Qt::ExactMatch );
- QListViewItem* selected = _ui->mSelectedView->findItem(
- i18n("Distribution Lists"), 0, Qt::ExactMatch );
+ TQListViewItem* l = _ui->mAvailableView->tqfindItem(
+ i18n("Distribution Lists"), 0, TQt::ExactMatch );
+ TQListViewItem* selected = _ui->mSelectedView->tqfindItem(
+ i18n("Distribution Lists"), 0, TQt::ExactMatch );
- QListViewItem* item = ( l->firstChild() );
+ TQListViewItem* item = ( l->firstChild() );
while( item && (lists.count()>0) )
{
- QListViewItem* nextItem = item->nextSibling();
+ TQListViewItem* nextItem = item->nextSibling();
- for( QStringList::Iterator itLists = lists.begin();
+ for( TQStringList::Iterator itLists = lists.begin();
itLists != lists.end(); ++itLists )
{
- QString id = *itLists;
+ TQString id = *itLists;
if( item->text(0) == id )
{
selected->insertItem( item );
@@ -267,34 +267,34 @@ void KWMailMergeKABCConfig::initSelectedLists()
void KWMailMergeKABCConfig::initSlotSignalConnections()
{
- connect( this, SIGNAL( okClicked() ), SLOT( acceptSelection() ) );
- connect( _ui->mAddButton, SIGNAL( clicked() ), SLOT( addSelectedContacts() ) );
- connect( _ui->mAddressBook, SIGNAL( clicked() ), SLOT( launchAddressbook() ) );
-
- connect( _ui->mAvailableView, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int ) ),
- SLOT( addSelectedContacts() ) );
-
- connect( _ui->mFilterEdit, SIGNAL( textChanged(const QString &) ),
- SLOT( filterChanged(const QString &) ) );
- connect( _ui->mRemoveButton, SIGNAL( clicked() ), SLOT( removeSelectedContacts() ) );
- connect( _ui->mSaveList, SIGNAL( clicked() ), SLOT( saveDistributionList() ) );
- connect( _ui->mSelectedView, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int ) ),
- SLOT( removeSelectedContacts() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), TQT_SLOT( acceptSelection() ) );
+ connect( _ui->mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addSelectedContacts() ) );
+ connect( _ui->mAddressBook, TQT_SIGNAL( clicked() ), TQT_SLOT( launchAddressbook() ) );
+
+ connect( _ui->mAvailableView, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int ) ),
+ TQT_SLOT( addSelectedContacts() ) );
+
+ connect( _ui->mFilterEdit, TQT_SIGNAL( textChanged(const TQString &) ),
+ TQT_SLOT( filterChanged(const TQString &) ) );
+ connect( _ui->mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeSelectedContacts() ) );
+ connect( _ui->mSaveList, TQT_SIGNAL( clicked() ), TQT_SLOT( saveDistributionList() ) );
+ connect( _ui->mSelectedView, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int ) ),
+ TQT_SLOT( removeSelectedContacts() ) );
}
void KWMailMergeKABCConfig::launchAddressbook() const
{
- kapp->startServiceByDesktopName( "kaddressbook", QString() );
+ kapp->startServiceByDesktopName( "kaddressbook", TQString() );
}
-void KWMailMergeKABCConfig::removeContact( QListViewItem* item )
+void KWMailMergeKABCConfig::removeContact( TQListViewItem* item )
{
- QStringList& categories = _usedCategories;
- QListViewItem* availableLists = _ui->mAvailableView->findItem(
- i18n("Distribution Lists"), 0, Qt::ExactMatch );
+ TQStringList& categories = _usedCategories;
+ TQListViewItem* availableLists = _ui->mAvailableView->tqfindItem(
+ i18n("Distribution Lists"), 0, TQt::ExactMatch );
if( item->depth() > 0 )
{
if( !item->text( -1 ).isEmpty() ) // remove selected single entry here
@@ -302,14 +302,14 @@ void KWMailMergeKABCConfig::removeContact( QListViewItem* item )
KWMailMergeKABCConfigListItem* rightItem =
static_cast<KWMailMergeKABCConfigListItem*> ( item );
- QStringList entryCategories = rightItem->addressee().categories();
- for ( QStringList::Iterator itEntryCat = entryCategories.begin();
+ TQStringList entryCategories = rightItem->addressee().categories();
+ for ( TQStringList::Iterator itEntryCat = entryCategories.begin();
itEntryCat != entryCategories.end(); ++itEntryCat )
{
- int i = categories.findIndex(*itEntryCat);
+ int i = categories.tqfindIndex(*itEntryCat);
if( i == -1 )
{
- QListViewItem* category = new QListViewItem( _ui->mAvailableView,
+ TQListViewItem* category = new TQListViewItem( _ui->mAvailableView,
*itEntryCat );
categories.append( *itEntryCat );
@@ -320,23 +320,23 @@ void KWMailMergeKABCConfig::removeContact( QListViewItem* item )
{
KWMailMergeKABCConfigListItem* leftItem = new
KWMailMergeKABCConfigListItem(
- _ui->mAvailableView->findItem(
+ _ui->mAvailableView->tqfindItem(
*itEntryCat, 0,
- Qt::ExactMatch),
+ TQt::ExactMatch),
rightItem->addressee() );
}
}
if( entryCategories.isEmpty() )
{
- QString noCat = i18n("no category");
+ TQString noCat = i18n("no category");
KWMailMergeKABCConfigListItem* leftItem = new KWMailMergeKABCConfigListItem(
- _ui->mAvailableView->findItem(
- noCat, 0, Qt::ExactMatch),
+ _ui->mAvailableView->tqfindItem(
+ noCat, 0, TQt::ExactMatch),
rightItem->addressee() );
}
delete item;
}
- else if( item->parent()->text(0) == i18n("Distribution Lists") ) // remove a list
+ else if( item->tqparent()->text(0) == i18n("Distribution Lists") ) // remove a list
{
if( availableLists )
availableLists->insertItem( item );
@@ -346,7 +346,7 @@ void KWMailMergeKABCConfig::removeContact( QListViewItem* item )
void KWMailMergeKABCConfig::removeSelectedContacts()
{
- QListViewItemIterator it( _ui->mSelectedView, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( _ui->mSelectedView, TQListViewItemIterator::Selected );
while( it.current() )
{
@@ -364,9 +364,9 @@ void KWMailMergeKABCConfig::saveDistributionList()
dlm.load();
bool ok = false;
- QString listName = KInputDialog::getText( i18n("New Distribution List"),
+ TQString listName = KInputDialog::getText( i18n("New Distribution List"),
i18n("Please enter name:"),
- QString::null, &ok,
+ TQString(), &ok,
this );
if ( !ok || listName.isEmpty() )
return;
@@ -376,15 +376,15 @@ void KWMailMergeKABCConfig::saveDistributionList()
KMessageBox::information( 0,
i18n( "<qt>Distribution list with the given name <b>%1</b> "
"already exists. Please select a different name.</qt>" )
- .arg( listName ) );
+ .tqarg( listName ) );
return;
}
KABC::DistributionList *distList = new KABC::DistributionList( &dlm, listName );
- QListViewItem* newListItem = new QListViewItem( _ui->mSelectedView->findItem(
- i18n("Distribution Lists"),0 , Qt::ExactMatch), listName );
+ TQListViewItem* newListItem = new TQListViewItem( _ui->mSelectedView->tqfindItem(
+ i18n("Distribution Lists"),0 , TQt::ExactMatch), listName );
- QListViewItem* category = _ui->mSelectedView->firstChild();
+ TQListViewItem* category = _ui->mSelectedView->firstChild();
while(category)
{
if( category->text(0)==i18n("Single Entries") )
@@ -397,15 +397,15 @@ void KWMailMergeKABCConfig::saveDistributionList()
distList->insertEntry( item->addressee() );
KABC::Addressee addr = item->addressee();
- QString formattedName = addr.formattedName();
- QListViewItem* newItem = new QListViewItem(
+ TQString formattedName = addr.formattedName();
+ TQListViewItem* newItem = new TQListViewItem(
newListItem, item->addressee().formattedName() );
newItem->setEnabled( false );
item = static_cast<KWMailMergeKABCConfigListItem*>( item->nextSibling() );
}
- QListViewItemIterator it ( category->firstChild() );
+ TQListViewItemIterator it ( category->firstChild() );
while( it.current() )
{
removeContact( it.current() );
@@ -428,10 +428,10 @@ void KWMailMergeKABCConfig::updateAvailable()
//
// First append the addressees.
//
- QListViewItem* noCategory = new QListViewItem( _ui->mAvailableView,
+ TQListViewItem* noCategory = new TQListViewItem( _ui->mAvailableView,
i18n("no category") );
- QStringList& categories = _usedCategories ;
+ TQStringList& categories = _usedCategories ;
categories.clear();
KABC::AddressBook *addressBook = KABC::StdAddressBook::self();
@@ -439,16 +439,16 @@ void KWMailMergeKABCConfig::updateAvailable()
itAddr != addressBook->end(); ++itAddr )
{
- QStringList entryCategories = itAddr->categories();
- for ( QStringList::Iterator itCat = entryCategories.begin();
+ TQStringList entryCategories = itAddr->categories();
+ for ( TQStringList::Iterator itCat = entryCategories.begin();
itCat != entryCategories.end(); ++itCat )
{
- int i = categories.findIndex(*itCat);
+ int i = categories.tqfindIndex(*itCat);
// Create category, if not yet in listview and append item to it.
if( i == -1 )
{
- QListViewItem* category = new QListViewItem( _ui->mAvailableView, *itCat );
+ TQListViewItem* category = new TQListViewItem( _ui->mAvailableView, *itCat );
categories.append( *itCat );
KWMailMergeKABCConfigListItem* item = new KWMailMergeKABCConfigListItem(
@@ -458,8 +458,8 @@ void KWMailMergeKABCConfig::updateAvailable()
else
{
KWMailMergeKABCConfigListItem* item = new KWMailMergeKABCConfigListItem(
- _ui->mAvailableView->findItem(
- *itCat, 0, Qt::ExactMatch),
+ _ui->mAvailableView->tqfindItem(
+ *itCat, 0, TQt::ExactMatch),
*itAddr );
}
@@ -478,11 +478,11 @@ void KWMailMergeKABCConfig::updateAvailable()
KABC::DistributionListManager dlm ( addressBook );
dlm.load();
- QStringList distributionLists = dlm.listNames();
- QListViewItem* distributionListsItem = new QListViewItem( _ui->mAvailableView,
+ TQStringList distributionLists = dlm.listNames();
+ TQListViewItem* distributionListsItem = new TQListViewItem( _ui->mAvailableView,
i18n("Distribution Lists") );
- QStringList::Iterator itDistributionLists;
+ TQStringList::Iterator itDistributionLists;
for( itDistributionLists = distributionLists.begin();
itDistributionLists != distributionLists.end(); ++itDistributionLists )
@@ -491,15 +491,15 @@ void KWMailMergeKABCConfig::updateAvailable()
KABC::DistributionList::Entry::List entries = list->entries();
- QListViewItem* listItem = new QListViewItem( distributionListsItem,
+ TQListViewItem* listItem = new TQListViewItem( distributionListsItem,
*itDistributionLists );
KABC::DistributionList::Entry::List::Iterator itList;
for ( itList = entries.begin(); itList != entries.end(); ++itList )
{
- // Create a normal QListViewItem and disable it, because this is not a
+ // Create a normal TQListViewItem and disable it, because this is not a
// distribution-list-editor. KAddressbook should be used instead.
- QListViewItem* item = new QListViewItem(
+ TQListViewItem* item = new TQListViewItem(
listItem, (*itList).addressee.formattedName() );
item->setEnabled( false );
}
@@ -509,15 +509,15 @@ void KWMailMergeKABCConfig::updateAvailable()
-KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( QListView *parent,
- const KABC::Addressee& addressEntry ) : QListViewItem( parent )
+KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( TQListView *tqparent,
+ const KABC::Addressee& addressEntry ) : TQListViewItem( tqparent )
{
setText( 0, addressEntry.formattedName() );
_addressEntry = addressEntry;
}
-KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( QListViewItem *parent,
- const KABC::Addressee& addressEntry ) : QListViewItem( parent )
+KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( TQListViewItem *tqparent,
+ const KABC::Addressee& addressEntry ) : TQListViewItem( tqparent )
{
setText( 0, addressEntry.formattedName() );
_addressEntry = addressEntry;
@@ -531,7 +531,7 @@ KABC::Addressee KWMailMergeKABCConfigListItem::addressee() const
return _addressEntry;
}
-QString KWMailMergeKABCConfigListItem::text( int column ) const
+TQString KWMailMergeKABCConfigListItem::text( int column ) const
{
if( column == -1 )
{
@@ -539,7 +539,7 @@ QString KWMailMergeKABCConfigListItem::text( int column ) const
}
else
{
- return QListViewItem::text( column );
+ return TQListViewItem::text( column );
}
}
diff --git a/kword/mailmerge/kabc/KWMailMergeKABCConfig.h b/kword/mailmerge/kabc/KWMailMergeKABCConfig.h
index 335574b8..32fe74cd 100644
--- a/kword/mailmerge/kabc/KWMailMergeKABCConfig.h
+++ b/kword/mailmerge/kabc/KWMailMergeKABCConfig.h
@@ -34,8 +34,9 @@ class KWMailMergeKABC;
class KWMailMergeKABCConfig: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWMailMergeKABCConfig( QWidget *parent, KWMailMergeKABC *db_ );
+ KWMailMergeKABCConfig( TQWidget *tqparent, KWMailMergeKABC *db_ );
virtual ~KWMailMergeKABCConfig();
@@ -57,14 +58,14 @@ private slots:
void launchAddressbook() const;
/**
- Updates the parent's mail merge list from items in the right Listview.
+ Updates the tqparent's mail merge list from items in the right Listview.
*/
void acceptSelection();
/**
Hides items in the left listview, which are not matching @p txt.
*/
- void filterChanged( const QString& txt );
+ void filterChanged( const TQString& txt );
/**
Saves the selected single entries to a new KABC::DistributionList in KAddressbook.
@@ -79,7 +80,7 @@ private:
/**
Store all categories used in the addressbook, to avoid some iterator cycles.
*/
- QStringList _usedCategories;
+ TQStringList _usedCategories;
/**
The mail merge list.
@@ -87,17 +88,17 @@ private:
KWMailMergeKABC *_db;
/**
- Removes duplicates in the left QListView, when moving an item to the right.
+ Removes duplicates in the left TQListView, when moving an item to the right.
*/
- void destroyAvailableClones( const QString& uid );
+ void destroyAvailableClones( const TQString& uid );
/**
- Appends the previously selected entries to the right QListView.
+ Appends the previously selected entries to the right TQListView.
*/
void initSelectedAddressees();
/**
- Appends the previously selected distribution lists to the right QListView.
+ Appends the previously selected distribution lists to the right TQListView.
*/
void initSelectedLists();
@@ -111,22 +112,22 @@ private:
Called by KWMailMergeKABCConfig::removeSelectedContacts().
*/
- void removeContact( QListViewItem* item );
+ void removeContact( TQListViewItem* item );
/**
Appends all KAddressbook entries in KABC::StdAddressBook::self() and all
- KABC::DistributionLists to the left QListView.
+ KABC::DistributionLists to the left TQListView.
*/
void updateAvailable();
};
-class KWMailMergeKABCConfigListItem : public QListViewItem
+class KWMailMergeKABCConfigListItem : public TQListViewItem
{
public:
- KWMailMergeKABCConfigListItem( QListView *parent, const KABC::Addressee& addressEntry );
- KWMailMergeKABCConfigListItem( QListViewItem *parent, const KABC::Addressee& addressEntry );
+ KWMailMergeKABCConfigListItem( TQListView *tqparent, const KABC::Addressee& addressEntry );
+ KWMailMergeKABCConfigListItem( TQListViewItem *tqparent, const KABC::Addressee& addressEntry );
virtual ~KWMailMergeKABCConfigListItem();
/**
@@ -135,11 +136,11 @@ public:
KABC::Addressee addressee() const;
/**
- This is an overloaded member function of QListViewItem::text( int column ).
+ This is an overloaded member function of TQListViewItem::text( int column ).
It Returns the KABC::Addressee::uid(), if column is set to -1.
- Otherwise QListViewItem::text( int column ) is returned.
+ Otherwise TQListViewItem::text( int column ) is returned.
*/
- QString text( int column ) const;
+ TQString text( int column ) const;
private:
diff --git a/kword/mailmerge/kabc/addresspicker.ui b/kword/mailmerge/kabc/addresspicker.ui
index ec179c3b..40521704 100644
--- a/kword/mailmerge/kabc/addresspicker.ui
+++ b/kword/mailmerge/kabc/addresspicker.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>AddressPickerUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>AddressPickerUI</cstring>
</property>
@@ -19,9 +19,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="1" column="1">
+ <widget class="TQLayoutWidget" row="1" column="1">
<property name="name">
- <cstring>layout10</cstring>
+ <cstring>tqlayout10</cstring>
</property>
<vbox>
<property name="name">
@@ -37,7 +37,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -76,7 +76,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -85,7 +85,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QPushButton" row="2" column="2">
+ <widget class="TQPushButton" row="2" column="2">
<property name="name">
<cstring>mSaveList</cstring>
</property>
@@ -99,15 +99,15 @@
<string>Save selected single entries to a new distribution list.</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
@@ -118,7 +118,7 @@
<cstring>mFilterEdit</cstring>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>mFilterEdit</cstring>
</property>
@@ -194,7 +194,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton" row="2" column="1">
+ <widget class="TQPushButton" row="2" column="1">
<property name="name">
<cstring>mAddressBook</cstring>
</property>
@@ -205,7 +205,7 @@
<string>Launch KAddressbook</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -217,14 +217,14 @@
<property name="text">
<string>&amp;Address Book</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignCenter</set>
</property>
<property name="buddy" stdset="0">
<cstring>mAvailableView</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -236,7 +236,7 @@
<property name="text">
<string>&amp;Selected Addresses</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignCenter</set>
</property>
<property name="buddy" stdset="0">
@@ -287,7 +287,7 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/kword/mailmerge/kspread/kwmailmerge_kspread.cpp b/kword/mailmerge/kspread/kwmailmerge_kspread.cpp
index 738cf6d7..518699a8 100644
--- a/kword/mailmerge/kspread/kwmailmerge_kspread.cpp
+++ b/kword/mailmerge/kspread/kwmailmerge_kspread.cpp
@@ -29,8 +29,8 @@
using namespace KSpread;
-KWMailMergeKSpread::KWMailMergeKSpread( KInstance *instance, QObject *parent )
- : KWMailMergeDataSource( instance, parent ), _spreadSheetNumber( 1 )
+KWMailMergeKSpread::KWMailMergeKSpread( KInstance *instance, TQObject *tqparent )
+ : KWMailMergeDataSource( instance, tqparent ), _spreadSheetNumber( 1 )
{
}
@@ -43,7 +43,7 @@ int KWMailMergeKSpread::getNumRecords() const
return rows() - 2;
}
-QString KWMailMergeKSpread::getValue( const QString &name, int record ) const
+TQString KWMailMergeKSpread::getValue( const TQString &name, int record ) const
{
if ( record < 0 )
return name;
@@ -53,29 +53,29 @@ QString KWMailMergeKSpread::getValue( const QString &name, int record ) const
if ( cell )
return cellText( cell );
else
- return i18n( "Unkown mail merge variable: %1" ).arg( name );
+ return i18n( "Unkown mail merge variable: %1" ).tqarg( name );
}
-void KWMailMergeKSpread::load( QDomElement& parentElem )
+void KWMailMergeKSpread::load( TQDomElement& tqparentElem )
{
- QDomNode contentNode = parentElem.namedItem( "CONTENT" );
+ TQDomNode contentNode = tqparentElem.namedItem( "CONTENT" );
if ( contentNode.isNull() )
return;
- QDomElement element = contentNode.toElement();
+ TQDomElement element = contentNode.toElement();
if ( element.isNull() )
return;
- _url = element.attribute( QString::fromLatin1( "URL" ) );
- _spreadSheetNumber = element.attribute( QString::fromLatin1( "SpreadSheetNumber" ) ).toInt();
+ _url = element.attribute( TQString::tqfromLatin1( "URL" ) );
+ _spreadSheetNumber = element.attribute( TQString::tqfromLatin1( "SpreadSheetNumber" ) ).toInt();
initDocument();
}
-void KWMailMergeKSpread::save( QDomDocument& doc, QDomElement& parent )
+void KWMailMergeKSpread::save( TQDomDocument& doc, TQDomElement& tqparent )
{
- QDomElement content = doc.createElement( QString::fromLatin1( "CONTENT" ) );
- parent.appendChild( content );
+ TQDomElement content = doc.createElement( TQString::tqfromLatin1( "CONTENT" ) );
+ tqparent.appendChild( content );
content.setAttribute( "URL", _url.url() );
content.setAttribute( "SpreadSheetNumber", _spreadSheetNumber );
@@ -85,9 +85,9 @@ void KWMailMergeKSpread::refresh( bool )
{
}
-bool KWMailMergeKSpread::showConfigDialog( QWidget *parent, int )
+bool KWMailMergeKSpread::showConfigDialog( TQWidget *tqparent, int )
{
- KWMailMergeKSpreadConfig dlg( parent, this );
+ KWMailMergeKSpreadConfig dlg( tqparent, this );
int retval = dlg.exec();
if ( retval )
@@ -100,7 +100,7 @@ void KWMailMergeKSpread::initDocument()
{
_document = new Doc();
- connect( _document, SIGNAL( completed() ), SLOT( initSpreadSheets() ) );
+ connect( _document, TQT_SIGNAL( completed() ), TQT_SLOT( initSpreadSheets() ) );
_document->openURL( _url );
}
@@ -111,7 +111,7 @@ void KWMailMergeKSpread::initSpreadSheets()
_columnMap.clear();
sampleRecord.clear();
- QPtrListIterator<Sheet> it( _document->map()->sheetList() );
+ TQPtrListIterator<Sheet> it( _document->map()->sheetList() );
int counter = 0;
for ( it.toFirst(); it.current(), counter < _spreadSheetNumber; ++it ) {
_sheet = it.current();
@@ -172,9 +172,9 @@ int KWMailMergeKSpread::columns() const
return col;
}
-QString KWMailMergeKSpread::cellText( const Cell *cell ) const
+TQString KWMailMergeKSpread::cellText( const Cell *cell ) const
{
- QString text = QString::null;
+ TQString text = TQString();
if ( !cell->isDefault() && !cell->isEmpty() ) {
if ( cell->isFormula() )
@@ -202,9 +202,9 @@ QString KWMailMergeKSpread::cellText( const Cell *cell ) const
extern "C"
{
- KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_kspread( KInstance *instance, QObject *parent )
+ KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_kspread( KInstance *instance, TQObject *tqparent )
{
- return new KWMailMergeKSpread( instance, parent );
+ return new KWMailMergeKSpread( instance, tqparent );
}
}
diff --git a/kword/mailmerge/kspread/kwmailmerge_kspread.h b/kword/mailmerge/kspread/kwmailmerge_kspread.h
index 2d639074..2b039c01 100644
--- a/kword/mailmerge/kspread/kwmailmerge_kspread.h
+++ b/kword/mailmerge/kspread/kwmailmerge_kspread.h
@@ -21,8 +21,8 @@
#ifndef _KWMAILMERGE_KSPREAD_H_
#define _KWMAILMERGE_KSPREAD_H_
-#include <qdom.h>
-#include <qmap.h>
+#include <tqdom.h>
+#include <tqmap.h>
#include <kspread_doc.h>
#include <kspread_sheet.h>
@@ -32,20 +32,21 @@
class KWMailMergeKSpread: public KWMailMergeDataSource
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWMailMergeKSpread( KInstance *inst, QObject *parent );
+ KWMailMergeKSpread( KInstance *inst, TQObject *tqparent );
~KWMailMergeKSpread();
/**
Saves the mail merge list to the kword document.
*/
- virtual void save( QDomDocument&, QDomElement& );
+ virtual void save( TQDomDocument&, TQDomElement& );
/**
Loads the mail merge list stored in the kword document.
*/
- virtual void load( QDomElement& );
+ virtual void load( TQDomElement& );
/**
@param name The name of the value e.g. "Family name".
@@ -54,7 +55,7 @@ class KWMailMergeKSpread: public KWMailMergeDataSource
If @p record equals -1, @p name is returned.
*/
- virtual class QString getValue( const class QString &name, int record = -1 ) const;
+ virtual class TQString getValue( const class TQString &name, int record = -1 ) const;
/**
@return The number of available contacts in mail merge list.
@@ -71,7 +72,7 @@ class KWMailMergeKSpread: public KWMailMergeDataSource
/**
Shows a KWMailMergeKSpreadConfig dialog for selecting entries from KAddressbook.
*/
- virtual bool showConfigDialog( QWidget*, int action);
+ virtual bool showConfigDialog( TQWidget*, int action);
void setURL( const KURL &url ) { _url = url; }
@@ -92,14 +93,14 @@ class KWMailMergeKSpread: public KWMailMergeDataSource
int rows() const;
int columns() const;
- QString cellText( const KSpread::Cell* ) const;
+ TQString cellText( const KSpread::Cell* ) const;
KSpread::Doc *_document;
KSpread::Sheet* _sheet;
KURL _url;
int _spreadSheetNumber;
- QMap<QString, int> _columnMap;
+ TQMap<TQString, int> _columnMap;
};
#endif
diff --git a/kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp b/kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp
index fc170780..00f1ba20 100644
--- a/kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp
+++ b/kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp
@@ -19,8 +19,8 @@
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kcombobox.h>
#include <klineedit.h>
@@ -34,9 +34,9 @@
using namespace KSpread;
-KWMailMergeKSpreadConfig::KWMailMergeKSpreadConfig( QWidget *parent, KWMailMergeKSpread *object )
+KWMailMergeKSpreadConfig::KWMailMergeKSpreadConfig( TQWidget *tqparent, KWMailMergeKSpread *object )
: KDialogBase( Plain, i18n( "Mail Merge - Editor" ),
- Ok | Cancel, Ok, parent, "", true ),
+ Ok | Cancel, Ok, tqparent, "", true ),
_document( 0 ), _initialPage( 1 )
{
_object = object;
@@ -46,8 +46,8 @@ KWMailMergeKSpreadConfig::KWMailMergeKSpreadConfig( QWidget *parent, KWMailMerge
_urlRequester->setURL( _object->url().url() );
_initialPage = _object->spreadSheetNumber();
- connect( _urlRequester, SIGNAL( urlSelected( const QString& ) ),
- SLOT( loadDocument() ) );
+ connect( _urlRequester, TQT_SIGNAL( urlSelected( const TQString& ) ),
+ TQT_SLOT( loadDocument() ) );
loadDocument();
slotTextChanged( _urlRequester->lineEdit()->text() );
@@ -75,7 +75,7 @@ void KWMailMergeKSpreadConfig::loadDocument()
if ( !_urlRequester->url().isEmpty() ) {
_document = new Doc();
- connect( _document, SIGNAL( completed() ), SLOT( documentLoaded() ) );
+ connect( _document, TQT_SIGNAL( completed() ), TQT_SLOT( documentLoaded() ) );
_document->openURL( _urlRequester->url() );
}
@@ -85,39 +85,39 @@ void KWMailMergeKSpreadConfig::documentLoaded()
{
_pageNumber->clear();
- QPtrListIterator<Sheet> it( _document->map()->sheetList() );
+ TQPtrListIterator<Sheet> it( _document->map()->sheetList() );
int counter = 1;
for ( it.toFirst(); it.current(); ++it ) {
- _pageNumber->insertItem( QString::number( counter ) );
+ _pageNumber->insertItem( TQString::number( counter ) );
counter++;
}
_pageNumber->setEnabled( true );
- _pageNumber->setCurrentText( QString::number( _initialPage ) );
+ _pageNumber->setCurrentText( TQString::number( _initialPage ) );
}
void KWMailMergeKSpreadConfig::initGUI()
{
- QFrame *page = plainPage();
+ TQFrame *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 2, 2, marginHint(), spacingHint() );
+ TQGridLayout *tqlayout = new TQGridLayout( page, 2, 2, marginHint(), spacingHint() );
- QLabel *label = new QLabel( i18n( "URL:" ), page );
- layout->addWidget( label, 0, 0 );
+ TQLabel *label = new TQLabel( i18n( "URL:" ), page );
+ tqlayout->addWidget( label, 0, 0 );
_urlRequester = new KURLRequester( page );
- layout->addWidget( _urlRequester, 0, 1 );
+ tqlayout->addWidget( _urlRequester, 0, 1 );
- label = new QLabel( i18n( "Page number:" ), page );
- layout->addWidget( label, 1, 0 );
+ label = new TQLabel( i18n( "Page number:" ), page );
+ tqlayout->addWidget( label, 1, 0 );
_pageNumber = new KComboBox( page );
_pageNumber->setEnabled( false );
- layout->addWidget( _pageNumber, 1, 1 );
- connect( _urlRequester->lineEdit() , SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) );
+ tqlayout->addWidget( _pageNumber, 1, 1 );
+ connect( _urlRequester->lineEdit() , TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) );
}
-void KWMailMergeKSpreadConfig::slotTextChanged( const QString & _text )
+void KWMailMergeKSpreadConfig::slotTextChanged( const TQString & _text )
{
enableButtonOK( !_text.isEmpty() );
}
diff --git a/kword/mailmerge/kspread/kwmailmerge_kspread_config.h b/kword/mailmerge/kspread/kwmailmerge_kspread_config.h
index 6aacff63..31706e76 100644
--- a/kword/mailmerge/kspread/kwmailmerge_kspread_config.h
+++ b/kword/mailmerge/kspread/kwmailmerge_kspread_config.h
@@ -33,9 +33,10 @@ class KWMailMergeKSpread;
class KWMailMergeKSpreadConfig: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWMailMergeKSpreadConfig( QWidget *parent, KWMailMergeKSpread *object );
+ KWMailMergeKSpreadConfig( TQWidget *tqparent, KWMailMergeKSpread *object );
virtual ~KWMailMergeKSpreadConfig();
@@ -44,7 +45,7 @@ class KWMailMergeKSpreadConfig: public KDialogBase
void loadDocument();
void documentLoaded();
- void slotTextChanged( const QString & _text );
+ void slotTextChanged( const TQString & _text );
private:
void initGUI();
diff --git a/kword/mailmerge/sql/KWMySqlCursor.h b/kword/mailmerge/sql/KWMySqlCursor.h
index e5e998b6..a7843f6a 100644
--- a/kword/mailmerge/sql/KWMySqlCursor.h
+++ b/kword/mailmerge/sql/KWMySqlCursor.h
@@ -17,12 +17,12 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _SERIALLETTER_QtSql_SQLCURSOR_H_
-#define _SERIALLETTER_QtSql_SQLCURSOR_H_
+#ifndef _SERIALLETTER_TQtSql_STQLCURSOR_H_
+#define _SERIALLETTER_TQtSql_STQLCURSOR_H_
/* FOR THE DIRTY HACK */
-#include <qsqlcursor.h>
-#include <qsqldriver.h>
+#include <tqsqlcursor.h>
+#include <tqsqldriver.h>
/* END FOR THE DIRTY HACK */
/******************************************************************
@@ -34,35 +34,35 @@
-class KWMySqlCursor: public QSqlCursor
+class KWMySqlCursor: public TQSqlCursor
{
public:
- KWMySqlCursor( const QString & query = QString::null, bool autopopulate =
-TRUE, QSqlDatabase* db = 0 ): QSqlCursor( QString::null, autopopulate, db )
+ KWMySqlCursor( const TQString & query = TQString(), bool autopopulate =
+TRUE, TQSqlDatabase* db = 0 ): TQSqlCursor( TQString(), autopopulate, db )
{
exec( query );
if ( autopopulate )
- *(QSqlRecord*)this = ((QSqlQuery*)this)->driver()->record(
-*(QSqlQuery*)this );
- setMode( QSqlCursor::ReadOnly );
+ *(TQSqlRecord*)this = ((TQSqlQuery*)this)->driver()->record(
+*(TQSqlQuery*)this );
+ setMode( TQSqlCursor::ReadOnly );
}
- KWMySqlCursor( const KWMySqlCursor & other ): QSqlCursor( other ) {}
- KWMySqlCursor( const QSqlQuery & query, bool autopopulate = TRUE ):
-QSqlCursor( QString::null, autopopulate )
+ KWMySqlCursor( const KWMySqlCursor & other ): TQSqlCursor( other ) {}
+ KWMySqlCursor( const TQSqlQuery & query, bool autopopulate = TRUE ):
+TQSqlCursor( TQString(), autopopulate )
{
- *(QSqlQuery*)this = query;
+ *(TQSqlQuery*)this = query;
if ( autopopulate )
- *(QSqlRecord*)this = query.driver()->record( query );
- setMode( QSqlCursor::ReadOnly );
+ *(TQSqlRecord*)this = query.driver()->record( query );
+ setMode( TQSqlCursor::ReadOnly );
}
- bool select( const QString & /*filter*/, const QSqlIndex & /*sort*/ =
-QSqlIndex() ) { return exec( lastQuery() ); }
- QSqlIndex primaryIndex( bool /*prime*/ = TRUE ) const { return
-QSqlIndex(); }
- int insert( bool /*invalidate*/ = TRUE ) { return FALSE; }
- int update( bool /*invalidate*/ = TRUE ) { return FALSE; }
- int del( bool /*invalidate*/ = TRUE ) { return FALSE; }
- void setName( const QString& /*name*/, bool /*autopopulate*/ = TRUE ) {}
+ bool select( const TQString & /*filter*/, const TQSqlIndex & /*sort*/ =
+TQSqlIndex() ) { return exec( lastQuery() ); }
+ TQSqlIndex primaryIndex( bool /*prime*/ = TRUE ) const { return
+TQSqlIndex(); }
+ int insert( bool /*tqinvalidate*/ = TRUE ) { return FALSE; }
+ int update( bool /*tqinvalidate*/ = TRUE ) { return FALSE; }
+ int del( bool /*tqinvalidate*/ = TRUE ) { return FALSE; }
+ void setName( const TQString& /*name*/, bool /*autopopulate*/ = TRUE ) {}
};
diff --git a/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp b/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp
index 0f5e5ffb..c2c14249 100644
--- a/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp
+++ b/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp
@@ -1,19 +1,19 @@
-#include "KWQtSqlEasyFilter.h"
-#include "KWQtSqlEasyFilter.moc"
-#include <qtable.h>
-#include <qscrollview.h>
+#include "KWTQtSqlEasyFilter.h"
+#include "KWTQtSqlEasyFilter.moc"
+#include <tqtable.h>
+#include <tqscrollview.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
-KWQtSqlEasyFilter::KWQtSqlEasyFilter( QWidget *parent)
- :KDialogBase( Swallow, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, parent, "", true)
+KWTQtSqlEasyFilter::KWTQtSqlEasyFilter( TQWidget *tqparent)
+ :KDialogBase( Swallow, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, tqparent, "", true)
{
m_fieldList << "" <<"one" << "two" << "three" << "four";
m_sortingList << ""<<i18n("ascending")<<i18n("descending");
- m_operationList <<"="<<i18n("contains")<< "<" << ">";
+ m_operationList <<"="<<i18n("tqcontains")<< "<" << ">";
- m_table=new QTable(6,3,this);
+ m_table=new TQTable(6,3,this);
setMainWidget(m_table);
m_table->verticalHeader()->setLabel(0,i18n("Field"));
@@ -22,7 +22,7 @@ KWQtSqlEasyFilter::KWQtSqlEasyFilter( QWidget *parent)
m_table->verticalHeader()->setLabel(3,i18n("Operator"));
m_table->verticalHeader()->setLabel(4,i18n("Condition"));
m_table->verticalHeader()->setLabel(5,i18n("Value"));
- m_table->setSelectionMode(QTable::NoSelection);
+ m_table->setSelectionMode(TQTable::NoSelection);
m_table->setColumnMovingEnabled(true);
m_table->setSorting(false);
@@ -33,35 +33,35 @@ KWQtSqlEasyFilter::KWQtSqlEasyFilter( QWidget *parent)
int h=m_table->rowHeight(0);
for (int i=0;i<6;i++) h+=m_table->rowHeight(i);
- h+=m_table->horizontalHeader()->sizeHint().height();
+ h+=m_table->horizontalHeader()->tqsizeHint().height();
m_table->setMinimumHeight(h);
int w=0;
for (int i=0;i<3;i++) w+=m_table->columnWidth(i);
w+=m_table->verticalHeader()->headerWidth();
m_table->setMinimumWidth(w);
- connect(m_table,SIGNAL(valueChanged ( int, int)),this,SLOT(slotValueChanged ( int, int)));
+ connect(m_table,TQT_SIGNAL(valueChanged ( int, int)),this,TQT_SLOT(slotValueChanged ( int, int)));
}
-void KWQtSqlEasyFilter::createColumn(int i)
+void KWTQtSqlEasyFilter::createColumn(int i)
{
- QTableItem *it;
- m_table->setItem(0,i,it=new QComboTableItem(m_table,m_fieldList,false));
- m_table->setItem(1,i,it=new QComboTableItem(m_table,m_sortingList,false));
+ TQTableItem *it;
+ m_table->setItem(0,i,it=new TQComboTableItem(m_table,m_fieldList,false));
+ m_table->setItem(1,i,it=new TQComboTableItem(m_table,m_sortingList,false));
it->setEnabled(false);
- m_table->setItem(2,i,it=new QCheckTableItem(m_table,i18n("Yes")));
+ m_table->setItem(2,i,it=new TQCheckTableItem(m_table,i18n("Yes")));
it->setEnabled(false);
- m_table->setItem(3,i,it=new QCheckTableItem(m_table,i18n("NOT")));
+ m_table->setItem(3,i,it=new TQCheckTableItem(m_table,i18n("NOT")));
it->setEnabled(false);
- m_table->setItem(4,i,it=new QComboTableItem(m_table,m_operationList,false));
+ m_table->setItem(4,i,it=new TQComboTableItem(m_table,m_operationList,false));
it->setEnabled(false);
- m_table->setItem(5,i,it=new QTableItem(m_table,QTableItem::WhenCurrent,""));
+ m_table->setItem(5,i,it=new TQTableItem(m_table,TQTableItem::WhenCurrent,""));
it->setEnabled(false);
m_table->ensureCellVisible(0,i);
}
-void KWQtSqlEasyFilter::slotValueChanged ( int row, int col )
+void KWTQtSqlEasyFilter::slotValueChanged ( int row, int col )
{
switch (row)
{
@@ -75,7 +75,7 @@ void KWQtSqlEasyFilter::slotValueChanged ( int row, int col )
}
m_table->item(1,col)->setEnabled(true);
m_table->item(2,col)->setEnabled(true);
- bool enableSearch=(static_cast<QCheckTableItem*>(m_table->item(2,col))->isChecked());
+ bool enableSearch=(static_cast<TQCheckTableItem*>(m_table->item(2,col))->isChecked());
m_table->item(3,col)->setEnabled(enableSearch);
m_table->item(4,col)->setEnabled(enableSearch);
m_table->item(5,col)->setEnabled(enableSearch);
@@ -86,7 +86,7 @@ void KWQtSqlEasyFilter::slotValueChanged ( int row, int col )
}
break;
case 2:
- bool enSearch=static_cast<QCheckTableItem*>(m_table->item(row,col))->isChecked();
+ bool enSearch=static_cast<TQCheckTableItem*>(m_table->item(row,col))->isChecked();
m_table->item(3,col)->setEnabled(enSearch);
m_table->item(4,col)->setEnabled(enSearch);
m_table->item(5,col)->setEnabled(enSearch);
@@ -94,5 +94,5 @@ void KWQtSqlEasyFilter::slotValueChanged ( int row, int col )
}
}
-KWQtSqlEasyFilter::~KWQtSqlEasyFilter(){;}
+KWTQtSqlEasyFilter::~KWTQtSqlEasyFilter(){;}
diff --git a/kword/mailmerge/sql/KWQtSqlEasyFilter.h b/kword/mailmerge/sql/KWQtSqlEasyFilter.h
index aa20d494..f5602793 100644
--- a/kword/mailmerge/sql/KWQtSqlEasyFilter.h
+++ b/kword/mailmerge/sql/KWQtSqlEasyFilter.h
@@ -1,27 +1,28 @@
-#ifndef MAILMERGE_QtSqlPLUGIN_EASYFILTER
-#define MAILMERGE_QtSqlPLUGIN_EASYFILTER
+#ifndef MAILMERGE_TQtSqlPLUGIN_EASYFILTER
+#define MAILMERGE_TQtSqlPLUGIN_EASYFILTER
#include <kdialogbase.h>
-class QTable;
-class QScrollView;
-class QStringList;
+class TQTable;
+class TQScrollView;
+class TQStringList;
-class KWQtSqlEasyFilter: public KDialogBase
+class KWTQtSqlEasyFilter: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWQtSqlEasyFilter( QWidget *parent);
- virtual ~KWQtSqlEasyFilter();
+ KWTQtSqlEasyFilter( TQWidget *tqparent);
+ virtual ~KWTQtSqlEasyFilter();
protected:
void createColumn(int i);
protected slots:
void slotValueChanged ( int, int);
private:
- QTable *m_table;
- QScrollView *m_view;
- QStringList m_fieldList,m_sortingList,m_operationList;
+ TQTable *m_table;
+ TQScrollView *m_view;
+ TQStringList m_fieldList,m_sortingList,m_operationList;
};
diff --git a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp
index 099e92a8..02ff145f 100644
--- a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp
+++ b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp
@@ -17,51 +17,51 @@
* Boston, MA 02110-1301, USA.
*/
-#include "KWQtSqlMailMergeOpen.h"
-#include "KWQtSqlMailMergeOpen.moc"
+#include "KWTQtSqlMailMergeOpen.h"
+#include "KWTQtSqlMailMergeOpen.moc"
#include <kcombobox.h>
#include <klineedit.h>
#include <kdebug.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kconfig.h>
#include <kpushbutton.h>
#include <klineeditdlg.h>
#include <kiconloader.h>
-#include <qsqldatabase.h>
-#include <qguardedptr.h>
+#include <tqsqldatabase.h>
+#include <tqguardedptr.h>
#include <klocale.h>
/******************************************************************
*
- * Class: KWQtSqlMailMergeOpen
+ * Class: KWTQtSqlMailMergeOpen
*
******************************************************************/
-KWQtSqlMailMergeOpen::KWQtSqlMailMergeOpen( QWidget *parent, KWQtSqlSerialDataSourceBase *db_ )
- :KDialogBase( Plain, i18n( "Mail Merge - Setup Database Connection" ), Ok | Cancel, Ok, parent, "", true ), db( db_ ){
- (new QVBoxLayout(plainPage()))->setAutoAdd(true);
- setMainWidget(widget=new KWQtSqlOpenWidget(plainPage()));
- widget->drivers->insertStringList(QSqlDatabase::drivers());
+KWTQtSqlMailMergeOpen::KWTQtSqlMailMergeOpen( TQWidget *tqparent, KWTQtSqlSerialDataSourceBase *db_ )
+ :KDialogBase( Plain, i18n( "Mail Merge - Setup Database Connection" ), Ok | Cancel, Ok, tqparent, "", true ), db( db_ ){
+ (new TQVBoxLayout(plainPage()))->setAutoAdd(true);
+ setMainWidget(widget=new KWTQtSqlOpenWidget(plainPage()));
+ widget->drivers->insertStringList(TQSqlDatabase::drivers());
widget->hostname->setText(db->hostname);
widget->username->setText(db->username);
widget->port->setText(db->port);
widget->databasename->setText(db->databasename);
fillSavedProperties();
- connect(this,SIGNAL(okClicked()),this,SLOT(handleOk()));
- connect(widget->savedProperties,SIGNAL(activated(const QString&)),
- this, SLOT(savedPropertiesChanged(const QString&)));
- connect(widget->rememberButton,SIGNAL(clicked()),
- this, SLOT(slotSave()));
+ connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(handleOk()));
+ connect(widget->savedProperties,TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(savedPropertiesChanged(const TQString&)));
+ connect(widget->rememberButton,TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSave()));
}
-KWQtSqlMailMergeOpen::~KWQtSqlMailMergeOpen(){;}
+KWTQtSqlMailMergeOpen::~KWTQtSqlMailMergeOpen(){;}
-void KWQtSqlMailMergeOpen::savedPropertiesChanged(const QString& name)
+void KWTQtSqlMailMergeOpen::savedPropertiesChanged(const TQString& name)
{
if (name!=i18n("<not saved>"))
{
KConfig conf("kwmailmergerc");
- conf.setGroup("KWSLQTDB:"+name);
+ conf.setGroup("KWSLTQTDB:"+name);
widget->hostname->setText(conf.readEntry("hostname",""));
widget->username->setText(conf.readEntry("username",""));
widget->port->setText(conf.readEntry("port",""));
@@ -77,32 +77,32 @@ void KWQtSqlMailMergeOpen::savedPropertiesChanged(const QString& name)
}
-void KWQtSqlMailMergeOpen::fillSavedProperties()
+void KWTQtSqlMailMergeOpen::fillSavedProperties()
{
widget->savedProperties->clear();
widget->savedProperties->insertItem(i18n("<not saved>"));
//Read data from configuration file and add entries
KConfig conf("kwmailmergerc");
- QStringList list=conf.groupList();
- for (QStringList::Iterator it=list.begin();it!=list.end();++it)
+ TQStringList list=conf.groupList();
+ for (TQStringList::Iterator it=list.begin();it!=list.end();++it)
{
- if ((*it).startsWith("KWSLQTDB:"))
+ if ((*it).startsWith("KWSLTQTDB:"))
widget->savedProperties->insertItem((*it).right((*it).length()-9));
}
}
-void KWQtSqlMailMergeOpen::slotSave()
+void KWTQtSqlMailMergeOpen::slotSave()
{
- QString value;
+ TQString value;
bool ok;
value=KLineEditDlg::getText(i18n("Store Settings"),i18n("Name:"),
- QString::null, &ok,this);
+ TQString(), &ok,this);
if (!ok) kdDebug()<<"Cancel was pressed"<<endl;
if (value.isEmpty()) kdDebug()<<"Name value was empty"<<endl;
if ((ok) && (!value.isEmpty()))
{
KConfig conf("kwmailmergerc");
- conf.setGroup("KWSLQTDB:"+value);
+ conf.setGroup("KWSLTQTDB:"+value);
conf.writeEntry("hostname",widget->hostname->text());
conf.writeEntry("username",widget->username->text());
conf.writeEntry("port",widget->port->text());
@@ -113,7 +113,7 @@ void KWQtSqlMailMergeOpen::slotSave()
}
}
-void KWQtSqlMailMergeOpen::handleOk()
+void KWTQtSqlMailMergeOpen::handleOk()
{
db->hostname=widget->hostname->text();
db->username=widget->username->text();
diff --git a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.h b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.h
index 66b3c329..9a427cc1 100644
--- a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.h
+++ b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.h
@@ -17,39 +17,40 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _SERIALLETTER_QtSql_OPEN_EDITOR_H_
-#define _SERIALLETTER_QtSql_OPEN_EDITOR_H_
+#ifndef _SERIALLETTER_TQtSql_OPEN_EDITOR_H_
+#define _SERIALLETTER_TQtSql_OPEN_EDITOR_H_
-#include <qdom.h>
+#include <tqdom.h>
#include <kdialogbase.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "KWMailMergeDataSource.h"
-#include "KWQtSqlSerialDataSourceBase.h"
-#include "qtsqlopenwidget.h"
+#include "KWTQtSqlSerialDataSourceBase.h"
+#include "tqtsqlopenwidget.h"
/******************************************************************
*
- * Class: KWQtSqlMailMergeOpen
+ * Class: KWTQtSqlMailMergeOpen
*
******************************************************************/
-class KWQtSqlMailMergeOpen : public KDialogBase
+class KWTQtSqlMailMergeOpen : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWQtSqlMailMergeOpen( QWidget *parent, KWQtSqlSerialDataSourceBase *db_ );
- ~KWQtSqlMailMergeOpen();
+ KWTQtSqlMailMergeOpen( TQWidget *tqparent, KWTQtSqlSerialDataSourceBase *db_ );
+ ~KWTQtSqlMailMergeOpen();
private:
- KWQtSqlSerialDataSourceBase *db;
- KWQtSqlOpenWidget *widget;
+ KWTQtSqlSerialDataSourceBase *db;
+ KWTQtSqlOpenWidget *widget;
void fillSavedProperties();
private slots:
void handleOk();
public slots:
-void savedPropertiesChanged(const QString&);
+void savedPropertiesChanged(const TQString&);
void slotSave();
};
diff --git a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp
index 8f89274a..dd88750a 100644
--- a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp
+++ b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp
@@ -17,43 +17,43 @@
* Boston, MA 02110-1301, USA.
*/
-#include "KWQtSqlPowerSerialDataSource.h"
-#include "KWQtSqlPowerSerialDataSource.moc"
-#include "KWQtSqlMailMergeOpen.h"
-#include <qlayout.h>
-#include <qdom.h>
+#include "KWTQtSqlPowerSerialDataSource.h"
+#include "KWTQtSqlPowerSerialDataSource.moc"
+#include "KWTQtSqlMailMergeOpen.h"
+#include <tqlayout.h>
+#include <tqdom.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <kpushbutton.h>
-#include <qsqldatabase.h>
-#include <qmessagebox.h>
+#include <tqsqldatabase.h>
+#include <tqmessagebox.h>
#include <kpassdlg.h>
-#include <qsqlrecord.h>
-#include <qsqlcursor.h>
-#include <qdatatable.h>
+#include <tqsqlrecord.h>
+#include <tqsqlcursor.h>
+#include <tqdatatable.h>
#include <kdebug.h>
-#define KWQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() )
+#define KWTQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() )
/******************************************************************
*
- * Class: KWQtSqlSerialDataSource
+ * Class: KWTQtSqlSerialDataSource
*
******************************************************************/
-KWQtSqlPowerSerialDataSource::KWQtSqlPowerSerialDataSource(KInstance *inst,QObject *parent)
- : KWQtSqlSerialDataSourceBase(inst,parent),myquery(0)
+KWTQtSqlPowerSerialDataSource::KWTQtSqlPowerSerialDataSource(KInstance *inst,TQObject *tqparent)
+ : KWTQtSqlSerialDataSourceBase(inst,tqparent),myquery(0)
{
port=i18n("default");
}
-KWQtSqlPowerSerialDataSource::~KWQtSqlPowerSerialDataSource()
+KWTQtSqlPowerSerialDataSource::~KWTQtSqlPowerSerialDataSource()
{
if (myquery) delete myquery;
- QSqlDatabase::removeDatabase("KWQTSQLPOWER");
+ TQSqlDatabase::removeDatabase("KWTQTSTQLPOWER");
}
-void KWQtSqlPowerSerialDataSource::refresh(bool force)
+void KWTQtSqlPowerSerialDataSource::refresh(bool force)
{
if ((force) || (myquery==0))
{
@@ -62,16 +62,16 @@ void KWQtSqlPowerSerialDataSource::refresh(bool force)
delete myquery;
myquery=0;
}
- QString tmp=query.upper();
+ TQString tmp=query.upper();
if (!tmp.startsWith("SELECT")) return;
if ((!database) || (!database->isOpen()))openDatabase();
myquery=new KWMySqlCursor(query,true,database);
- myquery->setMode(QSqlCursor::ReadOnly);
+ myquery->setMode(TQSqlCursor::ReadOnly);
}
- kdDebug()<<QString("There were %1 rows in the query").arg(myquery->size())<<endl;
+ kdDebug()<<TQString("There were %1 rows in the query").tqarg(myquery->size())<<endl;
}
-QString KWQtSqlPowerSerialDataSource::getValue( const QString &name, int record ) const
+TQString KWTQtSqlPowerSerialDataSource::getValue( const TQString &name, int record ) const
{
int num=record;
@@ -79,145 +79,145 @@ QString KWQtSqlPowerSerialDataSource::getValue( const QString &name, int record
if ( num < 0 || num > (int)myquery->size() )
return name;
if (!myquery->seek(num,false)) return i18n(">>>Illegal position within datasource<<<");
- if (!myquery->contains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").arg(name);
+ if (!myquery->tqcontains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").tqarg(name);
return (myquery->value(name)).toString();
}
-void KWQtSqlPowerSerialDataSource::save( QDomDocument &doc, QDomElement &parent)
+void KWTQtSqlPowerSerialDataSource::save( TQDomDocument &doc, TQDomElement &tqparent)
{
- QDomElement def=doc.createElement(QString::fromLatin1("DEFINITION"));
- parent.appendChild(def);
+ TQDomElement def=doc.createElement(TQString::tqfromLatin1("DEFINITION"));
+ tqparent.appendChild(def);
{
- QDomElement defEnt=doc.createElement(QString::fromLatin1("DATABASE"));
- defEnt.setAttribute(QString::fromLatin1("hostname"),hostname);
- defEnt.setAttribute(QString::fromLatin1("port"),port);
- defEnt.setAttribute(QString::fromLatin1("driver"),driver);
- defEnt.setAttribute(QString::fromLatin1("databasename"),databasename);
- defEnt.setAttribute(QString::fromLatin1("username"),username);
+ TQDomElement defEnt=doc.createElement(TQString::tqfromLatin1("DATABASE"));
+ defEnt.setAttribute(TQString::tqfromLatin1("hostname"),hostname);
+ defEnt.setAttribute(TQString::tqfromLatin1("port"),port);
+ defEnt.setAttribute(TQString::tqfromLatin1("driver"),driver);
+ defEnt.setAttribute(TQString::tqfromLatin1("databasename"),databasename);
+ defEnt.setAttribute(TQString::tqfromLatin1("username"),username);
def.appendChild(defEnt);
- defEnt=doc.createElement(QString::fromLatin1("QUERY"));
- defEnt.setAttribute(QString::fromLatin1("value"),query);
+ defEnt=doc.createElement(TQString::tqfromLatin1("TQUERY"));
+ defEnt.setAttribute(TQString::tqfromLatin1("value"),query);
def.appendChild(defEnt);
- QDomElement sampleEnt=doc.createElement(QString::fromLatin1("SAMPLERECORD"));
- parent.appendChild(sampleEnt);
+ TQDomElement sampleEnt=doc.createElement(TQString::tqfromLatin1("SAMPLERECORD"));
+ tqparent.appendChild(sampleEnt);
for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it)
{
- QDomElement fieldEnt=doc.createElement(QString::fromLatin1("FIELD"));
- fieldEnt.setAttribute(QString::fromLatin1("name"),it.key());
+ TQDomElement fieldEnt=doc.createElement(TQString::tqfromLatin1("FIELD"));
+ fieldEnt.setAttribute(TQString::tqfromLatin1("name"),it.key());
sampleEnt.appendChild(fieldEnt);
}
}
}
-void KWQtSqlPowerSerialDataSource::load( QDomElement& parentElem )
+void KWTQtSqlPowerSerialDataSource::load( TQDomElement& tqparentElem )
{
clearSampleRecord();
- QDomNode defNd=parentElem.namedItem("DEFINITION");
+ TQDomNode defNd=tqparentElem.namedItem("DEFINITION");
if (!defNd.isNull())
{
- QDomElement def=defNd.toElement();
- QDomNode dbNd=def.namedItem("DATABASE");
+ TQDomElement def=defNd.toElement();
+ TQDomNode dbNd=def.namedItem("DATABASE");
if (!dbNd.isNull())
{
- QDomElement dbEnt=dbNd.toElement();
- if (dbEnt.tagName()==QString::fromLatin1("DATABASE"))
+ TQDomElement dbEnt=dbNd.toElement();
+ if (dbEnt.tagName()==TQString::tqfromLatin1("DATABASE"))
{
- hostname=dbEnt.attribute(QString::fromLatin1("hostname"));
- port=dbEnt.attribute(QString::fromLatin1("port"));
- driver=dbEnt.attribute(QString::fromLatin1("driver"));
- databasename=dbEnt.attribute(QString::fromLatin1("databasename"));
- username=dbEnt.attribute(QString::fromLatin1("username"));
+ hostname=dbEnt.attribute(TQString::tqfromLatin1("hostname"));
+ port=dbEnt.attribute(TQString::tqfromLatin1("port"));
+ driver=dbEnt.attribute(TQString::tqfromLatin1("driver"));
+ databasename=dbEnt.attribute(TQString::tqfromLatin1("databasename"));
+ username=dbEnt.attribute(TQString::tqfromLatin1("username"));
}
}
- QDomNode queryNd=def.namedItem("QUERY");
+ TQDomNode queryNd=def.namedItem("TQUERY");
if (!queryNd.isNull())
{
- query=queryNd.toElement().attribute(QString::fromLatin1("value"));
+ query=queryNd.toElement().attribute(TQString::tqfromLatin1("value"));
}
}
- defNd=parentElem.namedItem("SAMPLERECORD");
+ defNd=tqparentElem.namedItem("SAMPLERECORD");
if (!defNd.isNull())
{
- QDomElement def1=defNd.toElement();
- for (QDomElement defEnt=defNd.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
+ TQDomElement def1=defNd.toElement();
+ for (TQDomElement defEnt=defNd.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
{
- addSampleRecordEntry(defEnt.attribute(QString::fromLatin1("name")));
+ addSampleRecordEntry(defEnt.attribute(TQString::tqfromLatin1("name")));
}
}
}
-bool KWQtSqlPowerSerialDataSource::showConfigDialog(QWidget *par,int action)
+bool KWTQtSqlPowerSerialDataSource::showConfigDialog(TQWidget *par,int action)
{
bool ret=false;
if (action==KWSLEdit)
{
if ((!database) || (!database->isOpen()))openDatabase();
- KWQtSqlPowerMailMergeEditor *dia=new KWQtSqlPowerMailMergeEditor(par,this);
+ KWTQtSqlPowerMailMergeEditor *dia=new KWTQtSqlPowerMailMergeEditor(par,this);
ret=dia->exec();
delete dia;
}
- else ret=KWQtSqlSerialDataSourceBase::showConfigDialog(par,action);
+ else ret=KWTQtSqlSerialDataSourceBase::showConfigDialog(par,action);
return ret;
}
-void KWQtSqlPowerSerialDataSource::clearSampleRecord() {sampleRecord.clear();}
+void KWTQtSqlPowerSerialDataSource::clearSampleRecord() {sampleRecord.clear();}
-void KWQtSqlPowerSerialDataSource::addSampleRecordEntry(QString name)
+void KWTQtSqlPowerSerialDataSource::addSampleRecordEntry(TQString name)
{sampleRecord[name]=name; }//i18n("No Value");}
/******************************************************************
*
- * Class: KWQtSqlMailMergeEditor
+ * Class: KWTQtSqlMailMergeEditor
*
******************************************************************/
-KWQtSqlPowerMailMergeEditor::KWQtSqlPowerMailMergeEditor( QWidget *parent, KWQtSqlPowerSerialDataSource *db_ )
- :KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, parent, "", true ), db( db_ )
+KWTQtSqlPowerMailMergeEditor::KWTQtSqlPowerMailMergeEditor( TQWidget *tqparent, KWTQtSqlPowerSerialDataSource *db_ )
+ :KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, tqparent, "", true ), db( db_ )
{
- (new QVBoxLayout(plainPage()))->setAutoAdd(true);
- setMainWidget(widget=new KWQtSqlPowerWidget(plainPage()));
- connect(widget->setup,SIGNAL(clicked()),this,SLOT(openSetup()));
- connect(widget->tables,SIGNAL(currentChanged(QListBoxItem*)),this,SLOT(slotTableChanged(QListBoxItem*)));
- connect(widget->execute,SIGNAL(clicked()),this,SLOT(slotExecute()));
- connect(this,SIGNAL(okClicked()),this,SLOT(slotSetQuery()));
+ (new TQVBoxLayout(plainPage()))->setAutoAdd(true);
+ setMainWidget(widget=new KWTQtSqlPowerWidget(plainPage()));
+ connect(widget->setup,TQT_SIGNAL(clicked()),this,TQT_SLOT(openSetup()));
+ connect(widget->tables,TQT_SIGNAL(currentChanged(TQListBoxItem*)),this,TQT_SLOT(slotTableChanged(TQListBoxItem*)));
+ connect(widget->execute,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotExecute()));
+ connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(slotSetQuery()));
widget->query->setText(db->query);
updateDBViews();
}
-void KWQtSqlPowerMailMergeEditor::slotSetQuery()
+void KWTQtSqlPowerMailMergeEditor::slotSetQuery()
{
db->query=widget->query->text();
db->refresh(true);
}
-void KWQtSqlPowerMailMergeEditor::slotExecute()
+void KWTQtSqlPowerMailMergeEditor::slotExecute()
{
if (!db->database) if (!db->openDatabase()) return;
- QString tmp=widget->query->text().upper();
+ TQString tmp=widget->query->text().upper();
if (!tmp.startsWith("SELECT")) return;
KWMySqlCursor *cur=new KWMySqlCursor(widget->query->text(),true,db->database);
- cur->setMode(QSqlCursor::ReadOnly);
+ cur->setMode(TQSqlCursor::ReadOnly);
db->clearSampleRecord();
- kdDebug()<<QString("Fieldname count %1").arg(cur->count())<<endl;
+ kdDebug()<<TQString("Fieldname count %1").tqarg(cur->count())<<endl;
for (uint i=0;i<cur->count();i++)
db->addSampleRecordEntry(cur->fieldName(i));
widget->queryresult->setSqlCursor(cur,true,true);
- widget->queryresult->refresh(QDataTable::RefreshAll);
+ widget->queryresult->refresh(TQDataTable::RefreshAll);
}
-void KWQtSqlPowerMailMergeEditor::slotTableChanged ( QListBoxItem * item )
+void KWTQtSqlPowerMailMergeEditor::slotTableChanged ( TQListBoxItem * item )
{
widget->fields->clear();
if (item)
{
if (!db->database) return;
- QSqlRecord rec=db->database->record(item->text());
+ TQSqlRecord rec=db->database->record(item->text());
for (uint i=0;i<rec.count();i++)
{
widget->fields->insertItem(rec.fieldName(i));
@@ -225,9 +225,9 @@ void KWQtSqlPowerMailMergeEditor::slotTableChanged ( QListBoxItem * item )
}
}
-void KWQtSqlPowerMailMergeEditor::openSetup()
+void KWTQtSqlPowerMailMergeEditor::openSetup()
{
- KWQtSqlMailMergeOpen *dia=new KWQtSqlMailMergeOpen(this,db);
+ KWTQtSqlMailMergeOpen *dia=new KWTQtSqlMailMergeOpen(this,db);
if (dia->exec())
{
db->openDatabase();
@@ -237,7 +237,7 @@ void KWQtSqlPowerMailMergeEditor::openSetup()
}
-void KWQtSqlPowerMailMergeEditor::updateDBViews()
+void KWTQtSqlPowerMailMergeEditor::updateDBViews()
{
widget->fields->clear();
widget->tables->clear();
@@ -245,12 +245,12 @@ void KWQtSqlPowerMailMergeEditor::updateDBViews()
widget->tables->insertStringList(db->database->tables());
}
-KWQtSqlPowerMailMergeEditor::~KWQtSqlPowerMailMergeEditor(){;}
+KWTQtSqlPowerMailMergeEditor::~KWTQtSqlPowerMailMergeEditor(){;}
extern "C" {
- KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_qtsqldb_power(KInstance *inst,QObject *parent)
+ KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_qtsqldb_power(KInstance *inst,TQObject *tqparent)
{
- return new KWQtSqlPowerSerialDataSource(inst,parent);
+ return new KWTQtSqlPowerSerialDataSource(inst,tqparent);
}
}
diff --git a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h
index d7587eea..1c36b196 100644
--- a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h
+++ b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h
@@ -17,77 +17,79 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _SERIALLETTER_QtSql_POWER_PLUGIN_H_
-#define _SERIALLETTER_QtSql_POWER_PLUGIN_H_
+#ifndef _SERIALLETTER_TQtSql_POWER_PLUGIN_H_
+#define _SERIALLETTER_TQtSql_POWER_PLUGIN_H_
-#include <qdom.h>
+#include <tqdom.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kdialogbase.h>
-#include <qsqldatabase.h>
+#include <tqsqldatabase.h>
/* FOR THE DIRTY HACK */
-#include <qsqlcursor.h>
-#include <qsqldriver.h>
+#include <tqsqlcursor.h>
+#include <tqsqldriver.h>
/* END FOR THE DIRTY HACK */
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include "defs.h"
#include "KWMailMergeDataSource.h"
-#include "KWQtSqlSerialDataSourceBase.h"
+#include "KWTQtSqlSerialDataSourceBase.h"
#include "kwqtsqlpower.h"
#include "KWMySqlCursor.h"
/******************************************************************
*
- * Class: KWQtSqlSerialDataSource
+ * Class: KWTQtSqlSerialDataSource
*
******************************************************************/
-class KWQtSqlPowerSerialDataSource: public KWQtSqlSerialDataSourceBase
+class KWTQtSqlPowerSerialDataSource: public KWTQtSqlSerialDataSourceBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWQtSqlPowerSerialDataSource(KInstance *inst,QObject *parent);
- ~KWQtSqlPowerSerialDataSource();
+ KWTQtSqlPowerSerialDataSource(KInstance *inst,TQObject *tqparent);
+ ~KWTQtSqlPowerSerialDataSource();
- virtual void save( QDomDocument &doc,QDomElement&);
- virtual void load( QDomElement& elem );
- virtual class QString getValue( const class QString &name, int record = -1 ) const;
+ virtual void save( TQDomDocument &doc,TQDomElement&);
+ virtual void load( TQDomElement& elem );
+ virtual class TQString getValue( const class TQString &name, int record = -1 ) const;
virtual int getNumRecords() const {
return (myquery?((myquery->size()<0)?0:myquery->size()):0);
}
- virtual bool showConfigDialog(QWidget *,int);
+ virtual bool showConfigDialog(TQWidget *,int);
virtual void refresh(bool force);
protected:
- friend class KWQtSqlPowerMailMergeEditor;
- QString query;
+ friend class KWTQtSqlPowerMailMergeEditor;
+ TQString query;
KWMySqlCursor *myquery;
void clearSampleRecord();
- void addSampleRecordEntry(QString name);
+ void addSampleRecordEntry(TQString name);
};
/******************************************************************
*
- * Class: KWQtSqlPowerMailMergeEditor
+ * Class: KWTQtSqlPowerMailMergeEditor
*
******************************************************************/
-class KWQtSqlPowerMailMergeEditor : public KDialogBase
+class KWTQtSqlPowerMailMergeEditor : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWQtSqlPowerMailMergeEditor( QWidget *parent, KWQtSqlPowerSerialDataSource *db_ );
- ~KWQtSqlPowerMailMergeEditor();
+ KWTQtSqlPowerMailMergeEditor( TQWidget *tqparent, KWTQtSqlPowerSerialDataSource *db_ );
+ ~KWTQtSqlPowerMailMergeEditor();
private:
- KWQtSqlPowerSerialDataSource *db;
- KWQtSqlPowerWidget *widget;
+ KWTQtSqlPowerSerialDataSource *db;
+ KWTQtSqlPowerWidget *widget;
private slots:
void openSetup();
void updateDBViews();
- void slotTableChanged ( QListBoxItem * item );
+ void slotTableChanged ( TQListBoxItem * item );
void slotExecute();
void slotSetQuery();
};
diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp b/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp
index 8835bf49..fa5bc8f6 100644
--- a/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp
+++ b/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp
@@ -17,41 +17,41 @@
* Boston, MA 02110-1301, USA.
*/
-#include "KWQtSqlSerialDataSource.h"
-#include "KWQtSqlSerialDataSource.moc"
-#include "KWQtSqlEasyFilter.h"
+#include "KWTQtSqlSerialDataSource.h"
+#include "KWTQtSqlSerialDataSource.moc"
+#include "KWTQtSqlEasyFilter.h"
#include <klocale.h>
-#include <qlayout.h>
-#include <qsqlcursor.h>
-#include <qdatatable.h>
-#include <qcheckbox.h>
-#include <qsqlrecord.h>
-#include <qsqlquery.h>
+#include <tqlayout.h>
+#include <tqsqlcursor.h>
+#include <tqdatatable.h>
+#include <tqcheckbox.h>
+#include <tqsqlrecord.h>
+#include <tqsqlquery.h>
#include <kdebug.h>
-#define KWQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() )
+#define KWTQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() )
/******************************************************************
*
- * Class: KWQtSqlSerialDataSource
+ * Class: KWTQtSqlSerialDataSource
*
******************************************************************/
-KWQtSqlSerialDataSource::KWQtSqlSerialDataSource(KInstance *inst,QObject *parent)
- : KWQtSqlSerialDataSourceBase(inst,parent)
+KWTQtSqlSerialDataSource::KWTQtSqlSerialDataSource(KInstance *inst,TQObject *tqparent)
+ : KWTQtSqlSerialDataSourceBase(inst,tqparent)
{
myquery=0;
}
-KWQtSqlSerialDataSource::~KWQtSqlSerialDataSource()
+KWTQtSqlSerialDataSource::~KWTQtSqlSerialDataSource()
{
delete myquery;
- QSqlDatabase::removeDatabase("KWQTSQLPOWER");
+ TQSqlDatabase::removeDatabase("KWTQTSTQLPOWER");
}
-QString KWQtSqlSerialDataSource::getValue( const QString &name, int record ) const
+TQString KWTQtSqlSerialDataSource::getValue( const TQString &name, int record ) const
{
int num=record;
@@ -59,79 +59,79 @@ QString KWQtSqlSerialDataSource::getValue( const QString &name, int record ) con
if ( num < 0 || num > (int)myquery->size() )
return name;
if (!myquery->seek(num,false)) return i18n(">>>Illegal position within datasource<<<");
- if (!myquery->contains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").arg(name);
+ if (!myquery->tqcontains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").tqarg(name);
return (myquery->value(name)).toString();
}
-void KWQtSqlSerialDataSource::save( QDomDocument & /*doc*/, QDomElement & /*parent*/)
+void KWTQtSqlSerialDataSource::save( TQDomDocument & /*doc*/, TQDomElement & /*tqparent*/)
{
/*
- QDomElement def=doc.createElement(QString::fromLatin1("DEFINITION"));
- parent.appendChild(def);
+ TQDomElement def=doc.createElement(TQString::tqfromLatin1("DEFINITION"));
+ tqparent.appendChild(def);
for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it)
{
- QDomElement defEnt=doc.createElement(QString::fromLatin1("FIELD"));
- defEnt.setAttribute(QString::fromLatin1("name"),it.key());
+ TQDomElement defEnt=doc.createElement(TQString::tqfromLatin1("FIELD"));
+ defEnt.setAttribute(TQString::tqfromLatin1("name"),it.key());
def.appendChild(defEnt);
}
- QDomElement cont=doc.createElement(QString::fromLatin1("CONTENT"));
- parent.appendChild(cont);
+ TQDomElement cont=doc.createElement(TQString::tqfromLatin1("CONTENT"));
+ tqparent.appendChild(cont);
for (Db::Iterator dbI=db.begin();dbI!=db.end();++dbI)
{
- QDomElement rec=doc.createElement(QString::fromLatin1("RECORD"));
+ TQDomElement rec=doc.createElement(TQString::tqfromLatin1("RECORD"));
cont.appendChild(rec);
for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it)
{
- QDomElement recEnt=doc.createElement(QString::fromLatin1("ITEM"));
- recEnt.setAttribute(QString::fromLatin1("name"),it.key());
- recEnt.setAttribute(QString::fromLatin1("data"),(*dbI)[it.key()]);
+ TQDomElement recEnt=doc.createElement(TQString::tqfromLatin1("ITEM"));
+ recEnt.setAttribute(TQString::tqfromLatin1("name"),it.key());
+ recEnt.setAttribute(TQString::tqfromLatin1("data"),(*dbI)[it.key()]);
rec.appendChild(recEnt);
}
}
*/
}
-void KWQtSqlSerialDataSource::load( QDomElement& /*parentElem*/ )
+void KWTQtSqlSerialDataSource::load( TQDomElement& /*tqparentElem*/ )
{
/*
db.clear();
sampleRecord.clear();
- QDomNode defNd=parentElem.namedItem("DEFINITION");
+ TQDomNode defNd=tqparentElem.namedItem("DEFINITION");
if (defNd.isNull()) return;
- QDomElement def=defNd.toElement();
- for (QDomElement defEnt=def.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
+ TQDomElement def=defNd.toElement();
+ for (TQDomElement defEnt=def.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
{
- sampleRecord[defEnt.attribute(QString::fromLatin1("name"))]=defEnt.attribute(QString::fromLatin1("name"));//i18n( "No Value" );
+ sampleRecord[defEnt.attribute(TQString::tqfromLatin1("name"))]=defEnt.attribute(TQString::tqfromLatin1("name"));//i18n( "No Value" );
}
- QDomNode contNd=parentElem.namedItem("CONTENT");
+ TQDomNode contNd=tqparentElem.namedItem("CONTENT");
if (contNd.isNull()) return;
- for (QDomNode rec=contNd.firstChild();!rec.isNull();rec=rec.nextSibling())
+ for (TQDomNode rec=contNd.firstChild();!rec.isNull();rec=rec.nextSibling())
{
appendRecord();
- for (QDomElement recEnt=rec.firstChild().toElement();!recEnt.isNull();recEnt=recEnt.nextSibling().toElement())
+ for (TQDomElement recEnt=rec.firstChild().toElement();!recEnt.isNull();recEnt=recEnt.nextSibling().toElement())
{
- setValue(recEnt.attribute(QString::fromLatin1("name")),
- recEnt.attribute(QString::fromLatin1("data")),db.count()-1);
+ setValue(recEnt.attribute(TQString::tqfromLatin1("name")),
+ recEnt.attribute(TQString::tqfromLatin1("data")),db.count()-1);
}
}
*/
}
-bool KWQtSqlSerialDataSource::showConfigDialog(QWidget *par,int action)
+bool KWTQtSqlSerialDataSource::showConfigDialog(TQWidget *par,int action)
{
bool ret=false;
if (action==KWSLEdit)
{
- KWQtSqlDataSourceEditor *dia=new KWQtSqlDataSourceEditor(par,this);
+ KWTQtSqlDataSourceEditor *dia=new KWTQtSqlDataSourceEditor(par,this);
ret=dia->exec();
delete dia;
}
- else ret=KWQtSqlSerialDataSourceBase::showConfigDialog(par,action);
+ else ret=KWTQtSqlSerialDataSourceBase::showConfigDialog(par,action);
return ret;
}
-void KWQtSqlSerialDataSource::refresh(bool force)
+void KWTQtSqlSerialDataSource::refresh(bool force)
{
if ((force) || (myquery==0))
{
@@ -142,11 +142,11 @@ void KWQtSqlSerialDataSource::refresh(bool force)
}
if ((!database) || (!database->isOpen())) openDatabase();
if ((!database) || (!database->isOpen())) return;
- myquery=new QSqlCursor(tableName,true,database);
- myquery->setMode(QSqlCursor::ReadOnly);
+ myquery=new TQSqlCursor(tableName,true,database);
+ myquery->setMode(TQSqlCursor::ReadOnly);
myquery->select(filter);
}
- kdDebug()<<QString("There were %1 rows in the query").arg(myquery->size())<<endl;
+ kdDebug()<<TQString("There were %1 rows in the query").tqarg(myquery->size())<<endl;
}
@@ -156,39 +156,39 @@ void KWQtSqlSerialDataSource::refresh(bool force)
/******************************************************************
*
- * Class: KWQtSqlDataSourceEditor
+ * Class: KWTQtSqlDataSourceEditor
*
******************************************************************/
-KWQtSqlDataSourceEditor::KWQtSqlDataSourceEditor( QWidget *parent, KWQtSqlSerialDataSource *db_ )
- :KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, parent, "", true ), db( db_ )
+KWTQtSqlDataSourceEditor::KWTQtSqlDataSourceEditor( TQWidget *tqparent, KWTQtSqlSerialDataSource *db_ )
+ :KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, tqparent, "", true ), db( db_ )
{
tableName=db->tableName;
filter=db->filter;
- (new QVBoxLayout(plainPage()))->setAutoAdd(true);
- setMainWidget(widget=new QtSqlDataSourceEditor(plainPage()));
- connect(widget->tableCombo,SIGNAL(activated(int)),this,SLOT(tableChanged(int)));
- connect(widget->editFilter,SIGNAL(clicked()),this,SLOT(editFilter()));
+ (new TQVBoxLayout(plainPage()))->setAutoAdd(true);
+ setMainWidget(widget=new TQtSqlDataSourceEditor(plainPage()));
+ connect(widget->tableCombo,TQT_SIGNAL(activated(int)),this,TQT_SLOT(tableChanged(int)));
+ connect(widget->editFilter,TQT_SIGNAL(clicked()),this,TQT_SLOT(editFilter()));
updateTableCombo();
-// connect(this,SIGNAL(okClicked()),this,SLOT(slotSetQuery()));
+// connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(slotSetQuery()));
}
-void KWQtSqlDataSourceEditor::tableChanged(int item)
+void KWTQtSqlDataSourceEditor::tableChanged(int item)
{
tableName=widget->tableCombo->text(item);
- QSqlCursor *tmpCursor=new QSqlCursor(tableName,true,db->database);
- tmpCursor->setMode(QSqlCursor::ReadOnly);
+ TQSqlCursor *tmpCursor=new TQSqlCursor(tableName,true,db->database);
+ tmpCursor->setMode(TQSqlCursor::ReadOnly);
if (widget->filterCheckBox->isChecked()) tmpCursor->select(filter);
widget->DataTable->setSqlCursor(tmpCursor,true,true);
- widget->DataTable->refresh(QDataTable::RefreshAll);
+ widget->DataTable->refresh(TQDataTable::RefreshAll);
}
-void KWQtSqlDataSourceEditor::updateTableCombo()
+void KWTQtSqlDataSourceEditor::updateTableCombo()
{
widget->tableCombo->clear();
if (!db->database) return;
@@ -196,7 +196,7 @@ void KWQtSqlDataSourceEditor::updateTableCombo()
widget->tableCombo->insertStringList(db->database->tables());
}
-void KWQtSqlDataSourceEditor::slotSetQuery()
+void KWTQtSqlDataSourceEditor::slotSetQuery()
{
db->tableName=tableName;
db->filter=filter;
@@ -204,15 +204,15 @@ void KWQtSqlDataSourceEditor::slotSetQuery()
}
-void KWQtSqlDataSourceEditor::editFilter()
+void KWTQtSqlDataSourceEditor::editFilter()
{
- KWQtSqlEasyFilter *f=new KWQtSqlEasyFilter(static_cast<QWidget*>(parent()));
+ KWTQtSqlEasyFilter *f=new KWTQtSqlEasyFilter(static_cast<TQWidget*>(tqparent()));
f->exec();
}
extern "C" {
- KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_qtsqldb(KInstance *inst,QObject *parent)
+ KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_qtsqldb(KInstance *inst,TQObject *tqparent)
{
- return new KWQtSqlSerialDataSource(inst,parent);
+ return new KWTQtSqlSerialDataSource(inst,tqparent);
}
}
diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSource.h b/kword/mailmerge/sql/KWQtSqlSerialDataSource.h
index e2051a2f..c415c19c 100644
--- a/kword/mailmerge/sql/KWQtSqlSerialDataSource.h
+++ b/kword/mailmerge/sql/KWQtSqlSerialDataSource.h
@@ -17,63 +17,64 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _SERIALLETTER_QtSql_PLUGIN_H_
-#define _SERIALLETTER_QtSql_PLUGIN_H_
+#ifndef _SERIALLETTER_TQtSql_PLUGIN_H_
+#define _SERIALLETTER_TQtSql_PLUGIN_H_
-#include <qdom.h>
-#include <qsqlcursor.h>
+#include <tqdom.h>
+#include <tqsqlcursor.h>
#include "KWMailMergeDataSource.h"
-#include "KWQtSqlSerialDataSourceBase.h"
-#include "qtsqldatasourceeditor.h"
+#include "KWTQtSqlSerialDataSourceBase.h"
+#include "tqtsqldatasourceeditor.h"
/******************************************************************
*
- * Class: KWQtSqlSerialDataSource
+ * Class: KWTQtSqlSerialDataSource
*
******************************************************************/
-class KWQtSqlSerialDataSource: public KWQtSqlSerialDataSourceBase
+class KWTQtSqlSerialDataSource: public KWTQtSqlSerialDataSourceBase
{
public:
- KWQtSqlSerialDataSource(KInstance *inst,QObject *parent);
- ~KWQtSqlSerialDataSource();
+ KWTQtSqlSerialDataSource(KInstance *inst,TQObject *tqparent);
+ ~KWTQtSqlSerialDataSource();
- virtual void save( QDomDocument &doc,QDomElement&);
- virtual void load( QDomElement& elem );
- virtual class QString getValue( const class QString &name, int record = -1 ) const;
+ virtual void save( TQDomDocument &doc,TQDomElement&);
+ virtual void load( TQDomElement& elem );
+ virtual class TQString getValue( const class TQString &name, int record = -1 ) const;
virtual int getNumRecords() const {
return (myquery?((myquery->size()<0)?0:myquery->size()):0);
}
virtual void refresh(bool);
- virtual bool showConfigDialog(QWidget *,int);
+ virtual bool showConfigDialog(TQWidget *,int);
protected:
- friend class KWQtSqlDataSourceEditor;
- QString tableName;
- QString filter;
- QSqlCursor *myquery;
+ friend class KWTQtSqlDataSourceEditor;
+ TQString tableName;
+ TQString filter;
+ TQSqlCursor *myquery;
};
/******************************************************************
*
- * Class: KWQtSqlDataSourceEditor
+ * Class: KWTQtSqlDataSourceEditor
*
******************************************************************/
-class KWQtSqlDataSourceEditor : public KDialogBase
+class KWTQtSqlDataSourceEditor : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWQtSqlDataSourceEditor( QWidget *parent, KWQtSqlSerialDataSource *db_ );
- ~KWQtSqlDataSourceEditor(){;}
+ KWTQtSqlDataSourceEditor( TQWidget *tqparent, KWTQtSqlSerialDataSource *db_ );
+ ~KWTQtSqlDataSourceEditor(){;}
private:
- KWQtSqlSerialDataSource *db;
- QtSqlDataSourceEditor *widget;
+ KWTQtSqlSerialDataSource *db;
+ TQtSqlDataSourceEditor *widget;
void updateTableCombo();
- QString filter;
- QString tableName;
+ TQString filter;
+ TQString tableName;
private slots:
void tableChanged(int);
diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp
index 781c1ab5..ddb32794 100644
--- a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp
+++ b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp
@@ -17,20 +17,20 @@
* Boston, MA 02110-1301, USA.
*/
-#include "KWQtSqlSerialDataSourceBase.h"
-#include "KWQtSqlSerialDataSourceBase.moc"
-#include "KWQtSqlMailMergeOpen.h"
-#include <qlayout.h>
-#include <qdom.h>
+#include "KWTQtSqlSerialDataSourceBase.h"
+#include "KWTQtSqlSerialDataSourceBase.moc"
+#include "KWTQtSqlMailMergeOpen.h"
+#include <tqlayout.h>
+#include <tqdom.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <kpushbutton.h>
-#include <qsqldatabase.h>
-#include <qmessagebox.h>
+#include <tqsqldatabase.h>
+#include <tqmessagebox.h>
#include <kpassdlg.h>
-#include <qsqlrecord.h>
-#include <qsqlcursor.h>
-#include <qdatatable.h>
+#include <tqsqlrecord.h>
+#include <tqsqlcursor.h>
+#include <tqdatatable.h>
#include <kdebug.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -40,31 +40,31 @@
/******************************************************************
*
- * Class: KWQtSqlSerialDataSourceBase
+ * Class: KWTQtSqlSerialDataSourceBase
*
******************************************************************/
-int KWQtSqlSerialDataSourceBase::connectionId=0;
+int KWTQtSqlSerialDataSourceBase::connectionId=0;
-KWQtSqlSerialDataSourceBase::KWQtSqlSerialDataSourceBase(KInstance *inst,QObject *parent)
- : KWMailMergeDataSource(inst,parent)
+KWTQtSqlSerialDataSourceBase::KWTQtSqlSerialDataSourceBase(KInstance *inst,TQObject *tqparent)
+ : KWMailMergeDataSource(inst,tqparent)
{
- DataBaseConnection=QString("KWQTSQLPOWER")+parent->name()+QString("--%1").arg(connectionId++);
+ DataBaseConnection=TQString("KWTQTSTQLPOWER")+tqparent->name()+TQString("--%1").tqarg(connectionId++);
port=i18n("default");
}
-KWQtSqlSerialDataSourceBase::~KWQtSqlSerialDataSourceBase()
+KWTQtSqlSerialDataSourceBase::~KWTQtSqlSerialDataSourceBase()
{
- QSqlDatabase::removeDatabase(DataBaseConnection);
+ TQSqlDatabase::removeDatabase(DataBaseConnection);
}
-bool KWQtSqlSerialDataSourceBase::showConfigDialog(QWidget *par,int action)
+bool KWTQtSqlSerialDataSourceBase::showConfigDialog(TQWidget *par,int action)
{
bool ret=false;
if (action==KWSLOpen)
{
- KWQtSqlMailMergeOpen *dia=new KWQtSqlMailMergeOpen(par,this);
+ KWTQtSqlMailMergeOpen *dia=new KWTQtSqlMailMergeOpen(par,this);
ret=dia->exec();
if (ret) openDatabase();
@@ -73,16 +73,16 @@ bool KWQtSqlSerialDataSourceBase::showConfigDialog(QWidget *par,int action)
return ret;
}
-bool KWQtSqlSerialDataSourceBase::openDatabase()
+bool KWTQtSqlSerialDataSourceBase::openDatabase()
{
- QCString pwd;
- QSqlDatabase::removeDatabase(DataBaseConnection);
- database=QSqlDatabase::addDatabase(driver,DataBaseConnection);
+ TQCString pwd;
+ TQSqlDatabase::removeDatabase(DataBaseConnection);
+ database=TQSqlDatabase::addDatabase(driver,DataBaseConnection);
if (database)
{
- if (database->lastError().type()!=QSqlError::None)
+ if (database->lastError().type()!=TQSqlError::None)
{
- QMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),QMessageBox::Abort,QMessageBox::NoButton,QMessageBox::NoButton);
+ TQMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),TQMessageBox::Abort,TQMessageBox::NoButton,TQMessageBox::NoButton);
return false;
}
database->setDatabaseName(databasename);
@@ -97,9 +97,9 @@ bool KWQtSqlSerialDataSourceBase::openDatabase()
{
return true;
}
- QMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),QMessageBox::Abort,QMessageBox::NoButton,QMessageBox::NoButton);
+ TQMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),TQMessageBox::Abort,TQMessageBox::NoButton,TQMessageBox::NoButton);
return false;
}
- QMessageBox::critical(0,i18n("Error"),i18n("Unable to create database object"),QMessageBox::Abort,QMessageBox::NoButton,QMessageBox::NoButton);
+ TQMessageBox::critical(0,i18n("Error"),i18n("Unable to create database object"),TQMessageBox::Abort,TQMessageBox::NoButton,TQMessageBox::NoButton);
return false;
}
diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h
index 0e4586c3..a0705bdf 100644
--- a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h
+++ b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h
@@ -17,43 +17,44 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _SERIALLETTER_QtSql_BASE_H_
-#define _SERIALLETTER_QtSql_BASE_H_
+#ifndef _SERIALLETTER_TQtSql_BASE_H_
+#define _SERIALLETTER_TQtSql_BASE_H_
-#include <qdom.h>
+#include <tqdom.h>
#include <kdialogbase.h>
-#include <qsqldatabase.h>
-#include <qguardedptr.h>
+#include <tqsqldatabase.h>
+#include <tqguardedptr.h>
#include "KWMailMergeDataSource.h"
-#include "qtsqlopenwidget.h"
+#include "tqtsqlopenwidget.h"
/******************************************************************
*
- * Class: KWQtSqlSerialDataSourceBase
+ * Class: KWTQtSqlSerialDataSourceBase
*
******************************************************************/
-class KWQtSqlSerialDataSourceBase: public KWMailMergeDataSource
+class KWTQtSqlSerialDataSourceBase: public KWMailMergeDataSource
{
Q_OBJECT
+ TQ_OBJECT
K_DCOP
public:
- KWQtSqlSerialDataSourceBase(KInstance *inst,QObject *parent);
- ~KWQtSqlSerialDataSourceBase();
+ KWTQtSqlSerialDataSourceBase(KInstance *inst,TQObject *tqparent);
+ ~KWTQtSqlSerialDataSourceBase();
- virtual bool showConfigDialog(QWidget *par,int action);
+ virtual bool showConfigDialog(TQWidget *par,int action);
protected:
- friend class KWQtSqlMailMergeOpen;
- QString hostname;
- QString username;
- QString driver;
- QString port;
- QString databasename;
- QGuardedPtr<QSqlDatabase> database;
- QString DataBaseConnection;
+ friend class KWTQtSqlMailMergeOpen;
+ TQString hostname;
+ TQString username;
+ TQString driver;
+ TQString port;
+ TQString databasename;
+ TQGuardedPtr<TQSqlDatabase> database;
+ TQString DataBaseConnection;
static int connectionId;
k_dcop:
bool openDatabase();
diff --git a/kword/mailmerge/sql/kwqtsqlpower.ui b/kword/mailmerge/sql/kwqtsqlpower.ui
index 4979166e..bd579f81 100644
--- a/kword/mailmerge/sql/kwqtsqlpower.ui
+++ b/kword/mailmerge/sql/kwqtsqlpower.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>KWQtSqlPowerWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KWQtSqlPowerWidget</cstring>
</property>
@@ -25,7 +25,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>GroupBox3</cstring>
</property>
@@ -54,7 +54,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>120</height>
@@ -73,14 +73,14 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>120</height>
</size>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1_2</cstring>
</property>
@@ -91,7 +91,7 @@
<cstring>tables</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
@@ -104,7 +104,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>GroupBox6</cstring>
</property>
@@ -121,7 +121,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QDataTable">
+ <widget class="TQDataTable">
<property name="name">
<cstring>queryresult</cstring>
</property>
@@ -131,7 +131,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout11</cstring>
</property>
@@ -145,7 +145,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
@@ -168,7 +168,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>300</width>
<height>0</height>
@@ -196,7 +196,7 @@
<property name="name">
<cstring>Line2</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -229,5 +229,5 @@
<include location="global" impldecl="in declaration">klistbox.h</include>
<include location="global" impldecl="in declaration">kpushbutton.h</include>
</includes>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kword/mailmerge/sql/qtsqldatasourceeditor.ui b/kword/mailmerge/sql/qtsqldatasourceeditor.ui
index d0ad9902..a22ae687 100644
--- a/kword/mailmerge/sql/qtsqldatasourceeditor.ui
+++ b/kword/mailmerge/sql/qtsqldatasourceeditor.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>QtSqlDataSourceEditor</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>QtSqlDataSourceEditor</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout5</cstring>
</property>
@@ -36,7 +36,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
@@ -47,12 +47,12 @@
<cstring>tableCombo</cstring>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>tableCombo</cstring>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>filterCheckBox</cstring>
</property>
@@ -60,7 +60,7 @@
<string>&amp;Filter output</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>editFilter</cstring>
</property>
@@ -95,7 +95,7 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout6</cstring>
</property>
@@ -109,7 +109,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
@@ -133,7 +133,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QDataTable">
+ <widget class="TQDataTable">
<property name="name">
<cstring>DataTable</cstring>
</property>
@@ -151,8 +151,8 @@
<includes>
<include location="local" impldecl="in implementation">qtsqldatasourceeditor.ui.h</include>
</includes>
-<slots>
+<Q_SLOTS>
<slot>filterCheckBox_toggled( bool fcb_state )</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h b/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h
index 23d90812..160596f6 100644
--- a/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h
+++ b/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h
@@ -1,13 +1,13 @@
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
-** If you wish to add, delete or rename slots use Qt Designer which will
+** If you wish to add, delete or rename slots use TQt Designer which will
** update this file, preserving your code. Create an init() slot in place of
** a constructor, and a destroy() slot in place of a destructor.
*****************************************************************************/
-void QtSqlDataSourceEditor::filterCheckBox_toggled( bool fcb_state )
+void TQtSqlDataSourceEditor::filterCheckBox_toggled( bool fcb_state )
{
editFilter->setEnabled(fcb_state);
}
diff --git a/kword/mailmerge/sql/qtsqlopenwidget.ui b/kword/mailmerge/sql/qtsqlopenwidget.ui
index 1b635131..80c190b3 100644
--- a/kword/mailmerge/sql/qtsqlopenwidget.ui
+++ b/kword/mailmerge/sql/qtsqlopenwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>KWQtSqlOpenWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KWQtSqlOpenWidget</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout10</cstring>
</property>
@@ -36,7 +36,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>savedProperties</cstring>
</property>
@@ -67,7 +67,7 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
@@ -84,7 +84,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout8</cstring>
</property>
@@ -98,7 +98,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout7</cstring>
</property>
@@ -112,7 +112,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
@@ -131,7 +131,7 @@
<cstring>hostname</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel2_2</cstring>
</property>
@@ -150,7 +150,7 @@
<cstring>drivers</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
@@ -169,7 +169,7 @@
<cstring>databasename</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
@@ -188,7 +188,7 @@
<cstring>username</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
@@ -209,7 +209,7 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout6</cstring>
</property>
@@ -283,7 +283,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -297,5 +297,5 @@
<include location="global" impldecl="in declaration">kcombobox.h</include>
<include location="global" impldecl="in declaration">kpushbutton.h</include>
</includes>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kword/tests/FrameTester.cpp b/kword/tests/FrameTester.cpp
index 0a088674..9486f05d 100644
--- a/kword/tests/FrameTester.cpp
+++ b/kword/tests/FrameTester.cpp
@@ -21,7 +21,7 @@
#include <KWDocument.h>
#include <kunittest/runner.h>
#include <kunittest/module.h>
-#include <qapplication.h>
+#include <tqapplication.h>
using namespace KUnitTest;
@@ -31,7 +31,7 @@ KUNITTEST_MODULE_REGISTER_TESTER(KWFrameTester);
void KWFrameTester::allTests() {
int argc = 0;
char** argv = 0;
- QApplication app( argc, argv ); // needed for KWDocument, due to KWCommandHistory -> KToolBarPopupAction -> QPopupMenu -> QWidget
+ TQApplication app( argc, argv ); // needed for KWDocument, due to KWCommandHistory -> KToolBarPopupAction -> TQPopupMenu -> TQWidget
testSimpleFrame();
testFrameList();
diff --git a/kword/tests/FrameTester.h b/kword/tests/FrameTester.h
index 9c255829..5f9432f9 100644
--- a/kword/tests/FrameTester.h
+++ b/kword/tests/FrameTester.h
@@ -37,7 +37,7 @@ class TestFrameSet : public KWFrameSet {
public:
TestFrameSet( KWDocument* doc = 0 ) : KWFrameSet(doc) {
}
- QDomElement save(QDomElement&, bool) { return QDomElement(); }
+ TQDomElement save(TQDomElement&, bool) { return TQDomElement(); }
void saveOasis( KoXmlWriter&, KoSavingContext&, bool) const { };
void setProtectContent(bool) { }
bool protectContent() const { return true; }
@@ -45,10 +45,10 @@ public:
class TestTextFrameSet : public KWTextFrameSet {
public:
- TestTextFrameSet(KWDocument *doc, const QString name) : KWTextFrameSet(name) {
+ TestTextFrameSet(KWDocument *doc, const TQString name) : KWTextFrameSet(name) {
m_doc = doc;
}
- QDomElement save(QDomElement&, bool) { return QDomElement(); }
+ TQDomElement save(TQDomElement&, bool) { return TQDomElement(); }
void saveOasis( KoXmlWriter&, KoSavingContext&, bool) const { };
void setProtectContent(bool) { }
bool protectContent() const { return true; }
diff --git a/kword/tests/FrameViewTester.cpp b/kword/tests/FrameViewTester.cpp
index 652bc50e..f486e11c 100644
--- a/kword/tests/FrameViewTester.cpp
+++ b/kword/tests/FrameViewTester.cpp
@@ -271,11 +271,11 @@ void KWFrameViewTester::testMouseMeaning() {
for(int y = 50; y <= 100; y += 25) {
for(int offset2=-6; offset2 <= 6; offset2+=6) {
point.setY(y + offset2);
- CHECK(fv->contains(point, true), true);
+ CHECK(fv->tqcontains(point, true), true);
if(x < 50 || x > 100 || y < 50 || y > 100)
- CHECK(fv->contains(point), false);
+ CHECK(fv->tqcontains(point), false);
else
- CHECK(fv->contains(point), true);
+ CHECK(fv->tqcontains(point), true);
if(x > 60 && x < 90 && y > 60 && y < 90)
CHECK(fv->isBorderHit(point), false);
else
@@ -292,4 +292,4 @@ void KWFrameViewTester::testMouseMeaning() {
CHECK(fv->mouseMeaning(point, 0), MEANING_NONE);
}
-// QCursor mouseCursor( const KoPoint &point, int keyState ) const;
+// TQCursor mouseCursor( const KoPoint &point, int keyState ) const;
diff --git a/kword/tests/KWPageManagerTester.cpp b/kword/tests/KWPageManagerTester.cpp
index 9b261d90..641e6534 100644
--- a/kword/tests/KWPageManagerTester.cpp
+++ b/kword/tests/KWPageManagerTester.cpp
@@ -200,11 +200,11 @@ void KWPageManagerTester::removePages() {
void KWPageManagerTester::pageInfo() {
KWPageManager *pageManager = new KWPageManager();
- KoPageLayout layout;
- layout.ptWidth = 300;
- layout.ptHeight = 600;
- layout.format = PG_DIN_A4;
- pageManager->setDefaultPage(layout);
+ KoPageLayout tqlayout;
+ tqlayout.ptWidth = 300;
+ tqlayout.ptHeight = 600;
+ tqlayout.format = PG_DIN_A4;
+ pageManager->setDefaultPage(tqlayout);
pageManager->setStartPage(1);
KWPage *page1 = pageManager->appendPage();
page1->setWidth(100);
@@ -216,19 +216,19 @@ void KWPageManagerTester::pageInfo() {
CHECK(pageManager->topOfPage(3), 300.0);
CHECK(pageManager->bottomOfPage(3), 900.0);
- layout.ptHeight = 500;
- pageManager->setDefaultPage(layout);
+ tqlayout.ptHeight = 500;
+ pageManager->setDefaultPage(tqlayout);
CHECK(pageManager->bottomOfPage(3), 800.0);
page2->setHeight(-1);
CHECK(pageManager->bottomOfPage(3), 1200.0);
- layout.ptTop = 5;
- layout.ptLeft = 6;
- layout.ptBottom = 7;
- layout.ptRight = 8;
- layout.ptBindingSide = -1;
- layout.ptPageEdge = -1;
- pageManager->setDefaultPage(layout);
+ tqlayout.ptTop = 5;
+ tqlayout.ptLeft = 6;
+ tqlayout.ptBottom = 7;
+ tqlayout.ptRight = 8;
+ tqlayout.ptBindingSide = -1;
+ tqlayout.ptPageEdge = -1;
+ pageManager->setDefaultPage(tqlayout);
page2->setTopMargin(9);
page2->setLeftMargin(10);
page2->setBottomMargin(11);