forked from qt-creator/qt-creator
TextEditor: Add declaration format description
Change-Id: Ibea12f324308a07d7e549d60a1b1c5767659efb3 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -57,6 +57,7 @@ public:
|
||||
ShowBackgroundControl = 0x2,
|
||||
ShowFontControls = 0x4,
|
||||
ShowUnderlineControl = 0x8,
|
||||
ShowFontAndUnderlineControls = ShowFontControls | ShowUnderlineControl,
|
||||
AllControls = 0xF,
|
||||
AllControlsExceptUnderline = AllControls & ~ShowUnderlineControl,
|
||||
};
|
||||
|
||||
@@ -99,6 +99,7 @@ const char *nameForStyle(TextStyle style)
|
||||
case C_WARNING: return "Warning";
|
||||
case C_WARNING_CONTEXT: return "WarningContext";
|
||||
|
||||
case C_DECLARATION: return "Declaration";
|
||||
|
||||
case C_LAST_STYLE_SENTINEL: return "LastStyleSentinel";
|
||||
}
|
||||
|
||||
@@ -98,6 +98,8 @@ enum TextStyle : quint8 {
|
||||
C_ERROR,
|
||||
C_ERROR_CONTEXT,
|
||||
|
||||
C_DECLARATION,
|
||||
|
||||
C_LAST_STYLE_SENTINEL
|
||||
};
|
||||
|
||||
|
||||
@@ -305,7 +305,10 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
|
||||
QColor(255, 190, 0),
|
||||
QTextCharFormat::DotLine,
|
||||
FormatDescription::ShowUnderlineControl);
|
||||
|
||||
formatDescr.emplace_back(C_DECLARATION,
|
||||
tr("Declaration"),
|
||||
tr("Declaration of a function, variable, and so on."),
|
||||
FormatDescription::ShowFontAndUnderlineControls);
|
||||
|
||||
d->m_fontSettingsPage = new FontSettingsPage(formatDescr,
|
||||
Constants::TEXT_EDITOR_FONT_SETTINGS,
|
||||
|
||||
Reference in New Issue
Block a user