TextAddonsWidgets::OpenFileJob Class
| Header: | #include <TextAddonsWidgets/OpenFileJob> |
| CMake: | find_package(KF6TextAddonsWidgets REQUIRED)target_link_libraries(mytarget PRIVATE KF6::TextAddonsWidgets) |
| Inherits: | QObject |
Public Functions
| OpenFileJob(QObject *parent = nullptr) | |
| virtual | ~OpenFileJob() override |
| bool | canStart() const |
| virtual void | downloadFile(const QUrl &fileUrl) = 0 |
| QString | link() const |
| virtual void | openUrl() = 0 |
| QWidget * | parentWidget() const |
| virtual void | runApplication(const KService::Ptr &offer) = 0 |
| void | setLink(const QString &newLink) |
| void | setParentWidget(QWidget *newParentWidget) |
| void | start() |
Protected Variables
| QString | mLink |
| QWidget * | mParentWidget |
Detailed Description
Member Function Documentation
[explicit] OpenFileJob::OpenFileJob(QObject *parent = nullptr)
Constructor for OpenFileJob parent The parent object
[override virtual noexcept] OpenFileJob::~OpenFileJob()
Destructor for OpenFileJob
bool OpenFileJob::canStart() const
Returns whether the job can start Returns True if the job can start, false otherwise
[pure virtual] void OpenFileJob::downloadFile(const QUrl &fileUrl)
Download a file from the given URL (pure virtual) fileUrl The URL of the file to download
QString OpenFileJob::link() const
Returns the link to the file or URL Returns The link string
See also setLink().
[pure virtual] void OpenFileJob::openUrl()
Open a URL (pure virtual)
QWidget *OpenFileJob::parentWidget() const
Returns the parent widget for file operations Returns The parent widget
See also setParentWidget().
[pure virtual] void OpenFileJob::runApplication(const KService::Ptr &offer)
Run an application with the given service (pure virtual) offer The service to run
void OpenFileJob::setLink(const QString &newLink)
Sets the link to the file or URL newLink The link to set
See also link().
void OpenFileJob::setParentWidget(QWidget *newParentWidget)
Sets the parent widget for file operations newParentWidget The widget to set as parent
See also parentWidget().
void OpenFileJob::start()
Starts the file operation
Member Variable Documentation
QString OpenFileJob::mLink
This variable holds the link to the file or URL
QWidget *OpenFileJob::mParentWidget
This variable holds the parent widget for file operations