testaction.cpp

00001 /***************************************************************************
00002  * testaction.cpp
00003  * This file is part of the KDE project
00004  * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  * You should have received a copy of the GNU Library General Public License
00015  * along with this program; see the file COPYING.  If not, write to
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018  ***************************************************************************/
00019 
00020 #include "testaction.h"
00021 
00022 #include <kdebug.h>
00023 
00024 TestAction::TestAction(Kross::Api::ScriptContainer::Ptr scriptcontainer)
00025     : QWidget()
00026 {
00027     m_actioncollection = new KActionCollection(this, this);
00028 
00029     m_action1 = new KAction("Action1_Text", 0, this, SLOT(activatedAction1()), m_actioncollection, "Action1");
00030     m_actionlist.append(m_action1);
00031     scriptcontainer->addKAction(m_action1);
00032 
00033     m_action2 = new KAction("Action2_Text", 0, this, SLOT(activatedAction2()), m_actioncollection, "Action2");
00034     m_actionlist.append(m_action2);
00035     scriptcontainer->addKAction(m_action2);
00036 }
00037 
00038 TestAction::~TestAction()
00039 {
00040 }
00041 
00042 void TestAction::activatedAction1()
00043 {
00044     kdDebug() << "TestAction::activatedAction1()" << endl;
00045 }
00046 
00047 void TestAction::activatedAction2()
00048 {
00049     kdDebug() << "TestAction::activatedAction2()" << endl;
00050 }
00051 

Generated on Thu Feb 9 17:59:11 2006 for Kross by  doxygen 1.4.6