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 #ifndef kxmlguifactory_h
00021 #define kxmlguifactory_h
00022
00023 #include <kdeui_export.h>
00024 #include <kcomponentdata.h>
00025
00026 #include <QtCore/QObject>
00027
00028 class QAction;
00029 class KXMLGUIFactoryPrivate;
00030 class KXMLGUIClient;
00031 class KXMLGUIBuilder;
00032 class KComponentData;
00033
00034 class QDomAttr;
00035 class QDomDocument;
00036 class QDomElement;
00037 class QDomNode;
00038 class QDomNamedNodeMap;
00039
00040 namespace KXMLGUI
00041 {
00042 struct MergingIndex;
00043 struct ContainerNode;
00044 struct ContainerClient;
00045 class BuildHelper;
00046 }
00047
00065 class KDEUI_EXPORT KXMLGUIFactory : public QObject
00066 {
00067 friend class KXMLGUI::BuildHelper;
00068 Q_OBJECT
00069 public:
00077 explicit KXMLGUIFactory( KXMLGUIBuilder *builder, QObject *parent = 0 );
00078
00082 ~KXMLGUIFactory();
00083
00084
00086 static QString readConfigFile(const QString &filename,
00087 const KComponentData &componentData = KComponentData());
00089 static bool saveConfigFile(const QDomDocument& doc, const QString& filename,
00090 const KComponentData &componentData = KComponentData());
00091
00096 static QDomElement actionPropertiesElement( QDomDocument& doc );
00097
00103 static QDomElement findActionByName( QDomElement& elem, const QString& sName, bool create );
00104
00115 void addClient( KXMLGUIClient *client );
00116
00122 void removeClient( KXMLGUIClient *client );
00123
00124 void plugActionList( KXMLGUIClient *client, const QString &name, const QList<QAction*> &actionList );
00125 void unplugActionList( KXMLGUIClient *client, const QString &name );
00126
00130 QList<KXMLGUIClient*> clients() const;
00131
00152 QWidget *container( const QString &containerName, KXMLGUIClient *client, bool useTagName = false );
00153
00154 QList<QWidget*> containers( const QString &tagName );
00155
00164 void reset();
00165
00175 void resetContainer( const QString &containerName, bool useTagName = false );
00176
00181 void refreshActionProperties();
00182
00183 public Q_SLOTS:
00198 int configureShortcuts(bool bAllowLetterShortcuts = true, bool bSaveSettings = true);
00199
00200 void changeShortcutScheme(const QString &scheme);
00201
00202 Q_SIGNALS:
00203 void clientAdded( KXMLGUIClient *client );
00204 void clientRemoved( KXMLGUIClient *client );
00205
00216 void makingChanges(bool);
00217
00218 private:
00219 KXMLGUIFactoryPrivate *const d;
00220 };
00221
00222 #endif
00223
00224