1
// Copyright (C) 2003 Dominique Devriese <devriese@kde.org>
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.
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.
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
18
#ifndef KIG_OBJECTS_TEXT_TYPE_H
19
#define KIG_OBJECTS_TEXT_TYPE_H
21
#include "object_type.h"
26
const ArgsParser mparser;
28
GenericTextType( const char* fulltypename );
31
const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
32
bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
33
const ObjectImpType* resultId() const;
35
ObjectImp* calc( const Args& parents, const KigDocument& d ) const;
37
std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& os ) const;
38
Args sortArgs( const Args& args ) const;
40
bool canMove( const ObjectTypeCalcer& ourobj ) const;
41
bool isFreelyTranslatable( const ObjectTypeCalcer& ourobj ) const;
42
std::vector<ObjectCalcer*> movableParents( const ObjectTypeCalcer& ourobj ) const;
43
const Coordinate moveReferencePoint( const ObjectTypeCalcer& ourobj ) const;
44
void move( ObjectTypeCalcer& ourobj, const Coordinate& to,
45
const KigDocument& ) const;
47
QStringList specialActions() const;
48
void executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& c,
49
KigPart& d, KigWidget& w, NormalMode& m ) const;
51
const ArgsParser& argParser() const;
55
: public GenericTextType
60
static const TextType* instance();
62
QStringList specialActions() const;
63
void executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& c,
64
KigPart& d, KigWidget& w, NormalMode& m ) const;
68
: public GenericTextType
73
static const NumericTextType* instance();
75
QStringList specialActions() const;
76
void executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& c,
77
KigPart& d, KigWidget& w, NormalMode& m ) const;