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()46 HighlightDefinitionMetaData::HighlightDefinitionMetaData() : m_priority(0)
47 {}
48 
setPriority(const int priority)49 void HighlightDefinitionMetaData::setPriority(const int priority)
50 { m_priority = priority; }
51 
priority() const52 int HighlightDefinitionMetaData::priority() const
53 { return m_priority; }
54 
setId(const QString & id)55 void HighlightDefinitionMetaData::setId(const QString &id)
56 { m_id = id; }
57 
id() const58 const QString &HighlightDefinitionMetaData::id() const
59 { return m_id; }
60 
setName(const QString & name)61 void HighlightDefinitionMetaData::setName(const QString &name)
62 { m_name = name; }
63 
name() const64 const QString &HighlightDefinitionMetaData::name() const
65 { return m_name; }
66 
setVersion(const QString & version)67 void HighlightDefinitionMetaData::setVersion(const QString &version)
68 { m_version = version; }
69 
version() const70 const QString &HighlightDefinitionMetaData::version() const
71 { return m_version; }
72 
setFileName(const QString & fileName)73 void HighlightDefinitionMetaData::setFileName(const QString &fileName)
74 { m_fileName = fileName; }
75 
fileName() const76 const QString &HighlightDefinitionMetaData::fileName() const
77 { return m_fileName; }
78 
setPatterns(const QStringList & patterns)79 void HighlightDefinitionMetaData::setPatterns(const QStringList &patterns)
80 { m_patterns = patterns; }
81 
patterns() const82 const QStringList &HighlightDefinitionMetaData::patterns() const
83 { return m_patterns; }
84 
setMimeTypes(const QStringList & mimeTypes)85 void HighlightDefinitionMetaData::setMimeTypes(const QStringList &mimeTypes)
86 { m_mimeTypes = mimeTypes; }
87 
mimeTypes() const88 const QStringList &HighlightDefinitionMetaData::mimeTypes() const
89 { return m_mimeTypes; }
90 
setUrl(const QUrl & url)91 void HighlightDefinitionMetaData::setUrl(const QUrl &url)
92 { m_url = url; }
93 
url() const94 const QUrl &HighlightDefinitionMetaData::url() const
95 { return m_url; }
96