KJobWidgets 5.109.0
kdialogjobuidelegate.h
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2000 Stephan Kulow <coolo@kde.org>
4 SPDX-FileCopyrightText: 2000 David Faure <faure@kde.org>
5 SPDX-FileCopyrightText: 2006, 2007 Kevin Ottens <ervin@kde.org>
6
7 SPDX-License-Identifier: LGPL-2.0-or-later
8*/
9
10#ifndef KDIALOGJOBUIDELEGATE_H
11#define KDIALOGJOBUIDELEGATE_H
12
13#include <KJobUiDelegate>
14#include <kjobwidgets_export.h>
15
16#include <memory>
17
25class KJOBWIDGETS_EXPORT KDialogJobUiDelegate : public KJobUiDelegate
26{
27 Q_OBJECT
28
29public:
34
41 explicit KDialogJobUiDelegate(KJobUiDelegate::Flags flags, QWidget *window);
42
47
48public:
52 bool setJob(KJob *job) override;
53
60 virtual void setWindow(QWidget *window);
61
67 QWidget *window() const;
68
73 void updateUserTimestamp(unsigned long time);
74
78 unsigned long userTimestamp() const;
79
80 void showErrorMessage() override;
81
82protected Q_SLOTS:
83 void slotWarning(KJob *job, const QString &plain, const QString &rich) override;
84
85private:
86 std::unique_ptr<class KDialogJobUiDelegatePrivate> const d;
87};
88
89#endif
A UI delegate using KMessageBox for interaction (showing errors and warnings).
Definition kdialogjobuidelegate.h:26
KDialogJobUiDelegate()
Constructs a new KDialogJobUiDelegate.
QWidget * window() const
Returns the window this delegate is associated with.
bool setJob(KJob *job) override
KDialogJobUiDelegate(KJobUiDelegate::Flags flags, QWidget *window)
Constructs a new KDialogJobUiDelegate.
void updateUserTimestamp(unsigned long time)
Updates the last user action timestamp to the given time.
virtual void setWindow(QWidget *window)
Associate this delegate with a window given by window.
~KDialogJobUiDelegate() override
Destroys the KDialogJobUiDelegate.