6 #include <QCoreApplication>
7 #include <QDomDocument>
17 m_layout(LayoutHorizontal), m_effect(EffectReveal),
18 m_total(0), m_start(0),
31 const QString &filename, QDomElement &element,
bool showWarnings)
33 if (element.tagName() ==
"layout")
37 if (layout ==
"vertical")
42 else if (element.tagName() ==
"style")
46 if (effect ==
"slide")
89 LOG(VB_GENERAL, LOG_ERR,
"Progress image doesn't exist");
97 float percentage = 0.0;
99 if (total <= 0 || current <= 0 || current > total)
102 percentage = (float)current / (
float)total;
105 QRect fillArea = progressType->
GetArea();
107 int height = fillArea.height();
108 int width = fillArea.width();
109 int x = fillArea.x();
110 int y = fillArea.y();
118 width = (
int)((
float)fillArea.width() * percentage);
122 height = (
int)((
float)fillArea.height() * percentage);
130 int newwidth = (
int)((
float)fillArea.width() * percentage);
131 x = width - newwidth;
136 int newheight = (
int)((
float)fillArea.height() * percentage);
137 y = height - newheight;
158 else if (progressShape)