mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
CComponentsForm: add virtual members to replace cc-item
Origin commit data
------------------
Branch: ni/coolstream
Commit: b9dd3e21bf
Author: Thilo Graf <dbt@novatux.de>
Date: 2012-11-26 (Mon, 26 Nov 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -444,6 +444,8 @@ class CComponentsForm : public CComponentsItem
|
|||||||
virtual void addCCItem(CComponentsItem* cc_Item);
|
virtual void addCCItem(CComponentsItem* cc_Item);
|
||||||
virtual void insertCCItem(const uint& cc_item_id, CComponentsItem* cc_Item);
|
virtual void insertCCItem(const uint& cc_item_id, CComponentsItem* cc_Item);
|
||||||
virtual void removeCCItem(const uint& cc_item_id);
|
virtual void removeCCItem(const uint& cc_item_id);
|
||||||
|
virtual void replaceCCItem(const uint& cc_item_id, CComponentsItem* new_cc_Item);
|
||||||
|
virtual void replaceCCItem(CComponentsItem* old_cc_Item, CComponentsItem* new_cc_Item);
|
||||||
virtual int getCCItemId(CComponentsItem* cc_Item);
|
virtual int getCCItemId(CComponentsItem* cc_Item);
|
||||||
virtual CComponentsItem* getCCItem(const uint& cc_item_id);
|
virtual CComponentsItem* getCCItem(const uint& cc_item_id);
|
||||||
virtual void paintCCItems();
|
virtual void paintCCItems();
|
||||||
|
@@ -1585,6 +1585,27 @@ CComponentsItem* CComponentsForm::getCCItem(const uint& cc_item_id)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CComponentsForm::replaceCCItem(const uint& cc_item_id, CComponentsItem* new_cc_Item)
|
||||||
|
{
|
||||||
|
if (!v_cc_items.empty()){
|
||||||
|
if (v_cc_items[cc_item_id]){
|
||||||
|
delete v_cc_items[cc_item_id];
|
||||||
|
v_cc_items[cc_item_id] = NULL;
|
||||||
|
v_cc_items[cc_item_id] = new_cc_Item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#ifdef DEBUG_CC
|
||||||
|
else
|
||||||
|
printf("CComponentsForm: %s replace cc_Item not possible, v_cc_items is empty\n", __FUNCTION__);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CComponentsForm::replaceCCItem(CComponentsItem* old_cc_Item, CComponentsItem* new_cc_Item)
|
||||||
|
{
|
||||||
|
replaceCCItem(getCCItemId(old_cc_Item), new_cc_Item);
|
||||||
|
}
|
||||||
|
|
||||||
void CComponentsForm::insertCCItem(const uint& cc_item_id, CComponentsItem* cc_Item)
|
void CComponentsForm::insertCCItem(const uint& cc_item_id, CComponentsItem* cc_Item)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user