public
Description: This is audio and video player of content provided by Mediafly.com service for Neuros OSD 1 hardware.
Homepage:
Clone URL: git://github.com/tex/mediafly.git
Add header label and icon.
tex (author)
Fri Oct 10 10:30:12 -0700 2008
commit  6da93aecc804c11052de185a37cdea684da36f38
tree    6bf379ffe2bce4d45fd12f0b9c31274bdab8ac34
parent  2bf585da6ab65912f5aae28b787c1df8475b5b04
...
8
9
10
11
12
13
 
 
 
 
 
14
15
16
 
 
17
18
19
...
33
34
35
 
 
 
 
36
37
38
...
102
103
104
 
 
 
105
106
107
...
115
116
117
 
 
 
118
119
120
...
130
131
132
133
 
 
134
135
136
...
8
9
10
 
 
 
11
12
13
14
15
16
 
 
17
18
19
20
21
...
35
36
37
38
39
40
41
42
43
44
...
108
109
110
111
112
113
114
115
116
...
124
125
126
127
128
129
130
131
132
...
142
143
144
 
145
146
147
148
149
0
@@ -8,12 +8,14 @@ MediaflyMenu::MediaflyMenu(QWidget *parent) :
0
   m_listView(this),
0
   m_state(Menu)
0
 {
0
-  // Remember the default item delegate that m_listView uses.
0
-  // 
0
-  m_itemDelegateDefault = m_listView.itemDelegate();
0
+  m_vLayout.addWidget(&m_header);
0
+  m_vLayout.addWidget(&m_listView);
0
+  m_hLayout.addWidget(&m_icon);
0
+  m_hLayout.addLayout(&m_vLayout);
0
+  setLayout(&m_hLayout);
0
 
0
-  m_layout.addWidget(&m_listView);
0
-  setLayout(&m_layout);
0
+  m_header.setAlignment(Qt::AlignRight);
0
+  m_icon.setText("ICON");
0
 
0
   connect(&m_listView, SIGNAL(almostAtEndOfList()),
0
           this, SLOT(uploadNextPartOfMenu()));
0
@@ -33,6 +35,10 @@ MediaflyMenu::MediaflyMenu(QWidget *parent) :
0
   connect(Mediafly::getMediafly(), SIGNAL(readError(const QString&)),
0
           this, SLOT(errorHandler(const QString&)));
0
 
0
+  // Remember the default item delegate that m_listView uses.
0
+  // 
0
+  m_itemDelegateDefault = m_listView.itemDelegate();
0
+
0
   m_lastMenuIndex = m_menuModel.index(0, 0);
0
   m_lastChannelMenuIndex = QModelIndex();
0
 
0
@@ -102,6 +108,9 @@ void MediaflyMenu::errorHandler(const QString& errorMsg)
0
 
0
 void MediaflyMenu::renderMenu(const QModelIndex& /*index*/)
0
 {
0
+  m_header.setText("Mediafly");
0
+  m_icon.setVisible(true);
0
+
0
   m_listView.setItemDelegate(m_itemDelegateDefault);
0
 
0
   m_listView.setModel(NULL);
0
@@ -115,6 +124,9 @@ void MediaflyMenu::renderMenu(const QModelIndex& /*index*/)
0
 
0
 void MediaflyMenu::renderEpisodeMenu(const QModelIndex& index)
0
 {
0
+  m_header.setText("Media Episodes");
0
+  m_icon.setVisible(false);
0
+
0
   m_episodeModel.cancel();
0
   m_episodeModel.clear();
0
 
0
@@ -130,7 +142,8 @@ void MediaflyMenu::renderEpisodeMenu(const QModelIndex& index)
0
 
0
 void MediaflyMenu::renderChannelMenu(const QModelIndex& /*index*/)
0
 {
0
-  qDebug() << __PRETTY_FUNCTION__;
0
+  m_header.setText("Media Channels");
0
+  m_icon.setVisible(true);
0
 
0
   m_episodeModel.cancel();
0
   m_channelModel.refresh();
...
5
6
7
 
 
8
9
10
...
25
26
27
28
 
 
29
 
 
 
30
31
32
...
5
6
7
8
9
10
11
12
...
27
28
29
 
30
31
32
33
34
35
36
37
38
0
@@ -5,6 +5,8 @@
0
 #include "MediaflyList.h"
0
 #include <QObject>
0
 #include <QVBoxLayout>
0
+#include <QHBoxLayout>
0
+#include <QLabel>
0
 
0
 class MediaflyMenu : public QWidget
0
 {
0
@@ -25,8 +27,12 @@ private:
0
     EpisodeMenu,
0
   };
0
 
0
-  QVBoxLayout      m_layout;
0
+  QHBoxLayout      m_hLayout;
0
+  QVBoxLayout      m_vLayout;
0
   MediaflyList     m_listView;
0
+  QLabel           m_header;
0
+  QLabel           m_icon;
0
+
0
   QString           m_channelSlug;
0
   State           m_state;
0
 

Comments