• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

kxmlguifactory.h

Go to the documentation of this file.
00001 // -*- mode: c++; c-basic-offset: 2 -*-
00002 /* This file is part of the KDE libraries
00003    Copyright (C) 1999 Simon Hausmann <hausmann@kde.org>
00004    Copyright (C) 2000 Kurt Granroth <granroth@kde.org>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License version 2 as published by the Free Software Foundation.
00009 
00010    This library 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 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef kxmlguifactory_h
00022 #define kxmlguifactory_h
00023 
00024 #include <kdeui_export.h>
00025 #include <kcomponentdata.h>
00026 
00027 #include <QtCore/QObject>
00028 
00029 class QAction;
00030 class KXMLGUIFactoryPrivate;
00031 class KXMLGUIClient;
00032 class KXMLGUIBuilder;
00033 class KComponentData;
00034 
00035 class QDomAttr;
00036 class QDomDocument;
00037 class QDomElement;
00038 class QDomNode;
00039 class QDomNamedNodeMap;
00040 
00041 namespace KXMLGUI
00042 {
00043 struct MergingIndex;
00044 struct ContainerNode;
00045 struct ContainerClient;
00046 class BuildHelper;
00047 }
00048 
00066 class KDEUI_EXPORT KXMLGUIFactory : public QObject
00067 {
00068   friend class KXMLGUI::BuildHelper;
00069   Q_OBJECT
00070  public:
00078   explicit KXMLGUIFactory( KXMLGUIBuilder *builder, QObject *parent = 0 );
00079 
00083   ~KXMLGUIFactory();
00084 
00085   // XXX move to somewhere else? (Simon)
00087   static QString readConfigFile(const QString &filename,
00088           const KComponentData &componentData = KComponentData());
00090   static bool saveConfigFile(const QDomDocument& doc, const QString& filename,
00091           const KComponentData &componentData = KComponentData());
00092 
00097   static QDomElement actionPropertiesElement( QDomDocument& doc );
00098 
00104   static QDomElement findActionByName( QDomElement& elem, const QString& sName, bool create );
00105 
00116   void addClient( KXMLGUIClient *client );
00117 
00123   void removeClient( KXMLGUIClient *client );
00124 
00125   void plugActionList( KXMLGUIClient *client, const QString &name, const QList<QAction*> &actionList );
00126   void unplugActionList( KXMLGUIClient *client, const QString &name );
00127 
00131   QList<KXMLGUIClient*> clients() const;
00132 
00153   QWidget *container( const QString &containerName, KXMLGUIClient *client, bool useTagName = false );
00154 
00155   QList<QWidget*> containers( const QString &tagName );
00156 
00165   void reset();
00166 
00176   void resetContainer( const QString &containerName, bool useTagName = false );
00177 
00178  public Q_SLOTS:
00193   int configureShortcuts(bool bAllowLetterShortcuts = true, bool bSaveSettings = true);
00194 
00195  Q_SIGNALS:
00196   void clientAdded( KXMLGUIClient *client );
00197   void clientRemoved( KXMLGUIClient *client );
00198 
00199 private:
00200   KXMLGUIFactoryPrivate *const d;
00201 };
00202 
00203 #endif
00204 /* vim: et sw=4
00205  */

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal