• 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
  • filters
asyexporterimpvisitor.h
Go to the documentation of this file.
1 // Copyright (C) 2010,2011 Raoul Bourquin
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_FILTERS_ASYEXPORTERIMPVISITOR_H
19 #define KIG_FILTERS_ASYEXPORTERIMPVISITOR_H
20 
21 #include "../kig/kig_document.h"
22 #include "../kig/kig_part.h"
23 #include "../kig/kig_view.h"
24 
25 #include "../objects/circle_imp.h"
26 #include "../objects/cubic_imp.h"
27 #include "../objects/bezier_imp.h"
28 #include "../objects/curve_imp.h"
29 #include "../objects/line_imp.h"
30 #include "../objects/locus_imp.h"
31 #include "../objects/object_drawer.h"
32 #include "../objects/object_holder.h"
33 #include "../objects/object_imp.h"
34 #include "../objects/other_imp.h"
35 #include "../objects/point_imp.h"
36 #include "../objects/polygon_imp.h"
37 #include "../objects/text_imp.h"
38 
39 
40 class AsyExporterImpVisitor
41  : public ObjectImpVisitor
42 {
43  QTextStream& mstream;
44  ObjectHolder* mcurobj;
45  const KigWidget& mw;
46  Rect msr;
47 public:
48  void visit( ObjectHolder* obj );
49 
50  AsyExporterImpVisitor( QTextStream& s, const KigWidget& w )
51  : mstream( s ), mw( w ), msr( mw.showingRect() )
52  {
53  }
54  using ObjectImpVisitor::visit;
55  void visit( const LineImp* imp );
56  void visit( const PointImp* imp );
57  void visit( const TextImp* imp );
58  void visit( const AngleImp* imp );
59  void visit( const VectorImp* imp );
60  void visit( const LocusImp* imp );
61  void visit( const CircleImp* imp );
62  void visit( const ConicImp* imp );
63  void visit( const CubicImp* imp );
64  void visit( const SegmentImp* imp );
65  void visit( const RayImp* imp );
66  void visit( const ArcImp* imp );
67  void visit( const FilledPolygonImp* imp );
68  void visit( const ClosedPolygonalImp* imp );
69  void visit( const OpenPolygonalImp* imp );
70  void visit ( const BezierImp* imp );
71  void visit ( const RationalBezierImp* imp );
72 
73  double unit;
74 
75 private:
80  static const uint maxlinelength = 500;
81 
85  QString emitPenColor( const QColor& c );
86 
90  QString emitPenStyle( const Qt::PenStyle& style );
91 
95  QString emitPenSize( const int width );
96 
100  QString emitPen( const QColor& c, const int width, const Qt::PenStyle& style );
101 
106  QString emitCoord( const Coordinate& c );
107 
111  void emitLine( const Coordinate& a, const Coordinate& b, const int width,
112  const Qt::PenStyle s, bool vector = false );
113 
117  void newLine();
118 
123  double dimRealToCoord( int dim );
124 
128  void plotGenericCurve( const CurveImp* imp );
129 };
130 
131 #endif
ClosedPolygonalImp
An ObjectImp representing a closed polygonal.
Definition: polygon_imp.h:130
BezierImp
An ObjectImp representing polynomial Bézier Curve.
Definition: bezier_imp.h:31
CubicImp
An ObjectImp representing a cubic.
Definition: cubic_imp.h:29
LocusImp
LocusImp is an imp that consists of a copy of the curveimp that the moving point moves over...
Definition: locus_imp.h:57
OpenPolygonalImp
An ObjectImp representing an open polygonal.
Definition: polygon_imp.h:157
ObjectImpVisitor::visit
void visit(const ObjectImp *imp)
Definition: object_imp.cc:81
CircleImp
An ObjectImp representing a circle.
Definition: circle_imp.h:27
TextImp
Definition: text_imp.h:26
RayImp
An ObjectImp representing a ray.
Definition: line_imp.h:136
Rect
This file is part of Kig, a KDE program for Interactive Geometry...
Definition: rect.h:34
RationalBezierImp
An ObjectImp representing a rational Bézier curve.
Definition: bezier_imp.h:100
Coordinate
The Coordinate class is the basic class representing a 2D location by its x and y components...
Definition: coordinate.h:33
AsyExporterImpVisitor
Definition: asyexporterimpvisitor.h:40
VectorImp
An ObjectImp representing a vector.
Definition: other_imp.h:99
ObjectHolder
An ObjectHolder represents an object as it is known to the document.
Definition: object_holder.h:40
PointImp
An ObjectImp representing a point.
Definition: point_imp.h:27
AsyExporterImpVisitor::unit
double unit
Definition: asyexporterimpvisitor.h:73
KigWidget
This class is the real widget showing the document.
Definition: kig_view.h:50
AsyExporterImpVisitor::AsyExporterImpVisitor
AsyExporterImpVisitor(QTextStream &s, const KigWidget &w)
Definition: asyexporterimpvisitor.h:50
ConicImp
An ObjectImp representing a conic.
Definition: conic_imp.h:39
LineImp
An ObjectImp representing a line.
Definition: line_imp.h:184
ArcImp
An ObjectImp representing an arc.
Definition: other_imp.h:169
FilledPolygonImp
An ObjectImp representing a filled polygon.
Definition: polygon_imp.h:101
AsyExporterImpVisitor::visit
void visit(ObjectHolder *obj)
Definition: asyexporterimpvisitor.cc:143
uint
unsigned int uint
Definition: object_imp.h:87
ObjectImpVisitor
Definition: object_imp.h:56
AngleImp
An ObjectImp representing an angle.
Definition: other_imp.h:28
CurveImp
This class represents a curve: something which is composed of points, like a line, a circle, a locus.
Definition: curve_imp.h:27
SegmentImp
An ObjectImp representing a segment.
Definition: line_imp.h:81
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:38 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