diff options
author | Leandro Melo <leandro.melo@nokia.com> | 2010-04-30 13:08:06 +0200 |
---|---|---|
committer | Leandro Melo <leandro.melo@nokia.com> | 2010-05-14 10:12:21 +0200 |
commit | 65ca06e0f033c470dc65f7bf80e416afd2d21fa6 (patch) | |
tree | 8a2dc584fa40ba749b20adad6e61b267deaadffd /src/libs/utils/uncommentselection.h | |
parent | c8441462c9795134bb3e669464680d146d0a2dd4 (diff) | |
download | qt-creator-65ca06e0f033c470dc65f7bf80e416afd2d21fa6.tar.gz |
Generalized Utils::unCommentSelection; Started implementing editor details (configuration by highlight definition, actions).
Diffstat (limited to 'src/libs/utils/uncommentselection.h')
-rw-r--r-- | src/libs/utils/uncommentselection.h | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/libs/utils/uncommentselection.h b/src/libs/utils/uncommentselection.h index 4a4a666767..a984d512b3 100644 --- a/src/libs/utils/uncommentselection.h +++ b/src/libs/utils/uncommentselection.h @@ -32,13 +32,42 @@ #include "utils_global.h" +#include <QtCore/QString> + QT_BEGIN_NAMESPACE class QPlainTextEdit; QT_END_NAMESPACE namespace Utils { -QTCREATOR_UTILS_EXPORT void unCommentSelection(QPlainTextEdit *edit); +class QTCREATOR_UTILS_EXPORT CommentDefinition +{ +public: + CommentDefinition(); + + CommentDefinition &setAfterWhiteSpaces(const bool); + CommentDefinition &setSingleLine(const QString &singleLine); + CommentDefinition &setMultiLineStart(const QString &multiLineStart); + CommentDefinition &setMultiLineEnd(const QString &multiLineEnd); + + bool isAfterWhiteSpaces() const; + const QString &singleLine() const; + const QString &multiLineStart() const; + const QString &multiLineEnd() const; + + bool hasSingleLineStyle() const; + bool hasMultiLineStyle() const; + +private: + bool m_afterWhiteSpaces; + QString m_singleLine; + QString m_multiLineStart; + QString m_multiLineEnd; +}; + +QTCREATOR_UTILS_EXPORT +void unCommentSelection(QPlainTextEdit *edit, + const CommentDefinition &definiton = CommentDefinition()); } // end of namespace Utils |