X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fgui%2Fepositiongauge.cpp;h=e45d4a6c4e328ec4359d404fae2098bc1a72d4bf;hp=68a4b46d1719d54945c0ff8a20d93fbe61967083;hb=13fa6a99a041ecae345d3a3f5e4ace9d23815a8a;hpb=12d94aa55276d7409d366d045fda6004b6ec7ed0 diff --git a/lib/gui/epositiongauge.cpp b/lib/gui/epositiongauge.cpp index 68a4b46..e45d4a6 100644 --- a/lib/gui/epositiongauge.cpp +++ b/lib/gui/epositiongauge.cpp @@ -43,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) @@ -59,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; @@ -70,14 +75,14 @@ void ePositionGauge::setInOutList(PyObject *list) for (i=0; i::iterator i(m_cue_entries.begin()); @@ -121,11 +127,20 @@ int ePositionGauge::event(int event, void *data, void *data2) continue; } else if (i->what == 1) /* out */ out = i++->where; - else /* mark */ + else /* mark or last */ { - int xm = scale(i->where); - painter.setForegroundColor(gRGB(0xFF8080)); - painter.fill(eRect(xm - 2, 0, 4, s.height())); + xm = scale(i->where); + if (i->what == 2) { + painter.setForegroundColor(gRGB(0xFF8080)); + if (xm - 2 < xm_last) /* Make sure last is not overdrawn */ + painter.fill(eRect(xm_last, 0, 2 + xm - xm_last, s.height())); + else + painter.fill(eRect(xm - 2, 0, 4, s.height())); + } else if (i->what == 3) { + painter.setForegroundColor(gRGB(0x80FF80)); + painter.fill(eRect(xm - 1, 0, 3, s.height())); + xm_last = xm + 2; + } i++; continue; } @@ -135,7 +150,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;