#include <filter_menu.h>
|
void | filtersReset () |
|
void | filterRemoved (std::string filter_name) |
|
void | filterUpdated (std::string name, std::string type, bool hide, bool inverted, bool enabled, std::string color, std::string opacity, std::map< std::string, std::string > params, bool last) |
|
void | filterInserted (std::string name, std::string type, bool hide, bool inverted, bool enabled, std::string color, std::string opacity, std::map< std::string, std::string > params, bool last) |
|
|
QStandardItemModel * | model_ |
| Internal model.
|
|
This class binds the FilterMenu UI-components with the logic provided in MainWindow and MainController. The Filter Menu is used to create/remove/edit/enable/disable filters.
The main functionality is currently implemented as a right click menu.
FilterMenu::FilterMenu |
( |
bool |
formatting_properties = false , |
|
|
QWidget * |
parent = 0 |
|
) |
| |
Main constructor for the FilterMenu
- Parameters
-
formatting_properties | Set to false if filter, true if conditional formatting |
parent | Set parent widget |
void FilterMenu::add_filters |
( |
QList< QList< QStandardItem * > > * |
filters | ) |
|
void FilterMenu::change_state_of_all_filters |
( |
bool |
state | ) |
|
|
slot |
Slot used by the signal coming from the custom header checkbox to adjust the states of all filters in the FilterMenu
- Parameters
-
state | True if to enable all filters, false if to disable all filters |
void FilterMenu::create_menu_action |
( |
QAction * |
action | ) |
|
|
slot |
Slot which runs the action ordered by the user from the right click menu
- Parameters
-
action | The action to be executed |
void FilterMenu::create_new_filter |
( |
QString |
filter_type | ) |
|
Method for launching the create filter flow
- Parameters
-
void FilterMenu::filterInserted |
( |
std::string |
name, |
|
|
std::string |
type, |
|
|
bool |
hide, |
|
|
bool |
inverted, |
|
|
bool |
enabled, |
|
|
std::string |
color, |
|
|
std::string |
opacity, |
|
|
std::map< std::string, std::string > |
params, |
|
|
bool |
last |
|
) |
| |
|
signal |
Signal for adding filters to the MainController
- Parameters
-
name | Name of the filter |
type | Type of filter(dependency_degree, regex, run_block, lpm_ldm, diff_filter) |
hide | True to hide nodes, false not to hide nodes |
inverted | True if exclude, false if include |
enabled | True if enabled, false if disabled |
color | Can be colors such as green, silver, black, red |
opacity | Value between 0 and 255 |
params | Parameters used by the different filters(min/max for dependency degree for example) |
last | True if last filter to be applied by the MainController, false if not |
void FilterMenu::filterRemoved |
( |
std::string |
filter_name | ) |
|
|
signal |
Signal for removing specific filter from the MainController
- Parameters
-
filter_name | Name of the filter |
void FilterMenu::filtersReset |
( |
| ) |
|
|
signal |
void FilterMenu::filterUpdated |
( |
std::string |
name, |
|
|
std::string |
type, |
|
|
bool |
hide, |
|
|
bool |
inverted, |
|
|
bool |
enabled, |
|
|
std::string |
color, |
|
|
std::string |
opacity, |
|
|
std::map< std::string, std::string > |
params, |
|
|
bool |
last |
|
) |
| |
|
signal |
Signal for updating filters in the MainController
- Parameters
-
name | Name of the filter |
type | Type of filter(dependency_degree, regex, run_block, lpm_ldm, diff_filter) |
hide | True to hide nodes, false not to hide nodes |
inverted | True if exclude, false if include |
enabled | True if enabled, false if disabled |
color | Can be colors such as green, silver, black, red |
opacity | Value between 0 and 255 |
params | Parameters used by the different filters(min/max for dependency degree for example) |
last | True if last filter to be applied by the MainController, false if not |
QList< QList< QStandardItem * > > * FilterMenu::get_filters |
( |
| ) |
|
void FilterMenu::insert |
( |
const QModelIndex & |
parent, |
|
|
int |
start, |
|
|
int |
end, |
|
|
bool |
updated = false |
|
) |
| |
|
slot |
Slot used to insert new rows in the tree view(connected to the rowsInserted() signal coming from the model)
- Parameters
-
parent | Index of parent |
start | From where to insert new rows |
end | Stop inserting new rows here |
updated | True if edited row, false if new |
QStandardItemModel * FilterMenu::model |
( |
| ) |
|
Get the model used for the FilterMenu
- Returns
- A pointer to the QStandardItemModel used by the FilterMenu
void FilterMenu::onContextMenu |
( |
const QPoint & |
point | ) |
|
|
slot |
Slot which creates the right click menu in the FilterMenu
- Parameters
-
point | The point where the right click occurred |
void FilterMenu::remove |
( |
const QModelIndex & |
parent, |
|
|
int |
start, |
|
|
int |
end |
|
) |
| |
|
slot |
Slot used to remove new rows in the tree view(connected to the rowsAboutToBeRemoved() signal coming from the model)
- Parameters
-
index | Index of parent |
start | From where to start removing rows |
end | To where the removal of rows should stop |
void FilterMenu::reset |
( |
| ) |
|
|
slot |
Slot connected to the modelAboutToBeReset() signal from the model which in turn signals the MainController about the resetted model
void FilterMenu::resetAllFilters |
( |
| ) |
|
|
slot |
Slot used to reset(remove) all filters in the FilterMenu
void FilterMenu::resetFilter |
( |
| ) |
|
|
slot |
Slot used to reset(remove) specific filter in the FilterMenu
void FilterMenu::setModel |
( |
QStandardItemModel * |
model | ) |
|
Set the model used for the FilterMenu
- Parameters
-
model | A pointer to a QStandardItemModel used for the filters |
void FilterMenu::update |
( |
const QModelIndex & |
start, |
|
|
const QModelIndex & |
end |
|
) |
| |
|
slot |
Slot used to alter values for rows in the treeview(connected to the dataChanged() signal coming from the model)
- Parameters
-
start | From which cell to start the update |
end | To which cell to end the update |
The documentation for this class was generated from the following files: