widget = NULL;
}
virtual ~ConfigControl() {};
- virtual int getType() = 0;
- const char * getName() { return p_item->psz_name; }
- QWidget *getWidget() { assert( widget ); return widget; }
- bool isAdvanced() { return p_item->b_advanced; }
+ virtual int getType() const = 0;
+ const char * getName() const { return p_item->psz_name; }
+ QWidget *getWidget() const { assert( widget ); return widget; }
+ bool isAdvanced() const { return p_item->b_advanced; }
virtual void hide() { getWidget()->hide(); };
virtual void show() { getWidget()->show(); };
VIntConfigControl( vlc_object_t *a, module_config_t *b ) :
ConfigControl(a,b) {};
virtual ~VIntConfigControl() {};
- virtual int getValue() = 0;
- virtual int getType() { return CONFIG_ITEM_INTEGER; }
+ virtual int getValue() const = 0;
+ virtual int getType() const { return CONFIG_ITEM_INTEGER; }
};
class IntegerConfigControl : public VIntConfigControl
IntegerConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QSlider* );
virtual ~IntegerConfigControl() {};
- virtual int getValue();
- virtual void show() { spin->show(); if( label ) label->show(); }
- virtual void hide() { spin->hide(); if( label ) label->hide(); }
+ virtual int getValue() const;
+ virtual void show() const { spin->show(); if( label ) label->show(); }
+ virtual void hide() const { spin->hide(); if( label ) label->hide(); }
protected:
QSpinBox *spin;
IntegerRangeSliderConfigControl( vlc_object_t *, module_config_t *,
QLabel *, QSlider * );
virtual ~IntegerRangeSliderConfigControl() {};
- virtual int getValue();
+ virtual int getValue() const;
protected:
QSlider *slider;
private:
IntegerListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool );
virtual ~IntegerListConfigControl() {};
- virtual int getValue();
+ virtual int getValue() const;
virtual void hide() { combo->hide(); if( label ) label->hide(); }
virtual void show() { combo->show(); if( label ) label->show(); }
private:
BoolConfigControl( vlc_object_t *, module_config_t *,
QLabel *, QAbstractButton*, bool );
virtual ~BoolConfigControl() {};
- virtual int getValue();
+ virtual int getValue() const;
virtual void show() { checkbox->show(); }
virtual void hide() { checkbox->hide(); }
- virtual int getType() { return CONFIG_ITEM_BOOL; }
+ virtual int getType() const { return CONFIG_ITEM_BOOL; }
private:
QAbstractButton *checkbox;
void finish();
VFloatConfigControl( vlc_object_t *a, module_config_t *b ) :
ConfigControl(a,b) {};
virtual ~VFloatConfigControl() {};
- virtual float getValue() = 0;
- virtual int getType() { return CONFIG_ITEM_FLOAT; }
+ virtual float getValue() const = 0;
+ virtual int getType() const { return CONFIG_ITEM_FLOAT; }
};
class FloatConfigControl : public VFloatConfigControl
FloatConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QDoubleSpinBox* );
virtual ~FloatConfigControl() {};
- virtual float getValue();
+ virtual float getValue() const;
virtual void show() { spin->show(); if( label ) label->show(); }
virtual void hide() { spin->hide(); if( label ) label->hide(); }
VStringConfigControl( vlc_object_t *a, module_config_t *b ) :
ConfigControl(a,b) {};
virtual ~VStringConfigControl() {};
- virtual QString getValue() = 0;
- virtual int getType() { return CONFIG_ITEM_STRING; }
+ virtual QString getValue() const = 0;
+ virtual int getType() const { return CONFIG_ITEM_STRING; }
};
class StringConfigControl : public VStringConfigControl
StringConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QLineEdit*, bool pwd );
virtual ~StringConfigControl() {};
- virtual QString getValue() { return text->text(); };
+ virtual QString getValue() const { return text->text(); };
virtual void show() { text->show(); if( label ) label->show(); }
virtual void hide() { text->hide(); if( label ) label->hide(); }
private:
FileConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QLineEdit *, QPushButton * );
virtual ~FileConfigControl() {};
- virtual QString getValue() { return text->text(); };
+ virtual QString getValue() const { return text->text(); };
virtual void show() { text->show(); if( label ) label->show(); browse->show(); }
virtual void hide() { text->hide(); if( label ) label->hide(); browse->hide(); }
public slots:
FontConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QFontComboBox *);
virtual ~FontConfigControl() {};
- virtual QString getValue(){ return font->currentFont().family(); }
+ virtual QString getValue() const { return font->currentFont().family(); }
protected:
QLabel *label;
QFontComboBox *font;
ModuleConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool );
virtual ~ModuleConfigControl() {};
- virtual QString getValue();
+ virtual QString getValue() const;
virtual void hide() { combo->hide(); if( label ) label->hide(); }
virtual void show() { combo->show(); if( label ) label->show(); }
private:
// ModuleListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
// QComboBox*, bool );
virtual ~ModuleListConfigControl();
- virtual QString getValue();
+ virtual QString getValue() const;
virtual void hide();
virtual void show();
public slots:
StringListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool );
virtual ~StringListConfigControl() {};
- virtual QString getValue();
+ virtual QString getValue() const;
virtual void hide() { combo->hide(); if( label ) label->hide(); }
virtual void show() { combo->show(); if( label ) label->show(); }
QComboBox *combo;
QString getValue() const { return value; }
void setGlobal( bool _value ) { b_global = _value; }
- bool getGlobal() const { return b_global; }
+ bool getGlobal() const { return b_global; }
public slots:
virtual void clear(void) { value = qfu(""); QLineEdit::clear(); }
private:
public:
KeySelectorControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout*, int& );
- virtual int getType() { return CONFIG_ITEM_KEY; }
+ virtual int getType() const { return CONFIG_ITEM_KEY; }
virtual ~KeySelectorControl() {};
virtual void hide() { table->hide(); if( label ) label->hide(); }
virtual void show() { table->show(); if( label ) label->show(); }