~ubuntu-branches/ubuntu/oneiric/kig/oneiric

« back to all changes in this revision

Viewing changes to objects/line_type.h

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2011-07-10 11:57:38 UTC
  • Revision ID: james.westby@ubuntu.com-20110710115738-gdjnn1kctr49lmy9
Tags: upstream-4.6.90+repack
ImportĀ upstreamĀ versionĀ 4.6.90+repack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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_LINE_TYPE_H
 
19
#define KIG_OBJECTS_LINE_TYPE_H
 
20
 
 
21
#include "base_type.h"
 
22
 
 
23
class LineData;
 
24
 
 
25
class SegmentABType
 
26
  : public ObjectABType
 
27
{
 
28
  SegmentABType();
 
29
  ~SegmentABType();
 
30
public:
 
31
  static const SegmentABType* instance();
 
32
 
 
33
  ObjectImp* calcx( const Coordinate& a, const Coordinate& b ) const;
 
34
  const ObjectImpType* resultId() const;
 
35
 
 
36
  QStringList specialActions() const;
 
37
  /**
 
38
   * execute the \p i 'th action from the specialActions above.
 
39
   */
 
40
  void executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& c,
 
41
                      KigPart& d, KigWidget& w, NormalMode& m ) const;
 
42
};
 
43
 
 
44
class LineABType
 
45
  : public ObjectABType
 
46
{
 
47
  LineABType();
 
48
  ~LineABType();
 
49
public:
 
50
  static const LineABType* instance();
 
51
  ObjectImp* calcx( const Coordinate& a, const Coordinate& b ) const;
 
52
  const ObjectImpType* resultId() const;
 
53
};
 
54
 
 
55
class RayABType
 
56
  : public ObjectABType
 
57
{
 
58
  RayABType();
 
59
  ~RayABType();
 
60
public:
 
61
  static const RayABType* instance();
 
62
  ObjectImp* calcx( const Coordinate& a, const Coordinate& b ) const;
 
63
  const ObjectImpType* resultId() const;
 
64
};
 
65
 
 
66
class LinePerpendLPType
 
67
  : public ObjectLPType
 
68
{
 
69
  LinePerpendLPType();
 
70
  ~LinePerpendLPType();
 
71
public:
 
72
  static LinePerpendLPType* instance();
 
73
  ObjectImp* calc( const LineData& a, const Coordinate& b ) const;
 
74
  const ObjectImpType* resultId() const;
 
75
};
 
76
 
 
77
class LineParallelLPType
 
78
  : public ObjectLPType
 
79
{
 
80
  LineParallelLPType();
 
81
  ~LineParallelLPType();
 
82
public:
 
83
  static LineParallelLPType* instance();
 
84
  ObjectImp* calc( const LineData& a, const Coordinate& b ) const;
 
85
  const ObjectImpType* resultId() const;
 
86
};
 
87
 
 
88
class LineByVectorType
 
89
  : public ArgsParserObjectType
 
90
{
 
91
  LineByVectorType();
 
92
  ~LineByVectorType();
 
93
public:
 
94
  static const LineByVectorType* instance();
 
95
  ObjectImp* calc( const Args& args, const KigDocument& ) const;
 
96
  const ObjectImpType* resultId() const;
 
97
};
 
98
 
 
99
class HalflineByVectorType
 
100
  : public ArgsParserObjectType
 
101
{
 
102
  HalflineByVectorType();
 
103
  ~HalflineByVectorType();
 
104
public:
 
105
  static const HalflineByVectorType* instance();
 
106
  ObjectImp* calc( const Args& args, const KigDocument& ) const;
 
107
  const ObjectImpType* resultId() const;
 
108
};
 
109
 
 
110
#endif