From d888cfa39e8b38abe17f3d425d19cb8235136a79 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 17:25:43 -0600 Subject: Fix FTBFS --- tdeparts/dockmainwindow.cpp | 166 ------------------------------------------ tdeparts/dockmainwindow.h | 88 ---------------------- tdeparts/doctdemainwindow.cpp | 166 ++++++++++++++++++++++++++++++++++++++++++ tdeparts/doctdemainwindow.h | 88 ++++++++++++++++++++++ 4 files changed, 254 insertions(+), 254 deletions(-) delete mode 100644 tdeparts/dockmainwindow.cpp delete mode 100644 tdeparts/dockmainwindow.h create mode 100644 tdeparts/doctdemainwindow.cpp create mode 100644 tdeparts/doctdemainwindow.h (limited to 'tdeparts') diff --git a/tdeparts/dockmainwindow.cpp b/tdeparts/dockmainwindow.cpp deleted file mode 100644 index ce462e691..000000000 --- a/tdeparts/dockmainwindow.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2000 Falk Brettschneider - (C) 1999 Simon Hausmann - (C) 1999 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -using namespace KParts; - -namespace KParts -{ -class DockMainWindowPrivate -{ -public: - DockMainWindowPrivate() - { - m_activePart = 0; - m_bShellGUIActivated = false; - m_helpMenu = 0; - } - ~DockMainWindowPrivate() - { - } - - TQGuardedPtr m_activePart; - bool m_bShellGUIActivated; - KHelpMenu *m_helpMenu; -}; -} - -DockMainWindow::DockMainWindow( TQWidget* parent, const char *name, WFlags f ) - : KDockMainWindow( parent, name, f ) -{ - d = new DockMainWindowPrivate(); - PartBase::setPartObject( TQT_TQOBJECT(this) ); -} - -DockMainWindow::~DockMainWindow() -{ - delete d; -} - -void DockMainWindow::createGUI( Part * part ) -{ - kdDebug(1000) << TQString(TQString("DockMainWindow::createGUI for %1").arg(part?part->name():"0L")) << endl; - - KXMLGUIFactory *factory = guiFactory(); - - setUpdatesEnabled( false ); - - TQPtrList plugins; - - if ( d->m_activePart ) - { - kdDebug(1000) << TQString(TQString("deactivating GUI for %1").arg(d->m_activePart->name())) << endl; - - GUIActivateEvent ev( false ); - TQApplication::sendEvent( d->m_activePart, &ev ); - - factory->removeClient( d->m_activePart ); - - disconnect( d->m_activePart, TQT_SIGNAL( setWindowCaption( const TQString & ) ), - this, TQT_SLOT( setCaption( const TQString & ) ) ); - disconnect( d->m_activePart, TQT_SIGNAL( setStatusBarText( const TQString & ) ), - this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) ); - } - - if ( !d->m_bShellGUIActivated ) - { - loadPlugins( TQT_TQOBJECT(this), this, TDEGlobal::instance() ); - createShellGUI(); - d->m_bShellGUIActivated = true; - } - - if ( part ) - { - // do this before sending the activate event - connect( part, TQT_SIGNAL( setWindowCaption( const TQString & ) ), - this, TQT_SLOT( setCaption( const TQString & ) ) ); - connect( part, TQT_SIGNAL( setStatusBarText( const TQString & ) ), - this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) ); - - factory->addClient( part ); - - GUIActivateEvent ev( true ); - TQApplication::sendEvent( part, &ev ); - - } - - setUpdatesEnabled( true ); - - d->m_activePart = part; -} - -void DockMainWindow::slotSetStatusBarText( const TQString & text ) -{ - statusBar()->message( text ); -} - -void DockMainWindow::createShellGUI( bool create ) -{ - bool bAccelAutoUpdate = accel()->setAutoUpdate( false ); - assert( d->m_bShellGUIActivated != create ); - d->m_bShellGUIActivated = create; - if ( create ) - { - if ( isHelpMenuEnabled() ) - d->m_helpMenu = new KHelpMenu( this, instance()->aboutData(), true, actionCollection() ); - - TQString f = xmlFile(); - setXMLFile( locate( "config", "ui/ui_standards.rc", instance() ) ); - if ( !f.isEmpty() ) - setXMLFile( f, true ); - else - { - TQString auto_file( instance()->instanceName() + "ui.rc" ); - setXMLFile( auto_file, true ); - } - - GUIActivateEvent ev( true ); - TQApplication::sendEvent( this, &ev ); - - guiFactory()->addClient( this ); - - } - else - { - GUIActivateEvent ev( false ); - TQApplication::sendEvent( this, &ev ); - - guiFactory()->removeClient( this ); - } - accel()->setAutoUpdate( bAccelAutoUpdate ); -} - -#include "dockmainwindow.moc" diff --git a/tdeparts/dockmainwindow.h b/tdeparts/dockmainwindow.h deleted file mode 100644 index 223bd3a42..000000000 --- a/tdeparts/dockmainwindow.h +++ /dev/null @@ -1,88 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2000 Falk Brettschneider - (C) 1999 Simon Hausmann - (C) 1999 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef __DOCKMAINWINDOW_H -#define __DOCKMAINWINDOW_H - -#include -#include - -#include - -#include - -class TQString; - -namespace KParts -{ - -class DockMainWindowPrivate; - -/** - * A KPart-aware main window with ability for docking widgets, whose user interface is described in XML. - * - * Inherit your main dock-window from this class - * and don't forget to call setXMLFile() in the inherited constructor. - * - * It implements all internal interfaces in the case of a KDockMainWindow as host: - * the builder and servant interface (for menu merging). - */ -class KPARTS_EXPORT DockMainWindow : public KDockMainWindow, virtual public PartBase -{ - Q_OBJECT - public: - /** - * Constructor, same signature as KDockMainWindow. - */ - DockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = (WFlags)WDestructiveClose ); - /** - * Destructor. - */ - virtual ~DockMainWindow(); - -protected slots: - - /** - * Create the GUI (by merging the host's and the active part's) - * - * Called on startup and whenever the active part changes. - * For this you need to connect this slot to the - * PartManager::activePartChanged() signal - * @param part The active part (set to 0L if no part). - */ - void createGUI( KParts::Part * part ); - - /** - * Called when the active part wants to change the statusbar message. - * Reimplement if your dock-mainwindow has a complex statusbar - * (with several items) - */ - virtual void slotSetStatusBarText( const TQString & ); - -protected: - virtual void createShellGUI( bool create = true ); - - private: - DockMainWindowPrivate *d; - }; - -} - -#endif diff --git a/tdeparts/doctdemainwindow.cpp b/tdeparts/doctdemainwindow.cpp new file mode 100644 index 000000000..ce462e691 --- /dev/null +++ b/tdeparts/doctdemainwindow.cpp @@ -0,0 +1,166 @@ +/* This file is part of the KDE project + Copyright (C) 2000 Falk Brettschneider + (C) 1999 Simon Hausmann + (C) 1999 David Faure + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +using namespace KParts; + +namespace KParts +{ +class DockMainWindowPrivate +{ +public: + DockMainWindowPrivate() + { + m_activePart = 0; + m_bShellGUIActivated = false; + m_helpMenu = 0; + } + ~DockMainWindowPrivate() + { + } + + TQGuardedPtr m_activePart; + bool m_bShellGUIActivated; + KHelpMenu *m_helpMenu; +}; +} + +DockMainWindow::DockMainWindow( TQWidget* parent, const char *name, WFlags f ) + : KDockMainWindow( parent, name, f ) +{ + d = new DockMainWindowPrivate(); + PartBase::setPartObject( TQT_TQOBJECT(this) ); +} + +DockMainWindow::~DockMainWindow() +{ + delete d; +} + +void DockMainWindow::createGUI( Part * part ) +{ + kdDebug(1000) << TQString(TQString("DockMainWindow::createGUI for %1").arg(part?part->name():"0L")) << endl; + + KXMLGUIFactory *factory = guiFactory(); + + setUpdatesEnabled( false ); + + TQPtrList plugins; + + if ( d->m_activePart ) + { + kdDebug(1000) << TQString(TQString("deactivating GUI for %1").arg(d->m_activePart->name())) << endl; + + GUIActivateEvent ev( false ); + TQApplication::sendEvent( d->m_activePart, &ev ); + + factory->removeClient( d->m_activePart ); + + disconnect( d->m_activePart, TQT_SIGNAL( setWindowCaption( const TQString & ) ), + this, TQT_SLOT( setCaption( const TQString & ) ) ); + disconnect( d->m_activePart, TQT_SIGNAL( setStatusBarText( const TQString & ) ), + this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) ); + } + + if ( !d->m_bShellGUIActivated ) + { + loadPlugins( TQT_TQOBJECT(this), this, TDEGlobal::instance() ); + createShellGUI(); + d->m_bShellGUIActivated = true; + } + + if ( part ) + { + // do this before sending the activate event + connect( part, TQT_SIGNAL( setWindowCaption( const TQString & ) ), + this, TQT_SLOT( setCaption( const TQString & ) ) ); + connect( part, TQT_SIGNAL( setStatusBarText( const TQString & ) ), + this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) ); + + factory->addClient( part ); + + GUIActivateEvent ev( true ); + TQApplication::sendEvent( part, &ev ); + + } + + setUpdatesEnabled( true ); + + d->m_activePart = part; +} + +void DockMainWindow::slotSetStatusBarText( const TQString & text ) +{ + statusBar()->message( text ); +} + +void DockMainWindow::createShellGUI( bool create ) +{ + bool bAccelAutoUpdate = accel()->setAutoUpdate( false ); + assert( d->m_bShellGUIActivated != create ); + d->m_bShellGUIActivated = create; + if ( create ) + { + if ( isHelpMenuEnabled() ) + d->m_helpMenu = new KHelpMenu( this, instance()->aboutData(), true, actionCollection() ); + + TQString f = xmlFile(); + setXMLFile( locate( "config", "ui/ui_standards.rc", instance() ) ); + if ( !f.isEmpty() ) + setXMLFile( f, true ); + else + { + TQString auto_file( instance()->instanceName() + "ui.rc" ); + setXMLFile( auto_file, true ); + } + + GUIActivateEvent ev( true ); + TQApplication::sendEvent( this, &ev ); + + guiFactory()->addClient( this ); + + } + else + { + GUIActivateEvent ev( false ); + TQApplication::sendEvent( this, &ev ); + + guiFactory()->removeClient( this ); + } + accel()->setAutoUpdate( bAccelAutoUpdate ); +} + +#include "dockmainwindow.moc" diff --git a/tdeparts/doctdemainwindow.h b/tdeparts/doctdemainwindow.h new file mode 100644 index 000000000..223bd3a42 --- /dev/null +++ b/tdeparts/doctdemainwindow.h @@ -0,0 +1,88 @@ +/* This file is part of the KDE project + Copyright (C) 2000 Falk Brettschneider + (C) 1999 Simon Hausmann + (C) 1999 David Faure + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef __DOCKMAINWINDOW_H +#define __DOCKMAINWINDOW_H + +#include +#include + +#include + +#include + +class TQString; + +namespace KParts +{ + +class DockMainWindowPrivate; + +/** + * A KPart-aware main window with ability for docking widgets, whose user interface is described in XML. + * + * Inherit your main dock-window from this class + * and don't forget to call setXMLFile() in the inherited constructor. + * + * It implements all internal interfaces in the case of a KDockMainWindow as host: + * the builder and servant interface (for menu merging). + */ +class KPARTS_EXPORT DockMainWindow : public KDockMainWindow, virtual public PartBase +{ + Q_OBJECT + public: + /** + * Constructor, same signature as KDockMainWindow. + */ + DockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = (WFlags)WDestructiveClose ); + /** + * Destructor. + */ + virtual ~DockMainWindow(); + +protected slots: + + /** + * Create the GUI (by merging the host's and the active part's) + * + * Called on startup and whenever the active part changes. + * For this you need to connect this slot to the + * PartManager::activePartChanged() signal + * @param part The active part (set to 0L if no part). + */ + void createGUI( KParts::Part * part ); + + /** + * Called when the active part wants to change the statusbar message. + * Reimplement if your dock-mainwindow has a complex statusbar + * (with several items) + */ + virtual void slotSetStatusBarText( const TQString & ); + +protected: + virtual void createShellGUI( bool create = true ); + + private: + DockMainWindowPrivate *d; + }; + +} + +#endif -- cgit v1.2.3