C++ tooltip: Option to integrate Qt docs into tooltips.

This commit is contained in:
Leandro Melo
2010-07-13 14:43:47 +02:00
parent a4cd93889f
commit 3ed60eaa6c
5 changed files with 23 additions and 3 deletions

View File

@@ -44,6 +44,7 @@ static const char * const animateMatchingParenthesesKey= "AnimateMatchingParenth
static const char * const markTextChangesKey = "MarkTextChanges";
static const char * const autoFoldFirstCommentKey = "AutoFoldFirstComment";
static const char * const centerCursorOnScrollKey = "CenterCursorOnScroll";
static const char * const integrateDocsIntoTooltips = "IntegrateDocsIntoTooltips";
static const char * const groupPostfix = "DisplaySettings";
namespace TextEditor {
@@ -60,7 +61,8 @@ DisplaySettings::DisplaySettings() :
m_animateMatchingParentheses(true),
m_markTextChanges(true),
m_autoFoldFirstComment(true),
m_centerCursorOnScroll(false)
m_centerCursorOnScroll(false),
m_integrateDocsIntoTooltips(true)
{
}
@@ -82,6 +84,7 @@ void DisplaySettings::toSettings(const QString &category, QSettings *s) const
s->setValue(QLatin1String(markTextChangesKey), m_markTextChanges);
s->setValue(QLatin1String(autoFoldFirstCommentKey), m_autoFoldFirstComment);
s->setValue(QLatin1String(centerCursorOnScrollKey), m_centerCursorOnScroll);
s->setValue(QLatin1String(integrateDocsIntoTooltips), m_integrateDocsIntoTooltips);
s->endGroup();
}
@@ -106,6 +109,7 @@ void DisplaySettings::fromSettings(const QString &category, const QSettings *s)
m_markTextChanges = s->value(group + QLatin1String(markTextChangesKey), m_markTextChanges).toBool();
m_autoFoldFirstComment = s->value(group + QLatin1String(autoFoldFirstCommentKey), m_autoFoldFirstComment).toBool();
m_centerCursorOnScroll = s->value(group + QLatin1String(centerCursorOnScrollKey), m_centerCursorOnScroll).toBool();
m_integrateDocsIntoTooltips = s->value(group + QLatin1String(integrateDocsIntoTooltips), m_integrateDocsIntoTooltips).toBool();
}
bool DisplaySettings::equals(const DisplaySettings &ds) const
@@ -122,6 +126,7 @@ bool DisplaySettings::equals(const DisplaySettings &ds) const
&& m_markTextChanges == ds.m_markTextChanges
&& m_autoFoldFirstComment== ds.m_autoFoldFirstComment
&& m_centerCursorOnScroll == ds.m_centerCursorOnScroll
&& m_integrateDocsIntoTooltips == ds.m_integrateDocsIntoTooltips
;
}