add_subdirectory(kdeeduui)
add_subdirectory(extdate)
add_subdirectory(libscience)
-add_subdirectory(plasma)
+++ /dev/null
-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)
+++ /dev/null
-add_subdirectory(rypton)
+++ /dev/null
-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})
+++ /dev/null
-[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
+++ /dev/null
-/***************************************************************************
- * 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"
+++ /dev/null
-/***************************************************************************
- * 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
+++ /dev/null
-add_subdirectory(chemical-data)
+++ /dev/null
-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} )
-
+++ /dev/null
-/*
- * 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"
+++ /dev/null
-#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
+++ /dev/null
-[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