QmlProfiler: changed Analyze Button icon

Change-Id: I1246e9292a6d92d406971fa3b655e81df56ba9ae
Reviewed-on: http://codereview.qt.nokia.com/1183
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
This commit is contained in:
Christiaan Janssen
2011-07-05 17:49:03 +02:00
parent 8658d6f1c6
commit 086e0b5789
4 changed files with 8 additions and 2 deletions

View File

@@ -307,8 +307,7 @@ QWidget *QmlProfilerTool::createControlWidget()
layout->setSpacing(0);
d->m_recordButton = new QToolButton(toolbarWidget);
d->m_recordButton->setIcon(QIcon(QLatin1String(":/qmlprofiler/analyzer_category_small.png")));
// icon and tooltip set in setRecording(), called later
d->m_recordButton->setCheckable(true);
connect(d->m_recordButton,SIGNAL(toggled(bool)), this, SLOT(setRecording(bool)));
@@ -392,7 +391,12 @@ void QmlProfilerTool::stopRecording()
void QmlProfilerTool::setRecording(bool recording)
{
d->m_recordingEnabled = recording;
// update record button
d->m_recordButton->setToolTip( d->m_recordingEnabled ? tr("Disable profiling") : tr("Enable profiling"));
d->m_recordButton->setIcon(QIcon(d->m_recordingEnabled ? QLatin1String(":/qmlprofiler/recordOn.png") :
QLatin1String(":/qmlprofiler/recordOff.png")));
if (recording)
startRecording();
else