• 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
  • GenerateGraph
GenerateGraphToolsPlugin.cpp
Go to the documentation of this file.
1 /*
2  This file is part of Rocs.
3  Copyright (C) 2011-2012 Andreas Cord-Landwehr <cola@uni-paderborn.de>
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU General Public License as
7  published by the Free Software Foundation; either version 2 of
8  the License, or (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #include "GenerateGraphToolsPlugin.h"
20 #include "GenerateGraphWidget.h"
21 #include "../ToolsPluginInterface.h"
22 #include <CoreTypes.h>
23 #include <Document.h>
24 #include <DocumentManager.h>
25 
26 #include <KAboutData>
27 #include <KGenericFactory>
28 #include <KLocalizedString>
29 
30 #include <map>
31 
32 static const KAboutData aboutdata("rocs_generategraphplugin", 0, ki18nc("@Title Displayed plugin name", "Generate Graph") , "0.1");
33 
34 K_PLUGIN_FACTORY(ToolsPluginFactory, registerPlugin<GenerateGraphToolPlugin>();)
35 K_EXPORT_PLUGIN(ToolsPluginFactory(aboutdata))
36 
37 GenerateGraphToolPlugin::GenerateGraphToolPlugin(QObject* parent, const QList<QVariant> & /* args*/)
38 : ToolsPluginInterface(ToolsPluginFactory::componentData(), parent)
39 {
40 
41 }
42 
43 GenerateGraphToolPlugin::~GenerateGraphToolPlugin()
44 {
45 
46 }
47 
48 void GenerateGraphToolPlugin::run(Document *document) const
49 {
50  if (document == 0) {
51  document = DocumentManager::self().activeDocument();
52  }
53  QPointer<GenerateGraphWidget> dialog = new GenerateGraphWidget(document);
54  dialog->exec();
55 
56  return;
57 }
58 
59 #include "GenerateGraphToolsPlugin.moc"
QPointer
QObject
GenerateGraphToolPlugin::~GenerateGraphToolPlugin
~GenerateGraphToolPlugin()
Definition: GenerateGraphToolsPlugin.cpp:43
QList
ToolsPluginInterface
This interface must be implemented by all Visual graph editor tools.
Definition: ToolsPluginInterface.h:73
GenerateGraphToolsPlugin.h
GenerateGraphWidget.h
GenerateGraphToolPlugin
Definition: GenerateGraphToolsPlugin.h:26
GenerateGraphWidget
Definition: GenerateGraphWidget.h:28
aboutdata
static const KAboutData aboutdata("rocs_generategraphplugin", 0, ki18nc("@Title Displayed plugin name","Generate Graph"),"0.1")
GenerateGraphToolPlugin::run
void run(Document *document=0) const
Implement this method for each plugin.
Definition: GenerateGraphToolsPlugin.cpp:48
QVariant
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