00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __konq_guiclients_h__
00021 #define __konq_guiclients_h__
00022
00023 #include <kxmlguiclient.h>
00024 #include <tqobject.h>
00025 #include <tqdict.h>
00026 #include <ktrader.h>
00027
00028 class KAction;
00029 class KActionCollection;
00030 class KonqMainWindow;
00031 class KonqView;
00032
00055 class PopupMenuGUIClient : public KXMLGUIClient
00056 {
00057 public:
00058 PopupMenuGUIClient( KonqMainWindow *mainWindow, const KTrader::OfferList &embeddingServices,
00059 bool isIntoTrash, bool doTabHandling );
00060 virtual ~PopupMenuGUIClient();
00061
00062 virtual KAction *action( const TQDomElement &element ) const;
00063
00064 private:
00065 void addEmbeddingService( TQDomElement &menu, int idx, const TQString &name, const KService::Ptr &service );
00066
00067 KonqMainWindow *m_mainWindow;
00068
00069 TQDomDocument m_doc;
00070 };
00071
00072 class ToggleViewGUIClient : public QObject
00073 {
00074 Q_OBJECT
00075 public:
00076 ToggleViewGUIClient( KonqMainWindow *mainWindow );
00077 virtual ~ToggleViewGUIClient();
00078
00079 bool empty() const { return m_empty; }
00080
00081 TQPtrList<KAction> actions() const;
00082 KAction *action( const TQString &name ) { return m_actions[ name ]; }
00083
00084 void saveConfig( bool add, const TQString &serviceName );
00085
00086 private slots:
00087 void slotToggleView( bool toggle );
00088 void slotViewAdded( KonqView *view );
00089 void slotViewRemoved( KonqView *view );
00090 private:
00091 KonqMainWindow *m_mainWindow;
00092 TQDict<KAction> m_actions;
00093 bool m_empty;
00094 TQMap<TQString,bool> m_mapOrientation;
00095 };
00096
00097 #endif