• 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
  • Scene
GraphicsLayout.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 "GraphicsLayout.h"
20 
21 #include "Document.h"
22 #include "DataStructure.h"
23 #include "Data.h"
24 #include "Pointer.h"
25 #include "DocumentManager.h"
26 #include <DataType.h>
27 #include <PointerType.h>
28 
29 GraphicsLayout::GraphicsLayout(QObject* parent) : QObject(parent)
30 { }
31 
32 GraphicsLayout::~GraphicsLayout()
33 {
34 
35 }
36 
37 GraphicsLayout* GraphicsLayout::_self = 0;
38 
39 GraphicsLayout* GraphicsLayout::self()
40 {
41  if (!_self) {
42  _self = new GraphicsLayout();
43  }
44  return _self;
45 }
46 
47 
48 void GraphicsLayout::setViewStyleDataNode(int style)
49 {
50  _viewStyleDataNode = style;
51  Document *document = DocumentManager::self().activeDocument();
52  foreach(int identifier, document->dataTypeList()) {
53  document->updateGraphics(document->dataType(identifier));
54  }
55  emit changed();
56 }
57 
58 
59 void GraphicsLayout::setViewStyleDataEdge(int style)
60 {
61  _viewStyleDataEdge = style;
62  Document *document = DocumentManager::self().activeDocument();
63  foreach(int identifier, document->pointerTypeList()) {
64  document->updateGraphics(document->pointerType(identifier));
65  }
66  emit changed();
67 }
68 
69 int GraphicsLayout::viewStyleDataNode() const
70 {
71  return _viewStyleDataNode;
72 }
73 
74 int GraphicsLayout::viewStyleDataEdge() const
75 {
76  return _viewStyleDataEdge;
77 }
GraphicsLayout::viewStyleDataNode
int viewStyleDataNode() const
Definition: GraphicsLayout.cpp:69
GraphicsLayout::changed
void changed()
GraphicsLayout
Definition: GraphicsLayout.h:25
GraphicsLayout::self
static GraphicsLayout * self()
Definition: GraphicsLayout.cpp:39
GraphicsLayout::viewStyleDataEdge
int viewStyleDataEdge() const
Definition: GraphicsLayout.cpp:74
GraphicsLayout::setViewStyleDataEdge
void setViewStyleDataEdge(int style)
Definition: GraphicsLayout.cpp:59
GraphicsLayout::~GraphicsLayout
~GraphicsLayout()
Definition: GraphicsLayout.cpp:32
GraphicsLayout.h
QObject
GraphicsLayout::setViewStyleDataNode
void setViewStyleDataNode(int style)
Definition: GraphicsLayout.cpp:48
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