]> Git trees. - libqmvoc.git/commitdiff
* Very first version of the new KPart-based molecularviewer
authorCarsten Niehaus <cniehaus@gmx.de>
Sat, 25 Nov 2006 10:19:20 +0000 (10:19 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Sat, 25 Nov 2006 10:19:20 +0000 (10:19 +0000)
svn path=/trunk/KDE/kdeedu/kalzium/src/kalziumglpart.cpp; revision=607592

kalzium/kalziumgl_part.desktop [new file with mode: 0644]
kalzium/kalziumglpart.cpp [new file with mode: 0644]
kalzium/kalziumglpart.h [new file with mode: 0644]

diff --git a/kalzium/kalziumgl_part.desktop b/kalzium/kalziumgl_part.desktop
new file mode 100644 (file)
index 0000000..95222f4
--- /dev/null
@@ -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 (file)
index 0000000..8c23c03
--- /dev/null
@@ -0,0 +1,45 @@
+#include <kapplication.h>
+#include <kinstance.h>
+#include <kiconloader.h>
+#include <kaction.h>
+#include <kstdaction.h>
+#include <kxmlguifactory.h>
+#include <kparts/genericfactory.h>
+#include <kprogress.h>
+#include <kio/netaccess.h>
+#include <kstandarddirs.h>
+
+#include <QStringList>
+
+#include "kalziumglpart.h"
+
+typedef KParts::GenericFactory<KalziumGLPart> 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 (file)
index 0000000..0f3718a
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef KALZIUMGLPART_H
+#define KALZIUMGLPART_H
+
+#include <kparts/factory.h>
+#include <kparts/genericfactory.h>
+
+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