Warning, file /office/calligra/libs/main/KoApplicationAdaptor.h 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 David Faure <faure@kde.org> 0003 Copyright (C) 2006 Fredrik Edemar <f_edemar@linux.se> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Library General Public 0007 License as published by the Free Software Foundation; either 0008 version 2 of the License. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Library General Public License for more details. 0014 0015 You should have received a copy of the GNU Library General Public License 0016 along with this library; see the file COPYING.LIB. If not, write to 0017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #ifndef __KoApplicationAdaptor_h__ 0022 #define __KoApplicationAdaptor_h__ 0023 0024 #ifndef QT_NO_DBUS 0025 0026 #include <QDBusAbstractAdaptor> 0027 #include "komain_export.h" 0028 template<class T> class QList; 0029 template<class Key, class Value> class QMap; 0030 0031 class QString; 0032 class QStringList; 0033 class KoApplication; 0034 0035 /** 0036 * D-BUS interface for any Calligra application (entry point) 0037 */ 0038 class KOMAIN_EXPORT KoApplicationAdaptor : public QDBusAbstractAdaptor 0039 { 0040 Q_OBJECT 0041 Q_CLASSINFO("D-Bus Interface", "org.kde.calligra.application") 0042 public: 0043 explicit KoApplicationAdaptor(KoApplication *parent); 0044 ~KoApplicationAdaptor() override; 0045 0046 public Q_SLOTS: // METHODS 0047 // /** 0048 // * Creates a new document for the given native mimetype 0049 // * Use it to create a main window and to load an existing file, if any 0050 // */ 0051 // Q_SCRIPTABLE QString createDocument(const QString &nativeFormat); 0052 0053 /** 0054 * @return a list of references to all the documents 0055 * (see KoDocumentIface) 0056 */ 0057 Q_SCRIPTABLE QStringList getDocuments(); 0058 0059 /** 0060 * @return a list of references to all the views 0061 * (see KoViewIface) 0062 * Convenience method to avoid iterating over all documents to get all the views. 0063 */ 0064 Q_SCRIPTABLE QStringList getViews(); 0065 0066 /** 0067 * @return a list of references to all the windows 0068 * (see KoMainWindowIface) 0069 */ 0070 Q_SCRIPTABLE QStringList getWindows(); 0071 0072 Q_SIGNALS: 0073 /** 0074 * emitted when a new document is opened. 0075 */ 0076 void documentOpened(const QString &ref); 0077 0078 /** 0079 * emitted when an old document is closed. 0080 */ 0081 void documentClosed(const QString &ref); 0082 private: 0083 0084 KoApplication *m_application; 0085 }; 0086 0087 #endif // QT_NO_DBUS 0088 0089 #endif 0090