kexi
messageaction.cpp
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 #include "messageaction.h" 00022 00023 #include <core/keximainwindow.h> 00024 00025 #include <klocale.h> 00026 #include <kmessagebox.h> 00027 #include <kdebug.h> 00028 00029 using namespace KexiMacro; 00030 00031 MessageAction::MessageAction() 00032 : KexiAction("message", i18n("Message")) 00033 { 00034 setVariable("caption", i18n("Caption"), QString("")); 00035 setVariable("message", i18n("Message"), QString("")); 00036 } 00037 00038 MessageAction::~MessageAction() 00039 { 00040 } 00041 00042 void MessageAction::activate(KSharedPtr<KoMacro::Context> context) 00043 { 00044 kdDebug() << "MessageAction::activate(KSharedPtr<Context>)" << endl; 00045 const QString caption = context->variable("caption")->variant().toString(); 00046 const QString message = context->variable("message")->variant().toString(); 00047 KMessageBox::information(mainWin(), message, caption); 00048 } 00049 00050 //#include "messageaction.moc"