This commit is contained in:
doitux
2007-06-14 23:27:13 +00:00
parent 7345630c0d
commit 0cc67e0137
3 changed files with 15 additions and 12 deletions
+8 -2
View File
@@ -31,7 +31,6 @@ MySetLabel::~MySetLabel()
void MySetLabel::startTimeOutAnimation(int secs) { void MySetLabel::startTimeOutAnimation(int secs) {
decreaseWidthIntervall = 1; decreaseWidthIntervall = 1;
timeOutValue = secs; timeOutValue = secs;
@@ -55,6 +54,10 @@ void MySetLabel::startTimeOutAnimation(int secs) {
} }
waitFrames = 3000/timerIntervall; waitFrames = 3000/timerIntervall;
//start the real timer
realTimer.reset();
realTimer.start();
// std::cout << timerIntervall << endl; // std::cout << timerIntervall << endl;
timeOutAnimation = TRUE; timeOutAnimation = TRUE;
@@ -81,7 +84,10 @@ void MySetLabel::nextTimeOutAnimationFrame() {
if(timeOutAnimationWidth >=0) { if(timeOutAnimationWidth >=0) {
if(timeOutFrame > waitFrames) { if(timeOutFrame > waitFrames) {
//save gfx ressources and never play more the 10 pps //save gfx ressources and never play more the 10 pps
timeOutAnimationWidth = timeOutAnimationWidth - decreaseWidthIntervall; // timeOutAnimationWidth = timeOutAnimationWidth - decreaseWidthIntervall;
unsigned int realTimerValue = realTimer.elapsed().total_milliseconds();
timeOutAnimationWidth = 118-((realTimerValue*118)/(timeOutValue*1000));
} }
timeOutFrame++; timeOutFrame++;
update(); update();
+4 -1
View File
@@ -16,7 +16,7 @@
#include <QtGui> #include <QtGui>
#include <QtCore> #include <QtCore>
#include <core/boost/timer.hpp>
class mainWindowImpl; class mainWindowImpl;
@@ -47,6 +47,9 @@ private:
mainWindowImpl *myW; mainWindowImpl *myW;
QTimer *timeOutAnimationTimer; QTimer *timeOutAnimationTimer;
QTimer *timeOutAnimationKickOnTimer; QTimer *timeOutAnimationKickOnTimer;
boost::microsec_timer realTimer;
bool timeOutAnimation; bool timeOutAnimation;
int timeOutAnimationWidth; int timeOutAnimationWidth;
+3 -9
View File
@@ -1905,12 +1905,6 @@ p, li { white-space: pre-wrap; }
</property> </property>
<item> <item>
<widget class="QLabel" name="label_27" > <widget class="QLabel" name="label_27" >
<property name="maximumSize" >
<size>
<width>99</width>
<height>16777215</height>
</size>
</property>
<property name="text" > <property name="text" >
<string>Store log files for</string> <string>Store log files for</string>
</property> </property>
@@ -2023,17 +2017,17 @@ p, li { white-space: pre-wrap; }
</property> </property>
<item> <item>
<property name="text" > <property name="text" >
<string>every action (high frequent disc access)</string> <string>action (high frequent disc access)</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text" > <property name="text" >
<string>every hand (medium disc access)</string> <string>hand (medium disc access)</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text" > <property name="text" >
<string>every game (low disc access)</string> <string>game (low disc access)</string>
</property> </property>
</item> </item>
</widget> </widget>