PropertyValue Class Reference

A data type with a QVariant and some additional information. More...

#include <propertyvalue.h>

List of all members.

Public Types

enum  propertyValueType {
  value, error,
  unset
}

Public Member Functions

 PropertyValue ()
 PropertyValue (const PropertyValue &value)
virtual ~PropertyValue ()
PropertyValueoperator= (const PropertyValue &value)
bool operator== (const PropertyValue value) const
bool operator!= (const PropertyValue value) const
 operator QString () const

Public Attributes

QVariant internalValue
propertyValueType type
QString formatedValue
Qt::Alignment formatedValueAlignment
QString toolTip
QString whatsThis

Private Member Functions

void helper_copyFromHere (const PropertyValue &value)


Detailed Description

A data type with a QVariant and some additional information.

It doesn't provide much intellegence. Think of it not so much like a class, but more like just a struct. You have to set all members manually to give them useful values.

The data type provides the copy constructor and the assignment operator, so you can safly use it like any other data type. The data type is made available to QMetaType and is this way available in for example QVariant. If you want to use it in queued signal and slot connections, do something like int id = qRegisterMetaType<VersionNumber>(); This will register the type also for this use case. id will contain the type identifier used by QMetaObject.

Definition at line 47 of file propertyvalue.h.


Member Enumeration Documentation

Enum for determinating the type of value that this object holds.

Enumerator:
value 
error 
unset 

Definition at line 75 of file propertyvalue.h.


Constructor & Destructor Documentation

PropertyValue::PropertyValue (  ) 

Definition at line 23 of file propertyvalue.cpp.

References formatedValueAlignment, type, and unset.

PropertyValue::PropertyValue ( const PropertyValue value  ) 

Definition at line 29 of file propertyvalue.cpp.

References helper_copyFromHere().

Here is the call graph for this function:

PropertyValue::~PropertyValue (  )  [virtual]

Definition at line 34 of file propertyvalue.cpp.


Member Function Documentation

PropertyValue & PropertyValue::operator= ( const PropertyValue value  ) 

Definition at line 38 of file propertyvalue.cpp.

References helper_copyFromHere().

Here is the call graph for this function:

bool PropertyValue::operator== ( const PropertyValue  value  )  const

Returns:
true if all 3 members are equal. Otherwise false.

Definition at line 44 of file propertyvalue.cpp.

References formatedValue, formatedValueAlignment, internalValue, toolTip, type, and whatsThis.

bool PropertyValue::operator!= ( const PropertyValue  value  )  const

Returns:
false if all 3 members are equal. Otherwise true.

Definition at line 55 of file propertyvalue.cpp.

PropertyValue::operator QString (  )  const

Typecast to QString.

Definition at line 60 of file propertyvalue.cpp.

References formatedValue.

void PropertyValue::helper_copyFromHere ( const PropertyValue value  )  [private]

Internally used to copy another object to this object.

Definition at line 65 of file propertyvalue.cpp.

References formatedValue, formatedValueAlignment, internalValue, toolTip, type, and whatsThis.

Referenced by operator=(), and PropertyValue().

Here is the caller graph for this function:


Member Data Documentation

Provides information about the alignment that should be used for formatedValue. It's of type Qt::Alignment (see http://doc.trolltech.com/main-snapshot/qt.html#AlignmentFlag-enum for details).

Default value: (Qt::AlignLeft | Qt::AlignVCenter)

Definition at line 105 of file propertyvalue.h.

Referenced by ripping::formatedBitrate(), ripping::formatedDataSize(), ripping::formatedMetaInterval(), ripping::formatedRelayPort(), helper_copyFromHere(), operator==(), and PropertyValue().


The documentation for this class was generated from the following files:

Generated on Sat May 2 10:43:55 2009 for kradioripper by  doxygen 1.5.6