Provide a dialog that allow user to create a new property.
More...
#include <PropertyCreationDialog.h>
List of all members.
Public Member Functions |
| PropertyCreationDialog (QWidget *parent=0) |
| Constructs a property creation dialog with the given parent.
|
| PropertyCreationDialog (tlp::Graph *graph, QWidget *parent=0) |
| Constructs a property creation dialog with the given parent graph and parent widget.
|
| ~PropertyCreationDialog () |
void | accept () |
| Try to create a new property from the givent parameters. To get the created property use the createdProperty() function.
|
void | setGraph (tlp::Graph *graph) |
| Change the graph to use as parent for the properties to create.
|
tlp::Graph * | getGraph () const |
tlp::PropertyInterface * | createdProperty () const |
| Return the property created. You need to call this function after the accept() function.
|
Static Public Member Functions |
static PropertyInterface * | createNewProperty (tlp::Graph *graph, QWidget *parent=NULL) |
| This is a convenience static function that create a new property using user parameters. If the user presses Cancel or an error occur, it returns a null pointer.
|
Detailed Description
Provide a dialog that allow user to create a new property.
The easiest way to use this class is to use the static function.
Graph* g;
QWidget* parent;
Constructor & Destructor Documentation
tlp::PropertyCreationDialog::PropertyCreationDialog |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
Constructs a property creation dialog with the given parent.
tlp::PropertyCreationDialog::PropertyCreationDialog |
( |
tlp::Graph * |
graph, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
|
explicit |
Constructs a property creation dialog with the given parent graph and parent widget.
tlp::PropertyCreationDialog::~PropertyCreationDialog |
( |
| ) |
|
Member Function Documentation
void tlp::PropertyCreationDialog::accept |
( |
| ) |
|
Try to create a new property from the givent parameters. To get the created property use the createdProperty() function.
tlp::PropertyInterface* tlp::PropertyCreationDialog::createdProperty |
( |
| ) |
const |
|
inline |
Return the property created. You need to call this function after the accept() function.
- Returns:
- The last created property or NULL if no property there is an error during the property creation.
static PropertyInterface* tlp::PropertyCreationDialog::createNewProperty |
( |
tlp::Graph * |
graph, |
|
|
QWidget * |
parent = NULL |
|
) |
| |
|
static |
This is a convenience static function that create a new property using user parameters. If the user presses Cancel or an error occur, it returns a null pointer.
The function creates a modal property creation dialog with the given graph and parent widget.
- Parameters:
-
graph | The graph to use as parent for the properties to create. |
tlp::Graph* tlp::PropertyCreationDialog::getGraph |
( |
| ) |
const |
|
inline |
void tlp::PropertyCreationDialog::setGraph |
( |
tlp::Graph * |
graph | ) |
|
Change the graph to use as parent for the properties to create.