forked from qt-creator/qt-creator
ProjectExplorer: Add BaseIntegerAspect::setToolTip()
Change-Id: I7a9fe0695b30c926d6b3e11302a4a8eaadfa2b16 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -135,6 +135,7 @@ public:
|
|||||||
QString m_labelText;
|
QString m_labelText;
|
||||||
QString m_prefix;
|
QString m_prefix;
|
||||||
QString m_suffix;
|
QString m_suffix;
|
||||||
|
QString m_tooltip;
|
||||||
QPointer<QLabel> m_label;
|
QPointer<QLabel> m_label;
|
||||||
QPointer<QSpinBox> m_spinBox; // Owned by configuration widget
|
QPointer<QSpinBox> m_spinBox; // Owned by configuration widget
|
||||||
bool m_enabled = true;
|
bool m_enabled = true;
|
||||||
@@ -677,6 +678,7 @@ void BaseIntegerAspect::addToLayout(LayoutBuilder &builder)
|
|||||||
d->m_spinBox->setPrefix(d->m_prefix);
|
d->m_spinBox->setPrefix(d->m_prefix);
|
||||||
d->m_spinBox->setSuffix(d->m_suffix);
|
d->m_spinBox->setSuffix(d->m_suffix);
|
||||||
d->m_spinBox->setEnabled(d->m_enabled);
|
d->m_spinBox->setEnabled(d->m_enabled);
|
||||||
|
d->m_spinBox->setToolTip(d->m_tooltip);
|
||||||
if (d->m_maximumValue.isValid() && d->m_maximumValue.isValid())
|
if (d->m_maximumValue.isValid() && d->m_maximumValue.isValid())
|
||||||
d->m_spinBox->setRange(int(d->m_minimumValue.toLongLong() / d->m_displayScaleFactor),
|
d->m_spinBox->setRange(int(d->m_minimumValue.toLongLong() / d->m_displayScaleFactor),
|
||||||
int(d->m_maximumValue.toLongLong() / d->m_displayScaleFactor));
|
int(d->m_maximumValue.toLongLong() / d->m_displayScaleFactor));
|
||||||
@@ -761,6 +763,15 @@ void BaseIntegerAspect::setDefaultValue(qint64 defaultValue)
|
|||||||
d->m_defaultValue = defaultValue;
|
d->m_defaultValue = defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BaseIntegerAspect::setToolTip(const QString &tooltip)
|
||||||
|
{
|
||||||
|
d->m_tooltip = tooltip;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\class ProjectExplorer::BaseTristateAspect
|
||||||
|
*/
|
||||||
|
|
||||||
BaseTriStateAspect::BaseTriStateAspect()
|
BaseTriStateAspect::BaseTriStateAspect()
|
||||||
{
|
{
|
||||||
setDisplayStyle(DisplayStyle::ComboBox);
|
setDisplayStyle(DisplayStyle::ComboBox);
|
||||||
|
|||||||
@@ -192,6 +192,7 @@ public:
|
|||||||
void setDisplayScaleFactor(qint64 factor);
|
void setDisplayScaleFactor(qint64 factor);
|
||||||
void setEnabled(bool enabled);
|
void setEnabled(bool enabled);
|
||||||
void setDefaultValue(qint64 defaultValue);
|
void setDefaultValue(qint64 defaultValue);
|
||||||
|
void setToolTip(const QString &tooltip);
|
||||||
|
|
||||||
void fromMap(const QVariantMap &map) override;
|
void fromMap(const QVariantMap &map) override;
|
||||||
void toMap(QVariantMap &map) const override;
|
void toMap(QVariantMap &map) const override;
|
||||||
|
|||||||
Reference in New Issue
Block a user