|
a/GUI/progresswidget/progresswidget.cpp |
|
b/GUI/progresswidget/progresswidget.cpp |
|
... |
|
... |
44 |
} else if (secs > m_totalsecs) {
|
44 |
} else if (secs > m_totalsecs) {
|
45 |
secs = m_totalsecs;
|
45 |
secs = m_totalsecs;
|
46 |
}
|
46 |
}
|
47 |
setUi(secs);
|
47 |
setUi(secs);
|
48 |
emit seekRequested(secs);
|
48 |
emit seekRequested(secs);
|
49 |
|
|
|
50 |
}
|
49 |
}
|
51 |
|
50 |
|
52 |
void ProgressWidget::step(int steps)
|
51 |
void ProgressWidget::step(int steps)
|
53 |
{
|
52 |
{
|
54 |
int secs = m_step_pc > 0 ? (m_step_pc * steps * m_totalsecs) / 100 :
|
53 |
int secs = m_step_pc > 0 ? (m_step_pc * steps * m_totalsecs) / 100 :
|
55 |
m_step_secs * steps;
|
54 |
m_step_secs * steps;
|
56 |
setUi(secs);
|
55 |
int current = (songProgress->value() * m_totalsecs) / 100;
|
57 |
emit seekRequested(secs);
|
56 |
current += secs;
|
|
|
57 |
seek(current);
|
58 |
}
|
58 |
}
|
59 |
|
59 |
|
60 |
void ProgressWidget::setStepValuePc(int percent)
|
60 |
void ProgressWidget::setStepValuePc(int percent)
|
61 |
{
|
61 |
{
|
62 |
if (percent > 0 && percent <= 100) {
|
62 |
if (percent > 0 && percent <= 100) {
|
|
... |
|
... |
65 |
}
|
65 |
}
|
66 |
}
|
66 |
}
|
67 |
|
67 |
|
68 |
void ProgressWidget::setStepValueSecs(int secs)
|
68 |
void ProgressWidget::setStepValueSecs(int secs)
|
69 |
{
|
69 |
{
|
70 |
m_step_secs = secs;
|
|
|
71 |
if (secs < 0) {
|
70 |
if (secs > 0) {
|
72 |
m_step_pc = 2;
|
71 |
m_step_secs = secs;
|
73 |
} else {
|
|
|
74 |
m_step_pc = -1;
|
72 |
m_step_pc = -1;
|
75 |
}
|
73 |
}
|
76 |
}
|
74 |
}
|
77 |
|
75 |
|
78 |
void ProgressWidget::showTimes(int secs)
|
76 |
void ProgressWidget::showTimes(int secs)
|