• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop Property Editing Library
 

KDevelop Property Editing Library

  • lib
  • widgets
  • propeditor
multiproperty.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2004 by Alexander Dymo <cloudtemple@mskat.net> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU Library General Public License as *
6  * published by the Free Software Foundation; either version 2 of the *
7  * License, or (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU Library General Public *
15  * License along with this program; if not, write to the *
16  * Free Software Foundation, Inc., *
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18  ***************************************************************************/
19 #ifndef MULTIPROPERTY_H
20 #define MULTIPROPERTY_H
21 
22 #include <tqptrlist.h>
23 #include <tqmap.h>
24 #include <tqvariant.h>
25 
26 #include "property.h"
27 #include "childproperty.h"
28 
29 namespace PropertyLib{
30 
31 class PropertyList;
32 
49 class MultiProperty
50 {
51 public:
53  MultiProperty(Property *prop);
55  MultiProperty(PropertyList *propertyList);
57  MultiProperty(PropertyList *propertyList, Property *prop);
58  ~MultiProperty();
59 
61  bool operator ==(const MultiProperty &prop) const;
63  bool operator ==(const Property &prop) const;
64 
66  void addProperty(Property *prop);
68  void removeProperty(Property *prop);
70  void addProperty(MultiProperty *prop);
72  void removeProperty(MultiProperty *prop);
73 
75  TQString name() const;
77  int type() const;
79  TQVariant value() const;
81  TQString description() const;
83  bool readOnly() const;
85  bool visible() const;
87  TQMap<TQString, TQVariant> valueList() const;
88 
90  void setValue(const TQVariant& value);
95  void setValue(const TQVariant& value, bool emitChange);
97  void setDescription(const TQString &description);
99  void setValueList(const TQMap< TQString, TQVariant >& valueList);
100 
102  TQVariant findValueDescription() const;
104  TQVariant findValueDescription(TQVariant val) const;
105 
107  bool valid() const;
108 
110  void undo();
111 
113  TQValueList<ChildProperty> details;
114 
115 private:
116  TQPtrList<Property> list;
117 
118  PropertyList *m_propertyList;
119 
120 friend class PropertyList;
121 friend class PropertyBuffer;
122 };
123 
124 }
125 
126 #endif
PropertyLib::MultiProperty::undo
void undo()
Reverts the property value to previous setting.
Definition: multiproperty.cpp:262
PropertyLib::MultiProperty::readOnly
bool readOnly() const
Returns the readonly attribute of a property.
Definition: multiproperty.cpp:96
PropertyLib
Namespace which contain property editing classes.
Definition: childproperty.cpp:29
PropertyLib::MultiProperty::setValueList
void setValueList(const TQMap< TQString, TQVariant > &valueList)
Sets the list of possible values of a property.
Definition: multiproperty.cpp:179
PropertyLib::MultiProperty::operator==
bool operator==(const MultiProperty &prop) const
Compares two multiproperties.
Definition: multiproperty.cpp:200
PropertyLib::MultiProperty::valid
bool valid() const
Returns true if the multiproperty has no properties in the list (i.e.
Definition: multiproperty.cpp:257
PropertyLib::MultiProperty::valueList
TQMap< TQString, TQVariant > valueList() const
The string-to-value correspondence list of the property.
Definition: multiproperty.cpp:132
PropertyLib::MultiProperty::type
int type() const
Returns the type of a property.
Definition: multiproperty.cpp:53
property.h
Contains PropertyLib::Property class and PropertyLib::Property::PropertyType enum.
PropertyLib::MultiProperty::details
TQValueList< ChildProperty > details
The list of child properties.
Definition: multiproperty.h:113
PropertyLib::MultiProperty::setDescription
void setDescription(const TQString &description)
Sets the description of a property.
Definition: multiproperty.cpp:139
PropertyLib::PropertyBuffer
The list of properties which does not own them.
Definition: propertylist.h:183
PropertyLib::MultiProperty::value
TQVariant value() const
Returns the value of a property.
Definition: multiproperty.cpp:60
PropertyLib::MultiProperty::name
TQString name() const
Returns the name of a property.
Definition: multiproperty.cpp:46
PropertyLib::MultiProperty::visible
bool visible() const
Returns the visibility attribute of a property.
Definition: multiproperty.cpp:114
PropertyLib::MultiProperty::removeProperty
void removeProperty(Property *prop)
Removes property from the list.
Definition: multiproperty.cpp:191
PropertyLib::MultiProperty::description
TQString description() const
Returns the description of a property.
Definition: multiproperty.cpp:78
PropertyLib::PropertyList
The list of properties.
Definition: propertylist.h:55
PropertyLib::MultiProperty::setValue
void setValue(const TQVariant &value)
Sets the value of a property.
Definition: multiproperty.cpp:154
PropertyLib::MultiProperty::addProperty
void addProperty(Property *prop)
Adds property to the list.
Definition: multiproperty.cpp:186
PropertyLib::Property
Property.
Definition: property.h:62
PropertyLib::MultiProperty::findValueDescription
TQVariant findValueDescription() const
Finds string description for a value.
Definition: multiproperty.cpp:230
PropertyLib::MultiProperty
Holds a list of properties with the same name and type.
Definition: multiproperty.h:49
PropertyLib::MultiProperty::MultiProperty
MultiProperty(Property *prop)
Constructs multiproperty with one property which is not connected to a property list.
Definition: multiproperty.cpp:25

KDevelop Property Editing Library

Skip menu "KDevelop Property Editing Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

KDevelop Property Editing Library

Skip menu "KDevelop Property Editing Library"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop Property Editing Library by doxygen 1.8.13
This website is maintained by Timothy Pearson.