diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-19 18:22:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-19 18:22:05 +0000 |
commit | 57e10fedbcb8c3e8c6590ff0935dbf017ce5587f (patch) | |
tree | 3000a7649ca4e40e43f9e7feed963236a0b0f56b /kipi-plugins/common | |
download | kipi-plugins-57e10fedbcb8c3e8c6590ff0935dbf017ce5587f.tar.gz kipi-plugins-57e10fedbcb8c3e8c6590ff0935dbf017ce5587f.zip |
Import abandoned KDE3 version of kipi plugins
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/libraries/kipi-plugins@1077221 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kipi-plugins/common')
-rw-r--r-- | kipi-plugins/common/Makefile.am | 2 | ||||
-rw-r--r-- | kipi-plugins/common/include/kpaboutdata.h | 51 | ||||
-rw-r--r-- | kipi-plugins/common/include/pluginsversion.h | 27 | ||||
-rw-r--r-- | kipi-plugins/common/libkipiplugins/Makefile.am | 14 | ||||
-rw-r--r-- | kipi-plugins/common/libkipiplugins/kpaboutdata.cpp | 69 |
5 files changed, 163 insertions, 0 deletions
diff --git a/kipi-plugins/common/Makefile.am b/kipi-plugins/common/Makefile.am new file mode 100644 index 0000000..74c13d5 --- /dev/null +++ b/kipi-plugins/common/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS = libkipiplugins + diff --git a/kipi-plugins/common/include/kpaboutdata.h b/kipi-plugins/common/include/kpaboutdata.h new file mode 100644 index 0000000..89f986f --- /dev/null +++ b/kipi-plugins/common/include/kpaboutdata.h @@ -0,0 +1,51 @@ +////////////////////////////////////////////////////////////////////////////// +// +// KPABOUTDATA.H +// +// Copyright (C) 2006 Angelo Naselli <anaselli at linux dot it> +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __KIPI_ABOUT_DATA__ +#define __KIPI_ABOUT_DATA__ + +#include <kaboutdata.h> + +#include <libkipi/libkipi_export.h> + +namespace KIPIPlugins +{ + + class LIBKIPI_EXPORT KPAboutData : public KAboutData + { + private: + QString KipiPluginsVersionString; + + public: + + KPAboutData(const char *pluginName, + const char *pluginVersion=0, + int licenseType=License_Unknown, + const char *pluginDescription=0, + const char *copyrightStatement="Copyright 2003-2007, kipi-plugins team"); + + }; + +} // namespace KIPIPlugins + +#endif //__KIPI_ABOUT_DATA__ + diff --git a/kipi-plugins/common/include/pluginsversion.h b/kipi-plugins/common/include/pluginsversion.h new file mode 100644 index 0000000..5d4162c --- /dev/null +++ b/kipi-plugins/common/include/pluginsversion.h @@ -0,0 +1,27 @@ +/* ============================================================ + * Authors: Gilles Caulier <caulier dot gilles at free.fr> + * Date : 2006-14-09 + * Description : Kipi-Plugins release ID header. + * + * Copyright 2006-2008 by Gilles Caulier <caulier dot gilles at free.fr> + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) + * any later version. + * + * This program 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 General Public License for more details. + * + * ============================================================ */ + +#ifndef KIPIPLUGINS_VERSION_H +#define KIPIPLUGINS_VERSION_H + +static const char kipiplugins_version[] = "0.1.6"; + +#endif // KIPIPLUGINS_VERSION_H + diff --git a/kipi-plugins/common/libkipiplugins/Makefile.am b/kipi-plugins/common/libkipiplugins/Makefile.am new file mode 100644 index 0000000..718c336 --- /dev/null +++ b/kipi-plugins/common/libkipiplugins/Makefile.am @@ -0,0 +1,14 @@ +METASOURCES = AUTO + +KDE_CXXFLAGS = $(USE_EXCEPTIONS) + +lib_LTLIBRARIES = libkipiplugins.la + +libkipiplugins_la_SOURCES = kpaboutdata.cpp + +libkipiplugins_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -version-info 0:1:0 -no-undefined + +libkipiplugins_la_LIBADD = $(LIB_KDECORE) $(LIB_QT) + +INCLUDES = $(KIPI_PLUGINS_COMMON_INCLUDE) $(LIBKIPI_CFLAGS) $(all_includes) + diff --git a/kipi-plugins/common/libkipiplugins/kpaboutdata.cpp b/kipi-plugins/common/libkipiplugins/kpaboutdata.cpp new file mode 100644 index 0000000..dad65dc --- /dev/null +++ b/kipi-plugins/common/libkipiplugins/kpaboutdata.cpp @@ -0,0 +1,69 @@ +////////////////////////////////////////////////////////////////////////////// +// +// KPABOUTDATA.CPP +// +// Copyright (C) 2006 Angelo Naselli <anaselli at linux dot it> +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA. +// +////////////////////////////////////////////////////////////////////////////// + +#include <qglobal.h> +#include <kglobal.h> +#include <kstandarddirs.h> +#include <kglobalsettings.h> +#include <kdeversion.h> + +#include "kpaboutdata.h" +#include "pluginsversion.h" +#include "kdebug.h" + +namespace KIPIPlugins +{ + + KPAboutData::KPAboutData(const char *pluginName, + const char *pluginVersion, + int licenseType, + const char *pluginDescription, + const char *copyrightStatement) : KAboutData ("kipi-plugins", pluginName, + pluginVersion, + 0, licenseType, + copyrightStatement, + pluginDescription, + "http://www.kipi-plugins.org") + { +#if KDE_IS_VERSION(3,4,0) + // setProgramLogo is defined from kde 3.4.0 on + QString directory; + KGlobal::dirs()->addResourceType("kipi_plugins_logo", KGlobal::dirs()->kde_default("data") + "kipi/data"); + directory = KGlobal::dirs()->findResourceDir("kipi_plugins_logo", "kipi-plugins_logo.png"); + + // set the kipiplugins logo inside the about dialog + setProgramLogo(QImage(directory + "kipi-plugins_logo.png")); +#endif + // set the plugin description into long text description + setOtherText(pluginDescription); + + // put the plugin name and version with kipi-plugins and kipi-plugins version + KipiPluginsVersionString = QString(pluginName) + " " + QString(pluginVersion) + + " - Kipi-plugins " + QString(kipiplugins_version) ; + + kdDebug( 51001 ) << "Kipi-plugins - " << KipiPluginsVersionString.ascii() << endl; + + // and set the string into the short description + setShortDescription(KipiPluginsVersionString.ascii()); + } + +} |