QPIConfig includes improvements
git-svn-id: svn://db.shs.com.ru/libs@77 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
project(piqt_tools)
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
if (NOT LIBPROJECT)
|
||||
if (NOT ${LIBPROJECT})
|
||||
find_package(PIP REQUIRED)
|
||||
endif ()
|
||||
find_package(Qt4 REQUIRED)
|
||||
@@ -39,7 +39,7 @@ if (NOT DEFINED ENV{QNX_HOST})
|
||||
endif ()
|
||||
|
||||
if (DEFINED LIB)
|
||||
set(LIB 1)
|
||||
set(LIB true)
|
||||
if (${WIN32})
|
||||
find_package(MinGW REQUIRED)
|
||||
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
|
||||
|
||||
@@ -26,6 +26,15 @@ ConfigHighlighter::ConfigHighlighter(QTextDocument * parent): QSyntaxHighlighter
|
||||
rule.format = sectionFormat;
|
||||
highlightingRules.append(rule);
|
||||
|
||||
//substFormat.setFontWeight(QFont::Bold);
|
||||
substFormat.setForeground(QColor(192, 0, 192));
|
||||
rule.pattern = QRegExp("\\$\\{.*\\}+");
|
||||
rule.pattern.setMinimal(true);
|
||||
rule.format = substFormat;
|
||||
highlightingRules.append(rule);
|
||||
rule.pattern = QRegExp("\\$\\{[^\\{]*\\}+");
|
||||
highlightingRules.append(rule);
|
||||
|
||||
singleLineCommentFormat.setFontItalic(true);
|
||||
singleLineCommentFormat.setForeground(QColor(128, 128, 128));
|
||||
rule.pattern = QRegExp("#[^\n]*");
|
||||
|
||||
@@ -25,7 +25,7 @@ private:
|
||||
|
||||
QVector<HighlightingRule> highlightingRules;
|
||||
QRegExp commentStartExpression, commentEndExpression;
|
||||
QTextCharFormat singleLineCommentFormat, valueNameFormat, valueFormat, equalFormat, sectionFormat, spaceFormat;
|
||||
QTextCharFormat singleLineCommentFormat, valueNameFormat, valueFormat, equalFormat, sectionFormat, spaceFormat, substFormat;
|
||||
};
|
||||
|
||||
#endif // CONF_HIGHTLIGHTER_H
|
||||
|
||||
Reference in New Issue
Block a user