gui::RefProperty Class Reference

Property editor widget for editing CRef. More...

#include <refproperty.h>

Inheritance diagram for gui::RefProperty:
gui::Property

List of all members.

Public Member Functions

 RefProperty (const QString &_name, QWidget *parent=0, PropertyFlags _flags=defaultPropertyMode)
virtual QSize sizeHint () const
void resizeEvent (QResizeEvent *e)
virtual ~RefProperty ()
virtual void setValue (IProperty *pdfObject)
virtual void readValue (IProperty *pdfObject)
virtual void setDisabled (bool disabled)
virtual void applyReadOnly (bool _readonly)
virtual bool isValid ()
IndiRef getValue ()
void setPdf (boost::weak_ptr< CPdf > _pdf)

Protected Slots

void selectRef ()
void emitChange ()
void enableChange (const QString &newText)

Private Attributes

QLineEdit * ed
QPushButton * pb
boost::weak_ptr< CPdfpdf

Detailed Description

Property editor widget for editing CRef.

RefProperty - class for widget containing one editable property of type "Ref"
Represented by editable line and button allowing to pick reference target from the list
Used as one item in property editor


Constructor & Destructor Documentation

gui::RefProperty::RefProperty ( const QString &  _name,
QWidget *  parent = 0,
PropertyFlags  _flags = defaultPropertyMode 
)

Default constructor of property item

Parameters:
parent parent Property Editor containing this control
_name name of this property
_flags flags of this property items (default 0)
gui::RefProperty::~RefProperty (  )  [virtual]

default destructor


Member Function Documentation

void gui::RefProperty::applyReadOnly ( bool  _readonly  )  [virtual]

Apply this value of "read only" to the property

Parameters:
_readonly True for read-only, false for read-write

Implements gui::Property.

void gui::RefProperty::emitChange (  )  [protected, slot]

Called when text is accepted -> will emit signal informing about change

void gui::RefProperty::enableChange ( const QString &  newText  )  [protected, slot]

Called when text changes

Parameters:
newText value of new text

IndiRef gui::RefProperty::getValue (  ) 

Read the string in this property and return indirect reference parsed from it If the string is invalid, both num and gen are set to -1

Returns:
Indirect reference

References pb.

bool gui::RefProperty::isValid (  )  [virtual]

Check if edited property is currently valid.

Returns:
true if valid, false if not

Implements gui::Property.

void gui::RefProperty::readValue ( IProperty pdfObject  )  [virtual]

read internal value from given PDF object

Parameters:
pdfObject Object to read from

Implements gui::Property.

void gui::RefProperty::resizeEvent ( QResizeEvent *  e  ) 

Called on resizing of property editing control

Parameters:
e resize event containing new widget size

void gui::RefProperty::selectRef (  )  [protected, slot]

Invoked when someone pushes the ".." button

void gui::RefProperty::setDisabled ( bool  disabled  )  [virtual]

Disable this control

Parameters:
disabled True to disable, false to enable

Implements gui::Property.

void gui::RefProperty::setPdf ( boost::weak_ptr< CPdf _pdf  ) 

Set PDF explicitly for this property for purpose of validating references
This is usable if the property is new and does not have the pdf document from the edited CRef

Parameters:
_pdf CPdf to set
void gui::RefProperty::setValue ( IProperty pdfObject  )  [virtual]

write internal value to given PDF object

Parameters:
pdfObject Object to write to

Implements gui::Property.

QSize gui::RefProperty::sizeHint (  )  const [virtual]

return size hint of this property editing control

Returns:
preferred size for this widget


Member Data Documentation

QLineEdit* gui::RefProperty::ed [private]

one line edit control used for editing the value

QPushButton* gui::RefProperty::pb [private]

Push button for GUI selection

Referenced by getValue().

boost::weak_ptr<CPdf> gui::RefProperty::pdf [private]

PDF stored for validating references


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