mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
gui/channellist.cpp: add inline list editor;
add to favorite bouquets without channels re-init;
cleanup
Origin commit data
------------------
Branch: ni/coolstream
Commit: fa4333f948
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-10-10 (Fri, 10 Oct 2014)
------------------
This commit was generated by Migit
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -54,12 +54,34 @@ enum {
|
|||||||
LIST_MODE_LAST
|
LIST_MODE_LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
CHANLIST_CANCEL = -1,
|
||||||
|
CHANLIST_CANCEL_ALL = -2,
|
||||||
|
CHANLIST_CHANGE_MODE = -3,
|
||||||
|
CHANLIST_NO_RESTORE = -4
|
||||||
|
};
|
||||||
|
|
||||||
|
class CBouquet;
|
||||||
|
|
||||||
class CChannelList
|
class CChannelList
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
enum state_
|
||||||
|
{
|
||||||
|
beDefault,
|
||||||
|
beMoving
|
||||||
|
} move_state;
|
||||||
|
|
||||||
|
bool edit_state;
|
||||||
|
|
||||||
CFrameBuffer *frameBuffer;
|
CFrameBuffer *frameBuffer;
|
||||||
CComponentsPIP *cc_minitv;
|
CComponentsPIP *cc_minitv;
|
||||||
unsigned int selected, selected_in_new_mode;
|
unsigned int selected, selected_in_new_mode;
|
||||||
|
unsigned int origPosition;
|
||||||
|
unsigned int newPosition;
|
||||||
|
bool channelsChanged;
|
||||||
|
bool favoritesChanged;
|
||||||
|
|
||||||
unsigned int tuned;
|
unsigned int tuned;
|
||||||
t_channel_id selected_chid;
|
t_channel_id selected_chid;
|
||||||
CLastChannel lastChList;
|
CLastChannel lastChList;
|
||||||
@@ -75,7 +97,9 @@ private:
|
|||||||
int ffheight;
|
int ffheight;
|
||||||
|
|
||||||
std::string name;
|
std::string name;
|
||||||
ZapitChannelList chanlist;
|
ZapitChannelList channels;
|
||||||
|
ZapitChannelList *chanlist;
|
||||||
|
CBouquet *bouquet;
|
||||||
CZapProtection* zapProtection;
|
CZapProtection* zapProtection;
|
||||||
CComponentsDetailLine *dline;
|
CComponentsDetailLine *dline;
|
||||||
|
|
||||||
@@ -100,7 +124,6 @@ private:
|
|||||||
bool displayNext;
|
bool displayNext;
|
||||||
bool displayList;
|
bool displayList;
|
||||||
bool pig_on_win;
|
bool pig_on_win;
|
||||||
int first_mode_found;
|
|
||||||
|
|
||||||
int ChannelList_Rec;
|
int ChannelList_Rec;
|
||||||
|
|
||||||
@@ -131,22 +154,31 @@ private:
|
|||||||
void processTextToArray(std::string text, int screening = 0);
|
void processTextToArray(std::string text, int screening = 0);
|
||||||
int getPrevNextBouquet(bool next);
|
int getPrevNextBouquet(bool next);
|
||||||
|
|
||||||
|
void editMode(bool enable);
|
||||||
|
void beginMoveChannel();
|
||||||
|
void finishMoveChannel();
|
||||||
|
void cancelMoveChannel();
|
||||||
|
void internalMoveChannel(unsigned int fromPosition, unsigned int toPosition);
|
||||||
|
void deleteChannel();
|
||||||
|
void addChannel();
|
||||||
|
void saveChanges();
|
||||||
|
|
||||||
|
friend class CBouquet;
|
||||||
public:
|
public:
|
||||||
CChannelList(const char * const Name, bool historyMode = false, bool _vlist = false);
|
CChannelList(const char * const Name, bool historyMode = false, bool _vlist = false);
|
||||||
~CChannelList();
|
~CChannelList();
|
||||||
|
|
||||||
void SetChannelList(ZapitChannelList* channels);
|
void SetChannelList(ZapitChannelList* zlist);
|
||||||
void addChannel(CZapitChannel* chan, int num = 0);
|
void addChannel(CZapitChannel* chan);
|
||||||
void putChannel(CZapitChannel* chan);
|
|
||||||
|
|
||||||
CZapitChannel* getChannel(int number);
|
CZapitChannel* getChannel(int number);
|
||||||
CZapitChannel* getChannel(t_channel_id channel_id);
|
CZapitChannel* getChannel(t_channel_id channel_id);
|
||||||
CZapitChannel* getChannelFromIndex( uint32_t index) {
|
CZapitChannel* getChannelFromIndex( uint32_t index) {
|
||||||
if (chanlist.size() > index) return chanlist[index];
|
if ((*chanlist).size() > index) return (*chanlist)[index];
|
||||||
else return NULL;
|
else return NULL;
|
||||||
};
|
};
|
||||||
CZapitChannel* operator[]( uint32_t index) {
|
CZapitChannel* operator[]( uint32_t index) {
|
||||||
if (chanlist.size() > index) return chanlist[index];
|
if ((*chanlist).size() > index) return (*chanlist)[index];
|
||||||
else return NULL;
|
else return NULL;
|
||||||
};
|
};
|
||||||
int getKey(int);
|
int getKey(int);
|
||||||
@@ -164,7 +196,7 @@ public:
|
|||||||
void zapToChannel(CZapitChannel *channel, bool force = false);
|
void zapToChannel(CZapitChannel *channel, bool force = false);
|
||||||
void virtual_zap_mode(bool up);
|
void virtual_zap_mode(bool up);
|
||||||
bool zapTo_ChannelID(const t_channel_id channel_id, bool force = false);
|
bool zapTo_ChannelID(const t_channel_id channel_id, bool force = false);
|
||||||
bool adjustToChannelID(const t_channel_id channel_id, bool bToo = true);
|
bool adjustToChannelID(const t_channel_id channel_id);
|
||||||
bool showInfo(int pos, int epgpos = 0);
|
bool showInfo(int pos, int epgpos = 0);
|
||||||
void updateEvents(unsigned int from, unsigned int to);
|
void updateEvents(unsigned int from, unsigned int to);
|
||||||
int numericZap(int key);
|
int numericZap(int key);
|
||||||
@@ -180,13 +212,11 @@ public:
|
|||||||
int getSize() const;
|
int getSize() const;
|
||||||
bool isEmpty() const;
|
bool isEmpty() const;
|
||||||
int getSelectedChannelIndex() const;
|
int getSelectedChannelIndex() const;
|
||||||
void setSize(int newsize);
|
|
||||||
int doChannelMenu(void);
|
int doChannelMenu(void);
|
||||||
void SortAlpha(void);
|
void SortAlpha(void);
|
||||||
void SortSat(void);
|
void SortSat(void);
|
||||||
void SortTP(void);
|
void SortTP(void);
|
||||||
void SortChNumber(void);
|
void SortChNumber(void);
|
||||||
void ClearList(void);
|
|
||||||
bool SameTP(t_channel_id channel_id);
|
bool SameTP(t_channel_id channel_id);
|
||||||
bool SameTP(CZapitChannel * channel = NULL);
|
bool SameTP(CZapitChannel * channel = NULL);
|
||||||
CLastChannel & getLastChannels() { return lastChList; }
|
CLastChannel & getLastChannels() { return lastChList; }
|
||||||
@@ -202,7 +232,7 @@ public:
|
|||||||
SORT_CH_NUMBER,
|
SORT_CH_NUMBER,
|
||||||
SORT_MAX
|
SORT_MAX
|
||||||
};
|
};
|
||||||
unsigned Size() { return chanlist.size(); }
|
unsigned Size() { return (*chanlist).size(); }
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user