Ticket #1446: gallerylcd.patch

File gallerylcd.patch, 1.2 KB (added by shrimp@…, 20 years ago)
Line 
1*** glsingleview.cpp 2005-12-08 06:49:46.000000000 +0000
2--- ../../../../mythplugins-0.19/mythgallery/mythgallery/glsingleview.cpp 2006-02-23 21:19:42.000000000 +0000
3***************
4*** 31,36 ****
5--- 31,37 ----
6 #include <qpainter.h>
7
8 #include <mythtv/mythcontext.h>
9+ #include <mythtv/lcddevice.h>
10 #include <mythtv/util.h>
11
12 #include "glsingleview.h"
13***************
14*** 175,180 ****
15--- 176,186 ----
16
17 void GLSingleView::cleanUp()
18 {
19+ if (class LCD* lcd = LCD::Get())
20+ {
21+ lcd->switchToTime();
22+ }
23+
24 makeCurrent();
25
26 m_timer->stop();
27***************
28*** 575,580 ****
29--- 581,595 ----
30 QImage image(item->path);
31 if (!image.isNull()) {
32
33+ if (class LCD* lcd = LCD::Get())
34+ {
35+ QPtrList<LCDTextItem> textItems;
36+ textItems.setAutoDelete(true);
37+ textItems.append(new LCDTextItem(1, ALIGN_LEFT, item->name, "Generic", true));
38+ textItems.append(new LCDTextItem(2, ALIGN_LEFT, QString::number(m_pos + 1) + " / " + QString::number(m_itemList.count()), "Generic", false));
39+ lcd->switchToGeneric(&textItems);
40+ }
41+
42 int a = m_tex1First ? 0 : 1;
43 TexItem& t = m_texItem[a];
44