macroitem.h
1/***************************************************************************
2 * This file is part of the KDE project
3 * copyright (C) 2006 by Sebastian Sauer (mail@dipe.org)
4 * copyright (C) 2006 by Sascha Kupper (kusato@kfnv.de)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 * This program 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 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 ***************************************************************************/
19
20#ifndef KOMACRO_MACROITEM_H
21#define KOMACRO_MACROITEM_H
22
23#include <tqobject.h>
24
25#include <ksharedptr.h>
26
27// Forward declarations.
28class TQDomElement;
29
30#include "action.h"
31#include "context.h"
32
33namespace KoMacro {
34
35 // Forward-declarations.
36 //class Action;
37
46 class KOMACRO_EXPORT MacroItem : public TDEShared
47 {
48
49 public:
50
54 typedef TQValueList<TDESharedPtr<MacroItem > > List;
55
59 explicit MacroItem();
60
64 ~MacroItem();
65
70 TQString comment() const;
71
76 void setComment(const TQString& comment);
77
84 TDESharedPtr<Action> action() const;
85
89 void setAction(TDESharedPtr<Action> action);
90
101 TQVariant variant(const TQString& name, bool checkaction = false) const;
102
113 TDESharedPtr<Variable> variable(const TQString& name, bool checkaction = false) const;
114
118 TQMap<TQString, TDESharedPtr<Variable> > variables() const;
119
125 bool setVariant(const TQString& name, const TQVariant& variant);
126
131 TDESharedPtr<Variable> addVariable(const TQString& name, const TQVariant& variant);
132
133 private:
135 class Private;
137 Private* const d;
138 };
139
140}
141
142#endif
The MacroItem class is an item in a Macro and represents one single execution step.
Definition macroitem.h:47
TQValueList< TDESharedPtr< MacroItem > > List
A list of MacroItem instances.
Definition macroitem.h:54