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)
610 if (!ext.isEmpty() && m_url.query().isNull()) // not if the URL has a query, e.g. cgi.pl?something
The Browser Extension is an extension (yes, no kidding) to KParts::ReadOnlyPart, which allows a bette...
Definition: browserextension.h:320
bool isLocalFileTemporary() const
Definition: part.cpp:495
void setLocalFilePath(const QString &localFilePath)
Sets the local file path associated with this part.
Definition: part.cpp:487
QString i18n(const char *text)
ReadWritePart(QObject *parent=0)
Constructor See parent constructor for instructions.
Definition: part.cpp:769
KGuiItem discard()
bool addResourceType(const char *type, const QString &relativename, bool priority=true)
bool waitSaveComplete()
Waits for any pending upload job to finish and returns whether the last save() action was successful...
Definition: part.cpp:1034
QMap< QString, QString > & metaData()
Meta-data to associate with the KIO operation that will be used to open the URL.
Definition: part.cpp:1131
void urlChanged(const KUrl &url)
Emitted by the part when url() changes.
bool actionRequestedByUser() const
True if the user requested that the URL be opened.
Definition: part.cpp:1141
bool remove()
void setActionRequestedByUser(bool userRequested)
Definition: part.cpp:1146
virtual bool openFile()
If the part uses the standard implementation of openUrl(), it must reimplement this, to open the local file.
Definition: part.cpp:569
This event is sent by the part manager when the active part changes.
Definition: event.h:82
MimetypeJob * mimetype(const KUrl &url, JobFlags flags=DefaultFlags)
KStandardDirs * dirs()
bool isProgressInfoEnabled() const
Returns whether the part shows the progress info dialog used by internal KIO job. ...
Definition: part.cpp:519
virtual const QMetaObject * metaObject() const
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
BrowserExtension * browserExtension() const
This convenience method returns the browserExtension for this part, or 0 if there isn't any...
Definition: part.cpp:748
virtual void embed(QWidget *parentWidget)
Embed this part into a host widget.
Definition: part.cpp:215
FileCopyJob * file_move(const KUrl &src, const KUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
QString toLocalFile(AdjustPathOption trailing=LeaveTrailingSlash) const
KXMLGUIFactory * factory() const
StatJob * mostLocalUrl(const KUrl &url, JobFlags flags=DefaultFlags)
void setSuffix(const QString &suffix)
virtual bool queryClose()
If the document has been modified, ask the user to save changes.
Definition: part.cpp:808
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
bool isEmpty() const
void setParent(QWidget *parent)
QString mimeType() const
The mimetype to use when opening the url, when known by the calling application.
Definition: part.cpp:1121
void setGeometry(int x, int y, int w, int h)
void setPath(const QString &path)
QString catalogName() 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)
QWidget * activeWindow()
FileCopyJob * file_copy(const KUrl &src, const KUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
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
void canceled(const QString &errMsg)
Emit this if loading is canceled by the user or by an error.
virtual KComponentData componentData() const
OpenUrlArguments & operator=(const OpenUrlArguments &other)
Definition: part.cpp:1081
QString protocol() const
void sigQueryClose(bool *handled, bool *abortClosing)
set handled to true, if you don't want the default handling set abortClosing to true, if you handled the request, but for any reason don't want to allow closing the document
void setAutoRemove(bool b)
void setWindowCaption(const QString &caption)
Emitted by the part, to set the caption of the window(s) hosting this part.
QString objectName() const
void setPluginLoadingMode(PluginLoadingMode loadingMode)
Set how plugins should be loaded.
Definition: part.cpp:164
bool isEmpty() const
int xOffset() const
xOffset is the horizontal scrolling of the part's widget (in case it's a scrollview).
Definition: part.cpp:1101
QWidget * hostContainer(const QString &containerName)
Convenience method for KXMLGUIFactory::container.
Definition: part.cpp:338
CopyJob * link(const KUrl &src, const KUrl &destDir, JobFlags flags=DefaultFlags)
QString componentName() const
virtual void partActivateEvent(PartActivateEvent *event)
Convenience method which is called when the Part received a PartActivateEvent .
Definition: part.cpp:326
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
static QString protocolClass(const QString &protocol)
virtual void setComponentData(const KComponentData &componentData)
const KShortcut & reload()
This event is sent to a Part when its GUI has been activated or deactivated.
Definition: event.h:59
bool openStream(const QString &mimeType, const KUrl &url)
Initiate sending data to this part.
Definition: part.cpp:726
void insertCatalog(const QString &catalog)
const char * className() const
QString fileName() const
PluginLoadingMode
We have three different policies, whether to load new plugins or not.
Definition: part.h:119
KLocale * locale()
virtual void partSelectEvent(PartSelectEvent *event)
Convenience method which is called when the Part received a PartSelectEvent .
Definition: part.cpp:330
virtual void customEvent(QEvent *event)
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
void setArguments(const OpenUrlArguments &arguments)
Sets the arguments to use for the next openUrl call.
Definition: part.cpp:753
bool isValid() const
void setLocalFileTemporary(bool temp)
Definition: part.cpp:504
void setProgressInfoEnabled(bool show)
Call this to turn off the progress info dialog used by the internal KIO job.
Definition: part.cpp:512
KIconLoader * iconLoader()
Use this icon loader to load any icons that are specific to this part, i.e.
Definition: part.cpp:246
QString fileName(const DirectoryOptions &options=IgnoreTrailingSlash) const
PartManager * manager() const
Returns the part manager handling this part, if any (0L otherwise).
Definition: part.cpp:264
int yOffset() const
yOffset is the vertical scrolling of the part's widget (in case it's a scrollview).
Definition: part.cpp:1111
void loadPlugins(QObject *parent, KXMLGUIClient *parentGUIClient, const KComponentData &componentData)
Load the Plugins honoring the PluginLoadingMode.
Definition: part.cpp:156
void setAutoDeletePart(bool autoDeletePart)
By default, the part deletes itself when its widget is deleted.
Definition: part.cpp:238
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
virtual void setReadWrite(bool readwrite=true)
Changes the behavior of this part to readonly or readwrite.
Definition: part.cpp:782
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
KGuiItem save()
The part manager is an object which knows about a collection of parts (even nested ones) and handles ...
Definition: partmanager.h:47
QWidget * container(const QString &containerName, KXMLGUIClient *client, bool useTagName=false)
virtual void setComponentData(const KComponentData &componentData)
Set the componentData(KComponentData) for this part.
Definition: part.cpp:137
virtual void guiActivateEvent(GUIActivateEvent *event)
Convenience method which is called when the Part received a GUIActivateEvent .
Definition: part.cpp:334
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
void show()
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
virtual ~ReadWritePart()
Destructor Applications using a ReadWritePart should make sure, before destroying it...
Definition: part.cpp:774
bool isLocalFile() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
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
bool open()
void destroyed(QObject *obj)
ReadOnlyPart(QObject *parent=0)
Constructor See also Part for the setXXX methods to call.
Definition: part.cpp:450
QByteArray encodeName(const QString &fileName)
OpenUrlArguments is the set of arguments that specify how a URL should be opened by KParts::ReadOnlyP...
Definition: part.h:404
void setAutoDeleteWidget(bool autoDeleteWidget)
By default, the widget is deleted by the part when the part is deleted.
Definition: part.cpp:232
This event is sent when a part is selected or deselected.
Definition: event.h:103
QString localFilePath() const
Returns the local file path associated with this part.
Definition: part.cpp:480
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.