QXRD  0.11.16
Public Slots | Signals | Public Member Functions | Private Attributes | List of all members
QcepPolygonProperty Class Reference

#include <qcepproperty.h>

Inheritance diagram for QcepPolygonProperty:
Inheritance graph
[legend]
Collaboration diagram for QcepPolygonProperty:
Collaboration graph
[legend]

Public Slots

void setValue (QcepPolygon val, int index)
 
void setValue (QcepPolygon val)
 
void setDefaultValue (QcepPolygon val)
 
void resetValue ()
 
void appendValue (QPointF pt)
 
void clear ()
 

Signals

void valueChanged (QcepPolygon val, int index)
 

Public Member Functions

 QcepPolygonProperty (QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QcepPolygon value, QString toolTip)
 
QcepPolygon value () const
 
QcepPolygon defaultValue () const
 
- Public Member Functions inherited from QcepProperty
 QcepProperty (QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QString toolTip)
 
virtual void printMessage (QString msg, QDateTime dt=QDateTime::currentDateTime())
 
QString name () const
 
void setName (QString name)
 
QString parentName () const
 
QString toolTip () const
 
void setToolTip (QString tip)
 
QString expandedToolTip () const
 
void setWidgetToolTip (QWidget *widget)
 
int index ()
 
int incIndex (int step)
 
int debug () const
 
void setDebug (int dbg)
 
void setSaver (QcepSettingsSaverWPtr saver)
 

Private Attributes

QcepPolygon m_Default
 
QcepPolygon m_Value
 

Additional Inherited Members

- Static Public Member Functions inherited from QcepProperty
static void registerMetaTypes ()
 
static void setSettingsValue (QSettings *settings, QString name, QVariant value)
 
static void writeSettings (QObject *object, QSettings *settings, QString section)
 
static void readSettings (QObject *object, QSettings *settings, QString section)
 
static void writeSettings (QObject *object, const QMetaObject *meta, QString groupName, QSettings *settings, bool includeDynamic=false)
 
static void readSettings (QObject *object, const QMetaObject *meta, QString groupName, QSettings *settings, bool includeDynamic=false)
 
static void writeSettings (QObject *object, QString groupName, QSettings *settings, bool includeDynamic=false)
 
static void readSettings (QObject *object, QString groupName, QSettings *settings, bool includeDynamic=false)
 
static void registerCustomSaver (QString typeName, CustomSettingsSaver *saver)
 
- Protected Attributes inherited from QcepProperty
QMutex m_Mutex
 
QcepSettingsSaverWPtr m_Saver
 

Detailed Description

Definition at line 575 of file qcepproperty.h.

Constructor & Destructor Documentation

QcepPolygonProperty::QcepPolygonProperty ( QcepSettingsSaverWPtr  saver,
QObject *  parent,
const char *  name,
QcepPolygon  value,
QString  toolTip 
)

Definition at line 2735 of file qcepproperty.cpp.

2736  : QcepProperty(saver, parent, name, toolTip),
2737  m_Default(value),
2738  m_Value(value)
2739 {
2740 }
QcepPolygon m_Default
Definition: qcepproperty.h:595
QcepPolygon m_Value
Definition: qcepproperty.h:596
QcepPolygon value() const
QString name() const
QcepProperty(QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QString toolTip)
QString toolTip() const

Member Function Documentation

void QcepPolygonProperty::appendValue ( QPointF  pt)
slot

Definition at line 2795 of file qcepproperty.cpp.

References QcepProperty::m_Mutex, setValue(), and value().

2796 {
2797  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2798 
2799  QcepPolygon poly = value();
2800  poly.append(pt);
2801 
2802  setValue(poly);
2803 }
QMutex m_Mutex
Definition: qcepproperty.h:69
QcepPolygon value() const
void setValue(QcepPolygon val, int index)
QVector< QPointF > QcepPolygon
Definition: qcepmacros.h:37

Here is the call graph for this function:

void QcepPolygonProperty::clear ( )
slot

Definition at line 2805 of file qcepproperty.cpp.

References setValue().

2806 {
2807  setValue(QcepPolygon());
2808 }
void setValue(QcepPolygon val, int index)
QVector< QPointF > QcepPolygon
Definition: qcepmacros.h:37

Here is the call graph for this function:

QcepPolygon QcepPolygonProperty::defaultValue ( ) const

Definition at line 2749 of file qcepproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

Referenced by resetValue().

2750 {
2751  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2752 
2753  return m_Default;
2754 }
QcepPolygon m_Default
Definition: qcepproperty.h:595
QMutex m_Mutex
Definition: qcepproperty.h:69

Here is the caller graph for this function:

void QcepPolygonProperty::resetValue ( )
slot

Definition at line 2819 of file qcepproperty.cpp.

References DEBUG_PROPERTIES, defaultValue(), QcepProperty::name(), QcepProperty::printMessage(), qcepDebug(), and setValue().

2820 {
2821  if (qcepDebug(DEBUG_PROPERTIES)) {
2822  printMessage(tr("%1: QcepPolygon::resetValue").arg(name()));
2823  }
2824 
2826 }
QcepPolygon defaultValue() const
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
void setValue(QcepPolygon val, int index)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const

Here is the call graph for this function:

void QcepPolygonProperty::setDefaultValue ( QcepPolygon  val)
slot

Definition at line 2810 of file qcepproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

2811 {
2812  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2813 
2814  if (val != m_Default) {
2815  m_Default = val;
2816  }
2817 }
QcepPolygon m_Default
Definition: qcepproperty.h:595
QMutex m_Mutex
Definition: qcepproperty.h:69
void QcepPolygonProperty::setValue ( QcepPolygon  val,
int  index 
)
slot

Definition at line 2756 of file qcepproperty.cpp.

References QcepProperty::debug(), QcepProperty::index(), QcepProperty::name(), and QcepProperty::printMessage().

Referenced by appendValue(), clear(), and resetValue().

2757 {
2758  if (debug()) {
2759  printMessage(tr("%1 QcepPolygonProperty::setValue(QcepPolygon(...), int %2) [%3]")
2760  .arg(name()).arg(index).arg(this->index()));
2761  }
2762 
2763  if (index == this->index()) {
2764  setValue(val);
2765  }
2766 }
void setValue(QcepPolygon val, int index)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
int debug() const

Here is the call graph for this function:

Here is the caller graph for this function:

void QcepPolygonProperty::setValue ( QcepPolygon  val)
slot

Definition at line 2768 of file qcepproperty.cpp.

References QcepProperty::debug(), DEBUG_PROPERTIES, QcepProperty::incIndex(), QcepProperty::index(), QcepProperty::m_Mutex, QcepProperty::m_Saver, m_Value, QcepProperty::name(), QcepProperty::printMessage(), qcepDebug(), and valueChanged().

2769 {
2770  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2771 
2772  if (qcepDebug(DEBUG_PROPERTIES)) {
2773  printMessage(tr("%1: QcepPolygonProperty::setValue(QcepPolygon(...)")
2774  .arg(name()));
2775  }
2776 
2777  if (val != m_Value) {
2778  if (debug()) {
2779  printMessage(tr("%1: QcepPolygonProperty::setValue(QcepPolygon(...)) [%2]")
2780  .arg(name()).arg(index()));
2781  }
2782 
2783  m_Value = val;
2784 
2786 
2787  if (saver) {
2788  saver->changed(this);
2789  }
2790 
2791  emit valueChanged(m_Value, incIndex(1));
2792  }
2793 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
QcepPolygon m_Value
Definition: qcepproperty.h:596
QMutex m_Mutex
Definition: qcepproperty.h:69
int incIndex(int step)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
QSharedPointer< QcepSettingsSaver > QcepSettingsSaverPtr
int debug() const
QcepSettingsSaverWPtr m_Saver
Definition: qcepproperty.h:70
void valueChanged(QcepPolygon val, int index)

Here is the call graph for this function:

QcepPolygon QcepPolygonProperty::value ( ) const

Definition at line 2742 of file qcepproperty.cpp.

References QcepProperty::m_Mutex, and m_Value.

Referenced by appendValue().

2743 {
2744  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2745 
2746  return m_Value;
2747 }
QcepPolygon m_Value
Definition: qcepproperty.h:596
QMutex m_Mutex
Definition: qcepproperty.h:69

Here is the caller graph for this function:

void QcepPolygonProperty::valueChanged ( QcepPolygon  val,
int  index 
)
signal

Referenced by setValue().

Here is the caller graph for this function:

Member Data Documentation

QcepPolygon QcepPolygonProperty::m_Default
private

Definition at line 595 of file qcepproperty.h.

Referenced by defaultValue(), and setDefaultValue().

QcepPolygon QcepPolygonProperty::m_Value
private

Definition at line 596 of file qcepproperty.h.

Referenced by setValue(), and value().


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