Changeset View
Changeset View
Standalone View
Standalone View
krusader/Dialogs/krpleasewait.cpp
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 42 | { | |||
---|---|---|---|---|---|
44 | 44 | | |||
45 | timer = new QTimer(this); | 45 | timer = new QTimer(this); | ||
46 | setWindowTitle(i18n("Krusader::Wait")); | 46 | setWindowTitle(i18n("Krusader::Wait")); | ||
47 | 47 | | |||
48 | setMinimumDuration(500); | 48 | setMinimumDuration(500); | ||
49 | setAutoClose(false); | 49 | setAutoClose(false); | ||
50 | setAutoReset(false); | 50 | setAutoReset(false); | ||
51 | 51 | | |||
52 | connect(timer, SIGNAL(timeout()), this, SLOT(cycleProgress())); | 52 | connect(timer, &QTimer::timeout, this, &KRPleaseWait::cycleProgress); | ||
53 | 53 | | |||
54 | QProgressBar* progress = new QProgressBar(this); | 54 | QProgressBar* progress = new QProgressBar(this); | ||
55 | progress->setMaximum(count); | 55 | progress->setMaximum(count); | ||
56 | progress->setMinimum(0); | 56 | progress->setMinimum(0); | ||
57 | setBar(progress); | 57 | setBar(progress); | ||
58 | 58 | | |||
59 | QLabel* label = new QLabel(this); | 59 | QLabel* label = new QLabel(this); | ||
60 | setLabel(label); | 60 | setLabel(label); | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 99 | { | |||
104 | _parentWindow->setCursor(Qt::ArrowCursor); | 104 | _parentWindow->setCursor(Qt::ArrowCursor); | ||
105 | } | 105 | } | ||
106 | 106 | | |||
107 | 107 | | |||
108 | void KRPleaseWaitHandler::startWaiting(QString msg, int count , bool cancel) | 108 | void KRPleaseWaitHandler::startWaiting(QString msg, int count , bool cancel) | ||
109 | { | 109 | { | ||
110 | if (dlg == 0) { | 110 | if (dlg == 0) { | ||
111 | dlg = new KRPleaseWait(msg , _parentWindow, count, cancel); | 111 | dlg = new KRPleaseWait(msg , _parentWindow, count, cancel); | ||
112 | connect(dlg, SIGNAL(canceled()), this, SLOT(killJob())); | 112 | connect(dlg, &KRPleaseWait::canceled, this, &KRPleaseWaitHandler::killJob); | ||
113 | } | 113 | } | ||
114 | incMutex = cycleMutex = _wasCancelled = false; | 114 | incMutex = cycleMutex = _wasCancelled = false; | ||
115 | dlg->setValue(0); | 115 | dlg->setValue(0); | ||
116 | 116 | | |||
117 | dlg->setLabelText(msg); | 117 | dlg->setLabelText(msg); | ||
118 | if (count == 0) { | 118 | if (count == 0) { | ||
119 | dlg->setMaximum(10); | 119 | dlg->setMaximum(10); | ||
120 | cycle = true; | 120 | cycle = true; | ||
Show All 36 Lines |