lib

KoProperty Namespace Reference


Detailed Description

Namespace for a set of classes implementing generic properties framework.

Main classes of this framework are:

  • Property, representing a single property with its own type and value
  • Set, a set of properties
  • Editor, a widget for displaying and editing properties provided by a Set object. Every property has its own row displayed using EditorItem object, within Editor widget. Widget class provides editing feature for EditorItem objects if a user selects a given item.

KoProperty framework also supports adding custom property types and custom property editor types using Custom Property and CustomPropertyFactory. If you cannot store your value type in a QVariant, consider using composed properties (see FactoryManager for more information) or storing it in CustomProperty yourself with handleValue() set to true.

Take a look at the test application, available in /koproperty/test to see how to use KoProperty.

Author:
Cedric Pasteur <cedric.pasteur@free.fr>

Alexander Dymo <cloudtemple@mskat.net>

Jaroslaw Staniek <js@iidea.pl>


Classes

class  CustomProperty
 Base class for custom properties. More...
class  SizeCustomProperty
 Custom property implementation for QSize type. More...
class  PointCustomProperty
 Custom property implementation for QPoint type. More...
class  RectCustomProperty
 Custom property implementation for QRect type. More...
class  SizePolicyCustomProperty
 Custom property implementation for QSizePolicy type. More...
class  Editor
 A listview to edit properties Editor widgets use property options using Property::option(const char *) to override default behaviour of editor items. Currently supported options are:. More...
class  EditorItem
 Item for a single property displayed within Editor object. More...
class  CustomPropertyFactory
 A prototype for custom property factory. More...
class  FactoryManager
 Manages factories providing custom editors and properties. More...
class  Property
 The base class representing a single property. More...
class  Set
 Lists holding properties in groups. More...
class  Buffer
class  GroupContainer
 A container widget that can be used to split information into hideable sections for a property editor-like panes. More...
class  Widget
 The base class for all item editors used in Editor. More...
class  WidgetProxy

Enumerations

enum  PropertyType {
  Auto = QVariant::Invalid - 1, Invalid = QVariant::Invalid, Map = QVariant::Map, List = QVariant::List,
  String = QVariant::String, StringList = QVariant::StringList, Font = QVariant::Font, Pixmap = QVariant::Pixmap,
  Rect = QVariant::Rect, Size = QVariant::Size, Color = QVariant::Color, Point = QVariant::Point,
  Integer = QVariant::Int, Boolean = QVariant::Bool, Double = QVariant::Double, CString = QVariant::CString,
  Cursor = QVariant::Cursor, SizePolicy = QVariant::SizePolicy, Date = QVariant::Date, Time = QVariant::Time,
  DateTime = QVariant::DateTime, ValueFromList = 2000, Symbol = 2001, FontName,
  FileURL, PictureFileURL, DirectoryURL, LineStyle,
  Size_Height = 3001, Size_Width, Point_X, Point_Y,
  Rect_X, Rect_Y, Rect_Width, Rect_Height,
  SizePolicy_HorData, SizePolicy_VerData, SizePolicy_HorStretch, SizePolicy_VerStretch,
  UserDefined = 4000
}

Functions

bool hasParent (QObject *par, QObject *o)
static void paintListViewExpander (QPainter *p, QWidget *w, int height, const QColorGroup &cg, bool isOpen)
QMap< QCString, QVariant > propertyValues (const Set &set)

Variables

static bool kofficeAppDirAdded = false
static Property Set_nonConstNull

Enumeration Type Documentation

Helper function to create a value list from two string lists.

PropertyType. Integers that represent the type of the property. Plugin defined properties should have a type number >= UserDefined .

Enumerator:
Invalid  invalid property type
Map  QMap<QString, QVariant>.
List  QValueList<QVariant>.
String  string
StringList  string list
Font  font
Pixmap  pixmap
Rect  rectangle (x,y, width, height)

Todo:
implement QVariant::Brush
Size  size (width, height)
Color  color
Point  point (x,y)

Todo:
implement QVariant::Palette
Todo:
implement QVariant::ColorGroup
Todo:
implement QVariant::IconSet
Integer  integer

Todo:
implement QVariant::Image
Boolean  boolean

Todo:
implement QVariant::UInt
Double  double
Cursor  cursor

Todo:
implement QVariant::PointArray
Todo:
implement QVariant::Region
Todo:
implement QVariant::Bitmap
SizePolicy  size policy (horizontal, vertical)
Date  date
Time  time
DateTime  date and time
ValueFromList  string value from a list

Todo:
implement QVariant::ByteArray
Todo:
implement QVariant::BitArray
Todo:
implement QVariant::KeySequence
Todo:
implement QVariant::Pen
Todo:
implement QVariant::Long
Todo:
implement QVariant::LongLong
Todo:
implement QVariant::ULongLong
Symbol  unicode symbol code
FontName  font name, e.g.

"times new roman"

FileURL  url of a file
PictureFileURL  url of a pixmap
DirectoryURL  url of a directory
LineStyle  line style
UserDefined  plugin defined properties should start here

Definition at line 65 of file property.h.


Function Documentation

bool KoProperty::hasParent ( QObject *  par,
QObject *  o 
) [inline]

Returns:
true if o has parent par.

Definition at line 54 of file editor.cpp.

KDE Home | KDE Accessibility Home | Description of Access Keys