~ubuntu-branches/ubuntu/precise/kalzium/precise

« back to all changes in this revision

Viewing changes to compoundviewer/kalziumglpart.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Philip Muškovac
  • Date: 2011-07-03 12:28:58 UTC
  • Revision ID: james.westby@ubuntu.com-20110703122858-q1yyxncs89e4w0hs
Tags: upstream-4.6.90+repack
Import upstream version 4.6.90+repack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *  Copyright (C) 2006 by Carsten Niehaus <cniehaus@kde.org>
 
3
 *  Copyright (C) 2007-2008 by Marcus D. Hanwell <marcus@cryos.org>
 
4
 ***************************************************************************/
 
5
 
 
6
/***************************************************************************
 
7
 *                                                                         *
 
8
 *   This program is free software; you can redistribute it and/or modify  *
 
9
 *   it under the terms of the GNU General Public License as published by  *
 
10
 *   the Free Software Foundation; either version 2 of the License, or     *
 
11
 *   (at your option) any later version.                                   *
 
12
 *                                                                         *
 
13
 ***************************************************************************/
 
14
#include "kalziumglpart.h"
 
15
 
 
16
#include "kalziumglwidget.h"
 
17
 
 
18
#include <kparts/genericfactory.h>
 
19
 
 
20
KAboutData kalziumGLPartAboutData()
 
21
{
 
22
    KAboutData aboutData(
 
23
            "kalzium", QByteArray(), ki18n("Kalzium OpenGL Part"), "1.1.1",
 
24
            ki18n("A cool thing"),
 
25
            KAboutData::License_GPL, ki18n("(c) 2006, Carsten Niehaus"),
 
26
            KLocalizedString(),
 
27
            "http://edu.kde.org/kalzium/index.php"
 
28
    );
 
29
    aboutData.addAuthor(ki18n("Carsten Niehaus"), KLocalizedString(), "cniehaus@kde.org");
 
30
    aboutData.addAuthor(ki18n("Marcus D. Hanwell"), KLocalizedString(), "marcus@cryos.org");
 
31
 
 
32
    return aboutData;
 
33
}
 
34
 
 
35
K_PLUGIN_FACTORY(KalziumGLPartFactory, registerPlugin<KalziumGLPart>();)
 
36
K_EXPORT_PLUGIN(KalziumGLPartFactory(kalziumGLPartAboutData()))
 
37
 
 
38
KalziumGLPart::KalziumGLPart(QWidget* parentWidget, QObject* parent, const QVariantList& args)
 
39
{
 
40
    Q_UNUSED(parent);
 
41
    Q_UNUSED(parentWidget);
 
42
    Q_UNUSED(args);
 
43
    kDebug() << "KalziumGLPart::KalziumGLPart()";
 
44
    
 
45
    m_widget = new KalziumGLWidget();
 
46
    m_widget->setObjectName("KalziumGLWidget-KPart");
 
47
}
 
48
 
 
49
KalziumGLPart::~KalziumGLPart()
 
50
{
 
51
    delete m_widget;
 
52
    kDebug() << "KalziumGLPart::~KalziumGLPart()";
 
53
}
 
54
 
 
55
bool KalziumGLPart::openFile()
 
56
{
 
57
    return m_widget->openFile( url().toLocalFile() );
 
58
}
 
59
 
 
60
#include "kalziumglpart.moc"