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

kig

  • sources
  • kde-4.14
  • kdeedu
  • kig
  • objects
base_type.h
Go to the documentation of this file.
1 // Copyright (C) 2003 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_BASE_TYPE_H
19 #define KIG_OBJECTS_BASE_TYPE_H
20 
21 #include "object_type.h"
22 
23 #include "../misc/argsparser.h"
24 
25 class LineData;
26 
27 class ObjectABType
28  : public ArgsParserObjectType
29 {
30 protected:
31  ObjectABType( const char* fulltypename, const ArgsParser::spec* argsspec, int n );
32  ~ObjectABType();
33 public:
34  ObjectImp* calc( const Args& args, const KigDocument& ) const;
35  bool canMove( const ObjectTypeCalcer& o ) const;
36  bool isFreelyTranslatable( const ObjectTypeCalcer& o ) const;
37  std::vector<ObjectCalcer*> movableParents( const ObjectTypeCalcer& ourobj ) const;
38  void move( ObjectTypeCalcer& o, const Coordinate& to,
39  const KigDocument& d ) const;
40  const Coordinate moveReferencePoint( const ObjectTypeCalcer& o ) const;
41 
42  // mp: calcx was an overloaded calc, which caused a compilation warning
43  virtual ObjectImp* calcx( const Coordinate& a, const Coordinate& b ) const = 0;
44 };
45 
46 class ObjectLPType
47  : public ArgsParserObjectType
48 {
49 protected:
50  ObjectLPType( const char* fullname, const ArgsParser::spec* spec, int n );
51  ~ObjectLPType();
52 public:
53  ObjectImp* calc( const Args& args, const KigDocument& ) const;
54 
55  virtual ObjectImp* calc( const LineData& a, const Coordinate& b ) const = 0;
56 };
57 
58 #endif
ObjectABType::move
void move(ObjectTypeCalcer &o, const Coordinate &to, const KigDocument &d) const
Definition: base_type.cc:64
ObjectABType
Definition: base_type.h:27
ArgsParserObjectType
This is a convenience subclass of ObjectType that a type should inherit from if its parents can be sp...
Definition: object_type.h:113
LineData
Simple class representing a line.
Definition: misc/common.h:49
ObjectABType::movableParents
std::vector< ObjectCalcer * > movableParents(const ObjectTypeCalcer &ourobj) const
Definition: base_type.cc:102
ObjectLPType
Definition: base_type.h:46
ObjectABType::ObjectABType
ObjectABType(const char *fulltypename, const ArgsParser::spec *argsspec, int n)
Definition: base_type.cc:27
ObjectABType::moveReferencePoint
const Coordinate moveReferencePoint(const ObjectTypeCalcer &o) const
Definition: base_type.cc:95
ObjectTypeCalcer
This is an ObjectCalcer that uses one of the various ObjectType's to calculate its ObjectImp...
Definition: object_calcer.h:183
Coordinate
The Coordinate class is the basic class representing a 2D location by its x and y components...
Definition: coordinate.h:33
object_type.h
ObjectLPType::~ObjectLPType
~ObjectLPType()
Definition: base_type.cc:83
ObjectABType::isFreelyTranslatable
bool isFreelyTranslatable(const ObjectTypeCalcer &o) const
Definition: base_type.cc:58
ObjectLPType::ObjectLPType
ObjectLPType(const char *fullname, const ArgsParser::spec *spec, int n)
Definition: base_type.cc:78
Args
std::vector< const ObjectImp * > Args
Definition: objects/common.h:47
ObjectABType::~ObjectABType
~ObjectABType()
Definition: base_type.cc:32
ArgsParser::spec
Definition: argsparser.h:113
KigDocument
KigDocument is the class holding the real data in a Kig document.
Definition: kig_document.h:36
ObjectABType::canMove
bool canMove(const ObjectTypeCalcer &o) const
Definition: base_type.cc:47
ObjectImp
The ObjectImp class represents the behaviour of an object after it is calculated. ...
Definition: object_imp.h:226
ObjectABType::calc
ObjectImp * calc(const Args &args, const KigDocument &) const
Definition: base_type.cc:36
ObjectABType::calcx
virtual ObjectImp * calcx(const Coordinate &a, const Coordinate &b) const =0
ObjectLPType::calc
ObjectImp * calc(const Args &args, const KigDocument &) const
Definition: base_type.cc:87
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:05 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
  • 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