summaryrefslogtreecommitdiffstats
path: root/kword/KWView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kword/KWView.cpp')
-rw-r--r--kword/KWView.cpp1868
1 files changed, 935 insertions, 933 deletions
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 {