New Settings (permanent Breakbutton, ShowFadeOut) added

This commit is contained in:
doitux
2007-01-28 14:48:18 +00:00
parent 20b99f758d
commit 7166a77d48
11 changed files with 2664 additions and 2552 deletions
+14 -6
View File
@@ -18,6 +18,7 @@ MyCardsPixmapLabel::MyCardsPixmapLabel(QFrame* parent)
{
fadeOutAction = FALSE;
frameOpacity = 0.0;
opacityRaiseIntervall = 0.01;
timer = new QTimer;
connect(timer, SIGNAL(timeout()), this, SLOT(nextFadeOutFrame()));
@@ -29,18 +30,25 @@ MyCardsPixmapLabel::~MyCardsPixmapLabel()
{
}
void MyCardsPixmapLabel::startFadeOut() {
fadeOutAction = TRUE;
frameOpacity = 0.0;
timer->start(40);
void MyCardsPixmapLabel::startFadeOut(int speed) {
if(speed <= 4) { opacityRaiseIntervall = 0.01; }
if(speed > 4 && speed <= 7) { opacityRaiseIntervall = 0.02; }
if(speed > 7 && speed <= 10) { opacityRaiseIntervall = 0.04; }
if(speed != 11) {
fadeOutAction = TRUE;
frameOpacity = 0.0;
timer->start(40);
}
}
void MyCardsPixmapLabel::nextFadeOutFrame() {
if (frameOpacity < 0.7) {
frameOpacity += 0.01;
if (frameOpacity < 0.65) {
frameOpacity += opacityRaiseIntervall;
update();
}
else {