KParts
part.h
Go to the documentation of this file.
34 inline Class##Private* d_func() { return reinterpret_cast<Class##Private *>(PartBase::d_ptr); } \
109 // TODO KDE5: merge the above two methods, using loadPlugins=true. Or better, remove loadPlugins
156 void loadPlugins(QObject *parent, KXMLGUIClient *parentGUIClient, const KComponentData &componentData);
566 // TODO to avoid problems with the case where the loading fails, this could also be a openUrl() argument (heavy porting!).
The Browser Extension is an extension (yes, no kidding) to KParts::ReadOnlyPart, which allows a bette...
Definition browserextension.h:321
This event is sent to a Part when its GUI has been activated or deactivated.
Definition event.h:60
OpenUrlArguments is the set of arguments that specify how a URL should be opened by KParts::ReadOnlyP...
Definition part.h:405
void setReload(bool b)
Indicates that the url should be loaded from the network even if it matches the current url of the pa...
Definition part.cpp:1096
int xOffset() const
xOffset is the horizontal scrolling of the part's widget (in case it's a scrollview).
Definition part.cpp:1101
QString mimeType() const
The mimetype to use when opening the url, when known by the calling application.
Definition part.cpp:1121
QMap< QString, QString > & metaData()
Meta-data to associate with the KIO operation that will be used to open the URL.
Definition part.cpp:1131
OpenUrlArguments & operator=(const OpenUrlArguments &other)
Definition part.cpp:1081
int yOffset() const
yOffset is the vertical scrolling of the part's widget (in case it's a scrollview).
Definition part.cpp:1111
bool actionRequestedByUser() const
True if the user requested that the URL be opened.
Definition part.cpp:1141
void setActionRequestedByUser(bool userRequested)
Definition part.cpp:1146
This event is sent by the part manager when the active part changes.
Definition event.h:83
PluginLoadingMode
We have three different policies, whether to load new plugins or not.
Definition part.h:119
virtual void setComponentData(const KComponentData &componentData)
Set the componentData(KComponentData) for this part.
Definition part.cpp:137
void loadPlugins(QObject *parent, KXMLGUIClient *parentGUIClient, const KComponentData &componentData)
Load the Plugins honoring the PluginLoadingMode.
Definition part.cpp:156
The part manager is an object which knows about a collection of parts (even nested ones) and handles ...
Definition partmanager.h:48
This event is sent when a part is selected or deselected.
Definition event.h:104
void setWindowCaption(const QString &caption)
Emitted by the part, to set the caption of the window(s) hosting this part.
virtual Part * hitTest(QWidget *widget, const QPoint &globalPos)
Returns the part (this, or a child part) at the given global position.
Definition part.cpp:271
virtual void partSelectEvent(PartSelectEvent *event)
Convenience method which is called when the Part received a PartSelectEvent .
Definition part.cpp:330
QWidget * hostContainer(const QString &containerName)
Convenience method for KXMLGUIFactory::container.
Definition part.cpp:338
void setStatusBarText(const QString &text)
Emitted by the part, to set a text in the statusbar of the window(s) hosting this part.
void setAutoDeletePart(bool autoDeletePart)
By default, the part deletes itself when its widget is deleted.
Definition part.cpp:238
virtual void guiActivateEvent(GUIActivateEvent *event)
Convenience method which is called when the Part received a GUIActivateEvent .
Definition part.cpp:334
virtual void partActivateEvent(PartActivateEvent *event)
Convenience method which is called when the Part received a PartActivateEvent .
Definition part.cpp:326
KIconLoader * iconLoader()
Use this icon loader to load any icons that are specific to this part, i.e.
Definition part.cpp:246
void setAutoDeleteWidget(bool autoDeleteWidget)
By default, the widget is deleted by the part when the part is deleted.
Definition part.cpp:232
PartManager * manager() const
Returns the part manager handling this part, if any (0L otherwise).
Definition part.cpp:264
A plugin is the way to add actions to an existing KParts application, or to a Part.
Definition plugin.h:55
bool isProgressInfoEnabled() const
Returns whether the part shows the progress info dialog used by internal KIO job.
Definition part.cpp:519
BrowserExtension * browserExtension() const
This convenience method returns the browserExtension for this part, or 0 if there isn't any.
Definition part.cpp:748
void setProgressInfoEnabled(bool show)
Call this to turn off the progress info dialog used by the internal KIO job.
Definition part.cpp:512
void completed(bool pendingAction)
Same as the above signal except it indicates whether there is a pending action to be executed on a de...
void setLocalFilePath(const QString &localFilePath)
Sets the local file path associated with this part.
Definition part.cpp:487
virtual void guiActivateEvent(GUIActivateEvent *event)
Reimplemented from Part, so that the window caption is set to the current url (decoded) when the part...
Definition part.cpp:712
virtual bool openFile()
If the part uses the standard implementation of openUrl(), it must reimplement this,...
Definition part.cpp:569
void setLocalFileTemporary(bool temp)
Definition part.cpp:504
ReadOnlyPart(QObject *parent=0)
Constructor See also Part for the setXXX methods to call.
Definition part.cpp:450
void setArguments(const OpenUrlArguments &arguments)
Sets the arguments to use for the next openUrl call.
Definition part.cpp:753
void canceled(const QString &errMsg)
Emit this if loading is canceled by the user or by an error.
void urlChanged(const KUrl &url)
Emitted by the part when url() changes.
QString localFilePath() const
Returns the local file path associated with this part.
Definition part.cpp:480
virtual bool openUrl(const KUrl &url)
Only reimplement openUrl if you don't want the network transparency support to download from the url ...
Definition part.cpp:535
bool openStream(const QString &mimeType, const KUrl &url)
Initiate sending data to this part.
Definition part.cpp:726
virtual void setReadWrite(bool readwrite=true)
Changes the behavior of this part to readonly or readwrite.
Definition part.cpp:782
ReadWritePart(QObject *parent=0)
Constructor See parent constructor for instructions.
Definition part.cpp:769
virtual bool queryClose()
If the document has been modified, ask the user to save changes.
Definition part.cpp:808
bool waitSaveComplete()
Waits for any pending upload job to finish and returns whether the last save() action was successful.
Definition part.cpp:1034
void sigQueryClose(bool *handled, bool *abortClosing)
set handled to true, if you don't want the default handling set abortClosing to true,...
KXMLGUIClient()
virtual KComponentData componentData() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.