GraphTool  1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Signals | Public Member Functions | Protected Slots | List of all members
SearchBox Class Reference

#include <search_box.h>

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

Signals

void search (std::string searchTerm, std::string searchType)
 
void searchTypeChanged (std::string new_type)
 

Public Member Functions

 SearchBox (QWidget *parent=0)
 
std::string search_term ()
 
std::string search_type ()
 
void setAutocompletionModel (GraphModel *new_model)
 
void setAutocompletionList (QStringList wordList)
 

Protected Slots

void on_searchButton_clicked (bool checked=false)
 
void on_searchText_returnPressed ()
 
void on_searchType_currentIndexChanged (QString new_type)
 

Detailed Description

Widget created to generate the search box in the UI

Constructor & Destructor Documentation

SearchBox::SearchBox ( QWidget *  parent = 0)

Constructor for the SearchBox widget The SearchBox widget is the place in the GUI where the user can enter a search term and have suggestions appear. Once a search is completed the graph will change in order to show and focus on the searched SWU or run block

Parameters
parentUsed for placement in the GUI

Member Function Documentation

void SearchBox::on_searchButton_clicked ( bool  checked = false)
protectedslot

When the search button is clicked, the search string and type is emitted as a signal

Parameters
checkedtrue if the button is kept pressed (visually), false if not. An option for buttons
void SearchBox::on_searchText_returnPressed ( )
protectedslot

When the enter key is pressed, the search string and type is emitted as a signal

void SearchBox::on_searchType_currentIndexChanged ( QString  new_type)
protectedslot

When something is being typed - a signal is emitted to enable search suggestions to appear

Parameters
new_typeThe string currently being typed
void SearchBox::search ( std::string  searchTerm,
std::string  searchType 
)
signal

The search signal to be emitted with the search string and type

Parameters
searchTermThe search-string entered in the search field
searchTypeThe search-type being either SWU or run block
std::string SearchBox::search_term ( )

Accesses the search string entered and type chosen in the widget by the user. The type can be either SWU or Run Block

void SearchBox::searchTypeChanged ( std::string  new_type)
signal

When something is being typed - a signal is emitted to enable search suggestions to appear

Parameters
new_typeThe string currently being typed
void SearchBox::setAutocompletionList ( QStringList  wordList)

Method needed to set the suggestion / auto complete list

Parameters
wordListA list of strings to be displayed in the suggestion list
void SearchBox::setAutocompletionModel ( GraphModel new_model)

Method called by the setAutocompletionList to set the model. Needed to be set to show the list in the GUI. Deletes the previous model

Parameters
new_modelModel to be set

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