Commit d9a04c21 authored by Ludovic Fauvet's avatar Ludovic Fauvet

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

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