Property editor widget for editing CRef. More...
#include <refproperty.h>
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< CPdf > | |
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
| gui::RefProperty::RefProperty | ( | const QString & | _name, | |
| QWidget * | parent = 0, |
|||
| PropertyFlags | _flags = defaultPropertyMode | |||
| ) |
Default constructor of property item
| 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
| void gui::RefProperty::applyReadOnly | ( | bool | _readonly | ) | [virtual] |
Apply this value of "read only" to the property
| _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
| 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
References pb.
| bool gui::RefProperty::isValid | ( | ) | [virtual] |
Check if edited property is currently valid.
Implements gui::Property.
| void gui::RefProperty::readValue | ( | IProperty * | pdfObject | ) | [virtual] |
read internal value from given PDF object
| pdfObject | Object to read from |
Implements gui::Property.
| void gui::RefProperty::resizeEvent | ( | QResizeEvent * | e | ) |
Called on resizing of property editing control
| 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
| 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
| _pdf | CPdf to set |
| void gui::RefProperty::setValue | ( | IProperty * | pdfObject | ) | [virtual] |
write internal value to given PDF object
| pdfObject | Object to write to |
Implements gui::Property.
| QSize gui::RefProperty::sizeHint | ( | ) | const [virtual] |
return size hint of this property editing control
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