te::qt::widgets::GraphicDialog Class Reference

A dialog used to build a graphic element. If you want to use this dialog, you can use commands like: te::se::Graphic* g = te::qt::widgets::GraphicDialog::getGraphic(0, parent, "Title"); ... delete g; More...

#include <GraphicDialog.h>

Inheritance diagram for te::qt::widgets::GraphicDialog:

Public Member Functions

te::se::GraphicgetGraphic () const
 Gets the configured graphic element. More...
 
QIcon getGraphicIcon (const QSize &size)
 Gets the current graphic icon. More...
 
void setGraphic (const te::se::Graphic *graphic)
 Sets the graphic element. More...
 
Initializer Methods

Methods related to instantiation and destruction.

 GraphicDialog (QWidget *parent=0, Qt::WindowFlags f=0)
 Constructs a graphic dialog which is a child of parent, with widget flags set to f. More...
 
 ~GraphicDialog ()
 Destructor. More...
 

Static Public Member Functions

static te::se::GraphicgetGraphic (const te::se::Graphic *initial, QWidget *parent=0, const QString &title="")
 Pops up a modal graphic dialog with the given window title, lets the user configure the graphic, and returns that graphic. The graphic is initially set to initial. The dialog is a child of parent. More...
 

Private Attributes

GraphicSelectorWidgetm_graphicSelector
 Graphic selector widget used to select the graphic. More...
 
std::auto_ptr< Ui::GraphicDialogForm > m_ui
 Dialog form. More...
 

Detailed Description

A dialog used to build a graphic element. If you want to use this dialog, you can use commands like: te::se::Graphic* g = te::qt::widgets::GraphicDialog::getGraphic(0, parent, "Title"); ... delete g;

Definition at line 69 of file GraphicDialog.h.

Constructor & Destructor Documentation

te::qt::widgets::GraphicDialog::GraphicDialog ( QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)

Constructs a graphic dialog which is a child of parent, with widget flags set to f.

te::qt::widgets::GraphicDialog::~GraphicDialog ( )

Destructor.

Member Function Documentation

static te::se::Graphic* te::qt::widgets::GraphicDialog::getGraphic ( const te::se::Graphic initial,
QWidget *  parent = 0,
const QString &  title = "" 
)
static

Pops up a modal graphic dialog with the given window title, lets the user configure the graphic, and returns that graphic. The graphic is initially set to initial. The dialog is a child of parent.

Parameters
initialA initial graphic element that will be used. The dialog form will be update based on graphic element parameters. It can be NULL.
parentDialog parent.
titleDialog title.
Note
The dialog will NOT take the ownership of the given initial graphic.
The caller will take the ownership of the returned graphic.
It returns a NULL graphic element if the user cancels the dialog.
te::se::Graphic* te::qt::widgets::GraphicDialog::getGraphic ( ) const

Gets the configured graphic element.

Returns
The configured graphic element.
Note
The caller will take the ownership of the returned graphic.
QIcon te::qt::widgets::GraphicDialog::getGraphicIcon ( const QSize &  size)

Gets the current graphic icon.

Parameters
sizeThe icon size that will be generated.
Returns
An icon that represents the graphic. i.e. a simple preview.
void te::qt::widgets::GraphicDialog::setGraphic ( const te::se::Graphic graphic)

Sets the graphic element.

Returns
The graphic element.
Note
The dialog will NOT take the ownership of the given graphic.

Member Data Documentation

GraphicSelectorWidget* te::qt::widgets::GraphicDialog::m_graphicSelector
private

Graphic selector widget used to select the graphic.

Definition at line 133 of file GraphicDialog.h.

std::auto_ptr<Ui::GraphicDialogForm> te::qt::widgets::GraphicDialog::m_ui
private

Dialog form.

Definition at line 132 of file GraphicDialog.h.


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