te::qt::widgets::SymbolSelectorDialog Class Reference

A dialog used to select a specific symbol. More...

#include <SymbolSelectorDialog.h>

Inheritance diagram for te::qt::widgets::SymbolSelectorDialog:

Public Member Functions

SymbolgetSymbol () const
 Gets the selected symbol. More...
 
Initializer Methods

Methods related to instantiation and destruction.

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

Static Public Member Functions

static SymbolgetSymbol (QWidget *parent, const QString &title="")
 Pops up a modal symbol selector dialog with the given window title, lets the user select a symbol, and returns that symbol. More...
 

Private Types

enum  NodeType { LIBRARY = 0, SYMBOL = 1 }
 Auxiliary internal enumeration to control the tree nodes. More...
 

Private Slots

void onCurrentItemChanged (QTreeWidgetItem *current, QTreeWidgetItem *previous)
 
void onLoadSymbolLibraryPushButtonPressed ()
 
void onSearchLineEditTextChanged (const QString &text)
 
void onShowSymbolInfoPushButtonPressed ()
 

Private Member Functions

void filter (const QList< QTreeWidgetItem * > &items)
 Auxiliary internal method to filter the symbols. More...
 
QString formatSymbolInfo (const SymbolInfo &info) const
 Auxiliary internal method to format a symbol info to be used on tool tips. More...
 
SymbolgetSelectedSymbol () const
 Auxiliary internal method that returns the selected symbol. More...
 
SymbolgetSymbolFromItem (QTreeWidgetItem *item) const
 Auxiliary internal method that returns the symbol given a list widget item. More...
 
void initialize ()
 Initialize the dialog. More...
 

Private Attributes

SymbolPreviewWidgetm_preview
 Preview Widget used to visualize the symbol. More...
 
std::auto_ptr< Ui::SymbolSelectorDialogForm > m_ui
 Dialog form. More...
 

Detailed Description

A dialog used to select a specific symbol.

Definition at line 58 of file SymbolSelectorDialog.h.

Member Enumeration Documentation

Auxiliary internal enumeration to control the tree nodes.

Enumerator
LIBRARY 

Library root node.

SYMBOL 

Symbol node.

Definition at line 69 of file SymbolSelectorDialog.h.

Constructor & Destructor Documentation

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

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

te::qt::widgets::SymbolSelectorDialog::~SymbolSelectorDialog ( )

Destructor.

Member Function Documentation

void te::qt::widgets::SymbolSelectorDialog::filter ( const QList< QTreeWidgetItem * > &  items)
private

Auxiliary internal method to filter the symbols.

QString te::qt::widgets::SymbolSelectorDialog::formatSymbolInfo ( const SymbolInfo info) const
private

Auxiliary internal method to format a symbol info to be used on tool tips.

Symbol* te::qt::widgets::SymbolSelectorDialog::getSelectedSymbol ( ) const
private

Auxiliary internal method that returns the selected symbol.

static Symbol* te::qt::widgets::SymbolSelectorDialog::getSymbol ( QWidget *  parent,
const QString &  title = "" 
)
static

Pops up a modal symbol selector dialog with the given window title, lets the user select a symbol, and returns that symbol.

Parameters
parentDialog parent.
titleDialog title.
Note
The caller will take the ownership of the returned symbol.
It returns a NULL pointr if the user cancels the dialog.
It return a NULL pointer if there is not a selected symbol.
Symbol* te::qt::widgets::SymbolSelectorDialog::getSymbol ( ) const

Gets the selected symbol.

Returns
The selected fill element.
Note
The caller will take the ownership of the returned symbol.
It return a NULL pointer if there is not a selected symbol.
Symbol* te::qt::widgets::SymbolSelectorDialog::getSymbolFromItem ( QTreeWidgetItem *  item) const
private

Auxiliary internal method that returns the symbol given a list widget item.

void te::qt::widgets::SymbolSelectorDialog::initialize ( )
private

Initialize the dialog.

void te::qt::widgets::SymbolSelectorDialog::onCurrentItemChanged ( QTreeWidgetItem *  current,
QTreeWidgetItem *  previous 
)
privateslot
void te::qt::widgets::SymbolSelectorDialog::onLoadSymbolLibraryPushButtonPressed ( )
privateslot
void te::qt::widgets::SymbolSelectorDialog::onSearchLineEditTextChanged ( const QString &  text)
privateslot
void te::qt::widgets::SymbolSelectorDialog::onShowSymbolInfoPushButtonPressed ( )
privateslot

Member Data Documentation

SymbolPreviewWidget* te::qt::widgets::SymbolSelectorDialog::m_preview
private

Preview Widget used to visualize the symbol.

Definition at line 143 of file SymbolSelectorDialog.h.

std::auto_ptr<Ui::SymbolSelectorDialogForm> te::qt::widgets::SymbolSelectorDialog::m_ui
private

Dialog form.

Definition at line 142 of file SymbolSelectorDialog.h.


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