KJobWidgets 5.109.0
Public Member Functions | Protected Slots | List of all members
KDialogJobUiDelegate

A UI delegate using KMessageBox for interaction (showing errors and warnings). More...

#include <KDialogJobUiDelegate>

Public Member Functions

 KDialogJobUiDelegate ()
 Constructs a new KDialogJobUiDelegate.
 
 KDialogJobUiDelegate (KJobUiDelegate::Flags flags, QWidget *window)
 Constructs a new KDialogJobUiDelegate.
 
 ~KDialogJobUiDelegate () override
 Destroys the KDialogJobUiDelegate.
 
bool setJob (KJob *job) override
 
virtual void setWindow (QWidget *window)
 Associate this delegate with a window given by window.
 
void showErrorMessage () override
 
void updateUserTimestamp (unsigned long time)
 Updates the last user action timestamp to the given time.
 
unsigned long userTimestamp () const
 
QWidget * window () const
 Returns the window this delegate is associated with.
 

Protected Slots

void slotWarning (KJob *job, const QString &plain, const QString &rich) override
 

Detailed Description

A UI delegate using KMessageBox for interaction (showing errors and warnings).

The KMessageBox will use window as a parent in an application-modal.

Constructor & Destructor Documentation

◆ KDialogJobUiDelegate() [1/2]

KDialogJobUiDelegate::KDialogJobUiDelegate ( )

Constructs a new KDialogJobUiDelegate.

◆ KDialogJobUiDelegate() [2/2]

KDialogJobUiDelegate::KDialogJobUiDelegate ( KJobUiDelegate::Flags  flags,
QWidget *  window 
)
explicit

Constructs a new KDialogJobUiDelegate.

Parameters
flagsallows to enable automatic error/warning handling
windowthe window associated with this delegate, see setWindow.
Since
5.70

◆ ~KDialogJobUiDelegate()

KDialogJobUiDelegate::~KDialogJobUiDelegate ( )
override

Destroys the KDialogJobUiDelegate.

Member Function Documentation

◆ setJob()

bool KDialogJobUiDelegate::setJob ( KJob *  job)
override
Reimplemented from superclass.

◆ setWindow()

virtual void KDialogJobUiDelegate::setWindow ( QWidget *  window)
virtual

Associate this delegate with a window given by window.

Needed for dialog boxes to respect stacking order, centering to parent, focus going back to parent after closing...

Parameters
windowthe window to associate to
See also
window()

◆ updateUserTimestamp()

void KDialogJobUiDelegate::updateUserTimestamp ( unsigned long  time)

Updates the last user action timestamp to the given time.

See KApplication::updateUserTimestamp().

◆ window()

QWidget * KDialogJobUiDelegate::window ( ) const

Returns the window this delegate is associated with.

Returns
the associated window
See also
setWindow()