File: progressindicator.cpp

package info (click to toggle)
esperanza 0.2.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 600 kB
  • ctags: 536
  • sloc: cpp: 4,533; sh: 63; makefile: 4
file content (34 lines) | stat: -rw-r--r-- 569 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "progressindicator.h"

#include <QLabel>

ProgressIndicator::ProgressIndicator (QWidget *parent) : QLabel (parent)
{
	m_movie = new QMovie (":images/progress.mng", NULL, this);
	setMovie (m_movie);
//	setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);

//	connect (m_movie, SIGNAL (frameChanged (int)), this, updateImage ());
	hide ();
}

/*
QSize
ProgressIndicator::sizeHint () const
{
	return m_movie->size ();
}
*/

void
ProgressIndicator::setStatus (bool go)
{
	if (go) {
		show ();
		m_movie->start ();
	} else {
		hide ();
		m_movie->stop ();
	}
}