KParts
part.cpp
Go to the documentation of this file.
156void PartBase::loadPlugins(QObject *parent, KXMLGUIClient *parentGUIClient, const KComponentData &instance)
161 Plugin::loadPlugins( parent, parentGUIClient, instance, d->m_pluginLoadingMode == LoadPlugins, d->m_pluginInterfaceVersion );
605 // Use same extension as remote file. This is important for mimetype-determination (e.g. koffice)
610 if (!ext.isEmpty() && m_url.query().isNull()) // not if the URL has a query, e.g. cgi.pl?something
QString componentName() const
QString catalogName() const
static KUrl getSaveUrl(const KUrl &startDir, const QString &filter, QWidget *parent, const QString &caption, Options options)
virtual QString errorString() const
int error() const
void insertCatalog(const QString &catalog)
static int warningYesNoCancel(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonYes=KStandardGuiItem::yes(), const KGuiItem &buttonNo=KStandardGuiItem::no(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Notify)
static Ptr findByUrl(const KUrl &url, mode_t mode=0, bool is_local_file=false, bool fast_mode=false, int *accuracy=0)
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
void setPluginLoadingMode(PluginLoadingMode loadingMode)
Set how plugins should be loaded.
Definition: part.cpp:164
void setPluginInterfaceVersion(int version)
If you change the binary interface offered by your part, you can avoid crashes from old plugins lying...
Definition: part.cpp:171
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 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
virtual void embed(QWidget *parentWidget)
Embed this part into a host widget.
Definition: part.cpp:215
PartManager * manager() const
Returns the part manager handling this part, if any (0L otherwise).
Definition: part.cpp:264
static void loadPlugins(QObject *parent, const KComponentData &instance)
Load the plugin libraries from the directories appropriate to instance and make the Plugin objects ch...
Definition: plugin.cpp:136
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 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
virtual ~ReadWritePart()
Destructor Applications using a ReadWritePart should make sure, before destroying it,...
Definition: part.cpp:774
void sigQueryClose(bool *handled, bool *abortClosing)
set handled to true, if you don't want the default handling set abortClosing to true,...
bool addResourceType(const char *type, const char *basetype, const char *relativename, bool priority=true)
void setSuffix(const QString &suffix)
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
bool isLocalFile() const
void setPath(const QString &path)
QString fileName(const DirectoryOptions &options=IgnoreTrailingSlash) const
QString protocol() const
QString toLocalFile(AdjustPathOption trailing=LeaveTrailingSlash) const
virtual KComponentData componentData() const
KXMLGUIFactory * factory() const
virtual void setComponentData(const KComponentData &componentData)
QWidget * container(const QString &containerName, KXMLGUIClient *client, bool useTagName=false)
static void emitFilesAdded(const QString &directory)
#define kDebug
#define kWarning
QString i18n(const char *text)
KStandardDirs * dirs()
KLocale * locale()
StatJob * mostLocalUrl(const KUrl &url, JobFlags flags=DefaultFlags)
FileCopyJob * file_copy(const KUrl &src, const KUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
FileCopyJob * file_move(const KUrl &src, const KUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
MimetypeJob * mimetype(const KUrl &url, JobFlags flags=DefaultFlags)
DefaultFlags
HideProgressInfo
Overwrite
KGuiItem save()
KGuiItem discard()
const KShortcut & reload()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.