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

Use a QIcon instead of a QString to refer to a pixmap

parent a706dc31
...@@ -253,11 +253,11 @@ void MainWindow::createGlobalPreferences() ...@@ -253,11 +253,11 @@ void MainWindow::createGlobalPreferences()
m_globalPreferences = new Settings( false, "VLMC", this ); m_globalPreferences = new Settings( false, "VLMC", this );
m_globalPreferences->addWidget("VLMC", m_globalPreferences->addWidget("VLMC",
new VLMCPreferences( m_globalPreferences ), new VLMCPreferences( m_globalPreferences ),
"../images/vlmc.png", QIcon( ":/images/images/vlmc.png" ),
"VLMC settings"); "VLMC settings");
m_globalPreferences->addWidget("Language preferences", m_globalPreferences->addWidget("Language preferences",
new LanguagePreferences( m_globalPreferences ), new LanguagePreferences( m_globalPreferences ),
"../images/vlmc.png", QIcon( ":/images/images/vlmc.png" ),
"Langage settings"); "Langage settings");
m_globalPreferences->build(); m_globalPreferences->build();
} }
...@@ -267,15 +267,15 @@ void MainWindow::createProjectPreferences() ...@@ -267,15 +267,15 @@ void MainWindow::createProjectPreferences()
m_projectPreferences = new Settings( false, "project", this ); m_projectPreferences = new Settings( false, "project", this );
m_projectPreferences->addWidget("Project", m_projectPreferences->addWidget("Project",
new ProjectPreferences, new ProjectPreferences,
":/images/images/vlmc", QIcon( ":/images/images/vlmc.png" ),
"Project settings" ); "Project settings" );
m_projectPreferences->addWidget( "Video", m_projectPreferences->addWidget( "Video",
new VideoProjectPreferences, new VideoProjectPreferences,
":/images/images/video", QIcon( ":/images/images/video.png" ),
"Video settings" ); "Video settings" );
m_projectPreferences->addWidget( "Audio", m_projectPreferences->addWidget( "Audio",
new AudioProjectPreferences, new AudioProjectPreferences,
":/images/images/audio", QIcon( ":/images/images/audio.png" ),
"Audio settings" ); "Audio settings" );
m_projectPreferences->build(); m_projectPreferences->build();
} }
......
...@@ -67,13 +67,13 @@ Panel::~Panel() ...@@ -67,13 +67,13 @@ Panel::~Panel()
} }
void Panel::addButton( const QString& label, void Panel::addButton( const QString& label,
const QString& iconPath, const QIcon& icon,
int number) int number)
{ {
QToolButton* button = new QToolButton( this ); QToolButton* button = new QToolButton( this );
button->setText( label ); button->setText( label );
button->setIcon( QIcon( iconPath ) ); button->setIcon( icon );
button->setAutoRaise( true ); button->setAutoRaise( true );
button->setCheckable( true ); button->setCheckable( true );
button->setIconSize( QSize( Panel::M_ICON_HEIGHT, button->setIconSize( QSize( Panel::M_ICON_HEIGHT,
......
...@@ -37,7 +37,7 @@ class Panel : public QWidget ...@@ -37,7 +37,7 @@ class Panel : public QWidget
~Panel(); ~Panel();
void addButton( const QString& label, void addButton( const QString& label,
const QString& iconPath, const QIcon& icon,
int number); int number);
void show(); void show();
......
...@@ -62,7 +62,7 @@ Settings::~Settings() ...@@ -62,7 +62,7 @@ Settings::~Settings()
//adjust to the size of the biggest Widget. //adjust to the size of the biggest Widget.
void Settings::addWidget( const QString& name, void Settings::addWidget( const QString& name,
PreferenceWidget* pWidget, PreferenceWidget* pWidget,
const QString& icon, const QIcon& icon,
const QString& label ) const QString& label )
{ {
m_stackedWidgets->addWidget( pWidget ); m_stackedWidgets->addWidget( pWidget );
......
...@@ -50,7 +50,7 @@ class Settings : public QDialog ...@@ -50,7 +50,7 @@ class Settings : public QDialog
virtual ~Settings(); virtual ~Settings();
void addWidget( const QString& name, void addWidget( const QString& name,
PreferenceWidget* pWidget, PreferenceWidget* pWidget,
const QString& icon, const QIcon& icon,
const QString& label ); const QString& label );
void build(); void build();
void show( const QString& part = "default" ); void show( const QString& part = "default" );
......
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