|
graph_analysis
|
widget to manage all graphical custom regexp filter items in a common scene under behavioral restrictions More...
#include <FilterManager.hpp>


Public Types | |
| typedef std::vector< FilterItem * > | Filters |
| container datatype for an array of filter items More... | |
| typedef std::vector< QCheckBox * > | CheckBoxes |
| container datatype for an array of checkboxes handles More... | |
| typedef std::map< QCheckBox *, FilterItem::filter_index_t > | CheckBoxIndexMap |
| container datatype for mapping each registered check box to its registration index (i.e. offset in the array of checkboxes) More... | |
Public Slots | |
| void | addFilter () |
| listener for the filter adding button in the property dialog More... | |
| void | swapFilters () |
| listener for the filters swapping button in the property dialog More... | |
| void | renameFilter () |
| listener for the filter renaming button in the property dialog More... | |
| void | removeFilter () |
| listener for the filter removing button in the property dialog More... | |
| void | removeFilters () |
| listener for the all-filters removing button in the property dialog More... | |
| void | renameSelectedFilter () |
| listener for the selected filter renaming action in the context menu More... | |
| void | removeSelectedFilter () |
| listener for the selected filter removing action in the context menu More... | |
| void | updateToolTip (int state) |
| listener for the checkboxes user toggling More... | |
| void | showContextMenu (const QPoint &pos) |
| displays context menu (upon a right click in the scene) More... | |
Public Member Functions | |
| FilterManager (QWidget *checkBoxGrid, QWidget *parent=NULL) | |
| constructor More... | |
| bool | getItemSelected (void) |
| getter method for the boolean item-selection witness; returns true when a filter item is being hover-over; false otherwise More... | |
| void | setItemSelected (bool itemSelected) |
| setter method for the boolean item-selection witness; More... | |
| FilterItem * | getSelectedItem (void) |
| getter method for the currently selected filter item (i.e. currently being hovered over) More... | |
| void | setSelectedItem (FilterItem *selectedItem) |
| setter method for the currently selected filter item (i.e. currently being hovered over) More... | |
| int | filterCount () |
| returns the number of filters currently managed by the filter manager More... | |
| void | addFilter (const std::string &label, bool enable) |
| introduces a new filter item More... | |
| void | addFilter (const std::string &label) |
| introduces a new filter item with the given 'label' as text regex More... | |
| unsigned int | createFilter (const std::string &label) |
| creates a new filter item with the given 'label' as text regex and its corresponding checkbox More... | |
| void | swapFilters (FilterItem::filter_index_t left, FilterItem::filter_index_t right) |
| swaps in-place the 2 filters of the given indices; NOTE: only left gets displaced (right is assumed to still be dragged by the mouse after the swapping) More... | |
| void | dieOnIndex (FilterItem::filter_index_t index, const std::string &caller=std::string()) |
| error checking method: tests for the 'caller' whether the provided filter 'index' is out of bounds More... | |
| void | updateToolTip (FilterItem::filter_index_t index, bool witness, bool refresh=true) |
| synchronizes the GUI toolTip-s with the current text regex information held at index 'index' More... | |
| void | refreshToolTip (FilterItem::filter_index_t index, bool refresh=false) |
| synchronizes the GUI toolTip-s with the current text regex information held at index 'index' More... | |
| void | renameFilter (FilterItem::filter_index_t index, QString regexp) |
| changes regex of the filter at 'index' to 'regexp' More... | |
| void | renameFilter (FilterItem *item, QString regexp) |
| changes regex of the filter item 'filter' to 'regexp' More... | |
| void | removeFilter (FilterItem::filter_index_t index) |
| completely removes the filter item at 'index' More... | |
| void | removeFilter (FilterItem *item) |
| completely removes the given filter item More... | |
| void | refreshView (bool updatesStatusBar=true) |
| orders the layers view to refresh; when updatesStatusBar is unset, this takes place silently (the status bar won't get changed) More... | |
| Filters | getFilters (void) |
| getter method for the array of filters More... | |
widget to manage all graphical custom regexp filter items in a common scene under behavioral restrictions
the item can only move vertically dropping in a snap-to-grid fashion and displace/push each other when they overlap too much (beyond a threshold)
| typedef std::vector<QCheckBox*> graph_analysis::gui::FilterManager::CheckBoxes |
container datatype for an array of checkboxes handles
| typedef std::map<QCheckBox*, FilterItem::filter_index_t> graph_analysis::gui::FilterManager::CheckBoxIndexMap |
container datatype for mapping each registered check box to its registration index (i.e. offset in the array of checkboxes)
| typedef std::vector<FilterItem*> graph_analysis::gui::FilterManager::Filters |
container datatype for an array of filter items
| graph_analysis::gui::FilterManager::FilterManager | ( | QWidget * | checkBoxGrid, |
| QWidget * | parent = NULL |
||
| ) |
constructor
| checkBoxGrid | widget to host the check-boxes at this widget's disposal |
| parent | optional qt parent widget to assume ownership over this widget |
| void graph_analysis::gui::FilterManager::addFilter | ( | const std::string & | label, |
| bool | enable | ||
| ) |
introduces a new filter item
| label | the regex text of the filter |
| enable | the state of the corresponding checkbox on init (checked/unchecked) |
| void graph_analysis::gui::FilterManager::addFilter | ( | const std::string & | label | ) |
introduces a new filter item with the given 'label' as text regex
|
slot |
listener for the filter adding button in the property dialog
| unsigned int graph_analysis::gui::FilterManager::createFilter | ( | const std::string & | label | ) |
creates a new filter item with the given 'label' as text regex and its corresponding checkbox
| void graph_analysis::gui::FilterManager::dieOnIndex | ( | FilterItem::filter_index_t | index, |
| const std::string & | caller = std::string() |
||
| ) |
error checking method: tests for the 'caller' whether the provided filter 'index' is out of bounds
|
inline |
returns the number of filters currently managed by the filter manager
|
inline |
getter method for the array of filters
|
inline |
getter method for the boolean item-selection witness; returns true when a filter item is being hover-over; false otherwise
|
inline |
getter method for the currently selected filter item (i.e. currently being hovered over)
| void graph_analysis::gui::FilterManager::refreshToolTip | ( | FilterItem::filter_index_t | index, |
| bool | refresh = false |
||
| ) |
synchronizes the GUI toolTip-s with the current text regex information held at index 'index'
| index | the offset of the concerned filter in the filters array |
| refresh | boolean flag dictating whether to order a layers view refresh; it generally won't refresh |
| void graph_analysis::gui::FilterManager::refreshView | ( | bool | updatesStatusBar = true | ) |
orders the layers view to refresh; when updatesStatusBar is unset, this takes place silently (the status bar won't get changed)
| void graph_analysis::gui::FilterManager::removeFilter | ( | FilterItem::filter_index_t | index | ) |
completely removes the filter item at 'index'
| void graph_analysis::gui::FilterManager::removeFilter | ( | FilterItem * | item | ) |
completely removes the given filter item
|
slot |
listener for the filter removing button in the property dialog
|
slot |
listener for the all-filters removing button in the property dialog
|
slot |
listener for the selected filter removing action in the context menu
| void graph_analysis::gui::FilterManager::renameFilter | ( | FilterItem::filter_index_t | index, |
| QString | regexp | ||
| ) |
changes regex of the filter at 'index' to 'regexp'
| void graph_analysis::gui::FilterManager::renameFilter | ( | FilterItem * | item, |
| QString | regexp | ||
| ) |
changes regex of the filter item 'filter' to 'regexp'
|
slot |
listener for the filter renaming button in the property dialog
|
slot |
listener for the selected filter renaming action in the context menu
|
inline |
setter method for the boolean item-selection witness;
|
inline |
setter method for the currently selected filter item (i.e. currently being hovered over)
|
slot |
displays context menu (upon a right click in the scene)
| void graph_analysis::gui::FilterManager::swapFilters | ( | FilterItem::filter_index_t | left, |
| FilterItem::filter_index_t | right | ||
| ) |
swaps in-place the 2 filters of the given indices; NOTE: only left gets displaced (right is assumed to still be dragged by the mouse after the swapping)
|
slot |
listener for the filters swapping button in the property dialog
| void graph_analysis::gui::FilterManager::updateToolTip | ( | FilterItem::filter_index_t | index, |
| bool | witness, | ||
| bool | refresh = true |
||
| ) |
synchronizes the GUI toolTip-s with the current text regex information held at index 'index'
| index | the offset of the concerned filter in the filters array |
| witness | the boolean value of the checkbox to update to |
| refresh | boolean flag dictating whether to order a layers view refresh; it generally does so |
|
slot |
listener for the checkboxes user toggling
1.8.13