• 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
object_factory.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_OBJECT_FACTORY_H
19 #define KIG_OBJECTS_OBJECT_FACTORY_H
20 
21 #include "common.h"
22 
23 class ObjectFactory
24 {
25 public:
26 
27  static const ObjectFactory* instance();
28 
33  ObjectHolder* fixedPoint( const Coordinate& c ) const;
34  ObjectTypeCalcer* fixedPointCalcer( const Coordinate& c ) const;
35 
41  ObjectHolder* numericValue(
42  const double value, const Coordinate& loc, const KigDocument& doc ) const;
43  ObjectTypeCalcer* numericValueCalcer(
44  const double value, const Coordinate& loc, const KigDocument& doc ) const;
45 
52  ObjectTypeCalcer* cursorPointCalcer( const Coordinate& c ) const;
53 
58  ObjectTypeCalcer* relativePointCalcer( ObjectCalcer* o, const Coordinate& loc ) const;
59 
64  ObjectHolder* constrainedPoint( ObjectCalcer* curve, double param ) const;
65  ObjectTypeCalcer* constrainedPointCalcer( ObjectCalcer* curve, double param ) const;
70  ObjectTypeCalcer* constrainedPointCalcer(
71  ObjectCalcer* curve, const Coordinate& c, const KigDocument& ) const;
72  ObjectHolder* constrainedPoint(
73  ObjectCalcer* curve, const Coordinate& c, const KigDocument& ) const;
74 
75  ObjectTypeCalcer* constrainedRelativePointCalcer( ObjectCalcer* curve, double param ) const;
76 
86  ObjectTypeCalcer* sensiblePointCalcer(
87  const Coordinate& c, const KigDocument& d, const KigWidget& w ) const;
88  ObjectHolder* sensiblePoint(
89  const Coordinate& c, const KigDocument& d, const KigWidget& w ) const;
90 
94  void redefinePoint( ObjectTypeCalcer* point, const Coordinate& c,
95  KigDocument& d, const KigWidget& w ) const;
96 
105  ObjectTypeCalcer* locusCalcer( ObjectCalcer* a, ObjectCalcer* b ) const;
106  ObjectHolder* locus( ObjectCalcer* a, ObjectCalcer* b ) const;
107 
112  ObjectHolder* label(
113  const QString& s, const Coordinate& loc,
114  bool needframe, const std::vector<ObjectCalcer*>& parents,
115  const KigDocument& doc ) const;
116  ObjectTypeCalcer* labelCalcer(
117  const QString& s, const Coordinate& loc,
118  bool needframe, const std::vector<ObjectCalcer*>& parents,
119  const KigDocument& doc ) const;
120 
125  ObjectTypeCalcer* attachedLabelCalcer(
126  const QString& s, ObjectCalcer* locationparent,
127  const Coordinate& loc, bool needframe,
128  const std::vector<ObjectCalcer*>& parents,
129  const KigDocument& doc ) const;
135  ObjectCalcer* getAttachPoint(
136  ObjectCalcer* locationparent,
137  const Coordinate& loc,
138  const KigDocument& doc ) const;
139  ObjectHolder* attachedLabel(
140  const QString& s, ObjectCalcer* locationparent,
141  const Coordinate& loc, bool needframe,
142  const std::vector<ObjectCalcer*>& parents,
143  const KigDocument& doc ) const;
144 
153  ObjectPropertyCalcer* propertyObjectCalcer( ObjectCalcer* o, const char* p ) const;
154  ObjectHolder* propertyObject( ObjectCalcer* o, const char* p ) const;
155 };
156 
157 #endif
ObjectFactory::sensiblePoint
ObjectHolder * sensiblePoint(const Coordinate &c, const KigDocument &d, const KigWidget &w) const
Definition: object_factory.cc:286
ObjectFactory::instance
static const ObjectFactory * instance()
Definition: object_factory.cc:90
ObjectFactory::fixedPointCalcer
ObjectTypeCalcer * fixedPointCalcer(const Coordinate &c) const
Definition: object_factory.cc:50
ObjectFactory::getAttachPoint
ObjectCalcer * getAttachPoint(ObjectCalcer *locationparent, const Coordinate &loc, const KigDocument &doc) const
this has been added because it comes handy when redefining a text label, we move here all the code fo...
Definition: object_factory.cc:421
ObjectFactory::locusCalcer
ObjectTypeCalcer * locusCalcer(ObjectCalcer *a, ObjectCalcer *b) const
return a locus, defined by the two points ( one constrained, and one following ) a and b ...
Definition: object_factory.cc:355
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
ObjectFactory::propertyObject
ObjectHolder * propertyObject(ObjectCalcer *o, const char *p) const
Definition: object_factory.cc:491
ObjectFactory::labelCalcer
ObjectTypeCalcer * labelCalcer(const QString &s, const Coordinate &loc, bool needframe, const std::vector< ObjectCalcer * > &parents, const KigDocument &doc) const
Definition: object_factory.cc:394
common.h
ObjectFactory::label
ObjectHolder * label(const QString &s, const Coordinate &loc, bool needframe, const std::vector< ObjectCalcer * > &parents, const KigDocument &doc) const
returns a label with text s at point c .
Definition: object_factory.cc:386
ObjectFactory::redefinePoint
void redefinePoint(ObjectTypeCalcer *point, const Coordinate &c, KigDocument &d, const KigWidget &w) const
set point to what sensiblePoint would have returned.
Definition: object_factory.cc:497
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
ObjectFactory::attachedLabelCalcer
ObjectTypeCalcer * attachedLabelCalcer(const QString &s, ObjectCalcer *locationparent, const Coordinate &loc, bool needframe, const std::vector< ObjectCalcer * > &parents, const KigDocument &doc) const
this one does the same as the above, only that the new label is attached to locationparent if it is n...
Definition: object_factory.cc:402
ObjectFactory::fixedPoint
ObjectHolder * fixedPoint(const Coordinate &c) const
this returns a fixed point.
Definition: object_factory.cc:44
ObjectFactory::constrainedPointCalcer
ObjectTypeCalcer * constrainedPointCalcer(ObjectCalcer *curve, double param) const
Definition: object_factory.cc:313
ObjectFactory::constrainedPoint
ObjectHolder * constrainedPoint(ObjectCalcer *curve, double param) const
this returns a constrained point.
Definition: object_factory.cc:323
ObjectFactory::constrainedRelativePointCalcer
ObjectTypeCalcer * constrainedRelativePointCalcer(ObjectCalcer *curve, double param) const
Definition: object_factory.cc:343
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
ObjectFactory::propertyObjectCalcer
ObjectPropertyCalcer * propertyObjectCalcer(ObjectCalcer *o, const char *p) const
returns a property object for the property p of object o .
Definition: object_factory.cc:483
ObjectFactory::cursorPointCalcer
ObjectTypeCalcer * cursorPointCalcer(const Coordinate &c) const
this returns a CursorPointType; this is used during special constructions (e.g.
Definition: object_factory.cc:81
ObjectFactory::sensiblePointCalcer
ObjectTypeCalcer * sensiblePointCalcer(const Coordinate &c, const KigDocument &d, const KigWidget &w) const
this returns a "sensible point".
Definition: object_factory.cc:96
ObjectFactory::attachedLabel
ObjectHolder * attachedLabel(const QString &s, ObjectCalcer *locationparent, const Coordinate &loc, bool needframe, const std::vector< ObjectCalcer * > &parents, const KigDocument &doc) const
Definition: object_factory.cc:474
ObjectFactory::numericValueCalcer
ObjectTypeCalcer * numericValueCalcer(const double value, const Coordinate &loc, const KigDocument &doc) const
Definition: object_factory.cc:65
KigDocument
KigDocument is the class holding the real data in a Kig document.
Definition: kig_document.h:36
ObjectFactory::relativePointCalcer
ObjectTypeCalcer * relativePointCalcer(ObjectCalcer *o, const Coordinate &loc) const
this returns a relative point (to an object).
Definition: object_factory.cc:292
ObjectFactory::numericValue
ObjectHolder * numericValue(const double value, const Coordinate &loc, const KigDocument &doc) const
this returns a numeric label with the value value at the position loc .
Definition: object_factory.cc:59
ObjectFactory
Definition: object_factory.h:23
ObjectFactory::locus
ObjectHolder * locus(ObjectCalcer *a, ObjectCalcer *b) const
Definition: object_factory.cc:381
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