{
switch( getType() )
{
- case 1:
+ case CONFIG_ITEM_INTEGER:
+ case CONFIG_ITEM_BOOL:
{
VIntConfigControl *vicc = qobject_cast<VIntConfigControl *>(this);
assert( vicc );
config_PutInt( p_intf, vicc->getName(), vicc->getValue() );
break;
}
- case 2:
+ case CONFIG_ITEM_FLOAT:
{
VFloatConfigControl *vfcc =
qobject_cast<VFloatConfigControl *>(this);
config_PutFloat( p_intf, vfcc->getName(), vfcc->getValue() );
break;
}
- case 3:
+ case CONFIG_ITEM_STRING:
{
VStringConfigControl *vscc =
qobject_cast<VStringConfigControl *>(this);
config_PutPsz( p_intf, vscc->getName(), qta( vscc->getValue() ) );
break;
}
- case 4:
+ case CONFIG_ITEM_KEY:
{
KeySelectorControl *ksc = qobject_cast<KeySelectorControl *>(this);
assert( ksc );
ConfigControl(a,b) {};
virtual ~VIntConfigControl() {};
virtual int getValue() = 0;
- virtual int getType() { return 1; }
+ virtual int getType() { return CONFIG_ITEM_INTEGER; }
};
class IntegerConfigControl : public VIntConfigControl
virtual int getValue();
virtual void show() { checkbox->show(); }
virtual void hide() { checkbox->hide(); }
+ virtual int getType() { return CONFIG_ITEM_BOOL; }
private:
QCheckBox *checkbox;
void finish();
ConfigControl(a,b) {};
virtual ~VFloatConfigControl() {};
virtual float getValue() = 0;
- virtual int getType() { return 2; }
+ virtual int getType() { return CONFIG_ITEM_FLOAT; }
};
class FloatConfigControl : public VFloatConfigControl
ConfigControl(a,b) {};
virtual ~VStringConfigControl() {};
virtual QString getValue() = 0;
- virtual int getType() { return 3; }
+ virtual int getType() { return CONFIG_ITEM_STRING; }
};
class StringConfigControl : public VStringConfigControl
public:
KeySelectorControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout*, int& );
- virtual int getType() { return 4; }
+ virtual int getType() { return CONFIG_ITEM_KEY; }
virtual ~KeySelectorControl() {};
virtual void hide() { table->hide(); if( label ) label->hide(); }
virtual void show() { table->show(); if( label ) label->show(); }