Warning, file /office/calligra/libs/main/KoViewAdaptor.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 Copyright (c) 2000 Simon Hausmann <hausmann@kde.org> 0003 Copyright (C) 2006 Fredrik Edemar <f_edemar@linux.se> 0004 0005 $Id: KoViewAdaptor.cc 529520 2006-04-13 16:41:44Z mpfeiffer $ 0006 0007 This library is free software; you can redistribute it and/or 0008 modify it under the terms of the GNU Library General Public 0009 License as published by the Free Software Foundation; either 0010 version 2 of the License, or (at your option) any later version. 0011 0012 This library is distributed in the hope that it will be useful, 0013 but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0015 Library General Public License for more details. 0016 0017 You should have received a copy of the GNU Library General Public License 0018 along with this library; see the file COPYING.LIB. If not, write to 0019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0020 * Boston, MA 02110-1301, USA. 0021 */ 0022 0023 #include "KoViewAdaptor.h" 0024 0025 #include "KoView.h" 0026 0027 #include <kactioncollection.h> 0028 #include <QAction> 0029 #include <QList> 0030 0031 KoViewAdaptor::KoViewAdaptor(KoView *view) 0032 : QDBusAbstractAdaptor(view) 0033 { 0034 setAutoRelaySignals(true); 0035 m_pView = view; 0036 } 0037 0038 KoViewAdaptor::~KoViewAdaptor() 0039 { 0040 } 0041 0042 0043 QStringList KoViewAdaptor::actions() 0044 { 0045 QStringList tmp_actions; 0046 QList<QAction*> lst = m_pView->actionCollection()->actions(); 0047 foreach(QAction* it, lst) { 0048 if (it->isEnabled()) 0049 tmp_actions.append(it->objectName()); 0050 } 0051 return tmp_actions; 0052 }