~mateo-salta/nitroshare/nitroshare

« back to all changes in this revision

Viewing changes to src/sharebox/CShareBox.cpp

  • Committer: Nathan Osman
  • Date: 2012-06-28 00:44:25 UTC
  • Revision ID: admin@quickmediasolutions.com-20120628004425-k7sozkt1raz215qh
Added progress display in the share box for multiple file transfers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <QPainter>
27
27
#include <QPaintEvent>
28
28
#include <QPen>
 
29
#include <QTimer>
29
30
#include <QUrl>
30
31
 
31
 
#include <file/CFileSender.h>
32
32
#include <sharebox/CShareBox.h>
33
33
#include <util/settings.h>
34
34
 
57
57
void CShareBox::OnProgress(int progress)
58
58
 {
59
59
    m_progress = progress;
 
60
 
 
61
    /* If the transfer completed or an error occured, then set a timer
 
62
       after which the icon will go away. */
 
63
    if(m_progress > CFileSender::ProgressNone)
 
64
        QTimer::singleShot(3000, this, SLOT(ResetProgress()));
 
65
 
60
66
    update();
61
67
}
62
68