Forgot to add an icon

This commit is contained in:
Mark Watkins 2011-12-21 10:47:35 +10:00
parent 8aadf42cef
commit 7b571e644b
5 changed files with 23 additions and 5 deletions

View File

@ -2440,9 +2440,11 @@ void gGraphView::fadeOut()
} }
void gGraphView::fadeIn(bool dir) void gGraphView::fadeIn(bool dir)
{ {
static bool firstdraw=true;
m_tooltip->cancel(); m_tooltip->cancel();
if (!PROFILE.ExistsAndTrue("AnimationsAndTransitions")) { if (firstdraw || !PROFILE.ExistsAndTrue("AnimationsAndTransitions")) {
updateGL(); updateGL();
firstdraw=false;
return; return;
} }

View File

@ -345,6 +345,7 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
compliance_hours=PROFILE["ComplianceHours"].toDouble(); compliance_hours=PROFILE["ComplianceHours"].toDouble();
} }
int incompliant=0;
Day * day; Day * day;
EventDataType hours; EventDataType hours;
for (qint64 Q=minx;Q<=maxx+86400000L;Q+=86400000L) { for (qint64 Q=minx;Q<=maxx+86400000L;Q+=86400000L) {
@ -420,7 +421,10 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
QColor col=m_colors[j]; QColor col=m_colors[j];
if (m_type[j]==ST_HOURS) { if (m_type[j]==ST_HOURS) {
if (tmp<compliance_hours) col=QColor("#f04040"); if (tmp<compliance_hours) {
col=QColor("#f04040");
incompliant++;
}
} }
if (zd==hl_day) { if (zd==hl_day) {
@ -472,7 +476,11 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
} }
lastdaygood=true; lastdaygood=true;
if (Q>maxx+extra) break; if (Q>maxx+extra) break;
} else lastdaygood=false; } else {
if (Q<maxx+extra)
incompliant++;
lastdaygood=false;
}
px+=barw; px+=barw;
daynum++; daynum++;
//lastQ=Q; //lastQ=Q;
@ -486,6 +494,7 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
QString a,b; QString a,b;
int x,y; int x,y;
bool ishours=false;
for (int j=0;j<m_codes.size();j++) { for (int j=0;j<m_codes.size();j++) {
if (!m_goodcodes[j]) continue; if (!m_goodcodes[j]) continue;
ChannelID code=m_codes[j]; ChannelID code=m_codes[j];
@ -519,6 +528,7 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
int h=f; int h=f;
int m=int(f*60) % 60; int m=int(f*60) % 60;
val.sprintf("%02i:%02i",h,m); val.sprintf("%02i:%02i",h,m);
ishours=true;
} else { } else {
val=QString::number(f,'f',2); val=QString::number(f,'f',2);
} }
@ -551,10 +561,16 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
} }
}*/ }*/
a+="Days="+QString::number(total_days,'f',0); a+="Days="+QString::number(total_days,'f',0);
if (PROFILE.ExistsAndTrue("ShowCompliance")) {
if (ishours && incompliant>0) {
a+=" Low Usage Days="+QString::number(incompliant,'f',0)+" (%"+QString::number((1.0/daynum)*(total_days-incompliant)*100.0,'f',2)+" compliant, defined as >"+QString::number(compliance_hours,'f',1)+" hours)";
}
}
GetTextExtent(a,x,y); GetTextExtent(a,x,y);
px-=30+x; px-=30+x;
//w.renderText(a,px+24,py+5); //w.renderText(a,px+24,py+5);
w.renderText(a,left,py+1); w.renderText(a,left,py+1);
} }

BIN
icons/nodata.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
icons/sadface.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -1619,7 +1619,7 @@ this application to be unstable with this feature enabled.</string>
<item> <item>
<widget class="QCheckBox" name="animationsAndTransitionsCheckbox"> <widget class="QCheckBox" name="animationsAndTransitionsCheckbox">
<property name="text"> <property name="text">
<string>Animation &amp;&amp; Transitions</string> <string>Animations &amp;&amp; Transitions</string>
</property> </property>
</widget> </widget>
</item> </item>