2
Copyright (c) 2010 KDAB
4
Author: Tobias Koenig <tokoe@kde.org>
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.
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.
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.
21
#include "qpropertydeclaration.h"
22
#include <language/duchain/duchainregister.h>
24
using namespace KDevelop;
28
REGISTER_DUCHAIN_ITEM(QPropertyDeclaration);
30
QPropertyDeclaration::QPropertyDeclaration(const QPropertyDeclaration& rhs)
31
: KDevelop::ClassMemberDeclaration(*new QPropertyDeclarationData(*rhs.d_func()))
33
d_func_dynamic()->setClassId(this);
36
QPropertyDeclaration::QPropertyDeclaration(QPropertyDeclarationData& data)
37
: KDevelop::ClassMemberDeclaration(data)
41
QPropertyDeclaration::QPropertyDeclaration(const KDevelop::RangeInRevision& range, KDevelop::DUContext* context)
42
: KDevelop::ClassMemberDeclaration(*new QPropertyDeclarationData, range)
44
d_func_dynamic()->setClassId(this);
49
void QPropertyDeclaration::setReadMethod(const IndexedDeclaration &declaration)
51
d_func_dynamic()->m_readMethod = declaration;
54
IndexedDeclaration QPropertyDeclaration::readMethod() const
56
return d_func()->m_readMethod;
59
void QPropertyDeclaration::setWriteMethod(const IndexedDeclaration &declaration)
61
d_func_dynamic()->m_writeMethod = declaration;
64
IndexedDeclaration QPropertyDeclaration::writeMethod() const
66
return d_func()->m_writeMethod;
69
void QPropertyDeclaration::setResetMethod(const IndexedDeclaration &declaration)
71
d_func_dynamic()->m_resetMethod = declaration;
74
IndexedDeclaration QPropertyDeclaration::resetMethod() const
76
return d_func()->m_resetMethod;
79
void QPropertyDeclaration::setNotifyMethod(const IndexedDeclaration &declaration)
81
d_func_dynamic()->m_notifyMethod = declaration;
84
IndexedDeclaration QPropertyDeclaration::notifyMethod() const
86
return d_func()->m_notifyMethod;
89
void QPropertyDeclaration::setDesignableMethod(const IndexedDeclaration &declaration)
91
d_func_dynamic()->m_designableMethod = declaration;
94
IndexedDeclaration QPropertyDeclaration::designableMethod() const
96
return d_func()->m_designableMethod;
99
void QPropertyDeclaration::setScriptableMethod(const IndexedDeclaration &declaration)
101
d_func_dynamic()->m_scriptableMethod = declaration;
104
IndexedDeclaration QPropertyDeclaration::scriptableMethod() const
106
return d_func()->m_scriptableMethod;
109
void QPropertyDeclaration::setIsDesignable(bool designable)
111
d_func_dynamic()->m_isDesignable = designable;
114
bool QPropertyDeclaration::isDesignable() const
116
return d_func()->m_isDesignable;
119
void QPropertyDeclaration::setIsScriptable(bool scriptable)
121
d_func_dynamic()->m_isScriptable = scriptable;
124
bool QPropertyDeclaration::isScriptable() const
126
return d_func()->m_isScriptable;
129
void QPropertyDeclaration::setIsStored(bool stored)
131
d_func_dynamic()->m_isStored = stored;
134
bool QPropertyDeclaration::isStored() const
136
return d_func()->m_isStored;
139
void QPropertyDeclaration::setIsUser(bool user)
141
d_func_dynamic()->m_isUser = user;
144
bool QPropertyDeclaration::isUser() const
146
return d_func()->m_isUser;
149
void QPropertyDeclaration::setIsConstant(bool constant)
151
d_func_dynamic()->m_isConstant = constant;
154
bool QPropertyDeclaration::isConstant() const
156
return d_func()->m_isConstant;
159
void QPropertyDeclaration::setIsFinal(bool final)
161
d_func_dynamic()->m_isFinal = final;
164
bool QPropertyDeclaration::isFinal() const
166
return d_func()->m_isFinal;
169
KDevelop::Declaration* QPropertyDeclaration::clonePrivate() const
171
return new QPropertyDeclaration(*this);