2014-09-27 09:25:14 +02:00
|
|
|
#include "displaychannel.h"
|
|
|
|
|
2016-01-26 18:32:38 +01:00
|
|
|
cSDDisplayChannel::cSDDisplayChannel(cViewChannel *channelView, bool WithInfo) {
|
|
|
|
view = channelView;
|
|
|
|
ok = view->Init();
|
|
|
|
if (!ok)
|
|
|
|
esyslog("skindesigner: Error initiating displaychannel view - aborting");
|
2014-09-27 09:25:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
cSDDisplayChannel::~cSDDisplayChannel() {
|
2016-01-26 18:32:38 +01:00
|
|
|
view->Close();
|
2014-09-27 09:25:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::SetChannel(const cChannel *Channel, int Number) {
|
2016-01-26 18:32:38 +01:00
|
|
|
if (!ok)
|
2014-09-27 09:25:14 +02:00
|
|
|
return;
|
2016-01-26 18:32:38 +01:00
|
|
|
view->SetChannel(Channel, Number);
|
2014-09-27 09:25:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Following) {
|
2016-01-26 18:32:38 +01:00
|
|
|
if (!ok)
|
2014-09-27 09:25:14 +02:00
|
|
|
return;
|
2016-01-26 18:32:38 +01:00
|
|
|
view->SetEvents(Present, Following);
|
2014-09-27 09:25:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::SetMessage(eMessageType Type, const char *Text) {
|
2016-01-26 18:32:38 +01:00
|
|
|
if (!ok)
|
2014-09-27 09:25:14 +02:00
|
|
|
return;
|
2016-01-26 18:32:38 +01:00
|
|
|
view->SetMessage(Type, Text);
|
2014-09-27 09:25:14 +02:00
|
|
|
}
|
|
|
|
|
2016-05-26 10:47:45 +02:00
|
|
|
#ifdef USE_ZAPCOCKPIT
|
|
|
|
|
|
|
|
void cSDDisplayChannel::SetViewType(eDisplaychannelView ViewType) {
|
|
|
|
if (!ok)
|
|
|
|
return;
|
|
|
|
view->SetViewType(ViewType);
|
|
|
|
}
|
|
|
|
|
|
|
|
int cSDDisplayChannel::MaxItems(void) {
|
|
|
|
if (!ok)
|
|
|
|
return 0;
|
|
|
|
return view->MaxItems();
|
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::SetChannelInfo(const cChannel *Channel) {
|
|
|
|
if (!ok)
|
|
|
|
return;
|
|
|
|
view->SetChannelInfo(Channel);
|
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::SetChannelList(const cChannel *Channel, int Index, bool Current) {
|
|
|
|
if (!ok)
|
|
|
|
return;
|
|
|
|
view->SetChannelList(Channel, Index, Current);
|
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::SetGroupList(const char *Group, int NumChannels, int Index, bool Current) {
|
|
|
|
if (!ok)
|
|
|
|
return;
|
|
|
|
view->SetGroupList(Group, NumChannels, Index, Current);
|
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::SetGroupChannelList(const cChannel *Channel, int Index, bool Current) {
|
|
|
|
if (!ok)
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::ClearList(void) {
|
|
|
|
if (!ok)
|
|
|
|
return;
|
|
|
|
view->ClearList();
|
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::SetNumChannelHints(int Num) {
|
|
|
|
if (!ok)
|
|
|
|
return;
|
|
|
|
view->SetNumChannelHints(Num);
|
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::SetChannelHint(const cChannel *Channel) {
|
|
|
|
if (!ok)
|
|
|
|
return;
|
|
|
|
view->SetChannelHint(Channel);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //USE_ZAPCOCKPIT
|
|
|
|
|
2014-09-27 09:25:14 +02:00
|
|
|
void cSDDisplayChannel::Flush(void) {
|
2016-01-26 18:32:38 +01:00
|
|
|
if (!ok)
|
2014-09-27 09:25:14 +02:00
|
|
|
return;
|
2016-05-01 06:35:13 +02:00
|
|
|
view->Flush(false);
|
2015-05-10 12:55:23 +02:00
|
|
|
}
|