gui::RefPropertyDialog Class Reference

Dialog to pick reference target. More...

#include <refpropertydialog.h>

List of all members.

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< CPdfpdf
QLabel * infoText

Detailed Description

Dialog to pick reference target.

Dialog allowing to select reference target in some "interactive way"


Constructor & Destructor Documentation

gui::RefPropertyDialog::RefPropertyDialog ( boost::weak_ptr< CPdf _pdf,
IndiRef  src,
QWidget *  parent = 0 
)

Default constructor of reference picker dialog

Parameters:
_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


Member Function Documentation

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.

Parameters:
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]

Show error message for this window

Parameters:
message message to show

References infoText.

Referenced by check().

QString gui::RefPropertyDialog::getResult (  ) 

Return result of this dialog as string

Returns:
reference 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]

Show informational message for this window

Parameters:
message message to show

References infoText.

Referenced by check().

void gui::RefPropertyDialog::setGen ( const QString &  text  )  [private, slot]

Set generation number - called from corresponing edit control

Parameters:
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

Parameters:
text value to set

References check(), pdfobjects::IndiRef::num, and value.

Referenced by RefPropertyDialog().


Member Data Documentation

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().

Current value

Referenced by check(), getResult(), RefPropertyDialog(), setGen(), and setNum().


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