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;
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; }
485 void slotJobFinished( TDEIO::Job * job );
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 );
646 virtual void setModified();
659 bool waitSaveComplete();
683 virtual bool saveToURL();
689 void slotUploadFinished( TDEIO::Job * job );
692 void prepareSaving();
This event is sent to a Part when its GUI has been activated or deactivated.
This event is sent by the part manager when the active part changes.
Base class for all parts.
PluginLoadingMode
We have three different policies, whether to load new plugins or not.
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.
void setWindowCaption(const TQString &caption)
Emitted by the part, to set the caption of the window(s) hosting this part.
void setStatusBarText(const TQString &text)
Emited by the part, to set a text in the statusbar of the window(s) hosting this part.
Base class for any "viewer" part.
void completed(bool pendingAction)
Same as the above signal except it indicates whether there is a pending action to be executed on a de...
bool m_bTemp
If true, m_file is a temporary file that needs to be deleted later.
void canceled(const TQString &errMsg)
Emit this if loading is canceled by the user or by an error.
void completed()
Emit this when you have completed loading data.
TQString m_file
Local file - the only one the part implementation should deal with.
KURL m_url
Remote (or local) url - the one displayed to the user.
void started(TDEIO::Job *)
The part emits this when starting data.
virtual bool openFile()=0
If the part uses the standard implementation of openURL(), it must reimplement this,...
KURL url() const
Returns the currently in part used URL.
Base class for an "editor" part.
virtual bool saveFile()=0
Save to a local file.
void sigQueryClose(bool *handled, bool *abortClosing)