From b363d2579af0a11b77e698aed2e1021c2233b644 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 26 Jan 2013 13:17:50 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- libtdepim/kpartsdesignerplugin/CMakeLists.txt | 32 ------ libtdepim/kpartsdesignerplugin/Makefile.am | 8 -- libtdepim/kpartsdesignerplugin/README | 2 - .../kpartsdesignerplugin/kpartsdesignerplugin.cpp | 117 --------------------- .../kpartsdesignerplugin/kpartsdesignerplugin.h | 71 ------------- 5 files changed, 230 deletions(-) delete mode 100644 libtdepim/kpartsdesignerplugin/CMakeLists.txt delete mode 100644 libtdepim/kpartsdesignerplugin/Makefile.am delete mode 100644 libtdepim/kpartsdesignerplugin/README delete mode 100644 libtdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp delete mode 100644 libtdepim/kpartsdesignerplugin/kpartsdesignerplugin.h (limited to 'libtdepim/kpartsdesignerplugin') diff --git a/libtdepim/kpartsdesignerplugin/CMakeLists.txt b/libtdepim/kpartsdesignerplugin/CMakeLists.txt deleted file mode 100644 index 55c75251c..000000000 --- a/libtdepim/kpartsdesignerplugin/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_definitions( -DQT_PLUGIN ) - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/libtdepim - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### kpartsdesignerplugin (module) ############# - -tde_add_kpart( kpartsdesignerplugin AUTOMOC - SOURCES kpartsdesignerplugin.cpp - LINK kparts-shared kio-shared - DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/designer -) diff --git a/libtdepim/kpartsdesignerplugin/Makefile.am b/libtdepim/kpartsdesignerplugin/Makefile.am deleted file mode 100644 index ebbfbfba2..000000000 --- a/libtdepim/kpartsdesignerplugin/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -AM_CXXFLAGS = -DQT_PLUGIN -METASOURCES = AUTO -INCLUDES = $(all_includes) - -kde_widget_LTLIBRARIES = kpartsdesignerplugin.la -kpartsdesignerplugin_la_LDFLAGS = $(KDE_PLUGIN) -module $(all_libraries) $(LIB_QT) -ltdecore -lkio -kpartsdesignerplugin_la_LIBADD = $(LIB_KPARTS) -kpartsdesignerplugin_la_SOURCES = kpartsdesignerplugin.cpp diff --git a/libtdepim/kpartsdesignerplugin/README b/libtdepim/kpartsdesignerplugin/README deleted file mode 100644 index 0dbcb2ecf..000000000 --- a/libtdepim/kpartsdesignerplugin/README +++ /dev/null @@ -1,2 +0,0 @@ -When moving this to tdelibs: the KPartsGenericPart class should move to libkparts so -that it's possible to add an accessor for m_part there. diff --git a/libtdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp b/libtdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp deleted file mode 100644 index f25ec3cd3..000000000 --- a/libtdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* - Copyright (C) 2004, David Faure - This file is part of the KDE project - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2, as published by the Free Software Foundation. - - 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 "kpartsdesignerplugin.h" - -#include -#include -#include -#include -#include -#include - -KPartsGenericPart::KPartsGenericPart( TQWidget* parentWidget, const char* name ) - : TQWidget( parentWidget, name ), m_part( 0 ) -{ - TQVBoxLayout* layout = new TQVBoxLayout( this ); - layout->setAutoAdd( true ); -} - -void KPartsGenericPart::load() -{ - if ( m_mimetype.isEmpty() || m_url.isEmpty() ) - return; // not enough info yet - // Here it crashes in KSycoca::openDatabase when trying to load the stuff from designer itself - // Not sure why - but it's not really needed anyway. - if ( !kapp ) - return; - TQString mimetype = m_mimetype; - if ( mimetype == "auto" ) - mimetype == KMimeType::findByURL( m_url )->name(); - if ( m_part ) { - delete m_part; - } - // "this" is both the parent widget and the parent object - m_part = KParts::ComponentFactory::createPartInstanceFromQuery( mimetype, TQString(), TQT_TQWIDGET(this), 0, TQT_TQOBJECT(this), 0 ); - if ( m_part ) { - m_part->openURL( m_url ); - m_part->widget()->show(); - } -} - -//// - -static const char* mykey = "KPartsGenericPart"; - -TQStringList KPartsWidgetPlugin::keys() const { - return TQStringList() << mykey; -} - -TQWidget * KPartsWidgetPlugin::create( const TQString & key, TQWidget * parent, const char * name ) { - if ( key == mykey ) - return new KPartsGenericPart( parent, name ); - return 0; -} - -TQString KPartsWidgetPlugin::group( const TQString & key ) const { - if ( key == mykey ) - return "Display (KDE)"; - return TQString(); -} - -#if 0 -TQIconSet KPartsWidgetPlugin::iconSet( const TQString & key ) const { - return TQIconSet(); -} -#endif - -TQString KPartsWidgetPlugin::includeFile( const TQString & key ) const { - if ( key == mykey ) - return "partplugin.h"; - return TQString(); -} - -TQString KPartsWidgetPlugin::toolTip( const TQString & key ) const { - if ( key == mykey ) - return "Generic KParts viewer"; - return TQString(); -} - -TQString KPartsWidgetPlugin::whatsThis( const TQString & key ) const { - if ( key == mykey ) - return "A widget to embed any KParts viewer, given a url and optionally a mimetype"; - return TQString(); -} - -bool KPartsWidgetPlugin::isContainer( const TQString & /*key*/ ) const { - return false; -} - -/// Duplicated from tdelibs/tdecore/kdemacros.h.in for those with tdelibs < 3.4 -#ifndef KDE_TQ_EXPORT_PLUGIN -#define KDE_TQ_EXPORT_PLUGIN(PLUGIN) \ - TQ_EXTERN_C KDE_EXPORT const char* qt_ucm_query_verification_data(); \ - TQ_EXTERN_C KDE_EXPORT TQUnknownInterface* ucm_instantiate(); \ - TQ_EXPORT_PLUGIN(PLUGIN) -#endif - -KDE_TQ_EXPORT_PLUGIN( KPartsWidgetPlugin ) - -#include "kpartsdesignerplugin.moc" - diff --git a/libtdepim/kpartsdesignerplugin/kpartsdesignerplugin.h b/libtdepim/kpartsdesignerplugin/kpartsdesignerplugin.h deleted file mode 100644 index 91c96d2f3..000000000 --- a/libtdepim/kpartsdesignerplugin/kpartsdesignerplugin.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright (C) 2005, David Faure - This file is part of the KDE project - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2, as published by the Free Software Foundation. - - 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 DESIGNER_PARTPLUGIN_H -#define DESIGNER_PARTPLUGIN_H - -#include -#include -namespace KParts { class ReadOnlyPart; } - -/** - * Generic part loader, able to view any kind of file for which - * a KParts::ReadOnlyPart is available - */ -class KPartsGenericPart : public TQWidget { - Q_OBJECT - - TQ_PROPERTY( TQString url READ url WRITE setURL ) - TQ_PROPERTY( TQString mimetype READ mimetype WRITE setMimetype ) -public: - KPartsGenericPart( TQWidget* parentWidget, const char* name ); - - TQString url() const { return m_url; } - void setURL( const TQString& url ) { m_url = url; load(); } - - // The mimetype, or "auto" if unknown - TQString mimetype() const { return m_mimetype; } - void setMimetype( const TQString& mimetype ) { m_mimetype = mimetype; load(); } - -private: - void load(); - -private: - TQString m_mimetype; - TQString m_url; - KParts::ReadOnlyPart* m_part; -}; - -/** - * TQt designer plugin for embedding a KParts using KPartsGenericPart - */ -class KPartsWidgetPlugin : public TQWidgetPlugin { -public: - TQStringList keys() const; - TQWidget * create( const TQString & key, TQWidget * parent, const char * name ); - TQString group( const TQString & key ) const; - //TQIconSet iconSet( const TQString & key ) const; - TQString includeFile( const TQString & key ) const; - TQString toolTip( const TQString & key ) const; - TQString whatsThis( const TQString & key ) const; - bool isContainer( const TQString & key ) const; -}; - -#endif -- cgit v1.2.1