summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/kxmlguiclient.h
Side-by-side diff
Diffstat (limited to 'microkde/kdeui/kxmlguiclient.h') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdeui/kxmlguiclient.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/microkde/kdeui/kxmlguiclient.h b/microkde/kdeui/kxmlguiclient.h
index cd74c8e..b9d7b09 100644
--- a/microkde/kdeui/kxmlguiclient.h
+++ b/microkde/kdeui/kxmlguiclient.h
@@ -1,72 +1,72 @@
/* This file is part of the KDE libraries
Copyright (C) 2000 Simon Hausmann <hausmann@kde.org>
Copyright (C) 2000 Kurt Granroth <granroth@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef _KXMLGUICLIENT_H
#define _KXMLGUICLIENT_H
//US #include <qdom.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qmap.h>
#include <qstringlist.h>
class QWidget;
class KAction;
class KActionCollection;
class KInstance;
class KXMLGUIClientPrivate;
class KXMLGUIFactory;
class KXMLGUIBuilder;
/**
*
* A KXMLGUIClient can be used with @ref KXMLGUIFactory to create a
* GUI from actions and an XML document, and can be dynamically merged
* with other KXMLGUIClients.
*/
class KXMLGUIClient
{
friend class KEditToolbarWidget; // for setXMLFile(3 args)
public:
/**
* Constructs a KXMLGUIClient which can be used with a
* @ref KXMLGUIFactory to create a GUI from actions and an XML document, and
* which can be dynamically merged with other KXMLGUIClients.
*/
KXMLGUIClient();
/**
* Constructs a KXMLGUIClient which can be used with a @ref KXMLGUIFactory
* to create a GUI from actions and an XML document,
* and which can be dynamically merged with other KXMLGUIClients.
*
* This constructor takes an additional @p parent argument, which makes
* the client a child client of the parent.
*
* Child clients are automatically added to the GUI if the parent is added.
*
*/
KXMLGUIClient( KXMLGUIClient *parent );
/**
* Destructs the KXMLGUIClient.
*/
virtual ~KXMLGUIClient();
/**
@@ -116,164 +116,164 @@ public:
//US virtual QString xmlFile() const;
//US virtual QString localXMLFile() const;
/**
* @internal
*/
//US void setXMLGUIBuildDocument( const QDomDocument &doc );
/**
* @internal
*/
//US QDomDocument xmlguiBuildDocument() const;
/**
* This method is called by the @ref KXMLGUIFactory as soon as the client
* is added to the KXMLGUIFactory's GUI.
*/
//US void setFactory( KXMLGUIFactory *factory );
/**
* Retrieves a pointer to the @ref KXMLGUIFactory this client is
* associated with (will return 0L if the client's GUI has not been built
* by a KXMLGUIFactory.
*/
//US KXMLGUIFactory *factory() const;
/**
* KXMLGUIClients can form a simple child/parent object tree. This
* method returns a pointer to the parent client or 0L if it has no
* parent client assigned.
*/
KXMLGUIClient *parentClient() const;
/**
* Use this method to make a client a child client of another client.
* Usually you don't need to call this method, as it is called
* automatically when using the second constructor, which takes a
* arent argument.
*/
void insertChildClient( KXMLGUIClient *child );
/**
* Removes the given @p child from the client's children list.
*/
void removeChildClient( KXMLGUIClient *child );
/**
* Retrieves a list of all child clients.
*/
- const QPtrList<KXMLGUIClient> *childClients();
+ const Q3PtrList<KXMLGUIClient> *childClients();
/**
* A client can have an own @ref KXMLGUIBuilder.
* Use this method to assign your builder instance to the client (so that the
* @ref KXMLGUIFactory can use it when building the client's GUI)
*
* Client specific guibuilders are useful if you want to create
* custom container widgets for your GUI.
*/
//US void setClientBuilder( KXMLGUIBuilder *builder );
/**
* Retrieves the client's GUI builder or 0L if no client specific
* builder has been assigned via @ref #setClientBuilder()
*/
//US KXMLGUIBuilder *clientBuilder() const;
/**
* Forces this client to re-read its XML resource file. This is
* intended to be used when you know that the resource file has
* changed and you will soon be rebuilding the GUI. It has no
* useful effect with non-KParts GUIs, so don't bother using it
* unless your app is component based.
*/
//US void reloadXML();
/**
* ActionLists are a way for XMLGUI to support dynamic lists of
* actions. E.g. if you are writing a file manager, and there is a
* menu file whose contents depend on the mimetype of the file that
* is selected, then you can achieve this using ActionLists. It
* works as follows:
* In your xxxui.rc file ( the one that you set in @ref setXMLFile()
* ), you put an <ActionList name="xxx"> tag. E.g.
* \verbatim
* <kpartgui name="xxx_part" version="1">
* <MenuBar>
* <Menu name="file">
* ... <!-- some useful actions-->
* <ActionList name="xxx_file_actionlist" />
* ... <!-- even more useful actions-->
* </Menu>
* ...
* </MenuBar>
* </kpartgui>
* \endverbatim
*
* This tag will get expanded to a list of actions. In the example
* above ( a file manager with a dynamic file menu ), you would call
* \code
* QPtrList<KAction> file_actions;
* for( ... )
* if( ... )
* file_actions.append( cool_action );
* unplugActionList( "xxx_file_actionlist" );
* plugActionList( "xxx_file_actionlist", file_actions );
* \endcode
* every time a file is selected, unselected or ...
*
* \note You should not call createGUI() after calling this
* function. In fact, that would remove the newly added
* actionlists again...
* \note Forgetting to call unplugActionList() before
* plugActionList() would leave the previous actions in the
* menu too..
*/
- void plugActionList( const QString &name, const QPtrList<KAction> &actionList );
+ void plugActionList( const QString &name, const Q3PtrList<KAction> &actionList );
/**
* The complement of \ref plugActionList() ...
*/
void unplugActionList( const QString &name );
//US static QString findMostRecentXMLFile( const QStringList &files, QString &doc );
void addStateActionEnabled(const QString& state, const QString& action);
void addStateActionDisabled(const QString& state, const QString& action);
enum ReverseStateChange { StateNoReverse, StateReverse };
struct StateChange
{
QStringList actionsToEnable;
QStringList actionsToDisable;
};
StateChange getActionsToChangeForState(const QString& state);
/// @since 3.1
//US void beginXMLPlug( QWidget * );
/// @since 3.1
//US void endXMLPlug();
/// @since 3.1
//US void prepareXMLUnplug( QWidget * );
protected:
/**
* Returns true if client was added to super client list.
* Returns false if client was already in list.
*/
//bool addSuperClient( KXMLGUIClient * );
/**
* Sets the instance (@ref KInstance) for this part.
*
* Call this first in the inherited class constructor.
* (At least before @ref setXMLFile().)
*/
//US virtual void setInstance( KInstance *instance );
/**
* Sets the name of the rc file containing the XML for the part.
*
* Call this in the Part-inherited class constructor.
*