blob: 474c4af8b0654761fc9d302868239e7d2605abd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
//
// C++ Interface: creategettersetterconfiguration
//
// Description:
//
//
// Author: Jonas Jacobi <j.jacobi@gmx.de>, (C) 2004
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef CREATEGETTERSETTERCONFIGURATION_H
#define CREATEGETTERSETTERCONFIGURATION_H
#include <tqobject.h>
#include <tqstring.h>
#include <tqstringlist.h>
class CppSupportPart;
class TQDomDocument;
/**
* Class containing the settings for the creation of get/set methods for class attributes.
* It contains several attributes:
* - prefixGet is the prefix which is put in front of the attributename for the getmethod.
* - prefixSet is the prefix which is put in front of the attributename for the setmethod.
* - prefixVariable is a StringList containing prefixes which should be removed from the attributename
* when creating the get/set method names
* - parameterName is the name of the parameter containing the value in the setmethod.
* - inlineGet true if getmethod should be created inline, false otherwise
* - inlineSet true if setmethod should be created inline, false otherwise
*
* The settings are stored per project under /kdevcppsupport/creategettersetter/.
* @author Jonas Jacobi <j.jacobi@gmx.de>
*/
class CreateGetterSetterConfiguration : public TQObject{
TQ_OBJECT
public:
CreateGetterSetterConfiguration(CppSupportPart* part);
~CreateGetterSetterConfiguration();
public slots:
void init();
void store();
public:
void setPrefixGet(const TQString& theValue)
{
m_prefixGet = theValue;
}
TQString prefixGet() const
{
return m_prefixGet;
}
void setPrefixSet(const TQString& theValue)
{
m_prefixSet = theValue;
}
TQString prefixSet() const
{
return m_prefixSet;
}
void setPrefixVariable(const TQStringList& theValue)
{
m_prefixVariable = theValue;
}
TQStringList prefixVariable() const
{
return m_prefixVariable;
}
void setParameterName(const TQString& theValue)
{
m_parameterName = theValue;
}
TQString parameterName() const
{
return m_parameterName;
}
void setInlineGet(bool theValue)
{
m_isInlineGet = theValue;
}
bool isInlineGet() const
{
return m_isInlineGet;
}
void setInlineSet(bool theValue)
{
m_isInlineSet = theValue;
}
bool isInlineSet() const
{
return m_isInlineSet;
}
private:
CppSupportPart* m_part;
TQDomDocument* m_settings;
TQString m_prefixGet;
TQString m_prefixSet;
TQStringList m_prefixVariable;
TQString m_parameterName;
bool m_isInlineGet;
bool m_isInlineSet;
private:
static TQString defaultPath;
};
#endif
|