Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/shell/progresswidget/progressmanager.h
Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Line(s) | 279 | public: | |||
---|---|---|---|---|---|
284 | */ | 284 | */ | ||
285 | static ProgressManager *instance(); | 285 | static ProgressManager *instance(); | ||
286 | 286 | | |||
287 | /** | 287 | /** | ||
288 | * @return a unique id number which can be used to discern | 288 | * @return a unique id number which can be used to discern | ||
289 | * an operation from all others going on at the same time. Use that | 289 | * an operation from all others going on at the same time. Use that | ||
290 | * number as the id string for your <i>progressItem</i> to ensure it is unique. | 290 | * number as the id string for your <i>progressItem</i> to ensure it is unique. | ||
291 | */ | 291 | */ | ||
292 | static QString getUniqueID() | 292 | static QString createUniqueID() | ||
293 | { | 293 | { | ||
294 | return QString::number( ++uID ); | 294 | return QString::number( ++uID ); | ||
295 | } | 295 | } | ||
296 | 296 | | |||
297 | /** | 297 | /** | ||
298 | * Creates a ProgressItem with a unique id and the given label. | 298 | * Creates a ProgressItem with a unique id and the given label. | ||
299 | * This is the simplest way to acquire a progress item. It will not | 299 | * This is the simplest way to acquire a progress item. It will not | ||
300 | * have a parent and will be set to be cancellable and not using crypto. | 300 | * have a parent and will be set to be cancellable and not using crypto. | ||
301 | */ | 301 | */ | ||
302 | static ProgressItem *createProgressItem( const QString &label ) | 302 | static ProgressItem *createProgressItem( const QString &label ) | ||
303 | { | 303 | { | ||
304 | return instance()->createProgressItemImpl( nullptr, getUniqueID(), label, | 304 | return instance()->createProgressItemImpl( nullptr, createUniqueID(), label, | ||
305 | QString(), true, false ); | 305 | QString(), true, false ); | ||
306 | } | 306 | } | ||
307 | 307 | | |||
308 | /** | 308 | /** | ||
309 | * Creates a new progressItem with the given parent, id, label and initial | 309 | * Creates a new progressItem with the given parent, id, label and initial | ||
310 | * status. | 310 | * status. | ||
311 | * | 311 | * | ||
312 | * @param parent Specify an already existing item as the parent of this one. | 312 | * @param parent Specify an already existing item as the parent of this one. | ||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |