#include <kis_delayed_save_dialog.h>
|
| enum | ResultType { Rejected = QDialog::Rejected
, Accepted = QDialog::Accepted
, Ignored = 2
} |
| |
| enum | Type { SaveDialog
, GeneralDialog
, ForcedDialog
} |
| |
| enum | ButtonCode {
None = 0x00000000
, Help = 0x00000001
, Default = 0x00000002
, Ok = 0x00000004
,
Apply = 0x00000008
, Try = 0x00000010
, Cancel = 0x00000020
, Close = 0x00000040
,
No = 0x00000080
, Yes = 0x00000100
, Reset = 0x00000200
, Details = 0x00000400
,
User1 = 0x00001000
, User2 = 0x00002000
, User3 = 0x00004000
, NoDefault = 0x00008000
} |
| |
| enum | ButtonPopupMode { InstantPopup = 0
, DelayedPopup = 1
} |
| |
| enum | CaptionFlag { NoCaptionFlags = 0
, AppNameCaption = 1
, ModifiedCaption = 2
, HIGCompliantCaption = AppNameCaption
} |
| |
|
| void | blockIfImageIsBusy () |
| |
| bool | checkImageIdle () |
| |
| | KisDelayedSaveDialog (KisImageSP image, Type type, int busyWait, QWidget *parent=nullptr) |
| |
| | Private (KisImageSP _image, int _busyWait, Type _type) |
| |
| | ~KisDelayedSaveDialog () override |
| |
| | Private (KisCanvas2 *c) |
| |
| QPushButton * | button (ButtonCode id) const |
| |
| QIcon | buttonIcon (ButtonCode id) const |
| |
| QString | buttonText (ButtonCode id) const |
| |
| QString | buttonToolTip (ButtonCode id) const |
| |
| QString | buttonWhatsThis (ButtonCode id) const |
| |
| ButtonCode | defaultButton () const |
| |
| QString | helpLinkText () const |
| |
| void | incrementInitialSize (const QSize &size) |
| |
| bool | isButtonEnabled (ButtonCode id) const |
| |
| | KoDialog (QWidget *parent=0, Qt::WindowFlags f=Qt::WindowFlags()) |
| |
| QWidget * | mainWidget () |
| |
| QSize | minimumSizeHint () const override |
| |
| void | setButtonFocus (ButtonCode id) |
| |
| void | setButtonGuiItem (ButtonCode id, const KGuiItem &item) |
| |
| void | setButtonIcon (ButtonCode id, const QIcon &icon) |
| |
| void | setButtons (ButtonCodes buttonMask) |
| |
| void | setButtonsOrientation (Qt::Orientation orientation) |
| |
| void | setButtonText (ButtonCode id, const QString &text) |
| |
| void | setButtonToolTip (ButtonCode id, const QString &text) |
| |
| void | setButtonWhatsThis (ButtonCode id, const QString &text) |
| |
| void | setDefaultButton (ButtonCode id) |
| |
| void | setEscapeButton (ButtonCode id) |
| |
| void | setInitialSize (const QSize &size) |
| |
| void | setMainWidget (QWidget *widget) |
| |
| void | showButton (ButtonCode id, bool state) |
| |
| void | showButtonSeparator (bool state) |
| |
| QSize | sizeHint () const override |
| |
| | ~KoDialog () override |
| |
Definition at line 19 of file kis_delayed_save_dialog.cpp.
◆ ResultType
◆ Type
◆ KisDelayedSaveDialog()
| KisDelayedSaveDialog::KisDelayedSaveDialog |
( |
KisImageSP | image, |
|
|
Type | type, |
|
|
int | busyWait, |
|
|
QWidget * | parent = nullptr ) |
|
explicit |
Definition at line 46 of file kis_delayed_save_dialog.cpp.
50{
52
54
60
62
64
69 } else {
71 setWindowFlags(windowFlags() & ~Qt::WindowCloseButtonHint);
72 }
73
75
76 m_d->image->compositeProgressProxy()->addProxy(
ui->progressBar);
77
79}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void setMainWidget(QWidget *widget)
void setButtonText(ButtonCode id, const QString &text)
QSize sizeHint() const override
void setButtons(ButtonCodes buttonMask)
@ Ok
Show Ok button. (this button accept()s the dialog; result set to QDialog::Accepted)
@ User1
Show User defined button 1.
@ Cancel
Show Cancel-button. (this button reject()s the dialog; result set to QDialog::Rejected)
KoDialog(QWidget *parent=0, Qt::WindowFlags f=Qt::WindowFlags())
#define KIS_ASSERT_RECOVER_NOOP(cond)
void slotIgnoreRequested()
const QScopedPointer< Private > m_d
void slotCancelRequested()
WdgDelayedSaveDialog * ui
References KoDialog::Cancel, KoDialog::cancelClicked(), connect(), GeneralDialog, image, KIS_ASSERT_RECOVER_NOOP, m_d, KoDialog::None, KoDialog::Ok, KoDialog::okClicked(), SaveDialog, KoDialog::setButtons(), KoDialog::setButtonText(), KoDialog::setMainWidget(), KoDialog::sizeHint(), slotCancelRequested(), slotIgnoreRequested(), slotTimerTimeout(), type, ui, KoDialog::User1, and KoDialog::user1Clicked().
◆ ~KisDelayedSaveDialog()
| KisDelayedSaveDialog::~KisDelayedSaveDialog |
( |
| ) |
|
|
override |
◆ blockIfImageIsBusy()
| void KisDelayedSaveDialog::blockIfImageIsBusy |
( |
| ) |
|
Definition at line 87 of file kis_delayed_save_dialog.cpp.
88{
89 if (
m_d->checkImageIdle()) {
91 return;
92 }
93
94 m_d->image->requestStrokeEnd();
95
96 QElapsedTimer t;
97 t.start();
98
99 while (t.elapsed() <
m_d->busyWait) {
100 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
101
102 if (
m_d->checkImageIdle()) {
104 return;
105 }
106
107 QThread::yieldCurrentThread();
108 }
109
110 m_d->updateTimer.start(200);
111 exec();
112 m_d->updateTimer.stop();
113}
References Accepted, and m_d.
◆ checkImageIdle()
| bool KisDelayedSaveDialog::checkImageIdle |
( |
| ) |
|
|
inline |
◆ Private()
| KisDelayedSaveDialog::Private |
( |
KisImageSP | _image, |
|
|
int | _busyWait, |
|
|
Type | _type ) |
|
inline |
◆ slotCancelRequested
| void KisDelayedSaveDialog::slotCancelRequested |
( |
| ) |
|
|
privateslot |
◆ slotIgnoreRequested
| void KisDelayedSaveDialog::slotIgnoreRequested |
( |
| ) |
|
|
privateslot |
◆ slotTimerTimeout
| void KisDelayedSaveDialog::slotTimerTimeout |
( |
| ) |
|
|
privateslot |
◆ busyWait
| int KisDelayedSaveDialog::busyWait |
◆ image
◆ m_d
| const QScopedPointer<Private> KisDelayedSaveDialog::m_d |
|
private |
◆ type
| Type KisDelayedSaveDialog::type |
◆ ui
◆ updateTimer
| QTimer KisDelayedSaveDialog::updateTimer |
The documentation for this class was generated from the following files: