21 #ifndef __konqpopupmenu_h
22 #define __konqpopupmenu_h
24 #include <sys/types.h>
26 #include <tqpopupmenu.h>
28 #include <tdeaction.h>
30 #include <tqstringlist.h>
32 #include <tdefileitem.h>
33 #include <kmimetype.h>
34 #include <libkonq_export.h>
36 #include <tdeparts/browserextension.h>
37 #include <tdeio/jobclasses.h>
39 #include "konq_xmlguiclient.h"
41 typedef TQValueList<KDEDesktopMimeType::Service> ServiceList;
43 class KPropertiesDialog;
46 class KonqPopupMenuPlugin;
47 class KBookmarkManager;
78 const KFileItemList &items,
80 TDEActionCollection & actions,
82 bool showPropertiesAndFileType =
true ) TDE_DEPRECATED;
89 const KFileItemList &items,
91 TDEActionCollection & actions,
93 TQWidget * parentWidget,
94 bool showPropertiesAndFileType = true ) TDE_DEPRECATED;
117 const KFileItemList &items,
119 TDEActionCollection & actions,
121 TQWidget * parentWidget,
123 KParts::BrowserExtension::PopupFlags f );
134 void setURLTitle( const TQString& urlTitle );
136 class LIBKONQ_EXPORT ProtocolInfo {
139 bool supportsReading()
const;
140 bool supportsWriting()
const;
141 bool supportsDeleting()
const;
142 bool supportsMoving()
const;
143 bool trashIncluded()
const;
150 bool m_TrashIncluded:1;
155 virtual TDEAction *
action(
const TQDomElement &element )
const;
158 virtual TDEActionCollection *actionCollection()
const;
159 TQString mimeType( )
const;
161 KFileItemList fileItemList()
const;
162 KURL::List popupURLList( )
const;
163 ProtocolInfo protocolInfo()
const;
166 void slotPopupNewDir();
167 void slotPopupNewView();
168 void slotPopupEmptyTrashBin();
169 void slotPopupRestoreTrashedItems();
170 void slotPopupOpenWith();
171 void slotPopupAddToBookmark();
172 void slotRunService();
173 void slotPopupMimeType();
174 void slotPopupProperties();
175 void slotOpenShareFileDialog();
178 TDEActionCollection &m_actions;
179 TDEActionCollection m_ownActions;
182 void slotLocalURL( TDEIO::LocalURLJob *,
const KURL&,
bool );
183 void slotLocalURLKIODestroyed( );
186 void init (TQWidget * parentWidget,
KonqPopupFlags kpf, KParts::BrowserExtension::PopupFlags itemFlags);
189 int insertServicesSubmenus(
const TQMap<TQString, ServiceList>& list, TQDomElement& menu,
bool isBuiltin);
190 int insertServices(
const ServiceList& list, TQDomElement& menu,
bool isBuiltin);
191 bool KIOSKAuthorizedAction(TDEConfig& cfg);
192 KPropertiesDialog* showPropertiesDialog();
194 class KonqPopupMenuPrivate;
195 KonqPopupMenuPrivate *d;
198 TQString m_sMimeType;
199 KFileItemList m_lstItems;
200 KURL::List m_lstPopupURLs;
201 TQMap<int,KService::Ptr> m_mapPopup;
202 TQMap<int,KDEDesktopMimeType::Service> m_mapPopupServices;
203 bool m_bHandleEditOperations;
204 KXMLGUIFactory *m_factory;
205 KXMLGUIBuilder *m_builder;
208 TQPtrList<KonqPopupMenuPlugin> m_pluginList;
209 KBookmarkManager* m_pManager;
212 class LIBKONQ_EXPORT KonqPopupMenuPlugin :
public TQObject,
public KonqXMLGUIClient {
222 KonqPopupMenuPlugin(
KonqPopupMenu *_popup,
const char *name );
223 virtual ~KonqPopupMenuPlugin ( );
This class implements common methods to manipulate the DOMDocument of KXMLGUIClient.