25 #include <tqguardedptr.h>
28 #include <kxmlguiclient.h>
35 struct QUnknownInterface;
47 class PartActivateEvent;
48 class PartSelectEvent;
49 class GUIActivateEvent;
50 class PartBasePrivate;
59 friend class PartBasePrivate;
77 void setPartObject( TQObject *
object );
78 TQObject *partObject()
const;
95 virtual void setInstance(
TDEInstance *instance,
bool loadPlugins );
106 DoNotLoadPlugins = 0,
120 LoadPluginsIfEnabled = 2
149 void setPluginLoadingMode( PluginLoadingMode loadingMode );
193 Part( TQObject *parent = 0,
const char* name = 0 );
211 virtual void embed( TQWidget * parentWidget );
216 virtual TQWidget *widget();
237 virtual Part *hitTest( TQWidget *widget,
const TQPoint &globalPos );
242 virtual void setSelectable(
bool selectable );
247 bool isSelectable()
const;
254 void setWindowCaption(
const TQString & caption );
259 void setStatusBarText(
const TQString & text );
268 virtual void setWidget( TQWidget * widget );
273 virtual void customEvent( TQCustomEvent *event );
302 TQWidget *hostContainer(
const TQString &containerName );
305 void slotWidgetDestroyed();
308 TQGuardedPtr<TQWidget> m_widget;
316 class ReadOnlyPartPrivate;
347 ReadOnlyPart( TQObject *parent = 0,
const char *name = 0 );
361 void setProgressInfoEnabled(
bool show );
367 bool isProgressInfoEnabled()
const;
369 #ifndef KDE_NO_COMPAT
370 void showProgressInfo(
bool show );
382 virtual bool openURL(
const KURL &url );
400 virtual bool closeURL();
413 bool openStream(
const TQString& mimeType,
const KURL& url );
421 bool writeStream(
const TQByteArray& data );
437 virtual bool doOpenStream(
const TQString& ) {
return false; }
444 virtual bool doWriteStream(
const TQByteArray& ) {
return false; }
450 virtual bool doCloseStream() {
return false; }
458 void started( TDEIO::Job * );
476 void completed(
bool pendingAction );
482 void canceled(
const TQString &errMsg );
485 void slotJobFinished( TDEIO::Job * job );
493 virtual bool openFile() = 0;
510 virtual void guiActivateEvent( GUIActivateEvent *event );
526 ReadOnlyPartPrivate *d;
572 virtual void setReadWrite (
bool readwrite =
true );
603 virtual bool closeURL();
616 bool closeURL(
bool promptToSave );
623 virtual bool saveAs(
const KURL &url );
628 virtual void setModified(
bool modified );
638 void sigQueryClose(
bool *handled,
bool* abortClosing);
646 virtual void setModified();
659 bool waitSaveComplete();
673 virtual bool saveFile() = 0;
683 virtual bool saveToURL();
689 void slotUploadFinished( TDEIO::Job * job );
692 void prepareSaving();
KURL m_url
Remote (or local) url - the one displayed to the user.
This event is sent by the part manager when the active part changes.
TQString m_file
Local file - the only one the part implementation should deal with.
Base class for an "editor" part.
Base class for all parts.
KURL url() const
Returns the currently in part used URL.
This event is sent to a Part when its GUI has been activated or deactivated.
PluginLoadingMode
We have three different policies, whether to load new plugins or not.
bool m_bTemp
If true, m_file is a temporary file that needs to be deleted later.
The part manager is an object which knows about a collection of parts (even nested ones) and handles ...
This event is sent when a part is selected or deselected.
Base class for any "viewer" part.