KParts
part.cpp
Go to the documentation of this file.
156 void 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)
Overwrite
bool openStream(const QString &mimeType, const KUrl &url)
Initiate sending data to this part.
Definition: part.cpp:726
virtual void embed(QWidget *parentWidget)
Embed this part into a host widget.
Definition: part.cpp:215
KStandardDirs * dirs()
This event is sent when a part is selected or deselected.
Definition: event.h:104
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
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
The part manager is an object which knows about a collection of parts (even nested ones) and handles ...
Definition: partmanager.h:48
QString protocol() const
PluginLoadingMode
We have three different policies, whether to load new plugins or not.
Definition: part.h:119
void setAutoDeletePart(bool autoDeletePart)
By default, the part deletes itself when its widget is deleted.
Definition: part.cpp:238
void insertCatalog(const QString &catalog)
virtual void setComponentData(const KComponentData &componentData)
Set the componentData(KComponentData) for this part.
Definition: part.cpp:137
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
const KShortcut & reload()
QString mimeType() const
The mimetype to use when opening the url, when known by the calling application.
Definition: part.cpp:1121
This event is sent to a Part when its GUI has been activated or deactivated.
Definition: event.h:60
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QWidget * hostContainer(const QString &containerName)
Convenience method for KXMLGUIFactory::container.
Definition: part.cpp:338
void setArguments(const OpenUrlArguments &arguments)
Sets the arguments to use for the next openUrl call.
Definition: part.cpp:753
static Ptr findByUrl(const KUrl &url, mode_t mode=0, bool is_local_file=false, bool fast_mode=false, int *accuracy=0)
void setProgressInfoEnabled(bool show)
Call this to turn off the progress info dialog used by the internal KIO job.
Definition: part.cpp:512
void setLocalFileTemporary(bool temp)
Definition: part.cpp:504
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
DefaultFlags
int yOffset() const
yOffset is the vertical scrolling of the part's widget (in case it's a scrollview).
Definition: part.cpp:1111
KGuiItem save()
void sigQueryClose(bool *handled, bool *abortClosing)
set handled to true, if you don't want the default handling set abortClosing to true,...
void setPluginLoadingMode(PluginLoadingMode loadingMode)
Set how plugins should be loaded.
Definition: part.cpp:164
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
QString fileName(const DirectoryOptions &options=IgnoreTrailingSlash) const
static void emitFilesAdded(const QString &directory)
bool isProgressInfoEnabled() const
Returns whether the part shows the progress info dialog used by internal KIO job.
Definition: part.cpp:519
KLocale * locale()
ReadOnlyPart(QObject *parent=0)
Constructor See also Part for the setXXX methods to call.
Definition: part.cpp:450
QString toLocalFile(AdjustPathOption trailing=LeaveTrailingSlash) const
bool addResourceType(const char *type, const char *basetype, const char *relativename, bool priority=true)
QString catalogName() const
CopyJob * link(const KUrl &src, const KUrl &destDir, JobFlags flags=DefaultFlags)
StatJob * mostLocalUrl(const KUrl &url, JobFlags flags=DefaultFlags)
bool isLocalFile() const
virtual bool queryClose()
If the document has been modified, ask the user to save changes.
Definition: part.cpp:808
bool actionRequestedByUser() const
True if the user requested that the URL be opened.
Definition: part.cpp:1141
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
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
static KUrl getSaveUrl(const KUrl &startDir, const QString &filter, QWidget *parent, const QString &caption, Options options)
FileCopyJob * file_move(const KUrl &src, const KUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
virtual QString errorString() const
void setLocalFilePath(const QString &localFilePath)
Sets the local file path associated with this part.
Definition: part.cpp:487
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
KXMLGUIFactory * factory() const
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)
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
virtual void setReadWrite(bool readwrite=true)
Changes the behavior of this part to readonly or readwrite.
Definition: part.cpp:782
The Browser Extension is an extension (yes, no kidding) to KParts::ReadOnlyPart, which allows a bette...
Definition: browserextension.h:321
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 bool openFile()
If the part uses the standard implementation of openUrl(), it must reimplement this,...
Definition: part.cpp:569
QString i18n(const char *text)
void setSuffix(const QString &suffix)
QString componentName() const
virtual ~ReadWritePart()
Destructor Applications using a ReadWritePart should make sure, before destroying it,...
Definition: part.cpp:774
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
virtual void setComponentData(const KComponentData &componentData)
void urlChanged(const KUrl &url)
Emitted by the part when url() changes.
MimetypeJob * mimetype(const KUrl &url, JobFlags flags=DefaultFlags)
FileCopyJob * file_copy(const KUrl &src, const KUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
QString name() const
virtual void partActivateEvent(PartActivateEvent *event)
Convenience method which is called when the Part received a PartActivateEvent .
Definition: part.cpp:326
QString localFilePath() const
Returns the local file path associated with this part.
Definition: part.cpp:480
int xOffset() const
xOffset is the horizontal scrolling of the part's widget (in case it's a scrollview).
Definition: part.cpp:1101
QWidget * container(const QString &containerName, KXMLGUIClient *client, bool useTagName=false)
virtual void guiActivateEvent(GUIActivateEvent *event)
Convenience method which is called when the Part received a GUIActivateEvent .
Definition: part.cpp:334
virtual void partSelectEvent(PartSelectEvent *event)
Convenience method which is called when the Part received a PartSelectEvent .
Definition: part.cpp:330
HideProgressInfo
virtual KComponentData componentData() const
BrowserExtension * browserExtension() const
This convenience method returns the browserExtension for this part, or 0 if there isn't any.
Definition: part.cpp:748
ReadWritePart(QObject *parent=0)
Constructor See parent constructor for instructions.
Definition: part.cpp:769
void setActionRequestedByUser(bool userRequested)
Definition: part.cpp:1146
int error() const
void canceled(const QString &errMsg)
Emit this if loading is canceled by the user or by an error.
KIconLoader * iconLoader()
Use this icon loader to load any icons that are specific to this part, i.e.
Definition: part.cpp:246
OpenUrlArguments is the set of arguments that specify how a URL should be opened by KParts::ReadOnlyP...
Definition: part.h:405
This event is sent by the part manager when the active part changes.
Definition: event.h:83
void loadPlugins(QObject *parent, KXMLGUIClient *parentGUIClient, const KComponentData &componentData)
Load the Plugins honoring the PluginLoadingMode.
Definition: part.cpp:156
KGuiItem discard()
void setWindowCaption(const QString &caption)
Emitted by the part, to set the caption of the window(s) hosting this part.
bool waitSaveComplete()
Waits for any pending upload job to finish and returns whether the last save() action was successful.
Definition: part.cpp:1034
void setPath(const QString &path)
static QString protocolClass(const QString &protocol)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 27 2020 00:00:00 by doxygen 1.8.20 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 27 2020 00:00:00 by doxygen 1.8.20 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.