KParts
readonlypart.cpp
136 qCWarning(KPARTSLOG) << "Default implementation of ReadOnlyPart::openFile called!" << metaObject()->className()
171 // Use same extension as remote file. This is important for mimetype-determination (e.g. koffice)
179 QTemporaryFile tempFile(QDir::tempPath() + QLatin1Char('/') + m_metaData.pluginId() + QLatin1String("XXXXXX") + extension);
195 QObject::connect(m_job, &KIO::FileCopyJob::mimeTypeFound, q, [this](KIO::Job *job, const QString &mimeType) {
void mimeTypeFound(KIO::Job *job, const QString &mimeType)
virtual QString errorString() const
int error() const
void result(KJob *job)
This event is sent to a Part when its GUI has been activated or deactivated.
Definition guiactivateevent.h:30
OpenUrlArguments is the set of arguments that specify how a URL should be opened by KParts::ReadOnlyP...
Definition openurlarguments.h:35
QString mimeType() const
The mimetype to use when opening the url, when known by the calling application.
Definition openurlarguments.cpp:72
void setWindowCaption(const QString &caption)
Emitted by the part, to set the caption of the window(s) hosting this part.
bool isProgressInfoEnabled() const
Returns whether the part shows the progress info dialog used by the internal KIO job.
Definition readonlypart.cpp:86
bool openStream(const QString &mimeType, const QUrl &url)
Initiate sending data to this part.
Definition readonlypart.cpp:300
ReadOnlyPart(QObject *parent=nullptr, const KPluginMetaData &data={})
Constructor.
Definition readonlypart.cpp:29
virtual bool openUrl(const QUrl &url)
Only reimplement this if you don't want the network transparency support to download from the URL int...
Definition readonlypart.cpp:93
void setProgressInfoEnabled(bool show)
Call this to turn off the progress info dialog used by the internal KIO job.
Definition readonlypart.cpp:79
NavigationExtension * navigationExtension() const
This convenience method returns the NavigationExtension for this part, or nullptr if there isn't one.
Definition readonlypart.cpp:323
void urlChanged(const QUrl &url)
Emitted by the part when url() changes.
void setLocalFilePath(const QString &localFilePath)
Sets the local file path associated with this part.
Definition readonlypart.cpp:72
virtual bool doCloseStream()
This is called by closeStream(), to indicate that all the data has been sent.
Definition readonlypart.h:201
virtual bool openFile()
If the part uses the standard implementation of openUrl(), it must reimplement this to open the local...
Definition readonlypart.cpp:134
void setArguments(const OpenUrlArguments &arguments)
Sets the arguments to use for the next openUrl() call.
Definition readonlypart.cpp:328
virtual bool closeUrl()
Called when closing the current URL (for example, a document), for instance when switching to another...
Definition readonlypart.cpp:216
virtual bool doWriteStream(const QByteArray &data)
Receive some data from the hosting application.
Definition readonlypart.h:191
virtual bool doOpenStream(const QString &mimeType)
Called by openStream to initiate sending of data.
Definition readonlypart.h:180
QString localFilePath() const
Returns the local file path associated with this part.
Definition readonlypart.cpp:65
void guiActivateEvent(GUIActivateEvent *event) override
Reimplemented from Part, so that the window caption is set to the current URL (decoded) when the part...
Definition readonlypart.cpp:286
KIOCORE_EXPORT StatJob * mostLocalUrl(const QUrl &url, JobFlags flags=DefaultFlags)
KIOCORE_EXPORT FileCopyJob * file_copy(const QUrl &src, const QUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
DefaultFlags
HideProgressInfo
Overwrite
void setWindow(QObject *job, QWidget *widget)
QString tempPath()
bool remove()
const char * className() const const
QMimeType mimeTypeForUrl(const QUrl &url) const const
isDefault
name
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
virtual bool event(QEvent *e)
T findChild(const QString &name, Qt::FindChildOptions options) const const
virtual const QMetaObject * metaObject() const const
bool isEmpty() const const
PreferLocalFile
QUrl fromLocalFile(const QString &localFile)
bool isLocalFile() const const
bool isValid() const const
QString scheme() const const
QString toLocalFile() const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.