GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Slots | Signals | Public Member Functions | Public Attributes | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
QGoTraceSettingsWidget Class Reference

this class contains all the comboboxes for collectionID,color, celltypes and subcelltypes, and displays the trace and collection name. More...

#include <Code/GUI/lib/QGoTraceSettingsWidget.h>

Inheritance diagram for QGoTraceSettingsWidget:
Inheritance graph
[legend]
Collaboration diagram for QGoTraceSettingsWidget:
Collaboration graph
[legend]

Public Types

typedef
QGoColorComboBox::ItemColorComboboxData 
ItemColorComboboxData
 
typedef std::vector< std::pair
< std::string, std::string > > 
NamesDescrContainerType
 

Public Slots

void AddANewCollectionID (std::pair< std::string, QColor > iNewCollectionID)
 add a new collection in the collectionColorCombobox and select it More...
 
void SetSelectedPointersToNull ()
 in order the pointers already deleted are not deleted again More...
 

Signals

void AddANewCellType ()
 
void AddANewSubCellType ()
 
void AddNewColor ()
 
void DeleteCellType ()
 
void DeleteColor ()
 
void DeleteSubCellType ()
 
void NewCollectionToBeCreated ()
 
void TraceChanged (int)
 

Public Member Functions

unsigned int GetCurrentSelectedCollectionID ()
 
ItemColorComboboxDataGetPointerCollectionData ()
 
ItemColorComboboxDataGetPointerColorData ()
 
std::string * GetPointerSelectedCellType ()
 
std::string * GetPointerSelectedSubCellType ()
 
std::string GetTraceName ()
 get the name of the trace currently displayed in the QLabel More...
 
 QGoTraceSettingsWidget (QWidget *parent=0)
 
void SetCurrentCellType (std::string iCellTypeText)
 set the selected celltype in the combobox corresponding to iCellTypeText More...
 
void SetCurrentCellTypeToSelectedOne ()
 set the selected subcelltype in the combobox corresponding to the previous selected one, stored in m_SelectedSubCellType More...
 
void SetCurrentCollectionID (std::string iID)
 set the selected collectionID in the combobox to iID More...
 
void SetCurrentColor (std::string iColorText)
 set the selected color in the combobox corresponding to iColorText More...
 
void SetCurrentColorToSelectedOne ()
 set the selected color in the combobox corresponding to the previous selected one, stored in m_SelectedColorData More...
 
void SetCurrentSubCellType (std::string iSubCellTypeText)
 set the selected subcelltype in the combobox corresponding to iSubCellTypeText More...
 
void SetCurrentSubCellTypeToSelectedOne ()
 set the selected subcelltype in the combobox corresponding to the previous selected one, stored in m_SelectedSubCellType More...
 
void SetCurrentTraceName (std::string iTraceName)
 
void SetListCellTypes (NamesDescrContainerType iCellTypesData, std::string iCellTypeToSelect="")
 replace the list of celltype with the names in the iCellTypesData and select the celltype corresponding to iCellTypetoSelect if not empty, if empty, select the 1rst one. More...
 
void SetListCellTypeWithSelectedOne (NamesDescrContainerType iCellTypesData)
 replace the list of celltype with the name in the iCellTypesData and select the celltype corresponding to m_SelectedCelltype More...
 
void SetListCollectionID (std::list< ItemColorComboboxData > iListExistingID, std::string iCollectionIDtoSelect="")
 update the QLabel with iTrace and iCollection, the "add a new.." in the CollectionColorComboBox and hide/show the celltype and subcelltype comboboxes according to the iTrace More...
 
void SetListColors (std::list< ItemColorComboboxData > iListColors, std::string iColorToSelect="")
 replace the list of colors with the name and corresponding color in the iListColors and select the color corresponding to iColortoSelect if not empty, if empty, select the 1rst one More...
 
void SetListColorsWithSelectedOne (std::list< ItemColorComboboxData > iListColors)
 replace the list of colors with the name and corresponding color in the iListColors and select the color corresponding to m_SelectedColorData More...
 
void SetListSubCellTypes (NamesDescrContainerType iSubCellData, std::string iSubCellTypeToSelect="")
 replace the list of subcelltype with the names in the iSubCellTypesData and select the subcelltype corresponding to iSubCellTypetoSelect if not empty, if empty, select the 1rst one. More...
 
void SetListSubCellTypeWithSelectedOne (NamesDescrContainerType iSubCellTypesData)
 replace the list of subcelltype with the name in the iSubCellTypesData and select the subcelltype corresponding to m_SelectedSubCelltype More...
 
void SetPointerCollectionData (ItemColorComboboxData *iCollectionData)
 
void SetPointerColorData (ItemColorComboboxData *iColorData)
 
void SetPointerSelectedCellType (std::string *iCellType)
 
void SetPointerSelectedSubCellType (std::string *iSubCellType)
 
 ~QGoTraceSettingsWidget ()
 

Public Attributes

QGoComboBoxm_ChoseCellType
 
QGoComboBoxm_ChoseSubCellType
 
QGoCollectionColorComboBoxm_CollectionColorComboBox
 
QGoSelectedColorComboBoxm_SelectedColorComboBox
 
QComboBox * m_SelectedTrace
 

Protected Slots

void CurrentTraceToUpdate (int iIndex)
 
void UpdateValueSelectedCellType (std::string iCellType)
 
void UpdateValueSelectedCollection (ItemColorComboboxData iCollectionData)
 
void UpdateValueSelectedColor (ItemColorComboboxData iColorData)
 
void UpdateValueSelectedSubCellType (std::string iSubCellType)
 

Protected Member Functions

void SetCellTypeComboBox (QHBoxLayout *iCellLayout)
 add the Celltype QGoCombobox to the layout and make the signal/slot connections for it More...
 
template<typename T >
void SetListItemAndSelect (T *iComboBox, NamesDescrContainerType iItemsData, std::string iTextItemToSelect="")
 call the right methods to initialize the list if there is no iTextItemToSelect or select the iTextItemToSelect if not empty. More...
 
template<typename T >
void SetListItemAndSelect (T *iComboBox, std::list< ItemColorComboboxData > iItemsData, std::string iTextItemToSelect="")
 
void SetSelectedColorComboBox (QHBoxLayout *iColorLayout)
 add the SelectedColorCombobox to the layout and make the signal/slot connections for it More...
 
void SetSubCellTypeComboBox (QHBoxLayout *iSubCellLayout)
 add the SubCellType QGoCombobox to the layout and make the signal/slot connections for it More...
 
void SetTraceCollectionColorComboBox (QHBoxLayout *iLayoutTraceCollection, QLabel *iLabel)
 add the CollectionColorCombobox to the layout,set the trace and collection name labels, and make the signal/slot connections for it More...
 
void SetUpUi ()
 
void SetWidgetFont ()
 
void UpdateCollection (std::string iCollection)
 

Protected Attributes

QLabel * m_CollectionName
 
QLabel * m_LabelCellType
 
QLabel * m_LabelSubCellType
 
std::string * m_SelectedCellType
 
ItemColorComboboxDatam_SelectedCollectionData
 
ItemColorComboboxDatam_SelectedColorData
 
std::string * m_SelectedSubCellType
 

Detailed Description

this class contains all the comboboxes for collectionID,color, celltypes and subcelltypes, and displays the trace and collection name.

Definition at line 56 of file QGoTraceSettingsWidget.h.

Member Typedef Documentation

Definition at line 64 of file QGoTraceSettingsWidget.h.

typedef std::vector< std::pair< std::string, std::string > > QGoTraceSettingsWidget::NamesDescrContainerType

Definition at line 66 of file QGoTraceSettingsWidget.h.

Constructor & Destructor Documentation

QGoTraceSettingsWidget::QGoTraceSettingsWidget ( QWidget *  parent = 0)
explicit

Definition at line 45 of file QGoTraceSettingsWidget.cxx.

QGoTraceSettingsWidget::~QGoTraceSettingsWidget ( )

Definition at line 56 of file QGoTraceSettingsWidget.cxx.

Member Function Documentation

void QGoTraceSettingsWidget::AddANewCellType ( )
signal
void QGoTraceSettingsWidget::AddANewCollectionID ( std::pair< std::string, QColor >  iNewCollectionID)
slot

add a new collection in the collectionColorCombobox and select it

Parameters
[in]iNewCollectionIDID and QColor of the new item

Definition at line 482 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::AddANewSubCellType ( )
signal
void QGoTraceSettingsWidget::AddNewColor ( )
signal
void QGoTraceSettingsWidget::CurrentTraceToUpdate ( int  iIndex)
protectedslot

brief update the correspodning collection when the current trace has been changed and emit a signal that the trace has been changed

Definition at line 580 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::DeleteCellType ( )
signal
void QGoTraceSettingsWidget::DeleteColor ( )
signal
void QGoTraceSettingsWidget::DeleteSubCellType ( )
signal
unsigned int QGoTraceSettingsWidget::GetCurrentSelectedCollectionID ( )

Definition at line 573 of file QGoTraceSettingsWidget.cxx.

QGoTraceSettingsWidget::ItemColorComboboxData * QGoTraceSettingsWidget::GetPointerCollectionData ( )

Definition at line 508 of file QGoTraceSettingsWidget.cxx.

QGoTraceSettingsWidget::ItemColorComboboxData * QGoTraceSettingsWidget::GetPointerColorData ( )

Definition at line 517 of file QGoTraceSettingsWidget.cxx.

std::string * QGoTraceSettingsWidget::GetPointerSelectedCellType ( )

Definition at line 491 of file QGoTraceSettingsWidget.cxx.

std::string * QGoTraceSettingsWidget::GetPointerSelectedSubCellType ( )

Definition at line 499 of file QGoTraceSettingsWidget.cxx.

std::string QGoTraceSettingsWidget::GetTraceName ( )

get the name of the trace currently displayed in the QLabel

Returns
std::string contains the name of the trace

Definition at line 474 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::NewCollectionToBeCreated ( )
signal
void QGoTraceSettingsWidget::SetCellTypeComboBox ( QHBoxLayout *  iCellLayout)
protected

add the Celltype QGoCombobox to the layout and make the signal/slot connections for it

Definition at line 289 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetCurrentCellType ( std::string  iCellTypeText)

set the selected celltype in the combobox corresponding to iCellTypeText

Parameters
[in]iCellTypeTextname of the CellType to be selected

Definition at line 355 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetCurrentCellTypeToSelectedOne ( )

set the selected subcelltype in the combobox corresponding to the previous selected one, stored in m_SelectedSubCellType

Definition at line 364 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetCurrentCollectionID ( std::string  iID)

set the selected collectionID in the combobox to iID

Parameters
[in]iIDID of the collection to be selected

Definition at line 405 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetCurrentColor ( std::string  iColorText)

set the selected color in the combobox corresponding to iColorText

Parameters
[in]iColorTextname of the Color to be selected

Definition at line 389 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetCurrentColorToSelectedOne ( )

set the selected color in the combobox corresponding to the previous selected one, stored in m_SelectedColorData

Definition at line 397 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetCurrentSubCellType ( std::string  iSubCellTypeText)

set the selected subcelltype in the combobox corresponding to iSubCellTypeText

Parameters
[in]iSubCellTypeTextname of the SubCellType to be selected

Definition at line 372 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetCurrentSubCellTypeToSelectedOne ( )

set the selected subcelltype in the combobox corresponding to the previous selected one, stored in m_SelectedSubCellType

Definition at line 381 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetCurrentTraceName ( std::string  iTraceName)

Definition at line 666 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetListCellTypes ( NamesDescrContainerType  iCellTypesData,
std::string  iCellTypeToSelect = "" 
)

replace the list of celltype with the names in the iCellTypesData and select the celltype corresponding to iCellTypetoSelect if not empty, if empty, select the 1rst one.

Parameters
[in]iCellTypesDatalist of celltypes with their names and description to be displayed
[in]iCellTypeToSelectname of the celltype to be selected in the combobox

Definition at line 155 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetListCellTypeWithSelectedOne ( NamesDescrContainerType  iCellTypesData)

replace the list of celltype with the name in the iCellTypesData and select the celltype corresponding to m_SelectedCelltype

Parameters
[in]iCellTypesDatalist of celltypes with their names and description to be displayed

Definition at line 167 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetListCollectionID ( std::list< ItemColorComboboxData iListExistingID,
std::string  iCollectionIDtoSelect = "" 
)

update the QLabel with iTrace and iCollection, the "add a new.." in the CollectionColorComboBox and hide/show the celltype and subcelltype comboboxes according to the iTrace

Parameters
[in]iTracename of the trace to update
[in]iCollectionname of the collection to update replace the list of collectionID with the ID and corresponding color in the iListExistingID and select the ID corresponding to iCollectionIDtoSelect if not empty, if empty, select the 1rst one
[in]iListExistingIDlist of IDs with QColor to be displayed
[in]iCollectionIDtoSelectID to be selected in the combobox

Definition at line 106 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetListColors ( std::list< ItemColorComboboxData iListColors,
std::string  iColorToSelect = "" 
)

replace the list of colors with the name and corresponding color in the iListColors and select the color corresponding to iColortoSelect if not empty, if empty, select the 1rst one

Parameters
[in]iListColorslist of colors with their names and QColor to be displayed
[in]iColorToSelectname of the color to be selected in the combobox

Definition at line 134 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetListColorsWithSelectedOne ( std::list< ItemColorComboboxData iListColors)

replace the list of colors with the name and corresponding color in the iListColors and select the color corresponding to m_SelectedColorData

Parameters
[in]iListColorslist of colors with their names and QColor to be displayed

Definition at line 145 of file QGoTraceSettingsWidget.cxx.

template<typename T >
void QGoTraceSettingsWidget::SetListItemAndSelect ( T *  iComboBox,
NamesDescrContainerType  iItemsData,
std::string  iTextItemToSelect = "" 
)
inlineprotected

call the right methods to initialize the list if there is no iTextItemToSelect or select the iTextItemToSelect if not empty.

Parameters
[in]iComboBoxthe combobox with the list to be set up
[in]iItemsDatathe list of items with their names and descriptions to be displayed
[in]iTextItemToSelectthe item to be selected
Template Parameters
Tcould be a QGoComboBox

Definition at line 296 of file QGoTraceSettingsWidget.h.

template<typename T >
void QGoTraceSettingsWidget::SetListItemAndSelect ( T *  iComboBox,
std::list< ItemColorComboboxData iItemsData,
std::string  iTextItemToSelect = "" 
)
inlineprotected

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 321 of file QGoTraceSettingsWidget.h.

void QGoTraceSettingsWidget::SetListSubCellTypes ( NamesDescrContainerType  iSubCellData,
std::string  iSubCellTypeToSelect = "" 
)

replace the list of subcelltype with the names in the iSubCellTypesData and select the subcelltype corresponding to iSubCellTypetoSelect if not empty, if empty, select the 1rst one.

Parameters
[in]iSubCellDatalist of subcelltypes with their names and description to be displayed
[in]iSubCellTypeToSelectname of the subcelltype to be selected in the combobox

Definition at line 177 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetListSubCellTypeWithSelectedOne ( NamesDescrContainerType  iSubCellTypesData)

replace the list of subcelltype with the name in the iSubCellTypesData and select the subcelltype corresponding to m_SelectedSubCelltype

Parameters
[in]iSubCellTypesDatalist of subcelltypes with their names and description to be displayed

Definition at line 189 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetPointerCollectionData ( ItemColorComboboxData iCollectionData)

Definition at line 630 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetPointerColorData ( ItemColorComboboxData iColorData)

Definition at line 643 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetPointerSelectedCellType ( std::string *  iCellType)

Definition at line 604 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetPointerSelectedSubCellType ( std::string *  iSubCellType)

Definition at line 617 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetSelectedColorComboBox ( QHBoxLayout *  iColorLayout)
protected

add the SelectedColorCombobox to the layout and make the signal/slot connections for it

Definition at line 199 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetSelectedPointersToNull ( )
slot

in order the pointers already deleted are not deleted again

Definition at line 656 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetSubCellTypeComboBox ( QHBoxLayout *  iSubCellLayout)
protected

add the SubCellType QGoCombobox to the layout and make the signal/slot connections for it

Definition at line 326 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetTraceCollectionColorComboBox ( QHBoxLayout *  iLayoutTraceCollection,
QLabel *  iLabel 
)
protected

add the CollectionColorCombobox to the layout,set the trace and collection name labels, and make the signal/slot connections for it

Definition at line 230 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetUpUi ( )
protected

Definition at line 79 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::SetWidgetFont ( )
protected

Definition at line 457 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::TraceChanged ( int  )
signal
void QGoTraceSettingsWidget::UpdateCollection ( std::string  iCollection)
protected

Definition at line 423 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::UpdateValueSelectedCellType ( std::string  iCellType)
protectedslot
Todo:
Lydie: except when adding a new value, these methods are called twice when something changes in the comboboxes

Definition at line 548 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::UpdateValueSelectedCollection ( ItemColorComboboxData  iCollectionData)
protectedslot

Definition at line 525 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::UpdateValueSelectedColor ( ItemColorComboboxData  iColorData)
protectedslot

Definition at line 564 of file QGoTraceSettingsWidget.cxx.

void QGoTraceSettingsWidget::UpdateValueSelectedSubCellType ( std::string  iSubCellType)
protectedslot

Definition at line 556 of file QGoTraceSettingsWidget.cxx.

Member Data Documentation

QGoComboBox* QGoTraceSettingsWidget::m_ChoseCellType

Definition at line 71 of file QGoTraceSettingsWidget.h.

QGoComboBox* QGoTraceSettingsWidget::m_ChoseSubCellType

Definition at line 72 of file QGoTraceSettingsWidget.h.

QGoCollectionColorComboBox* QGoTraceSettingsWidget::m_CollectionColorComboBox

Definition at line 70 of file QGoTraceSettingsWidget.h.

QLabel* QGoTraceSettingsWidget::m_CollectionName
protected

Definition at line 244 of file QGoTraceSettingsWidget.h.

QLabel* QGoTraceSettingsWidget::m_LabelCellType
protected

Definition at line 245 of file QGoTraceSettingsWidget.h.

QLabel* QGoTraceSettingsWidget::m_LabelSubCellType
protected

Definition at line 246 of file QGoTraceSettingsWidget.h.

std::string* QGoTraceSettingsWidget::m_SelectedCellType
protected

Definition at line 247 of file QGoTraceSettingsWidget.h.

ItemColorComboboxData* QGoTraceSettingsWidget::m_SelectedCollectionData
protected

Definition at line 249 of file QGoTraceSettingsWidget.h.

QGoSelectedColorComboBox* QGoTraceSettingsWidget::m_SelectedColorComboBox

Definition at line 69 of file QGoTraceSettingsWidget.h.

ItemColorComboboxData* QGoTraceSettingsWidget::m_SelectedColorData
protected

Definition at line 250 of file QGoTraceSettingsWidget.h.

std::string* QGoTraceSettingsWidget::m_SelectedSubCellType
protected

Definition at line 248 of file QGoTraceSettingsWidget.h.

QComboBox* QGoTraceSettingsWidget::m_SelectedTrace

Definition at line 68 of file QGoTraceSettingsWidget.h.


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