SVN commit 503541 by cgilles:
Digikam 0.9.0 from trunk : common showfoto/IE gui implementation : io file acess progress bar can display a small text to discribe current file operation CCMAIL: [hidden email] M +4 -2 showfoto/showfoto.cpp M +4 -2 utilities/imageeditor/editor/imagewindow.cpp M +10 -2 utilities/imageeditor/editor/iofileprogressbar.cpp M +5 -3 utilities/imageeditor/editor/iofileprogressbar.h --- trunk/extragear/graphics/digikam/showfoto/showfoto.cpp #503540:503541 @@ -778,7 +778,8 @@ m_openFilesInFolderAction->setEnabled(false); m_fileOpenAction->setEnabled(false); - m_nameLabel->progressBarMode(Digikam::IOFileProgressBar::ProgressBarMode); + m_nameLabel->progressBarMode(Digikam::IOFileProgressBar::ProgressBarMode, + i18n("Loading: ")); } void ShowFoto::slotLoadingFinished(const QString &filename, bool success, bool isReadOnly) @@ -809,7 +810,8 @@ m_openFilesInFolderAction->setEnabled(false); m_fileOpenAction->setEnabled(false); - m_nameLabel->progressBarMode(Digikam::IOFileProgressBar::CancelProgressBarMode); + m_nameLabel->progressBarMode(Digikam::IOFileProgressBar::CancelProgressBarMode, + i18n("Saving: ")); } void ShowFoto::finishSaving(bool success) --- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/imagewindow.cpp #503540:503541 @@ -543,7 +543,8 @@ m_rightSidebar->noCurrentItem(); toggleActions(false); - m_nameLabel->progressBarMode(IOFileProgressBar::ProgressBarMode); + m_nameLabel->progressBarMode(IOFileProgressBar::ProgressBarMode, + i18n("Loading: ")); } void ImageWindow::slotLoadingFinished(const QString &filename, bool success, bool isReadOnly) @@ -570,7 +571,8 @@ m_rightSidebar->noCurrentItem(); toggleActions(false); - m_nameLabel->progressBarMode(IOFileProgressBar::CancelProgressBarMode); + m_nameLabel->progressBarMode(IOFileProgressBar::CancelProgressBarMode, + i18n("Saving: ")); } void ImageWindow::finishSaving(bool success) --- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/iofileprogressbar.cpp #503540:503541 @@ -99,7 +99,7 @@ delete d; } -void IOFileProgressBar::setText( QString text ) +void IOFileProgressBar::setText( const QString& text ) { d->fileNameLabel->setText(text); } @@ -114,11 +114,17 @@ d->fileAcessProgressBar->setProgress(v); } -void IOFileProgressBar::progressBarMode( int mode ) +void IOFileProgressBar::setProgressText( const QString& text ) { + d->fileAcessProgressBar->setFormat( text + QString ("%p%") ); +} + +void IOFileProgressBar::progressBarMode( int mode, const QString& text ) +{ if ( mode == FileNameMode) { raiseWidget(IOFileProgressBarPriv::FileNameLabel); + setProgressValue(0); } else if ( mode == ProgressBarMode ) { @@ -130,6 +136,8 @@ d->cancelButton->show(); raiseWidget(IOFileProgressBarPriv::FileAcessProgressBar); } + + setProgressText( text ); } } // namespace Digikam --- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/iofileprogressbar.h #503540:503541 @@ -46,10 +46,12 @@ ~IOFileProgressBar(); - void setText(QString text); - void progressBarMode(int mode); + void setText( const QString& text ); + void setAlignment( int a ); + + void progressBarMode( int mode, const QString& text=QString::null ); void setProgressValue( int v ); - void setAlignment(int a); + void setProgressText( const QString& text ); public: _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |