F:/KPlato/koffice/libs/kross/core/actioncollection.h

Aller à la documentation de ce fichier.
00001 /***************************************************************************
00002  * actioncollection.h
00003  * This file is part of the KDE project
00004  * copyright (C)2004-2006 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 #ifndef KROSS_ACTIONCOLLECTION_H
00021 #define KROSS_ACTIONCOLLECTION_H
00022 
00023 #include <QString>
00024 #include <QObject>
00025 #include <QDir>
00026 
00027 #include <kactioncollection.h>
00028 //#include <kaction.h>
00029 //#include <kurl.h>
00030 #include <koffice_export.h>
00031 
00032 class QDomElement;
00033 class QIODevice;
00034 
00035 namespace Kross {
00036 
00041     class KROSSCORE_EXPORT ActionCollection : public KActionCollection
00042     {
00043             Q_OBJECT
00044 
00045         public:
00046 
00057             ActionCollection(const QString& name, ActionCollection* parent = 0);
00058 
00062             virtual ~ActionCollection();
00063 
00067             QString text() const;
00068 
00072             void setText(const QString& text);
00073 
00079             ActionCollection* parentCollection() const;
00080 
00085             bool hasCollection(const QString& name) const;
00086 
00091             ActionCollection* collection(const QString& name) const;
00092 
00097             QStringList collections() const;
00098 
00109             bool readXml(const QDomElement& element, const QDir& directory = QDir());
00110 
00114             bool readXml(QIODevice* device, const QDir& directory = QDir());
00115 
00122             bool readXmlFile(const QString& file);
00123 
00139             bool readXmlResource(const QByteArray& resource = "data", const QString& filer = QString());
00140 
00145             QDomElement writeXml();
00146 
00151             bool writeXml(QIODevice* device, int indent = 2);
00152 
00153         signals:
00154             //void inserted(ActionCollection* self, ActionCollection* into);
00155             //void updated(ActionCollection* self);
00156             //void removed(ActionCollection* self, ActionCollection* from);
00157 
00158         protected:
00159             void registerCollection(ActionCollection* collection);
00160             void unregisterCollection(const QString& name);
00161 
00162         private:
00164             class Private;
00166             Private* const d;
00167     };
00168 
00169 }
00170 
00171 #endif
00172 

Généré le Wed Nov 22 23:41:11 2006 pour KPlato par  doxygen 1.5.1-p1