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

kig

  • sources
  • kde-4.12
  • kdeedu
  • kig
  • objects
objects/common.h
Go to the documentation of this file.
1 // Copyright (C) 2002 Dominique Devriese <devriese@kde.org>
2 
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
7 
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 // 02110-1301, USA.
17 
18 #ifndef KIG_OBJECTS_COMMON_H
19 #define KIG_OBJECTS_COMMON_H
20 
21 #include <set>
22 #include <vector>
23 #include <qbytearray.h>
24 #include <qlist.h>
25 #include <qstringlist.h>
26 #include <cassert>
27 #include <klocale.h>
28 
29 class Coordinate;
30 class KigDocument;
31 class KigPainter;
32 class KigPart;
33 class KigWidget;
34 class NormalMode;
35 class ObjectCalcer;
36 class ObjectDrawer;
37 class ObjectHolder;
38 class ObjectImp;
39 class ObjectImpType;
40 class ObjectPropertyCalcer;
41 class ObjectType;
42 class ObjectTypeCalcer;
43 class QDomDocument;
44 class QDomElement;
45 class Rect;
46 class ScreenInfo;
47 class Transformation;
48 
49 typedef std::vector<const ObjectImp*> Args;
50 typedef QList<QByteArray> QByteArrayList;
51 
52 template<typename T>
53 void delete_all( T begin, T end )
54 {
55  for( ; begin != end; ++begin )
56  {
57  delete *begin;
58  }
59 }
60 
64 std::vector<ObjectCalcer*> getAllCalcers( const std::vector<ObjectHolder*>& os );
65 
69 std::vector<ObjectCalcer*> getCalcers( const std::vector<ObjectHolder*>& os );
70 
99 class FakeClass {
100 public:
101  FakeClass( const ObjectType* ) {
102  }
103 };
104 
105 #define KIG_INSTANTIATE_OBJECT_TYPE_INSTANCE( type ) static class FakeClass _fake_class_instance_##type( type::instance() );
106 
107 #endif
FakeClass::FakeClass
FakeClass(const ObjectType *)
Definition: objects/common.h:101
ObjectImpType
Instances of this class represent a certain ObjectImp type.
Definition: object_imp.h:95
getCalcers
std::vector< ObjectCalcer * > getCalcers(const std::vector< ObjectHolder * > &os)
get the calcers that the holders represent ( not their namecalcers )
Definition: common.cc:34
Rect
This file is part of Kig, a KDE program for Interactive Geometry...
Definition: rect.h:34
ObjectTypeCalcer
This is an ObjectCalcer that uses one of the various ObjectType's to calculate its ObjectImp...
Definition: object_calcer.h:183
ScreenInfo
ScreenInfo is a simple utility class that maps a region of the document onto a region of the screen...
Definition: screeninfo.h:31
Coordinate
The Coordinate class is the basic class representing a 2D location by its x and y components...
Definition: coordinate.h:33
delete_all
void delete_all(T begin, T end)
Definition: objects/common.h:53
KigPainter
KigPainter is an extended QPainter.
Definition: kigpainter.h:51
ObjectHolder
An ObjectHolder represents an object as it is known to the document.
Definition: object_holder.h:40
ObjectCalcer
An ObjectCalcer is an object that represents an algorithm for calculating an ObjectImp from other Obj...
Definition: object_calcer.h:66
Args
std::vector< const ObjectImp * > Args
Definition: objects/common.h:47
Transformation
Class representing a transformation.
Definition: kigtransform.h:37
getAllCalcers
std::vector< ObjectCalcer * > getAllCalcers(const std::vector< ObjectHolder * > &os)
get the calcers that the holders represent and their namecalcers
Definition: common.cc:21
KigWidget
This class is the real widget showing the document.
Definition: kig_view.h:50
ObjectPropertyCalcer
This is an ObjectCalcer that has a single parent, and gets a certain property from it in its calc() m...
Definition: object_calcer.h:276
ObjectType
The ObjectType class is a thing that represents the "behaviour" for a certain type.
Definition: object_type.h:32
ObjectDrawer
A class holding some information about how a certain object is drawn on the window.
Definition: object_drawer.h:47
FakeClass
The below is a trick.
Definition: objects/common.h:99
KigDocument
KigDocument is the class holding the real data in a Kig document.
Definition: kig_document.h:36
QByteArrayList
QList< QByteArray > QByteArrayList
Definition: objects/common.h:50
ObjectImp
The ObjectImp class represents the behaviour of an object after it is calculated. ...
Definition: object_imp.h:226
KigPart
This is a "Part".
Definition: kig_part.h:68
NormalMode
Definition: normal.h:26
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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