X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fgui%2Fepositiongauge.cpp;h=ff98c080835532c4565558bb35254616b2673839;hb=e4377b927b5fbbc01ff6f9e62b9ca5f7343d033f;hp=0adda5db26668e15c7473699202b6f89f5b78b11;hpb=6c402c27ba2c8cc2c7c6bb6f5fbb0c2d2d0c0f8b;p=vuplus_dvbapp diff --git a/lib/gui/epositiongauge.cpp b/lib/gui/epositiongauge.cpp index 0adda5d..ff98c08 100644 --- a/lib/gui/epositiongauge.cpp +++ b/lib/gui/epositiongauge.cpp @@ -6,6 +6,7 @@ ePositionGauge::ePositionGauge(eWidget *parent) { m_point_widget = new ePixmap(this); m_seek_point_widget = new ePixmap(this); + m_seek_point_widget->hide(); m_point_widget->setAlphatest(1); m_seek_point_widget->setAlphatest(1); m_position = 0; @@ -42,6 +43,11 @@ void ePositionGauge::setInColor(const gRGB &color) invalidate(); } +void ePositionGauge::setPointer(int which, ePtr &pixmap, const ePoint ¢er) +{ + setPointer(which, pixmap.operator->(), center); +} + void ePositionGauge::setPointer(int which, gPixmap *pixmap, const ePoint ¢er) { if (which == 0) @@ -58,7 +64,7 @@ void ePositionGauge::setPointer(int which, gPixmap *pixmap, const ePoint ¢er updatePosition(); } -void ePositionGauge::setInOutList(PyObject *list) +void ePositionGauge::setInOutList(ePyObject list) { if (!PyList_Check(list)) return; @@ -69,14 +75,14 @@ void ePositionGauge::setInOutList(PyObject *list) for (i=0; iwhat == 1) /* out */ out = i++->where; - else /* mark */ + else if (i->what == 2) /* mark */ { int xm = scale(i->where); painter.setForegroundColor(gRGB(0xFF8080)); painter.fill(eRect(xm - 2, 0, 4, s.height())); i++; continue; + } else /* other marker, like last position */ + { + ++i; + continue; } } @@ -134,7 +144,7 @@ int ePositionGauge::event(int event, void *data, void *data2) { painter.setForegroundColor(gRGB(m_foreground_color)); int xi = scale(in), xo = scale(out); - painter.fill(eRect(xi, 10, xo-xi, s.height()-14)); + painter.fill(eRect(xi, (s.height()-4) / 2, xo-xi, 4)); } in = m_length;