From: Carsten Niehaus Date: Sat, 25 Nov 2006 10:19:20 +0000 (+0000) Subject: * Very first version of the new KPart-based molecularviewer X-Git-Tag: v3.80.3~103^2~4 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=81f6f95850d3ec52ef4b9435080f7e3608a57ce7;p=libqmvoc.git * Very first version of the new KPart-based molecularviewer svn path=/trunk/KDE/kdeedu/kalzium/src/kalziumglpart.cpp; revision=607592 --- diff --git a/kalzium/kalziumgl_part.desktop b/kalzium/kalziumgl_part.desktop new file mode 100644 index 0000000..95222f4 --- /dev/null +++ b/kalzium/kalziumgl_part.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Icon=kalzium +MimeType=application/x-ogg;audio/basic; +Name=KalziumGL +Comment=An OpenGL-based 3D-renderer for molecules +ServiceTypes=KParts/ReadOnlyPart +Type=Service +X-KDE-Library=libkalziumglpart +InitialPreference=9 diff --git a/kalzium/kalziumglpart.cpp b/kalzium/kalziumglpart.cpp new file mode 100644 index 0000000..8c23c03 --- /dev/null +++ b/kalzium/kalziumglpart.cpp @@ -0,0 +1,45 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "kalziumglpart.h" + +typedef KParts::GenericFactory KalziumGLPartFactory; + +K_EXPORT_COMPONENT_FACTORY (libkalziumglpart, KalziumGLPartFactory) + +KalziumGLPart::KalziumGLPart(QWidget* parentWidget, const char* widgetName, QObject* parent, const QStringList& args) +{ + kDebug() << "KalziumGLPart::KalziumGLPart()" << endl; +} + +KalziumGLPart::~KalziumGLPart() +{ + kDebug() << "KalziumGLPart::~KalziumGLPart()" << endl; +} + +KAboutData *KalziumGLPart::createAboutData() +{ + KAboutData* aboutData = new KAboutData( "kalzium", I18N_NOOP("KalziumGLPart"), + "1.1.1", I18N_NOOP("A cool thing"), + KAboutData::License_GPL, + "(c) 2006, Carsten Niehaus", 0, "http://edu.kde.org/kalzium/index.php", + "kalzium@kde.org"); + aboutData->addAuthor("Carsten Niehaus.",0, "cniehaus@kde.org"); + + return aboutData; +} + +bool KalziumGLPart::openURL(const KUrl& url) +{ + kDebug() << "KalziumGLPart::openURL()" << endl; +} diff --git a/kalzium/kalziumglpart.h b/kalzium/kalziumglpart.h new file mode 100644 index 0000000..0f3718a --- /dev/null +++ b/kalzium/kalziumglpart.h @@ -0,0 +1,20 @@ +#ifndef KALZIUMGLPART_H +#define KALZIUMGLPART_H + +#include +#include + +class KalziumGLPart : public KParts::ReadOnlyPart +{ + Q_OBJECT + public: + KalziumGLPart(QWidget*, const char*, QObject*, const QStringList&); + virtual ~KalziumGLPart(); + + static KAboutData* createAboutData(); + + public slots: + bool openURL(const KUrl& url); +}; + +#endif // KALZIUMGLPART_H