From ab125ebfa909fb2eda6936f3cf686a760d5f66fc Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 3 Jul 2007 13:13:59 +0000 Subject: [PATCH] the plasma stuff does not really belong to libkdeedu, move it to the top-level svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=682808 --- CMakeLists.txt | 1 - plasma/CMakeLists.txt | 7 - plasma/applets/CMakeLists.txt | 1 - plasma/applets/rypton/CMakeLists.txt | 13 -- .../rypton/plasma-rypton-default.desktop | 16 --- plasma/applets/rypton/rypton.cpp | 132 ------------------ plasma/applets/rypton/rypton.h | 93 ------------ plasma/engines/CMakeLists.txt | 1 - plasma/engines/chemical-data/CMakeLists.txt | 16 --- plasma/engines/chemical-data/chemicaldata.cpp | 70 ---------- plasma/engines/chemical-data/chemicaldata.h | 58 -------- .../plasma-engine-chemicaldata.desktop | 9 -- 12 files changed, 417 deletions(-) delete mode 100644 plasma/CMakeLists.txt delete mode 100644 plasma/applets/CMakeLists.txt delete mode 100644 plasma/applets/rypton/CMakeLists.txt delete mode 100644 plasma/applets/rypton/plasma-rypton-default.desktop delete mode 100644 plasma/applets/rypton/rypton.cpp delete mode 100644 plasma/applets/rypton/rypton.h delete mode 100644 plasma/engines/CMakeLists.txt delete mode 100644 plasma/engines/chemical-data/CMakeLists.txt delete mode 100644 plasma/engines/chemical-data/chemicaldata.cpp delete mode 100644 plasma/engines/chemical-data/chemicaldata.h delete mode 100644 plasma/engines/chemical-data/plasma-engine-chemicaldata.desktop diff --git a/CMakeLists.txt b/CMakeLists.txt index 24fdc51..120e4b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,4 +4,3 @@ add_subdirectory(kdeeducore) add_subdirectory(kdeeduui) add_subdirectory(extdate) add_subdirectory(libscience) -add_subdirectory(plasma) diff --git a/plasma/CMakeLists.txt b/plasma/CMakeLists.txt deleted file mode 100644 index 4b8f19d..0000000 --- a/plasma/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -find_package(Plasma) - -if(PLASMA_FOUND) - include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}) - add_subdirectory(engines) - add_subdirectory(applets) -endif(PLASMA_FOUND) diff --git a/plasma/applets/CMakeLists.txt b/plasma/applets/CMakeLists.txt deleted file mode 100644 index e5bb6f5..0000000 --- a/plasma/applets/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(rypton) diff --git a/plasma/applets/rypton/CMakeLists.txt b/plasma/applets/rypton/CMakeLists.txt deleted file mode 100644 index b460122..0000000 --- a/plasma/applets/rypton/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -project(plasma-rypton) - -set(rypton_SRCS - rypton.cpp) - -kde4_automoc(${rypton_SRCS}) - -kde4_add_plugin(plasma_applet_rypton ${rypton_SRCS}) -target_link_libraries(plasma_applet_rypton plasma ${KDE4_KIO_LIBS} ${KDE4_KDEUI_LIBS}) -set_target_properties(plasma_applet_rypton PROPERTIES VERSION 1.0.0 SOVERSION 1) - -install(TARGETS plasma_applet_rypton DESTINATION ${PLUGIN_INSTALL_DIR}) -install(FILES plasma-rypton-default.desktop DESTINATION ${SERVICES_INSTALL_DIR}) diff --git a/plasma/applets/rypton/plasma-rypton-default.desktop b/plasma/applets/rypton/plasma-rypton-default.desktop deleted file mode 100644 index 448bafa..0000000 --- a/plasma/applets/rypton/plasma-rypton-default.desktop +++ /dev/null @@ -1,16 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Rypton -Type=Service -ServiceTypes=Plasma/Applet - -X-KDE-Library=plasma_applet_rypton -X-KDE-PluginInfo-Author=Carsten Niehaus -X-KDE-PluginInfo-Email=kalzium@kde.org -X-KDE-PluginInfo-Name=Rypton -X-KDE-PluginInfo-Version=pre0.1 -X-KDE-PluginInfo-Website=http://plasma.kde.org/ -X-KDE-PluginInfo-Category= -X-KDE-PluginInfo-Depends= -X-KDE-PluginInfo-License=GPL -X-KDE-PluginInfo-EnabledByDefault=true diff --git a/plasma/applets/rypton/rypton.cpp b/plasma/applets/rypton/rypton.cpp deleted file mode 100644 index b3ae302..0000000 --- a/plasma/applets/rypton/rypton.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2007 by Thomas Georgiou * - * Copyright (C) 2007 by Jeff Cooper * - * * - * 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, Boston, MA 02110-1301 USA . * - ***************************************************************************/ - -#include "rypton.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include -#include -#include - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Plasma; - -Rypton::Rypton(QObject *parent, const QStringList &args) - : Plasma::Applet(parent, args), - m_defDisplay(0), - m_dialog(0) -{ - //setHasConfigurationInterface(true); - - dataEngine("chemicaldata")->connectSource("11", this); - - // Icon in upper-left corner - QIcon *icon = new KIcon("dictionary"); - m_graphicsIcon = new QGraphicsPixmapItem(icon->pixmap(32,32), this); - - // Position lineedits - const int wordEditOffset = 40; - m_graphicsIcon->setPos(-40 + wordEditOffset,-7); - - - m_wordEdit = new Plasma::LineEdit(this); - m_wordEdit->setTextInteractionFlags(Qt::TextEditorInteraction); - m_wordEdit->setDefaultText(i18n("Enter word to define here")); - - connect(m_wordEdit, SIGNAL(editingFinished()), this, SLOT(define())); - - - Phase::self()->animateItem(m_wordEdit, Phase::Appear); - - m_theme = new Plasma::Svg("widgets/toolbox-button", this); - m_theme->resize(); - constraintsUpdated(); -} - -void Rypton::define() -{ - kDebug() << "Rypton::define()" << endl; - m_word = m_wordEdit->toPlainText(); - dataEngine("chemicaldata")->connectSource(m_word, this); -} - -QRectF Rypton::boundingRect() const -{ - if (m_wordEdit->isVisible()) - return m_wordEdit->geometry().adjusted(-15,-12,15,12+40); - else - return m_wordEdit->geometry().adjusted(-15,-12,15,12); -} - -void Rypton::constraintsUpdated() -{ - kDebug() << "Rypton::constraintsUpdated()" << endl; - prepareGeometryChange(); -} - -void Rypton::updated(const QString& source, const Plasma::DataEngine::Data &data) -{ - kDebug() << "Rypton::updated()" << endl; - Q_UNUSED(source); -//X -//X kDebug() << data["Mass"].toString() << endl; -//X update(); -} - -void Rypton::showConfigurationInterface() -{ -} - -void Rypton::configAccepted() -{ -} - -Rypton::~Rypton() -{ -} - -void Rypton::paintInterface(QPainter *p, const QStyleOptionGraphicsItem *option, QWidget *widget) -{ -} -#include "rypton.moc" diff --git a/plasma/applets/rypton/rypton.h b/plasma/applets/rypton/rypton.h deleted file mode 100644 index 7fe0252..0000000 --- a/plasma/applets/rypton/rypton.h +++ /dev/null @@ -1,93 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2007 by Carsten Niehaus > * - * * - * 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, Boston, MA 02110-1301 USA . * - ***************************************************************************/ - -#ifndef Rypton_H -#define Rypton_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -class QTimer; -class QCheckBox; -class QSpinBox; -class QLineEdit; - - -class KDialog; -class KTimeZoneWidget; - -namespace Plasma -{ - class Svg; -} - -class Rypton : public Plasma::Applet -{ - Q_OBJECT - public: - Rypton(QObject *parent, const QStringList &args); - ~Rypton(); - - void paintInterface(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget =0); - void setPath(const QString&); - QRectF boundingRect() const; - void constraintsUpdated(); - - public slots: - void updated(const QString &name, const Plasma::DataEngine::Data &data); - void define(); - void showConfigurationInterface(); - - protected slots: - void configAccepted(); - - private: - QRectF m_bounds; - Plasma::Svg* m_theme; - int m_pixelSize; - KDialog *m_dialog; //should we move this into another class? - - QGraphicsPixmapItem * m_graphicsIcon; - - QTextEdit *m_defDisplay; - QLineEdit *m_wordChooser; - QString m_word; - Plasma::LineEdit *m_wordEdit; -}; - -K_EXPORT_PLASMA_APPLET(rypton, Rypton) - -#endif diff --git a/plasma/engines/CMakeLists.txt b/plasma/engines/CMakeLists.txt deleted file mode 100644 index 43b14eb..0000000 --- a/plasma/engines/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(chemical-data) diff --git a/plasma/engines/chemical-data/CMakeLists.txt b/plasma/engines/chemical-data/CMakeLists.txt deleted file mode 100644 index 0d7e4dd..0000000 --- a/plasma/engines/chemical-data/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -include_directories( - ${CMAKE_SOURCE_DIR}/libkdeedu/libscience/ - ${CMAKE_CURRENT_BINARY_DIR}/.. -) - -set(chemicaldata_engine_SRCS - chemicaldata.cpp - ) - -kde4_automoc(${chemicaldata_engine_SRCS}) -kde4_add_plugin(plasma_engine_chemicaldata ${chemicaldata_engine_SRCS}) -target_link_libraries(plasma_engine_chemicaldata ${KDE4_KDECORE_LIBS} ${PLASMA_LIBRARIES} ${QT_QTXML_LIBRARY} science ) - -install(TARGETS plasma_engine_chemicaldata DESTINATION ${PLUGIN_INSTALL_DIR}) -install(FILES plasma-engine-chemicaldata.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - diff --git a/plasma/engines/chemical-data/chemicaldata.cpp b/plasma/engines/chemical-data/chemicaldata.cpp deleted file mode 100644 index 2bf278a..0000000 --- a/plasma/engines/chemical-data/chemicaldata.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2007 Aaron Seigo - * Copyright (C) 2007 Sebastian Kuegler - * - * This program 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 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 Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "chemicaldata.h" -#include "element.h" -#include "elementparser.h" - -//solid specific includes -#include -#include -#include - -#include "plasma/datasource.h" - -#include - -ChemicalDataEngine::ChemicalDataEngine(QObject* parent, const QStringList& args) - : Plasma::DataEngine(parent) -{ - Q_UNUSED(args) - - ElementSaxParser * parser = new ElementSaxParser(); - QFile xmlFile( KStandardDirs::locate( "data", "libkdeedu/data/elements.xml" ) ); - QXmlInputSource source(&xmlFile); - QXmlSimpleReader reader; - - reader.setContentHandler(parser); - reader.parse(source); - - m_elements = parser->getElements(); -} - -ChemicalDataEngine::~ChemicalDataEngine() -{} - -void ChemicalDataEngine::init() -{} - -bool ChemicalDataEngine::sourceRequested(const QString &name) -{ - kDebug() << "ChemicalDataEngine::sourceRequested()" << endl; - int num = name.toInt(); num -= 1; - QString e_name = m_elements.at(num)->dataAsString( ChemicalDataObject::name ); - QString e_symbol = m_elements.at(num)->dataAsString( ChemicalDataObject::symbol ); - QString e_weight = m_elements.at(num)->dataAsString( ChemicalDataObject::mass ); - kDebug() << " name, symbol and weight: " << e_name << " " << e_symbol << " " << e_weight << endl; - setData( name, I18N_NOOP("Name"), e_name); - setData( name, I18N_NOOP("Symbol"), e_symbol ); - setData( name, I18N_NOOP("Mass"), e_weight ); - - return true; -} - -#include "chemicaldata.moc" diff --git a/plasma/engines/chemical-data/chemicaldata.h b/plasma/engines/chemical-data/chemicaldata.h deleted file mode 100644 index 3cc6063..0000000 --- a/plasma/engines/chemical-data/chemicaldata.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef CHEMICALDATA_H -#define CHEMICALDATA_H -/* - * Copyright (C) 2007 Carsten Niehaus - * - * This program 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 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 Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - - -#include "plasma/dataengine.h" -#include "element.h" -#include "chemicaldataobject.h" - -#include -#include - -/** - * This class provides runtime information about the battery and AC status - * for use in a simple batter monitor application. - */ -class ChemicalDataEngine : public Plasma::DataEngine -{ - Q_OBJECT - -public: - ChemicalDataEngine( QObject* parent, const QStringList& args ); - ~ChemicalDataEngine(); - -protected: - bool sourceRequested(const QString &name); - void init(); - -private: - /** - * Set the Element - * @param number The number of the Element (1 == H and so on) - */ - void setElement( int number ); - - QList m_elements; -}; - - -K_EXPORT_PLASMA_DATAENGINE(chemicaldata, ChemicalDataEngine) - -#endif // CHEMICALDATA_H diff --git a/plasma/engines/chemical-data/plasma-engine-chemicaldata.desktop b/plasma/engines/chemical-data/plasma-engine-chemicaldata.desktop deleted file mode 100644 index 40046d9..0000000 --- a/plasma/engines/chemical-data/plasma-engine-chemicaldata.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=Chemical Data Engine -Name[sv]=Gränssnitt för kemisk data -Name[zh_TW]=化學資料引擎 -ServiceTypes=Plasma/DataEngine -Type=Service -Icon=kalzium -X-KDE-Library=plasma_engine_chemicaldata -X-EngineName=chemicaldata -- 2.47.3