Changeset View
Changeset View
Standalone View
Standalone View
src/statusbar/ProgressBar.cpp
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | |||||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | void | 76 | void | ||
77 | ProgressBar::setDescription( const QString &description ) | 77 | ProgressBar::setDescription( const QString &description ) | ||
78 | { | 78 | { | ||
79 | m_descriptionLabel->setText( description ); | 79 | m_descriptionLabel->setText( description ); | ||
80 | } | 80 | } | ||
81 | 81 | | |||
82 | ProgressBar * | | |||
83 | ProgressBar::setAbortSlot( QObject *receiver, const char *slot, Qt::ConnectionType type ) | | |||
84 | { | | |||
85 | cancelButton()->setHidden( false ); | | |||
86 | if( receiver ) | | |||
87 | connect( this, SIGNAL(cancelled(ProgressBar*)), receiver, slot, type ); | | |||
88 | connect( cancelButton(), &QAbstractButton::clicked, this, &ProgressBar::cancel ); | | |||
89 | | ||||
90 | return this; | | |||
91 | } | | |||
92 | | ||||
93 | void ProgressBar::cancel() | 82 | void ProgressBar::cancel() | ||
94 | { | 83 | { | ||
95 | DEBUG_BLOCK | 84 | DEBUG_BLOCK | ||
96 | debug() << "cancelling operation: " << m_descriptionLabel->text(); | 85 | debug() << "cancelling operation: " << m_descriptionLabel->text(); | ||
97 | emit( cancelled( this ) ); | 86 | emit( cancelled( this ) ); | ||
98 | } | 87 | } | ||
99 | 88 | | |||
100 | void ProgressBar::setValue( int percentage ) | 89 | void ProgressBar::setValue( int percentage ) | ||
Show All 23 Lines |