1 /************************************************************************** 2 ** 3 ** This file is part of Qt Creator 4 ** 5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). 6 ** 7 ** Contact: Nokia Corporation (qt-info@nokia.com) 8 ** 9 ** No Commercial Usage 10 ** 11 ** This file contains pre-release code and may not be distributed. 12 ** You may use this file in accordance with the terms and conditions 13 ** contained in the Technology Preview License Agreement accompanying 14 ** this package. 15 ** 16 ** GNU Lesser General Public License Usage 17 ** 18 ** Alternatively, this file may be used under the terms of the GNU Lesser 19 ** General Public License version 2.1 as published by the Free Software 20 ** Foundation and appearing in the file LICENSE.LGPL included in the 21 ** packaging of this file. Please review the following information to 22 ** ensure the GNU Lesser General Public License version 2.1 requirements 23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 24 ** 25 ** In addition, as a special exception, Nokia gives you certain additional 26 ** rights. These rights are described in the Nokia Qt LGPL Exception 27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 28 ** 29 ** If you have questions regarding the use of this file, please contact 30 ** Nokia at qt-info@nokia.com. 31 ** 32 **************************************************************************/ 33 34 #include "highlightdefinitionmetadata.h" 35 36 using namespace TextEditor; 37 using namespace Internal; 38 39 const QLatin1String HighlightDefinitionMetaData::kPriority("priority"); 40 const QLatin1String HighlightDefinitionMetaData::kName("name"); 41 const QLatin1String HighlightDefinitionMetaData::kExtensions("extensions"); 42 const QLatin1String HighlightDefinitionMetaData::kMimeType("mimetype"); 43 const QLatin1String HighlightDefinitionMetaData::kVersion("version"); 44 const QLatin1String HighlightDefinitionMetaData::kUrl("url"); 45 HighlightDefinitionMetaData()46HighlightDefinitionMetaData::HighlightDefinitionMetaData() : m_priority(0) 47 {} 48 setPriority(const int priority)49void HighlightDefinitionMetaData::setPriority(const int priority) 50 { m_priority = priority; } 51 priority() const52int HighlightDefinitionMetaData::priority() const 53 { return m_priority; } 54 setId(const QString & id)55void HighlightDefinitionMetaData::setId(const QString &id) 56 { m_id = id; } 57 id() const58const QString &HighlightDefinitionMetaData::id() const 59 { return m_id; } 60 setName(const QString & name)61void HighlightDefinitionMetaData::setName(const QString &name) 62 { m_name = name; } 63 name() const64const QString &HighlightDefinitionMetaData::name() const 65 { return m_name; } 66 setVersion(const QString & version)67void HighlightDefinitionMetaData::setVersion(const QString &version) 68 { m_version = version; } 69 version() const70const QString &HighlightDefinitionMetaData::version() const 71 { return m_version; } 72 setFileName(const QString & fileName)73void HighlightDefinitionMetaData::setFileName(const QString &fileName) 74 { m_fileName = fileName; } 75 fileName() const76const QString &HighlightDefinitionMetaData::fileName() const 77 { return m_fileName; } 78 setPatterns(const QStringList & patterns)79void HighlightDefinitionMetaData::setPatterns(const QStringList &patterns) 80 { m_patterns = patterns; } 81 patterns() const82const QStringList &HighlightDefinitionMetaData::patterns() const 83 { return m_patterns; } 84 setMimeTypes(const QStringList & mimeTypes)85void HighlightDefinitionMetaData::setMimeTypes(const QStringList &mimeTypes) 86 { m_mimeTypes = mimeTypes; } 87 mimeTypes() const88const QStringList &HighlightDefinitionMetaData::mimeTypes() const 89 { return m_mimeTypes; } 90 setUrl(const QUrl & url)91void HighlightDefinitionMetaData::setUrl(const QUrl &url) 92 { m_url = url; } 93 url() const94const QUrl &HighlightDefinitionMetaData::url() const 95 { return m_url; } 96