• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

rocs/VisualEditor

  • sources
  • kde-4.14
  • kdeedu
  • rocs
  • VisualEditor
  • Tools
ToolsPluginInterface.cpp
Go to the documentation of this file.
1 /*
2  This file is part of Rocs.
3  Copyright 2001-2002 Duncan Mac-Vicar Prett <duncan@kde.org>
4  Copyright 2002-2004 Olivier Goffart <ogoffart@kde.org>
5  Copyright 2010-2011 Tomaz Canabrava <tomaz.canabrava@gmail.com>
6  Copyright 2010 Wagner Reck <wagner.reck@gmail.com>
7  Copyright 2013 Andreas Cord-Landwehr <cola@uni-paderborn.de>
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Lesser General Public
11  License as published by the Free Software Foundation; either
12  version 2.1 of the License, or (at your option) any later version.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #include "ToolsPluginInterface.h"
24 #include "ToolManager.h"
25 #include <KPluginInfo>
26 #include <KDebug>
27 
28 class ToolsPluginInterfacePrivate
29 {
30 public:
31  // currently not needed
32 };
33 
34 
35 ToolsPluginInterface::ToolsPluginInterface(const KComponentData &instance, QObject *parent)
36  : QObject(parent)
37  , KXMLGUIClient()
38  , d(new ToolsPluginInterfacePrivate)
39 {
40  setComponentData(instance);
41 }
42 
43 ToolsPluginInterface::~ToolsPluginInterface()
44 {
45  delete d;
46 }
47 
48 QString ToolsPluginInterface::pluginId() const
49 {
50  return QString::fromLatin1(metaObject()->className());
51 }
52 
53 
54 QString ToolsPluginInterface::displayName()
55 {
56  return pluginInfo().isValid() ? pluginInfo().name() : QString();
57 }
58 
59 QStringList ToolsPluginInterface::supportedDataStructures()
60 {
61  return pluginInfo().property(QLatin1String("X-Rocs-SupportedDataStructures")).toStringList();
62 }
63 
64 KPluginInfo ToolsPluginInterface::pluginInfo()
65 {
66  return ToolManager::self().pluginInfo(this);
67 }
QObject::className
const char * className() const
KXMLGUIClient
ToolsPluginInterface::displayName
QString displayName()
Returns the display name of this plugin.
Definition: ToolsPluginInterface.cpp:54
QObject::metaObject
virtual const QMetaObject * metaObject() const
ToolManager::pluginInfo
KPluginInfo pluginInfo(ToolsPluginInterface *plugin)
Definition: ToolManager.cpp:124
ToolsPluginInterface::supportedDataStructures
QStringList supportedDataStructures()
Gives list of supported data structures of the tool.
Definition: ToolsPluginInterface.cpp:59
ToolsPluginInterface::pluginId
QString pluginId() const
Return the plugin identifier.
Definition: ToolsPluginInterface.cpp:48
ToolsPluginInterface::~ToolsPluginInterface
virtual ~ToolsPluginInterface()
Definition: ToolsPluginInterface.cpp:43
QObject
QString
ToolManager::self
static ToolManager & self()
Returns self reference to tool manager.
Definition: ToolManager.cpp:105
ToolsPluginInterface::pluginInfo
KPluginInfo pluginInfo()
Return the KPluginInfo object associated with this plugin.
Definition: ToolsPluginInterface.cpp:64
QStringList
ToolManager.h
QLatin1String
ToolsPluginInterface.h
QString::fromLatin1
QString fromLatin1(const char *str, int size)
ToolsPluginInterface::ToolsPluginInterface
ToolsPluginInterface(const KComponentData &instance, QObject *parent)
Definition: ToolsPluginInterface.cpp:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

rocs/VisualEditor

Skip menu "rocs/VisualEditor"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal