module: ‘code_extract.py’

The ExtractController class allows the user to extract informations about the database. The module allows extracting in XML type. This file is especially dedicated to IHM_extraction.py, graphical interface file for the extraction file module.

class gwa.code_extract.ExtractController(main=None, parent=None)[source]

Bases: PyQt4.QtGui.QWizard

This fonction is called at every class instanciation. It is equivalent (in C & C++) to a class builder.

It initializes the graphical interface of the Extract part by different steps : - create the link with the main interface. - create the graphical interface. - Listening of the events generated by the graphical interface, with the function “connect_signals()”. - Initializing the variables with the function “initVariables()”.

addAP()[source]

Add the selected AP in the right list of APs.

addCampaign()[source]

Add the campaign selected in the right campaigns list.

addPlace()[source]

Add the selected place in the right list of selected places.

chooseAllTheAPs()[source]

Function executed when the user clicks on the checkbox ‘Choose all the APs’. By activating the checkbox, the function selects all the APs of the left list to put them in the right list. By de-activating the checkbox, the function puts back all the APs in the left list.

chooseAllTheCampaigns()[source]

Function executed when the user clicks on the checkbox ‘Choose all the campaigns’. By activating the checkbox, the function selects all the campaigns in the left list to place them in the right list. By de-activating the checkbox, the function puts back all the campaigns in the left list.

chooseAllThePlaces()[source]

Function executed when the user clicks on the checkbox ‘Choose all the places’. By activating the checkbox, the function selects all the places of the left list to place them in the right list. By de-activating the checkbox, the function puts back all the places on the left list.

connect_signals()[source]

This function allows listening of the signals generated by the graphical interface, and associate the adapted treatments to it.

example

>>> self.connect(self.ui.toolButton_measurement_campaign_add, QtCore.SIGNAL("clicked()"), self.addCampaign)

In this example, when the button “toolButton_measurement_campaign_add” will be clicked (“clicked()”) the function addCampaign will be called.

displayEnvironmentsList()[source]

This function allows displaying, on the interface, the list of environments present in the database

displaySelectedAPsList()[source]

This function allows displaying, on the interface, the list of APs related to the places selected just before, and selected by the user.

displaySelectedCampaignsList()[source]

This function allows displaying, on the interface, the list of campaigns related to the places selected before, and selected by the user

displaySelectedPlacesList()[source]

This function allows displaying, on the interface, the list of places related to the environment selected just before, and selected by the user.

displayUnselectedAPsList()[source]

This function allows displaying, on the APs list, related to the places selected juste before, but not selected by the user.

displayUnselectedCampaignsList()[source]

This function allows displaying, on the interface, the list of campaigns related to the place(s) selected before, but not selected by the user.

displayUnselectedPlacesList()[source]

This function allows displaying, on the interface, the list on places, related to the environment selected just before, but not selected by the user.

extractToXML()[source]

Extract the measurments of the DB in XML format, by the data selected. The function instantiates the Extract class pour les requêtes “select()” in the database and for the writing in a file.

getDistinctAP()[source]

This function allows collecting the list of distinct APs used in the campaigns selected in the previous window. The APs are stored in a dictionnary to skip the the dooblon during the run of measurments related to the selected campaigns. The function is called at the arrival on the page of APs selection.

initVariables()[source]

This function allows to initialize variables needed to realize all the measurements, recover variables of the “gwa.conf” file and connect to the database.

The initialized variables are

  • environments_ids :
  • id_area :
  • places_ids :
  • selected_places_ids :
  • aps_ids :
  • selected_aps_ids :
  • campaigns_ids :
  • selected_campaigns_ids :
pageChange()[source]

This function is called at avery page change to initialize the lists, and some variables.

reinitialize(resultCode)[source]

This function allows switching to the application menu and re-initializes the module (QWizard) to its first page.

removeAP()[source]

Remove the selected AP in the right list of APs

removeCampaign()[source]

Remove the campaign selected in the right list and replace it in the left list.

removePlace()[source]

Remove the place selected in the right list of selected places.

setCurrentEnvironment()[source]

Collects the name of the environment selected, then collect the corresponding id and name in the DB to place them in a global variable ‘self.environment_id’.

validateCurrentPage()[source]

Re-implementation of the “validateCurrentPage” function which implements by default “QWizardPage::validatePage()” on “currentPage()”. It allows testing that all the elements are filled and/or selected on the current page.

Those are unitary tests which permit to send “True” or “False”. >>> If “True”: The page is validated and its id is modified ==> page change >>> Si “False”: The page isn’t validated and its id stays the same ==> page stays unchanged

Previous topic

module: ‘code_AP.py’

Next topic

module: ‘code_measure.py’

This Page