35 #ifndef __QGoTraceSettingsWidget_h
36 #define __QGoTraceSettingsWidget_h
41 #include <QHBoxLayout>
42 #include <QVBoxLayout>
48 #include "QGoGUILibConfigure.h"
65 typedef std::vector< std::pair< std::string, std::string > >
77 std::string GetTraceName();
83 void SetCurrentCellType(std::string iCellTypeText);
89 void SetCurrentCellTypeToSelectedOne();
95 void SetCurrentSubCellType(std::string iSubCellTypeText);
101 void SetCurrentSubCellTypeToSelectedOne();
107 void SetCurrentColor(std::string iColorText);
113 void SetCurrentColorToSelectedOne();
119 void SetCurrentCollectionID(std::string iID);
121 void SetCurrentTraceName(std::string iTraceName);
140 void SetListCollectionID(
141 std::list< ItemColorComboboxData > iListExistingID,
142 std::string iCollectionIDtoSelect =
"");
151 void SetListColors(std::list< ItemColorComboboxData > iListColors,
152 std::string iColorToSelect =
"");
159 void SetListColorsWithSelectedOne(std::list< ItemColorComboboxData > iListColors);
170 std::string iCellTypeToSelect =
"");
189 std::string iSubCellTypeToSelect =
"");
199 std::string* GetPointerSelectedCellType();
200 std::string* GetPointerSelectedSubCellType();
204 void SetPointerSelectedCellType(std::string* iCellType);
205 void SetPointerSelectedSubCellType(std::string* iSubCellType);
209 unsigned int GetCurrentSelectedCollectionID();
218 void AddANewCollectionID(std::pair<std::string, QColor> iNewCollectionID);
222 void SetSelectedPointersToNull();
227 void AddANewCellType();
229 void DeleteCellType();
231 void AddANewSubCellType();
233 void DeleteSubCellType();
239 void NewCollectionToBeCreated();
241 void TraceChanged(
int );
259 void SetSelectedColorComboBox(
QHBoxLayout* iColorLayout);
266 void SetTraceCollectionColorComboBox(
273 void SetCellTypeComboBox(
280 void SetSubCellTypeComboBox(
283 void SetWidgetFont();
285 void UpdateCollection(std::string iCollection);
295 template<
typename T >
297 std::string iTextItemToSelect =
"")
299 if ( !iTextItemToSelect.empty() )
301 iComboBox->SetItemsFromList(iItemsData);
302 if ( iComboBox->findText( iTextItemToSelect.c_str() ) != -1 )
304 iComboBox->SetCurrentItem(iTextItemToSelect);
308 iComboBox->SetCurrentItemAndActivate(0);
313 iComboBox->InitializeTheList(iItemsData);
320 template<
typename T >
322 std::string iTextItemToSelect =
"")
324 if ( !iTextItemToSelect.empty() )
326 iComboBox->SetItemsFromListWithColor(iItemsData);
327 if ( iComboBox->findText( iTextItemToSelect.c_str() ) != -1 )
329 iComboBox->SetCurrentItem(iTextItemToSelect);
333 iComboBox->SetCurrentItemAndActivate(0);
338 iComboBox->InitializeTheListWithColor(iItemsData);
344 void UpdateValueSelectedCollection(ItemColorComboboxData iCollectionData);
345 void UpdateValueSelectedCellType(std::string iCellType);
346 void UpdateValueSelectedSubCellType(std::string iSubCellType);
347 void UpdateValueSelectedColor(ItemColorComboboxData iColorData);
352 void CurrentTraceToUpdate(
int iIndex);
this class inherits from QGoColorComboBox, has only the add item option and update the text according...
This class enables the Combobox to display item with colors icon for the color and sends a signal whe...
std::pair< std::string, QColor > ItemColorComboboxData
inherits from Qt QCombobox but add a the end of the list of items, 1 or 2 items: the first one to add...