diff options
author | Leandro Melo <leandro.melo@nokia.com> | 2010-05-26 10:58:44 +0200 |
---|---|---|
committer | Leandro Melo <leandro.melo@nokia.com> | 2010-05-27 09:54:59 +0200 |
commit | 125aaf861505176a7d8acc8ca36ca0094862785d (patch) | |
tree | 2a2cc7df78283bd5f4321a50f43b9ae077f296a4 /src/plugins/texteditor/generichighlighter/highlightersettings.h | |
parent | 154b312de61e3e39396a3a7a5516a29bcb5a671e (diff) |
Settings page for the generic highlighter.
Diffstat (limited to 'src/plugins/texteditor/generichighlighter/highlightersettings.h')
-rw-r--r-- | src/plugins/texteditor/generichighlighter/highlightersettings.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/plugins/texteditor/generichighlighter/highlightersettings.h b/src/plugins/texteditor/generichighlighter/highlightersettings.h new file mode 100644 index 0000000000..ba03719505 --- /dev/null +++ b/src/plugins/texteditor/generichighlighter/highlightersettings.h @@ -0,0 +1,65 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef HIGHLIGHTERSETTINGS_H +#define HIGHLIGHTERSETTINGS_H + +#include <QtCore/QString> + +QT_BEGIN_NAMESPACE +class QSettings; +QT_END_NAMESPACE + +namespace TextEditor { + +struct HighlighterSettings +{ + HighlighterSettings(); + + void toSettings(const QString &category, QSettings *s) const; + void fromSettings(const QString &category, QSettings *s); + + bool equals(const HighlighterSettings &highlighterSettings) const; + + QString m_definitionFilesPath; +}; + +inline bool operator==(const HighlighterSettings &a, const HighlighterSettings &b) +{ return a.equals(b); } + +inline bool operator!=(const HighlighterSettings &a, const HighlighterSettings &b) +{ return !a.equals(b); } + +namespace Internal { +void applyDefaults(HighlighterSettings *settings); +} + +} // namespace TextEditor + +#endif // HIGHLIGHTERSETTINGS_H |