Changeset View
Changeset View
Standalone View
Standalone View
src/statusbar/CompoundProgressBar.cpp
Show All 22 Lines | |||||
23 | 23 | | |||
24 | #include <KLocalizedString> | 24 | #include <KLocalizedString> | ||
25 | 25 | | |||
26 | 26 | | |||
27 | CompoundProgressBar::CompoundProgressBar( QWidget *parent ) | 27 | CompoundProgressBar::CompoundProgressBar( QWidget *parent ) | ||
28 | : ProgressBar( parent ) | 28 | : ProgressBar( parent ) | ||
29 | , m_mutex( QMutex::Recursive ) | 29 | , m_mutex( QMutex::Recursive ) | ||
30 | { | 30 | { | ||
31 | m_progressDetailsWidget = new PopupWidget( parent ); | 31 | m_progressDetailsWidget = new PopupWidget(); | ||
32 | m_progressDetailsWidget->hide(); | 32 | m_progressDetailsWidget->hide(); | ||
33 | 33 | | |||
34 | connect( cancelButton(), &QAbstractButton::clicked, this, &CompoundProgressBar::cancelAll ); | 34 | connect( cancelButton(), &QAbstractButton::clicked, this, &CompoundProgressBar::cancelAll ); | ||
35 | } | 35 | } | ||
36 | 36 | | |||
37 | CompoundProgressBar::~CompoundProgressBar() | 37 | CompoundProgressBar::~CompoundProgressBar() | ||
38 | { | 38 | { | ||
39 | delete m_progressDetailsWidget; | 39 | delete m_progressDetailsWidget; | ||
▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | 133 | { | |||
134 | QMutexLocker locker( &m_mutex ); | 134 | QMutexLocker locker( &m_mutex ); | ||
135 | 135 | | |||
136 | if( !m_progressMap.contains( owner ) ) | 136 | if( !m_progressMap.contains( owner ) ) | ||
137 | return ; | 137 | return ; | ||
138 | 138 | | |||
139 | m_progressMap.value( owner )->setMaximum( value ); | 139 | m_progressMap.value( owner )->setMaximum( value ); | ||
140 | } | 140 | } | ||
141 | 141 | | |||
142 | void CompoundProgressBar::setParent( QWidget *parent ) | | |||
143 | { | | |||
144 | QMutexLocker locker( &m_mutex ); | | |||
145 | | ||||
146 | delete m_progressDetailsWidget; | | |||
147 | m_progressDetailsWidget = new PopupWidget( parent ); | | |||
148 | m_progressDetailsWidget->hide(); | | |||
149 | | ||||
150 | ProgressBar::setParent( parent ); | | |||
151 | } | | |||
152 | | ||||
153 | | ||||
154 | void CompoundProgressBar::setProgressStatus( const QObject *owner, const QString &text ) | 142 | void CompoundProgressBar::setProgressStatus( const QObject *owner, const QString &text ) | ||
155 | { | 143 | { | ||
156 | QMutexLocker locker( &m_mutex ); | 144 | QMutexLocker locker( &m_mutex ); | ||
157 | 145 | | |||
158 | if( !m_progressMap.contains( owner ) ) | 146 | if( !m_progressMap.contains( owner ) ) | ||
159 | return ; | 147 | return ; | ||
160 | 148 | | |||
161 | m_progressMap.value( owner )->setDescription( text ); | 149 | m_progressMap.value( owner )->setDescription( text ); | ||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |