kexi
kexivariable.h
00001 /*************************************************************************** 00002 * This file is part of the KDE project 00003 * copyright (C) 2006 by Sebastian Sauer (mail@dipe.org) 00004 * copyright (C) 2006 by Bernd Steindorff (bernd@itii.de) 00005 * copyright (C) 2006 by Sascha Kupper (kusato@kfnv.de) 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Library General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2 of the License, or (at your option) any later version. 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Library General Public License for more details. 00015 * You should have received a copy of the GNU Library General Public License 00016 * along with this program; see the file COPYING. If not, write to 00017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 * Boston, MA 02110-1301, USA. 00019 ***************************************************************************/ 00020 00021 #ifndef KEXIMACRO_KEXIVARIABLE_H 00022 #define KEXIMACRO_KEXIVARIABLE_H 00023 00024 #include "../lib/manager.h" 00025 #include "../lib/exception.h" 00026 #include "../lib/action.h" 00027 #include "../lib/variable.h" 00028 00029 #include <ksharedptr.h> 00030 00031 class KexiMainWindow; 00032 00033 namespace KoMacro { 00034 class Context; 00035 } 00036 00037 namespace KexiMacro { 00038 00043 template<class ACTIONIMPL> 00044 class KexiVariable : public KoMacro::Variable 00045 { 00046 public: 00047 00051 KexiVariable(ACTIONIMPL* actionimpl, const QString& name, const QString& caption) 00052 : KoMacro::Variable() 00053 , m_actionimpl(actionimpl) 00054 { 00055 setName(name); 00056 setText(caption); 00057 } 00058 00059 protected: 00060 00065 ACTIONIMPL* actionImpl() const 00066 { 00067 return m_actionimpl; 00068 } 00069 00070 private: 00072 ACTIONIMPL* m_actionimpl; 00073 }; 00074 } 00075 00076 #endif