gui::AddItemDialog Class Reference
Dialog for adding items to Dictionaries or Arrays.
More...
#include <additemdialog.h>
List of all members.
Detailed Description
Dialog for adding items to Dictionaries or Arrays.
Class representing dialog for adding new item to Dictionary/array
Dialog does not block focus of main window and you can have multiple of them opened simultaneously (even for same Dict / Array)
Dialog closes itself, when the relevant document is closed
Constructor & Destructor Documentation
| gui::AddItemDialog::~AddItemDialog |
( |
|
) |
|
| gui::AddItemDialog::AddItemDialog |
( |
QWidget * |
parent = 0, |
|
|
const char * |
name = 0 | |
|
) |
| | [protected] |
constructor of AddItemDialog, creates window and fills it with elements, parameters are ignored
- Parameters:
-
| parent | Parent window of this dialog |
| name | Name of this window (used only for debugging |
References gui::addDialogPropertyTypes, util::getTypeName(), gui::globalSettings, pdfobjects::pArray, pdfobjects::pBool, pdfobjects::pDict, pdfobjects::pInt, pdfobjects::pName, pdfobjects::pReal, pdfobjects::pRef, pdfobjects::pString, Q_ButtonGroup, and gui::Settings::restoreWindow().
Referenced by message().
Member Function Documentation
| void gui::AddItemDialog::buttonSelected |
( |
int |
id |
) |
[protected, slot] |
Set given radiobutton as selected
- Parameters:
-
| bool gui::AddItemDialog::commit |
( |
|
) |
[protected, slot] |
Adds the item, but keep the window open, so user can easily modify value and add another similar item.
- Returns:
- true if successfull, false if cannot commit because of some errors in user-entered data
| void gui::AddItemDialog::commitClose |
( |
|
) |
[protected, slot] |
Adds the item and closes window
| AddItemDialog * gui::AddItemDialog::create |
( |
QWidget * |
parent, |
|
|
boost::shared_ptr< CArray > |
cont | |
|
) |
| | [static] |
Create dialog for adding objects (IProperty) to specified Array Returns immediately, but the dialog will remain opened.
- Parameters:
-
| parent | Parent window of this dialog |
| cont | Array into which to add properties |
- Returns:
- pointer to newly opened dialog instance
| AddItemDialog * gui::AddItemDialog::create |
( |
QWidget * |
parent, |
|
|
boost::shared_ptr< CDict > |
cont | |
|
) |
| | [static] |
Create dialog for adding objects (IProperty) to specified Dictionary
Returns immediately, but the dialog will remain opened.
- Parameters:
-
| parent | Parent window of this dialog |
| cont | Dict into which to add properties |
- Returns:
- pointer to newly opened dialog instance
| void gui::AddItemDialog::error |
( |
const QString & |
message |
) |
[protected] |
Show error message for this window
- Parameters:
-
| void gui::AddItemDialog::itemDeleted |
( |
boost::shared_ptr< IProperty > |
it |
) |
[slot] |
Called whenever item in main window is deleted. If the item matches the item in which we are adding, close the dialog
- Parameters:
-
Referenced by message().
| void gui::AddItemDialog::message |
( |
const QString & |
message |
) |
[protected] |
| void gui::AddItemDialog::posEndSet |
( |
bool |
on |
) |
[protected, slot] |
This slot is called when state of the "insert at end" radiobox is changed
- Parameters:
-
| on | True of it was checked as "on" |
| void gui::AddItemDialog::posNumSet |
( |
bool |
on |
) |
[protected, slot] |
This slot is called when state of the "insert at position" radiobox is changed
- Parameters:
-
| on | True of it was checked as "on" |
| void gui::AddItemDialog::setItem |
( |
boost::shared_ptr< IProperty > |
it |
) |
[protected] |
Set item into which newly created objects will be added and also initialize items in this control
Must be called exactly once before showing the control and must not be called after that
- Parameters:
-
| it | Dict or Array into which properties will be added |
Referenced by message().
Member Data Documentation
Edit box for editing array position at which the element should be inserted
Object (Dict or Array) into which any subitems will be added
Array with property names (selectors)
General layout of this widget
Label used to show message
Pdf document (for validating reference)
Radiobutton for appending at end of array
Radiobutton for inserting at arbitrary position in array
Name of new property, if adding to Dict
Index of item that is selected for editing
Settings used to save dialog position (dict/array) - this is useful, as these can have different sizes
Frame containing controls to select name of new property (Dict) or end of array for appending (Array)
The documentation for this class was generated from the following files: