save_attributes module

class save_attributes.SaveAttributes(iface)

Bases: object

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)
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

apply_graduated_symbology(area_size)

Creates Symbology for each value in range of values. Values are # of patients per zip code. Hard codes min value, max value, symbol (color), and label for each range of values. Then QgsSymbolRenderer takes field from attribute table and item from myRangeList and applies them to join_layer. Color values are hex codes, in a graduated fashion from light pink to black depending on intensity

createShp(input_line, costs, out_shp, sr)
error_msj(uyari)
initGui()

Create the menu entries and toolbar icons inside the QGIS GUI.

input_shp_file()
loadLayerList()
load_comboBox()

Load the fields into combobox when layers are changed

run()

Run method that performs all the real work

runAlgorithm()
select_output_file()
tr(message)

Get the translation for a string using Qt translation API.

We implement this ourselves since we do not inherit QObject.

Parameters

message (str, QString) – String for translation.

Returns

Translated version of message.

Return type

QString

unload()

Removes the plugin menu item and icon from QGIS GUI.