Commit a9735113 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Have tooltips on the profileconfigwidgets



Task-number: QTCREATORBUG-7571

Change-Id: I881c90ebffd33811893db39937a49a3614384d31
Reviewed-by: default avatarhjk <qthjk@ovi.com>
Reviewed-by: default avatarLeena Miettinen <riitta-leena.miettinen@nokia.com>
parent a31e8b44
......@@ -67,6 +67,8 @@ DebuggerProfileConfigWidget::DebuggerProfileConfigWidget(ProjectExplorer::Profil
m_info(pi),
m_chooser(new Utils::PathChooser)
{
setToolTip(tr("The debugger to use for this target."));
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setMargin(0);
......
......@@ -59,6 +59,8 @@ SysRootInformationConfigWidget::SysRootInformationConfigWidget(Profile *p, QWidg
ProfileConfigWidget(parent),
m_profile(p)
{
setToolTip(tr("The root directory of the system image to use.<br>"
"Leave empty when building for the desktop."));
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setMargin(0);
m_chooser = new Utils::PathChooser;
......@@ -110,6 +112,9 @@ ToolChainInformationConfigWidget::ToolChainInformationConfigWidget(Profile *p, Q
m_isReadOnly(false), m_profile(p),
m_comboBox(new QComboBox), m_manageButton(new QPushButton(this))
{
setToolTip(tr("The tool chain to use for building.<br>"
"Make sure the tool chains will produce binaries compatible with the target device, "
"Qt version and other libraries used."));
ToolChainManager *tcm = ToolChainManager::instance();
QHBoxLayout *layout = new QHBoxLayout(this);
......@@ -235,6 +240,7 @@ DeviceTypeInformationConfigWidget::DeviceTypeInformationConfigWidget(Profile *p,
m_isReadOnly(false), m_profile(p),
m_comboBox(new QComboBox)
{
setToolTip(tr("The type of device to run applications on."));
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setMargin(0);
m_comboBox->setContentsMargins(0, 0, 0, 0);
......@@ -302,6 +308,8 @@ DeviceInformationConfigWidget::DeviceInformationConfigWidget(Profile *p, QWidget
m_comboBox(new QComboBox), m_manageButton(new QPushButton(this)),
m_model(new DeviceManagerModel(DeviceManager::instance()))
{
setToolTip(tr("The device to run the applications on."));
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setMargin(0);
m_comboBox->setContentsMargins(0, 0, 0, 0);
......
......@@ -126,11 +126,18 @@ void ProfileManagerConfigWidget::addConfigWidget(ProjectExplorer::ProfileConfigW
connect(widget, SIGNAL(dirty()), this, SIGNAL(dirty()));
int row = m_layout->rowCount();
m_layout->addWidget(new QLabel(widget->displayName()), row, 0,
QLabel *label = new QLabel(widget->displayName());
label->setToolTip(widget->toolTip());
m_layout->addWidget(label, row, 0,
Qt::Alignment(style()->styleHint(QStyle::SH_FormLayoutLabelAlignment)));
m_layout->addWidget(widget, row, 1);
if (widget->buttonWidget())
QWidget *buttonWidget = widget->buttonWidget();
if (buttonWidget) {
if (buttonWidget->toolTip().isEmpty())
buttonWidget->setToolTip(widget->toolTip());
m_layout->addWidget(widget->buttonWidget(), row, 2);
}
m_widgets.append(widget);
}
......
......@@ -49,7 +49,7 @@ class ProfileManagerConfigWidget : public ProjectExplorer::ProfileConfigWidget
Q_OBJECT
public:
ProfileManagerConfigWidget(Profile *p, QWidget *parent = 0);
explicit ProfileManagerConfigWidget(Profile *p, QWidget *parent = 0);
QString displayName() const;
......
......@@ -48,6 +48,8 @@ QmakeProfileConfigWidget::QmakeProfileConfigWidget(ProjectExplorer::Profile *p,
m_profile(p),
m_lineEdit(new QLineEdit)
{
setToolTip(tr("The mkspec to use when building the project with qmake.<br>"
"This setting is ignored when using other build systems."));
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setMargin(0);
......
......@@ -47,7 +47,7 @@ class QmakeProfileConfigWidget : public ProjectExplorer::ProfileConfigWidget
Q_OBJECT
public:
QmakeProfileConfigWidget(ProjectExplorer::Profile *p, QWidget *parent = 0);
explicit QmakeProfileConfigWidget(ProjectExplorer::Profile *p, QWidget *parent = 0);
QString displayName() const;
......
......@@ -53,6 +53,8 @@ QtProfileConfigWidget::QtProfileConfigWidget(ProjectExplorer::Profile *p,
m_combo(new QComboBox),
m_manageButton(new QPushButton(this))
{
setToolTip(tr("The Qt library to use for all projects using this profile.<br>"
"A Qt version is required for qmake-based projects and optional when using other build systems."));
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setMargin(0);
......
......@@ -48,7 +48,7 @@ class QtProfileConfigWidget : public ProjectExplorer::ProfileConfigWidget
Q_OBJECT
public:
QtProfileConfigWidget(ProjectExplorer::Profile *p, QWidget *parent = 0);
explicit QtProfileConfigWidget(ProjectExplorer::Profile *p, QWidget *parent = 0);
QString displayName() const;
......
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