vlayercmd.h
1/* This file is part of the KDE project
2 Copyright (C) 2001, The Karbon Developers
3 Copyright (C) 2002, The Karbon Developers
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef __VLAYERCMD_H__
22#define __VLAYERCMD_H__
23
24#include "vcommand.h"
25#include "vobject.h"
26
27
28class VDocument;
29class VLayer;
30
31
32class VLayerCmd : public VCommand
33{
34public:
38 enum VLayerCmdType
39 {
40 addLayer,
41 raiseLayer,
42 lowerLayer,
43 deleteLayer
44 };
45
46 VLayerCmd( VDocument* doc, const TQString& name, VLayer* layer, VLayerCmdType order );
47 virtual ~VLayerCmd() {}
48
49 virtual void execute();
50 virtual void unexecute();
51
52protected:
53 VLayer* m_layer;
54 VLayerCmdType m_cmdType;
55 VObject::VState m_oldState;
56};
57
58#endif
59
The base class for all karbon commands.
Definition vcommand.h:42
virtual void unexecute()
Unexecutes the command.
Definition vcommand.h:75
TQString name() const
Returns the name of the command.
Definition vcommand.h:91
virtual void execute()=0
Executes the command.
All non-visual, static doc info is in here.
Definition vdocument.h:53
VLayer manages a set of vobjects.
Definition vlayer.h:37