Commit dbf7db76 authored by Ludovic Fauvet's avatar Ludovic Fauvet
Browse files

Code simplification

parent 3093f9ba
......@@ -27,7 +27,6 @@
AudioProjectPreferences::AudioProjectPreferences( QWidget *parent )
: PreferenceWidget( parent )
{
setWidget( this );
m_ui.setupUi( this );
}
......
......@@ -29,14 +29,3 @@ PreferenceWidget::PreferenceWidget( QWidget* parent )
: QWidget( parent )
{
}
QWidget* PreferenceWidget::widget() const
{
return ( m_widget );
}
void PreferenceWidget::setWidget( QWidget* widget )
{
m_widget = widget;
return ;
}
......@@ -35,12 +35,6 @@ class PreferenceWidget : public QWidget
virtual bool load() = 0;
virtual void save( QSettings& settings ) = 0;
QWidget* widget() const;
void setWidget( QWidget* widget );
private:
QWidget* m_widget;
};
#endif
......@@ -32,7 +32,6 @@
ProjectPreferences::ProjectPreferences( QWidget* parent )
: PreferenceWidget( parent )
{
setWidget( this );
m_ui.setupUi( this );
}
......
......@@ -59,13 +59,13 @@ void Settings::addWidget( const QString& name,
const QString& icon,
const QString& label )
{
m_stackedWidgets->addWidget( pWidget->widget() );
m_stackedWidgets->addWidget( pWidget );
int idx = m_stackedWidgets->indexOf( pWidget->widget() );
int idx = m_stackedWidgets->indexOf( pWidget );
m_widgets.insert( idx, name );
m_panel->addButton( label, icon, idx );
if ( !m_currentWidget )
m_currentWidget = pWidget->widget();
m_currentWidget = pWidget;
}
void Settings::build()
......
......@@ -27,7 +27,6 @@
VLMCPreferences::VLMCPreferences( QWidget *parent )
: PreferenceWidget( parent )
{
setWidget( this );
m_ui.setupUi(this);
}
......
......@@ -27,7 +27,6 @@
VideoProjectPreferences::VideoProjectPreferences( QWidget *parent )
: PreferenceWidget( parent )
{
setWidget( this );
m_ui.setupUi( this );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment