]> Git trees. - libqmvoc.git/commitdiff
the plasma stuff does not really belong to libkdeedu, move it to the top-level
authorPino Toscano <pino@kde.org>
Tue, 3 Jul 2007 13:13:59 +0000 (13:13 +0000)
committerPino Toscano <pino@kde.org>
Tue, 3 Jul 2007 13:13:59 +0000 (13:13 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=682808

12 files changed:
CMakeLists.txt
plasma/CMakeLists.txt [deleted file]
plasma/applets/CMakeLists.txt [deleted file]
plasma/applets/rypton/CMakeLists.txt [deleted file]
plasma/applets/rypton/plasma-rypton-default.desktop [deleted file]
plasma/applets/rypton/rypton.cpp [deleted file]
plasma/applets/rypton/rypton.h [deleted file]
plasma/engines/CMakeLists.txt [deleted file]
plasma/engines/chemical-data/CMakeLists.txt [deleted file]
plasma/engines/chemical-data/chemicaldata.cpp [deleted file]
plasma/engines/chemical-data/chemicaldata.h [deleted file]
plasma/engines/chemical-data/plasma-engine-chemicaldata.desktop [deleted file]

index 24fdc51a246cedeb2e3ee428f76055015b730fbd..120e4b208d5ffed449f7e651337b214faa6d2864 100644 (file)
@@ -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 (file)
index 4b8f19d..0000000
+++ /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 (file)
index e5bb6f5..0000000
+++ /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 (file)
index b460122..0000000
+++ /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 (file)
index 448bafa..0000000
+++ /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 (file)
index b3ae302..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2007 by Thomas Georgiou <TAGeorgiou@gmail.com>          *
- *   Copyright (C) 2007 by Jeff Cooper <weirdsox11@gmail.com>              *
- *                                                                         *
- *   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 <math.h>
-
-#include <QApplication>
-#include <QBitmap>
-#include <QGraphicsScene>
-#include <QMatrix>
-#include <QPaintEvent>
-#include <QPainter>
-#include <QPixmap>
-#include <QStyleOptionGraphicsItem>
-#include <QVBoxLayout>
-#include <QHBoxLayout>
-#include <QCheckBox>
-#include <QPushButton>
-#include <QSpinBox>
-//#include <QTextArea>
-#include <QLineEdit>
-#include <iostream>
-
-
-#include <KDebug>
-#include <KLocale>
-#include <KIcon>
-#include <KSharedConfig>
-#include <KTimeZoneWidget>
-#include <KDialog>
-#include <QTime>
-#include <plasma/svg.h>
-#include <plasma/phase.h>
-
-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 (file)
index 7fe0252..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2007 by Carsten Niehaus <cniehaus@kde.org>   >          *
- *                                                                         *
- *   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 <QImage>
-#include <QPaintDevice>
-#include <QLabel>
-#include <QPixmap>
-#include <QTimer>
-#include <QPaintEvent>
-#include <QPainter>
-#include <QTime>
-#include <QX11Info>
-#include <QWidget>
-#include <QGraphicsItem>
-#include <QColor>
-#include <QTextEdit>
-
-#include <plasma/applet.h>
-#include <plasma/dataengine.h>
-#include <plasma/widgets/vboxlayout.h>
-#include <plasma/widgets/lineedit.h>
-#include <plasma/widgets/pushbutton.h>
-
-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 (file)
index 43b14eb..0000000
+++ /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 (file)
index 0d7e4dd..0000000
+++ /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 (file)
index 2bf278a..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *   Copyright (C) 2007 Aaron Seigo <aseigo@kde.org>
- *   Copyright (C) 2007 Sebastian Kuegler <sebas@kde.org>
- *
- *   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 <KDebug>
-#include <KLocale>
-#include <kstandarddirs.h>
-
-#include "plasma/datasource.h"
-
-#include <QFile>
-
-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 (file)
index 3cc6063..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef CHEMICALDATA_H
-#define CHEMICALDATA_H
-/*
- *   Copyright (C) 2007 Carsten Niehaus <cniehaus@kde.org>
- *
- *   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 <QtXml/qxml.h>
-#include <QList>
-
-/**
- * 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<Element*> 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 (file)
index 40046d9..0000000
+++ /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