Dialog to pick reference target. More...
#include <refpropertydialog.h>
Public Member Functions | |
| RefPropertyDialog (boost::weak_ptr< CPdf > _pdf, IndiRef src, QWidget *parent=0) | |
| ~RefPropertyDialog () | |
| QString | getResult () |
Private Slots | |
| void | maybeAccept () |
| void | setNum (const QString &text) |
| void | setGen (const QString &text) |
Private Member Functions | |
| void | message (const QString &message) |
| void | error (const QString &message) |
| bool | check (bool sayIfOk=true) |
Private Attributes | |
| IndiRef | value |
| boost::weak_ptr< CPdf > | |
| QLabel * | infoText |
Dialog to pick reference target.
Dialog allowing to select reference target in some "interactive way"
| gui::RefPropertyDialog::RefPropertyDialog | ( | boost::weak_ptr< CPdf > | _pdf, | |
| IndiRef | src, | |||
| QWidget * | parent = 0 | |||
| ) |
Default constructor of reference picker dialog
| _pdf | Pdf in which is the reference | |
| src | original value of indirect refrence | |
| parent | Parent widget that called dialog |
References check(), pdfobjects::IndiRef::gen, infoText, maybeAccept(), pdfobjects::IndiRef::num, pdf, setGen(), setNum(), and value.
| gui::RefPropertyDialog::~RefPropertyDialog | ( | ) |
default destructor
| bool gui::RefPropertyDialog::check | ( | bool | sayIfOk = true |
) | [private] |
Check stored value for validity, return true if valid, otherwise display an error message and return false.
| sayIfOk | If set to false, no message will be output if the property is valid |
References error(), util::getTypeName(), pdfobjects::isRefValid(), message(), pdf, util::propertyPreview(), and value.
Referenced by maybeAccept(), RefPropertyDialog(), setGen(), and setNum().
| void gui::RefPropertyDialog::error | ( | const QString & | message | ) | [private] |
| QString gui::RefPropertyDialog::getResult | ( | ) |
Return result of this dialog as string
References pdfobjects::IndiRef::gen, pdfobjects::IndiRef::num, and value.
| void gui::RefPropertyDialog::maybeAccept | ( | ) | [private, slot] |
If input values are ok, call accept(), otherwise display an error message
References check().
Referenced by RefPropertyDialog().
| void gui::RefPropertyDialog::message | ( | const QString & | message | ) | [private] |
| void gui::RefPropertyDialog::setGen | ( | const QString & | text | ) | [private, slot] |
Set generation number - called from corresponing edit control
| text | value to set |
References check(), pdfobjects::IndiRef::gen, and value.
Referenced by RefPropertyDialog().
| void gui::RefPropertyDialog::setNum | ( | const QString & | text | ) | [private, slot] |
Set reference number - called from corresponing edit control
| text | value to set |
References check(), pdfobjects::IndiRef::num, and value.
Referenced by RefPropertyDialog().
QLabel* gui::RefPropertyDialog::infoText [private] |
Label to show errors/messages
Referenced by error(), message(), and RefPropertyDialog().
boost::weak_ptr<CPdf> gui::RefPropertyDialog::pdf [private] |
Pdf document with reference
Referenced by check(), and RefPropertyDialog().
IndiRef gui::RefPropertyDialog::value [private] |
Current value
Referenced by check(), getResult(), RefPropertyDialog(), setGen(), and setNum().