File indexing completed on 2024-05-12 16:35:35
0001 /* This file is part of the KDE project 0002 0003 Copyright 1999-2000 Torben Weis <weis@kde.org> 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, or (at your option) any later version. 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 CALLIGRA_SHEETS_MAP_ADAPTOR 0022 #define CALLIGRA_SHEETS_MAP_ADAPTOR 0023 0024 #ifndef QT_NO_DBUS 0025 #include <QStringList> 0026 0027 #include <QDBusAbstractAdaptor> 0028 #include "sheets_common_export.h" 0029 0030 namespace Calligra 0031 { 0032 namespace Sheets 0033 { 0034 class Map; 0035 0036 /** 0037 * The MapAdaptor class provides additional functionality to deal with sheets. 0038 */ 0039 class CALLIGRA_SHEETS_COMMON_EXPORT MapAdaptor : public QDBusAbstractAdaptor 0040 { 0041 Q_OBJECT 0042 Q_CLASSINFO("D-Bus Interface", "org.kde.calligra.spreadsheet.map") 0043 public: 0044 explicit MapAdaptor(Map*); 0045 0046 // virtual bool processDynamic(const DCOPCString &fun, const QByteArray &data, 0047 // DCOPCString& replyType, QByteArray &replyData); 0048 0049 public Q_SLOTS: // METHODS 0050 0051 /** Return the objectName of the sheet with the defined sheet name. */ 0052 virtual QString sheet(const QString& name); 0053 /** Return the objectName of the sheet with the defined index. */ 0054 virtual QString sheetByIndex(int index); 0055 /** Return the number of available sheets. */ 0056 virtual int sheetCount() const; 0057 /** Return a list of available sheet names. */ 0058 virtual QStringList sheetNames() const; 0059 /** Return a list of available sheet objectName's. */ 0060 virtual QStringList sheets(); 0061 /** Insert a new sheet with the defined sheet name. */ 0062 virtual QString insertSheet(const QString& name); 0063 0064 private: 0065 Map* m_map; 0066 }; 0067 0068 } // namespace Sheets 0069 } // namespace Calligra 0070 #endif // QT_NO_DBUS 0071 0072 #endif