Hi!
habe gerade versucht mir meine eigne Klasse von cOsdItem abzuleiten.
Allerdings will das leider noch nicht so wie ich... irgenwo hab ich mal wiede was vergessen und finds nicht...
Bei der verwendung der Klasse bekomme ich folgenden Fehler vom Kompiler:
Code
src/menusetup.cpp: In member function ‘void cMenuOrgSetup::CreateMenuItems(const xmlpp::Element*, int)’:
src/menusetup.cpp:67: error: ‘cOsdItem’ is an inaccessible base of ‘cOsdXmlItem’
src/menusetup.cpp:75: error: ‘cOsdItem’ is an inaccessible base of ‘cOsdXmlItem’
hier mal wieder etwas code
Code
class cOsdXmlItem: cOsdItem
{
public:
const xmlpp::Element* _xmlElement;
enum sItemType
{
SYSTEM = 0,
PLUGIN = 1,
MENU = 2,
COMMAND = 3
};
private:
sItemType _ItemType;
string _nameAttribute;
string _titleAttribute;
string _commandAttribute;
string _confirmAttribute;
public:
cOsdXmlItem(const char* Text, const xmlpp::Element* xmlElement, eOSState State=osUnknown);
sItemType getItemType(void);
string getNameAttribute(void);
string getTitleAttribute(void);
string getCommandAttribute(void);
string getConfirmAttribute(void);
void setItemType(sItemType type);
void setNameAttribute(string name);
void setTitleAttribute(string title);
void setCommandAttribute(string command);
void setConfirmAttribute(string confirm);
private:
void parseXmlElement(void); // parse the xml element and set the private attributes
};
cOsdXmlItem::cOsdXmlItem(const char* Text, const xmlpp::Element* xmlElement, eOSState State=osUnknown)
{
text = NULL;
offset = -1;
state = State;
selectable = true;
fresh = true;
_xmlElement = xmlElement;
parseXmlElement();
SetText(Text);
}
Alles anzeigen
Hat jemand ne Idee?