kexi

kexivariable.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 Bernd Steindorff (bernd@itii.de)
5 * copyright (C) 2006 by Sascha Kupper (kusato@kfnv.de)
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this program; see the file COPYING. 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 KEXIMACRO_KEXIVARIABLE_H
22#define KEXIMACRO_KEXIVARIABLE_H
23
24#include "../lib/manager.h"
25#include "../lib/exception.h"
26#include "../lib/action.h"
27#include "../lib/variable.h"
28
29#include <ksharedptr.h>
30
31class KexiMainWindow;
32
33namespace KoMacro {
34 class Context;
35}
36
37namespace KexiMacro {
38
43 template<class ACTIONIMPL>
45 {
46 public:
47
51 KexiVariable(ACTIONIMPL* actionimpl, const TQString& name, const TQString& caption)
52 : KoMacro::Variable()
53 , m_actionimpl(actionimpl)
54 {
56 setText(caption);
57 }
58
59 protected:
60
65 ACTIONIMPL* actionImpl() const
66 {
67 return m_actionimpl;
68 }
69
70 private:
72 ACTIONIMPL* m_actionimpl;
73 };
74}
75
76#endif
ACTIONIMPL * actionImpl() const
KexiVariable(ACTIONIMPL *actionimpl, const TQString &name, const TQString &caption)
Constructor.
Kexi's main window interface This interface is implemented by KexiMainWindowImpl class.
The context of an execution.
Definition context.h:44
A variable value used to provide abstract access to variables.
Definition variable.h:39
void setText(const TQString &text)
Set the caption.
Definition variable.cpp:152
TQString name() const
Definition variable.cpp:137
Variable()
Default constructor.
Definition variable.cpp:79
void setName(const TQString &name)
Set the name.
Definition variable.cpp:142