KDEUI
kxmlguifactory.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
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
00205