FAKT - Automatisk Generert Dokumantasjon¶
Tilgjengelighet¶
- /***********************************************************************
- Tilgjengelighet
- A QGIS plugin
- My Tilgjengelighet assignment
begin : 2017-08-21 git sha : $Format:%H$ copyright : (C) 2017 by Kasper Skjeggestad email : kasper.skjeggestad@gmail.com
***********************************************************************/
- /***********************************************************************
- This program is free software; you can redistribute it and/or modify *
- it under the terms of the GNU General Public License as published by *
- the Free Software Foundation; either version 2 of the License, or *
- (at your option) any later version. *
***********************************************************************/
-
class
Tilgjengelighet.
Tilgjengelighet
(iface)[source]¶ Bases:
object
QGIS Plugin Implementation.
-
addLayer
(layerType)[source]¶ The folowing code has been taken out from OpenLayers Plugin writen by Sourcepole
-
add_action
(icon_path, text, callback, enabled_flag=True, add_to_menu=True, add_to_toolbar=True, status_tip=None, whats_this=None, parent=None)[source]¶ Add a toolbar icon to the toolbar.
Parameters: - icon_path (str) – Path to the icon for this action. Can be a resource path (e.g. ‘:/plugins/foo/bar.png’) or a normal file system path.
- text (str) – Text that should be shown in menu items for this action.
- callback (function) – Function to be called when the action is triggered.
- enabled_flag (bool) – A flag indicating if the action should be enabled by default. Defaults to True.
- add_to_menu (bool) – Flag indicating whether the action should also be added to the menu. Defaults to True.
- add_to_toolbar (bool) – Flag indicating whether the action should also be added to the toolbar. Defaults to True.
- status_tip (str) – Optional text to show in a popup when mouse pointer hovers over the action.
- parent (QWidget) – Parent widget for the new action. Defaults None.
- whats_this – Optional text to show in the status bar when the mouse pointer hovers over the action.
Returns: The action that was created. Note that the action is also added to self.actions list.
Return type: QAction
-
assign_combobox_hc_parkering
()[source]¶ Assigning a AttributeForm object to each option in hc parkering
-
assign_combobox_parkeringsomraade
()[source]¶ Assigning a AttributeForm object to each option in parkeringsområde
-
canvasCrs
()[source]¶ The folowing code has been taken out from OpenLayers Plugin writen by Sourcepole
-
createGdalTmsLayer
(layerType, name)[source]¶ The folowing code has been taken out from OpenLayers Plugin writen by Sourcepole
-
create_filter
(opperator, valueReference, value)[source]¶ creates FE based on input, made to take less space in other method create_filtherencoding
Parameters: - opperator (str) – opperator for FE
- valueReference (str) – name of attribute for FE
- value (str) – value for FE
-
create_filtherencoding
(attributeList)[source]¶ creates FE based on user choices
Parameters: attributeList (list<AttributeForms>) – list of all attriubtes for filterencoding Returns: FilterEncoding Return type: str
-
excelSave
()[source]¶ obtaind from xytools, Saves features to excel format @author: Richard Duivenvoorde
-
fill_combobox
(combobox, filename)[source]¶ Fikks combobox with lines from filename
Parameters: - combobox (QComboBox) – The combobox to be filled
- filename (str, QString) – name of file with info to be filled in combobox
-
fill_infoWidget
(attributes)[source]¶ Filling infowidget with attributes name and no value. Also ajustes size of infowidget
Parameters: attributes (list<AttributeForms>) – List of gui attriibutes
-
get_temppath
(filename)[source]¶ Creating a temperarly path for a temperary file
Parameters: filename (str, QString) – String name for file Returns: string of full path Return type: str
-
hide_show_gui
(attributeForms, condition, extra=None)[source]¶ Shows parts of GUI if conditions are meat, hids it if not
Parameters: - attributeForms (list<AttributeForm>) – A list of witch attributes to hide in GUI
- condition (boolean) – The condition to show GUI parts
- extra (list<QtWidgets>) – include if gui consists of more than attributes that needs to be showed/hidden
-
openLayer_background_init
()[source]¶ The folowing code has been taken out from OpenLayers Plugin writen by Sourcepole
-
savePath
(saveType, saveExtension)[source]¶ Find the save path
Parameters: - saveType (str) – The type of file to be saved
- saveExtension (str) – File extention (e.g .xls .png)
Returns: direktory path and file namle
Return type: (str,str)
-
save_search
()[source]¶ “Saves the search to search history so it can set choises in GUI bac to preveus desisions
-
selectedObjects
(selFeatures)[source]¶ changing number of selected objects in infowidget and settning current selected object
Parameters: selFeatures – Selected features of layer
-
setMapCrs
(coordRefSys)[source]¶ The folowing code has been taken out from OpenLayers Plugin writen by Sourcepole
-
setReferenceLayer
(layer)[source]¶ The folowing code has been taken out from OpenLayers Plugin writen by Sourcepole
-
show_message
(msg_text, msg_title=None, msg_info=None, msg_details=None, msg_type=None)[source]¶ Show the user a message :param msg_text: the tekst to show the user :type msg_text: str
Parameters: - msg_title (str) – the title of the message box
- msg_info (str) – additional info for the user
- msg_details (str) – details for the user
- msg_type (QMessageBox.Icon) – the type of message
-
to_unicode
(in_string)[source]¶ Transforme string to unicode
Parameters: in_string – String to transforme Returns: unicode verson of string Return type: unicode
-
AttributeForm¶
-
class
AttributeForm.
AttributeForm
(attribute, comboBox=None, lineEdit=None, comboBoxText=None, label=None)[source]¶ Bases:
object
Saves attributes and assosiated gui widgets
-
getAttribute
()[source]¶ Returns the assosiated attriubte name
Returns: returns the associated attribute name Return type: str
-
getComboBox
()[source]¶ Returns the assosiated combobox widget
Returns: returns the associated comboBox Return type: QComboBox
-
getComboBoxCurrentText
()[source]¶ Returns the assosoated combobox text
Returns: returns the associated comboBox text, return None if no combobox is availeble Return type: QString
-
getLabel
()[source]¶ Returns the assisiated label widget if any :returns: returns the associated label :rtype: QLabel
-
getLineEdit
()[source]¶ Returns the assosiated lineEdit widget if any
Returns: returns the associated lineEdit Return type: QLineEdit
-
getLineEditText
()[source]¶ Returns the lineEdit text
Returns: returns the lineEdit text, return None if no lineEdit is availeble Return type: QString
-
is_number
(s)[source]¶ Sett text in AttributeForm lineEdit
Parameters: s (str) – string to be change for being a number Returns: tru if s is number, false if s in not a number Return type: boolean
-
setComboBox
(comboBox)[source]¶ Assigning comboBox
Parameters: comboBox (QComboBox) – combobox assisiated to attribute
-
setLineEdit
(lineEdit)[source]¶ Assigning lineEdit
Parameters: lineEdit (QLineEdit) – Linedit assisiated to attribute
-
setLineEditText
(string)[source]¶ Sett text in AttributeForm lineEdit
Parameters: string (str) – String to set in lineEdit
-
valudeValid
()[source]¶ checks if the attribute is valid and search ready
Returns: True if attrivute is valid, false if not Return type: boolean
-
SavedSearch¶
-
class
SavedSearch.
SavedSearch
(search_name, layer, tabIndex_main, tabIndex_friluft, tabIndex_tettsted)[source]¶ Bases:
object
Class made to save the choises made by user on a previus search
-
add_attribute
(attribute, current_index, current_lineText)[source]¶ Add attribute with current index for combobx and current text for lineText Attributes are stored in dictionarys as key, while value is list of combobox indes and lintEdtid text
Parameters: - attribute (AttributeForm) – one attribute from filter interface
- current_index (int) – index of combobx at search
- current_lineText (str) – text of lineEdit at search
-