~ubuntu-branches/ubuntu/trusty/kdevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to languages/cpp/cppduchain/qpropertydeclaration.cpp

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2013-12-09 18:54:59 UTC
  • mfrom: (1.7.19)
  • Revision ID: package-import@ubuntu.com-20131209185459-zlxv7jo7up8gthne
Tags: 4:4.6.0-0ubuntu1
* New upstream release (LP: #1259220)
* Update install files 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
   Copyright (c) 2010 KDAB
3
 
 
4
 
   Author: Tobias Koenig <tokoe@kde.org>
5
 
 
6
 
   This library is free software; you can redistribute it and/or
7
 
   modify it under the terms of the GNU Library General Public
8
 
   License version 2 as published by the Free Software Foundation.
9
 
 
10
 
   This library is distributed in the hope that it will be useful,
11
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 
   Library General Public License for more details.
14
 
 
15
 
   You should have received a copy of the GNU Library General Public License
16
 
   along with this library; see the file COPYING.LIB.  If not, write to
17
 
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
 
   Boston, MA 02110-1301, USA.
19
 
*/
20
 
 
21
 
#include "qpropertydeclaration.h"
22
 
#include <language/duchain/duchainregister.h>
23
 
 
24
 
using namespace KDevelop;
25
 
 
26
 
namespace Cpp {
27
 
 
28
 
REGISTER_DUCHAIN_ITEM(QPropertyDeclaration);
29
 
 
30
 
QPropertyDeclaration::QPropertyDeclaration(const QPropertyDeclaration& rhs)
31
 
  : KDevelop::ClassMemberDeclaration(*new QPropertyDeclarationData(*rhs.d_func()))
32
 
{
33
 
  d_func_dynamic()->setClassId(this);
34
 
}
35
 
 
36
 
QPropertyDeclaration::QPropertyDeclaration(QPropertyDeclarationData& data)
37
 
  : KDevelop::ClassMemberDeclaration(data)
38
 
{
39
 
}
40
 
 
41
 
QPropertyDeclaration::QPropertyDeclaration(const KDevelop::RangeInRevision& range, KDevelop::DUContext* context)
42
 
  : KDevelop::ClassMemberDeclaration(*new QPropertyDeclarationData, range)
43
 
{
44
 
  d_func_dynamic()->setClassId(this);
45
 
  if (context)
46
 
    setContext(context);
47
 
}
48
 
 
49
 
void QPropertyDeclaration::setReadMethod(const IndexedDeclaration &declaration)
50
 
{
51
 
  d_func_dynamic()->m_readMethod = declaration;
52
 
}
53
 
 
54
 
IndexedDeclaration QPropertyDeclaration::readMethod() const
55
 
{
56
 
  return d_func()->m_readMethod;
57
 
}
58
 
 
59
 
void QPropertyDeclaration::setWriteMethod(const IndexedDeclaration &declaration)
60
 
{
61
 
  d_func_dynamic()->m_writeMethod = declaration;
62
 
}
63
 
 
64
 
IndexedDeclaration QPropertyDeclaration::writeMethod() const
65
 
{
66
 
  return d_func()->m_writeMethod;
67
 
}
68
 
 
69
 
void QPropertyDeclaration::setResetMethod(const IndexedDeclaration &declaration)
70
 
{
71
 
  d_func_dynamic()->m_resetMethod = declaration;
72
 
}
73
 
 
74
 
IndexedDeclaration QPropertyDeclaration::resetMethod() const
75
 
{
76
 
  return d_func()->m_resetMethod;
77
 
}
78
 
 
79
 
void QPropertyDeclaration::setNotifyMethod(const IndexedDeclaration &declaration)
80
 
{
81
 
  d_func_dynamic()->m_notifyMethod = declaration;
82
 
}
83
 
 
84
 
IndexedDeclaration QPropertyDeclaration::notifyMethod() const
85
 
{
86
 
  return d_func()->m_notifyMethod;
87
 
}
88
 
 
89
 
void QPropertyDeclaration::setDesignableMethod(const IndexedDeclaration &declaration)
90
 
{
91
 
  d_func_dynamic()->m_designableMethod = declaration;
92
 
}
93
 
 
94
 
IndexedDeclaration QPropertyDeclaration::designableMethod() const
95
 
{
96
 
  return d_func()->m_designableMethod;
97
 
}
98
 
 
99
 
void QPropertyDeclaration::setScriptableMethod(const IndexedDeclaration &declaration)
100
 
{
101
 
  d_func_dynamic()->m_scriptableMethod = declaration;
102
 
}
103
 
 
104
 
IndexedDeclaration QPropertyDeclaration::scriptableMethod() const
105
 
{
106
 
  return d_func()->m_scriptableMethod;
107
 
}
108
 
 
109
 
void QPropertyDeclaration::setIsDesignable(bool designable)
110
 
{
111
 
  d_func_dynamic()->m_isDesignable = designable;
112
 
}
113
 
 
114
 
bool QPropertyDeclaration::isDesignable() const
115
 
{
116
 
  return d_func()->m_isDesignable;
117
 
}
118
 
 
119
 
void QPropertyDeclaration::setIsScriptable(bool scriptable)
120
 
{
121
 
  d_func_dynamic()->m_isScriptable = scriptable;
122
 
}
123
 
 
124
 
bool QPropertyDeclaration::isScriptable() const
125
 
{
126
 
  return d_func()->m_isScriptable;
127
 
}
128
 
 
129
 
void QPropertyDeclaration::setIsStored(bool stored)
130
 
{
131
 
  d_func_dynamic()->m_isStored = stored;
132
 
}
133
 
 
134
 
bool QPropertyDeclaration::isStored() const
135
 
{
136
 
  return d_func()->m_isStored;
137
 
}
138
 
 
139
 
void QPropertyDeclaration::setIsUser(bool user)
140
 
{
141
 
  d_func_dynamic()->m_isUser = user;
142
 
}
143
 
 
144
 
bool QPropertyDeclaration::isUser() const
145
 
{
146
 
  return d_func()->m_isUser;
147
 
}
148
 
 
149
 
void QPropertyDeclaration::setIsConstant(bool constant)
150
 
{
151
 
  d_func_dynamic()->m_isConstant = constant;
152
 
}
153
 
 
154
 
bool QPropertyDeclaration::isConstant() const
155
 
{
156
 
  return d_func()->m_isConstant;
157
 
}
158
 
 
159
 
void QPropertyDeclaration::setIsFinal(bool final)
160
 
{
161
 
  d_func_dynamic()->m_isFinal = final;
162
 
}
163
 
 
164
 
bool QPropertyDeclaration::isFinal() const
165
 
{
166
 
  return d_func()->m_isFinal;
167
 
}
168
 
 
169
 
KDevelop::Declaration* QPropertyDeclaration::clonePrivate() const
170
 
{
171
 
  return new QPropertyDeclaration(*this);
172
 
}
173
 
 
174
 
}