summaryrefslogtreecommitdiffstats
path: root/lib/kofficecore
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficecore')
-rw-r--r--lib/kofficecore/KoContainerHandler.cpp12
-rw-r--r--lib/kofficecore/KoDocument.cpp2
-rw-r--r--lib/kofficecore/KoMainWindow.cpp88
-rw-r--r--lib/kofficecore/KoMainWindowIface.cpp2
-rw-r--r--lib/kofficecore/KoView.cpp6
5 files changed, 55 insertions, 55 deletions
diff --git a/lib/kofficecore/KoContainerHandler.cpp b/lib/kofficecore/KoContainerHandler.cpp
index 74c49a7ed..e11654e98 100644
--- a/lib/kofficecore/KoContainerHandler.cpp
+++ b/lib/kofficecore/KoContainerHandler.cpp
@@ -71,7 +71,7 @@ public:
KoPartResizeHandler::KoPartResizeHandler( TQWidget* widget, const TQWMatrix& matrix, KoView* view, KoChild* child,
KoChild::Gadget gadget, const TQPoint& point )
- : KoEventHandler( TQT_TQOBJECT(widget) )
+ : KoEventHandler( widget )
{
child->lock();
d=new KoPartResizeHandlerPrivate(matrix, view, child, gadget, point);
@@ -230,7 +230,7 @@ public:
KoPartMoveHandler::KoPartMoveHandler( TQWidget* widget, const TQWMatrix& matrix, KoView* view, KoChild* child,
const TQPoint& point )
- : KoEventHandler( TQT_TQOBJECT(widget) )
+ : KoEventHandler( widget )
{
child->lock();
d=new KoPartMoveHandlerPrivate(matrix, view, child, point);
@@ -274,7 +274,7 @@ bool KoPartMoveHandler::eventFilter( TQObject*, TQEvent* ev )
// -------------------------------------------------------
KoContainerHandler::KoContainerHandler( KoView* view, TQWidget* widget )
- : KoEventHandler( TQT_TQOBJECT(widget) )
+ : KoEventHandler( widget )
{
m_view = view;
}
@@ -312,19 +312,19 @@ bool KoContainerHandler::eventFilter( TQObject*, TQEvent* ev )
}
else if ( e->button() == TQt::LeftButton && gadget == KoChild::Move )
{
- (void)new KoPartMoveHandler( TQT_TQWIDGET(target()), m_view->matrix(), m_view, ch, pos );
+ (void)new KoPartMoveHandler( static_cast<TQWidget*>(target()), m_view->matrix(), m_view, ch, pos );
return true;
}
else if ( e->button() == TQt::LeftButton && gadget != KoChild::NoGadget )
{
- (void)new KoPartResizeHandler( TQT_TQWIDGET(target()), m_view->matrix(), m_view, ch, gadget, pos );
+ (void)new KoPartResizeHandler( static_cast<TQWidget*>(target()), m_view->matrix(), m_view, ch, gadget, pos );
return true;
}
return false;
}
else if ( ev->type() == TQEvent::MouseMove )
{
- TQWidget *targetWidget = TQT_TQWIDGET( target() );
+ TQWidget *targetWidget = static_cast<TQWidget*>( target() );
KoChild::Gadget gadget;
TQPoint pos;
TQMouseEvent *e=static_cast<TQMouseEvent*>(ev);
diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp
index 99bd84590..6a6331de6 100644
--- a/lib/kofficecore/KoDocument.cpp
+++ b/lib/kofficecore/KoDocument.cpp
@@ -184,7 +184,7 @@ public:
{
TQObject *wid = child( 0, "TQWidget" );
if ( wid )
- TQT_TQWIDGET(wid)->setGeometry( 0, 0, width(), height() );
+ static_cast<TQWidget*>(wid)->setGeometry( 0, 0, width(), height() );
}
virtual void childEvent( TQChildEvent *ev )
diff --git a/lib/kofficecore/KoMainWindow.cpp b/lib/kofficecore/KoMainWindow.cpp
index a16755140..c2680b44d 100644
--- a/lib/kofficecore/KoMainWindow.cpp
+++ b/lib/kofficecore/KoMainWindow.cpp
@@ -193,7 +193,7 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name )
d->m_manager = new KoPartManager( this );
connect( d->m_manager, TQT_SIGNAL( activePartChanged( KParts::Part * ) ),
- TQT_TQOBJECT(this), TQT_SLOT( slotActivePartChanged( KParts::Part * ) ) );
+ this, TQT_SLOT( slotActivePartChanged( KParts::Part * ) ) );
if ( instance )
setInstance( instance, false ); // don't load plugins! we don't want
@@ -205,41 +205,41 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name )
setXMLFile( findMostRecentXMLFile( allFiles, doc ) );
setLocalXMLFile( locateLocal( "data", "koffice/koffice_shell.rc" ) );
- KStdAction::openNew( TQT_TQOBJECT(this), TQT_SLOT( slotFileNew() ), actionCollection(), "file_new" );
- KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen() ), actionCollection(), "file_open" );
- m_recent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection() );
- d->m_paSave = KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT( slotFileSave() ), actionCollection(), "file_save" );
- d->m_paSaveAs = KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT( slotFileSaveAs() ), actionCollection(), "file_save_as" );
- d->m_paPrint = KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT( slotFilePrint() ), actionCollection(), "file_print" );
- d->m_paPrintPreview = KStdAction::printPreview( TQT_TQOBJECT(this), TQT_SLOT( slotFilePrintPreview() ), actionCollection(), "file_print_preview" );
- d->m_sendfile = KStdAction::mail( TQT_TQOBJECT(this), TQT_SLOT( slotEmailFile() ), actionCollection(), "file_send_file");
+ KStdAction::openNew( this, TQT_SLOT( slotFileNew() ), actionCollection(), "file_new" );
+ KStdAction::open( this, TQT_SLOT( slotFileOpen() ), actionCollection(), "file_open" );
+ m_recent = KStdAction::openRecent( this, TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection() );
+ d->m_paSave = KStdAction::save( this, TQT_SLOT( slotFileSave() ), actionCollection(), "file_save" );
+ d->m_paSaveAs = KStdAction::saveAs( this, TQT_SLOT( slotFileSaveAs() ), actionCollection(), "file_save_as" );
+ d->m_paPrint = KStdAction::print( this, TQT_SLOT( slotFilePrint() ), actionCollection(), "file_print" );
+ d->m_paPrintPreview = KStdAction::printPreview( this, TQT_SLOT( slotFilePrintPreview() ), actionCollection(), "file_print_preview" );
+ d->m_sendfile = KStdAction::mail( this, TQT_SLOT( slotEmailFile() ), actionCollection(), "file_send_file");
- d->m_paCloseFile = KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT( slotFileClose() ), actionCollection(), "file_close" );
- KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( slotFileQuit() ), actionCollection(), "file_quit" );
+ d->m_paCloseFile = KStdAction::close( this, TQT_SLOT( slotFileClose() ), actionCollection(), "file_close" );
+ KStdAction::quit( this, TQT_SLOT( slotFileQuit() ), actionCollection(), "file_quit" );
d->m_reloadfile = new TDEAction( i18n( "Reload"), 0,
- TQT_TQOBJECT(this), TQT_SLOT( slotReloadFile() ),
+ this, TQT_SLOT( slotReloadFile() ),
actionCollection(), "file_reload_file");
d->m_versionsfile = new TDEAction( i18n( "Versions..."), 0,
- TQT_TQOBJECT(this), TQT_SLOT( slotVersionsFile() ),
+ this, TQT_SLOT( slotVersionsFile() ),
actionCollection(), "file_versions_file");
d->m_importFile = new TDEAction( i18n( "I&mport..." ), 0, // clashing accel key :(
- TQT_TQOBJECT(this), TQT_SLOT( slotImportFile() ),
+ this, TQT_SLOT( slotImportFile() ),
actionCollection(), "file_import_file");
d->m_exportFile = new TDEAction( i18n( "E&xport..." ), 0,
- TQT_TQOBJECT(this), TQT_SLOT( slotExportFile() ),
+ this, TQT_SLOT( slotExportFile() ),
actionCollection(), "file_export_file");
/* The following entry opens the document information dialog. Since the action is named so it
intends to show data this entry should not have a trailing ellipses (...). */
d->m_paDocInfo = new TDEAction( i18n( "&Document Information" ), "documentinfo", 0,
- TQT_TQOBJECT(this), TQT_SLOT( slotDocumentInfo() ),
+ this, TQT_SLOT( slotDocumentInfo() ),
actionCollection(), "file_documentinfo" );
- KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureKeys() ), actionCollection() );
- KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureToolbars() ), actionCollection() );
+ KStdAction::keyBindings( this, TQT_SLOT( slotConfigureKeys() ), actionCollection() );
+ KStdAction::configureToolbars( this, TQT_SLOT( slotConfigureToolbars() ), actionCollection() );
d->m_paDocInfo->setEnabled( false );
d->m_paSaveAs->setEnabled( false );
@@ -260,20 +260,20 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name )
// set up the action "list" for "Close all Views" (hacky :) (Werner)
d->m_veryHackyActionList.append(
new TDEAction(i18n("&Close All Views"), "window-close",
- "ctrl+shift+w", TQT_TQOBJECT(this), TQT_SLOT(slotCloseAllViews()),
+ "ctrl+shift+w", this, TQT_SLOT(slotCloseAllViews()),
actionCollection(), "view_closeallviews") );
// set up the action list for the splitter stuff
d->m_splitViewActionList.append(new TDEAction(i18n("&Split View"), "view_split", 0,
- TQT_TQOBJECT(this), TQT_SLOT(slotSplitView()),
+ this, TQT_SLOT(slotSplitView()),
actionCollection(), "view_split"));
d->m_removeView=new TDEAction(i18n("&Remove View"), "view_remove", 0,
- TQT_TQOBJECT(this), TQT_SLOT(slotRemoveView()),
+ this, TQT_SLOT(slotRemoveView()),
actionCollection(), "view_rm_splitter");
d->m_splitViewActionList.append(d->m_removeView);
d->m_removeView->setEnabled(false);
d->m_orientation=new TDESelectAction(i18n("Splitter &Orientation"), "view_orientation", 0,
- TQT_TQOBJECT(this), TQT_SLOT(slotSetOrientation()),
+ this, TQT_SLOT(slotSetOrientation()),
actionCollection(), "view_splitter_orientation");
TQStringList items;
items << i18n("&Vertical")
@@ -281,7 +281,7 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name )
d->m_orientation->setItems(items);
d->m_orientation->setCurrentItem(static_cast<int>(d->m_splitter->orientation()));
d->m_splitViewActionList.append(d->m_orientation);
- d->m_splitViewActionList.append(new TDEActionSeparator(TQT_TQOBJECT(this)));
+ d->m_splitViewActionList.append(new TDEActionSeparator(this));
// Load list of recent files
TDEConfig * config = instance ? instance->config() : TDEGlobal::config();
@@ -596,9 +596,9 @@ bool KoMainWindow::openDocumentInternal( const KURL & url, KoDocument *newdoc )
return false;
d->m_firstTime=true;
- connect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
- connect(newdoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCompleted()));
- connect(newdoc, TQT_SIGNAL(canceled( const TQString & )), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCanceled( const TQString & )));
+ connect(newdoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int)));
+ connect(newdoc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotLoadCompleted()));
+ connect(newdoc, TQT_SIGNAL(canceled( const TQString & )), this, TQT_SLOT(slotLoadCanceled( const TQString & )));
newdoc->addShell( this ); // used by openURL
bool openRet = (!isImporting ()) ? newdoc->openURL(url) : newdoc->import(url);
if(!openRet)
@@ -639,9 +639,9 @@ void KoMainWindow::slotLoadCompleted()
// We had no document, set the new one
setRootDocument( newdoc );
}
- disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
- disconnect(newdoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCompleted()));
- disconnect(newdoc, TQT_SIGNAL(canceled( const TQString & )), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCanceled( const TQString & )));
+ disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int)));
+ disconnect(newdoc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotLoadCompleted()));
+ disconnect(newdoc, TQT_SIGNAL(canceled( const TQString & )), this, TQT_SLOT(slotLoadCanceled( const TQString & )));
}
void KoMainWindow::slotLoadCanceled( const TQString & errMsg )
@@ -652,9 +652,9 @@ void KoMainWindow::slotLoadCanceled( const TQString & errMsg )
// ... can't delete the document, it's the one who emitted the signal...
KoDocument* newdoc = (KoDocument *)(sender());
- disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
- disconnect(newdoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCompleted()));
- disconnect(newdoc, TQT_SIGNAL(canceled( const TQString & )), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCanceled( const TQString & )));
+ disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int)));
+ disconnect(newdoc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotLoadCompleted()));
+ disconnect(newdoc, TQT_SIGNAL(canceled( const TQString & )), this, TQT_SLOT(slotLoadCanceled( const TQString & )));
newdoc->removeShell(this);
delete newdoc;
@@ -672,10 +672,10 @@ void KoMainWindow::slotSaveCompleted()
{
kdDebug(30003) << "KoMainWindow::slotSaveCompleted" << endl;
KoDocument* pDoc = (KoDocument *)(sender());
- disconnect(pDoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
- disconnect(pDoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotSaveCompleted()));
+ disconnect(pDoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int)));
+ disconnect(pDoc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotSaveCompleted()));
disconnect(pDoc, TQT_SIGNAL(canceled( const TQString & )),
- TQT_TQOBJECT(this), TQT_SLOT(slotSaveCanceled( const TQString & )));
+ this, TQT_SLOT(slotSaveCanceled( const TQString & )));
}
// returns true if we should save, false otherwise.
@@ -739,10 +739,10 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent )
else
reset_url = false;
- connect(pDoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
- connect(pDoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotSaveCompleted()));
+ connect(pDoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int)));
+ connect(pDoc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotSaveCompleted()));
connect(pDoc, TQT_SIGNAL(canceled( const TQString & )),
- TQT_TQOBJECT(this), TQT_SLOT(slotSaveCanceled( const TQString & )));
+ this, TQT_SLOT(slotSaveCanceled( const TQString & )));
KURL oldURL = pDoc->url();
TQString oldFile = pDoc->file();
@@ -893,7 +893,7 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent )
// (not Save As) they won't be expecting that they are
// using their File/Export settings
//
- // As a bad side-effect of TQT_TQOBJECT(this), the modified flag will not
+ // As a bad side-effect of this, the modified flag will not
// be updated and it is possible that what is currently on
// their screen is not what is stored on disk (through loss
// of formatting). But if you are dumb enough to change
@@ -1088,8 +1088,8 @@ void KoMainWindow::chooseNewDocument( int /*KoDocument::InitDocFlags*/ initDocFl
return;
//FIXME: This needs to be handled differently
- connect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
- disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
+ connect(newdoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int)));
+ disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int)));
if ( ( !doc && ( initDocFlags == KoDocument::InitDocFileNew ) ) || ( doc && !doc->isEmpty() ) )
{
@@ -1447,7 +1447,7 @@ void KoMainWindow::slotProgress(int value) {
TQObjectList *l = queryList( "TQStatusBar" );
if ( !l || !l->first() ) {
statusBar()->show();
- TQApplication::sendPostedEvents( TQT_TQOBJECT(this), TQEvent::ChildInserted );
+ TQApplication::sendPostedEvents( this, TQEvent::ChildInserted );
setUpLayout();
}
delete l;
@@ -1506,7 +1506,7 @@ void KoMainWindow::slotActivePartChanged( KParts::Part *newPart )
if ( !d->bMainWindowGUIBuilt )
{
// Load mainwindow plugins
- KParts::Plugin::loadPlugins( TQT_TQOBJECT(this), this, instance(), true );
+ KParts::Plugin::loadPlugins( this, this, instance(), true );
createShellGUI();
}
@@ -1541,7 +1541,7 @@ void KoMainWindow::slotActivePartChanged( KParts::Part *newPart )
TDEToggleAction * act = new TDEToggleAction( i18n("Show %1 Toolbar").arg( tb->text() ), 0,
actionCollection(), tb->name() );
act->setCheckedState(i18n("Hide %1 Toolbar").arg( tb->text() ));
- connect( act, TQT_SIGNAL( toggled( bool ) ), TQT_TQOBJECT(this), TQT_SLOT( slotToolbarToggled( bool ) ) );
+ connect( act, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotToolbarToggled( bool ) ) );
act->setChecked ( !tb->isHidden() );
d->m_toolbarList.append( act );
}
diff --git a/lib/kofficecore/KoMainWindowIface.cpp b/lib/kofficecore/KoMainWindowIface.cpp
index 51d782b14..fda04670b 100644
--- a/lib/kofficecore/KoMainWindowIface.cpp
+++ b/lib/kofficecore/KoMainWindowIface.cpp
@@ -27,7 +27,7 @@
#include <kdcopactionproxy.h>
KoMainWindowIface::KoMainWindowIface( KoMainWindow *mainwindow )
- : DCOPObject( TQT_TQOBJECT(mainwindow) )
+ : DCOPObject( mainwindow )
{
m_pMainWindow = mainwindow;
m_actionProxy = new KDCOPActionProxy( mainwindow->actionCollection(), this );
diff --git a/lib/kofficecore/KoView.cpp b/lib/kofficecore/KoView.cpp
index 322c1a7d5..6bebf91e8 100644
--- a/lib/kofficecore/KoView.cpp
+++ b/lib/kofficecore/KoView.cpp
@@ -114,7 +114,7 @@ KoView::KoView( KoDocument *document, TQWidget *parent, const char *name )
//kdDebug(30003) << "KoView::KoView " << this << endl;
d = new KoViewPrivate;
d->m_doc = document;
- KParts::PartBase::setPartObject( TQT_TQOBJECT(this) );
+ KParts::PartBase::setPartObject( this );
setFocusPolicy( TQWidget::StrongFocus );
@@ -533,7 +533,7 @@ void KoView::slotChildActivated( bool a )
// Is the new active view a child of this one ?
// In this case we may not delete!
// TQObject *n = d->m_manager->activeWidget();
- TQObject *n = TQT_TQOBJECT(activeWidget);
+ TQObject *n = activeWidget;
while( n )
if ( n == (TQObject *)view )
return;
@@ -627,7 +627,7 @@ void KoView::slotAutoScroll( )
void KoView::setupGlobalActions() {
actionNewView = new TDEAction( i18n( "&New View" ), "window-new", 0,
- TQT_TQOBJECT(this), TQT_SLOT( newView() ),
+ this, TQT_SLOT( newView() ),
actionCollection(), "view_newview" );
}