GRASS Programmer's Manual  6.4.4(2014)-r
dialogs Namespace Reference

Data Structures

class  CategoryListCtrl
 
class  CheckListCtrl
 List control for managing order and labels of vector maps in legend. More...
 
class  CheckListFeature
 
class  DecorationDialog
 
class  DisplayAttributesDialog
 
class  DxfImportDialog
 Dialog for bulk import of DXF layers. More...
 
class  ElementDialog
 
class  GdalImportDialog
 
class  GroupDialog
 Dialog for creating/editing groups. More...
 
class  HyperlinkDialog
 Dialog for displaying message with hyperlink. More...
 
class  ImageDialog
 Dialog for setting image properties. More...
 
class  ImageSizeDialog
 Set size for saved graphic file. More...
 
class  ImportDialog
 Dialog for bulk import of various data (base class) More...
 
class  ItemCheckListCtrl
 
class  ItemListCtrl
 
class  LayersList
 List of layers to be imported (dxf, shp...) More...
 
class  LegendDialog
 
class  LocationDialog
 Dialog used to select location. More...
 
class  MainVectorDialog
 if 'map' in self.parent.openDialogs: if self.parent.openDialogs['map'].mPanel.rasterTypeRadio.GetValue()\ and self.parent.openDialogs['map'].mPanel.select.GetValue(): if self.parent.openDialogs['map'].mPanel.drawMap.IsChecked(): self.rPanel.rasterSelect.SetValue(self.parent.openDialogs['map'].mPanel.select.GetValue()) More...
 
class  MapDialog
 Dialog for map frame settings and optionally raster and vector map selection. More...
 
class  MapFramePanel
 wx.Panel with map (scale, region, border) settings More...
 
class  MapinfoDialog
 
class  MapLayersDialog
 
class  MapsetDialog
 Dialog used to select mapset. More...
 
class  ModelConditionDialog
 Condition properties dialog. More...
 
class  ModelDataDialog
 Data item properties dialog. More...
 
class  ModelItemDialog
 Abstract item properties dialog. More...
 
class  ModelListCtrl
 
class  ModelLoopDialog
 Loop properties dialog. More...
 
class  ModelRelationDialog
 Relation properties dialog. More...
 
class  ModelSearchDialog
 
class  ModifyTableRecord
 
class  NewVectorDialog
 
class  NorthArrowDialog
 
class  OptDialog
 
class  PageSetupDialog
 
class  PenStyleComboBox
 if self.flag == 'SCALE' and chr(key) in string.digits + ':': event.Skip() return More...
 
class  PlotStatsFrame
 
class  PointDialog
 Dialog for setting point properties. More...
 
class  ProfileRasterDialog
 
class  PsmapDialog
 
class  RasterDialog
 
class  RasterPanel
 Panel for raster map settings. More...
 
class  RectangleDialog
 
class  RegionDef
 Page for setting default region extents and resolution. More...
 
class  SavedRegion
 
class  ScalebarDialog
 Dialog for scale bar. More...
 
class  SelectTransformDialog
 Dialog for selecting datum transformations. More...
 
class  SetOpacityDialog
 Set opacity of map layers. More...
 
class  SymbolDialog
 Dialog for GRASS symbols selection. More...
 
class  TCValidator
 validates input in textctrls, combobox, taken from wxpython demo More...
 
class  TextDialog
 
class  TextEntryDialog
 Simple dialog with text field. More...
 
class  TextLayerDialog
 
class  TransList
 Creates a multiline listbox for selecting datum transforms. More...
 
class  VariableListCtrl
 
class  VDigitCategoryDialog
 
class  VDigitDuplicatesDialog
 
class  VDigitZBulkDialog
 
class  VectorPanel
 Panel for vector maps settings. More...
 
class  VPropertiesDialog
 

Functions

def CreateNewVector
 Create new vector map layer. More...
 
def GetImageHandlers (image)
 Get list of supported image handlers. More...
 
def OnApply (self, event)
 parent.font['colorLabel'] = wx.StaticText(parent, id = wx.ID_ANY, label = _("Color:")) colorChoices = [ 'aqua', 'black', 'blue', 'brown', 'cyan', 'gray', 'green', 'indigo', 'magenta',\ 'orange', 'purple', 'red', 'violet', 'white', 'yellow'] parent.colorCtrl = wx.Choice(parent, id = wx.ID_ANY, choices = colorChoices) parent.colorCtrl.SetStringSelection(parent.rLegendDict['color']) parent.font['colorCtrl'] = wx.ColourPickerCtrl(parent, id = wx.ID_ANY) parent.font['colorCtrl'].SetColour(dialogDict['color']) More...
 
def OnOK (self, event)
 Apply changes, close dialog. More...
 
def OnCancel (self, event)
 Close dialog. More...
 
def OnClose (self, event)
 Destroy dialog and delete it from open dialogs. More...
 
def OnLayer (self, event)
 Change columns on layer change. More...
 
def OnOutline (self, event)
 
def OnFill (self, event)
 
def OnColor (self, event)
 
def OnSize (self, event)
 
def OnRotation (self, event)
 
def OnRotationType (self, event)
 
def OnPattern (self, event)
 
def OnSymbology (self, event)
 
def OnSymbolSelection (self, event)
 
def EnableLayerSelection
 
def getColsChoice (self, parent)
 Returns a wx.Choice with table columns. More...
 
def update (self)
 
def sizePositionFont (self, legendType, parent, mainSizer)
 Insert widgets for size, position and font control. More...
 
def OnIsLegend (self, event)
 Enables and disables controls, it depends if raster or vector legend is checked. More...
 
def OnRaster (self, event)
 
def OnDiscrete (self, event)
 Change control according to the type of legend. More...
 
def OnRange (self, event)
 
def OnUp (self, event)
 Moves selected map up, changes order in vector legend. More...
 
def OnDown (self, event)
 Moves selected map down, changes order in vector legend. More...
 
def OnEditLabel (self, event)
 Change legend label of vector map. More...
 
def OnSpan (self, event)
 
def OnFont (self, event)
 Changes default width according to fontsize, width [inch] = fontsize[pt]/24. More...
 
def OnBorder (self, event)
 Enables/disables colorPickerCtrl for border. More...
 
def updateRasterLegend (self)
 Save information from raster legend dialog to dictionary. More...
 
def updateVectorLegend (self)
 Save information from vector legend dialog to dictionary. More...
 
def updateDialog (self)
 Update legend coordinates after moving. More...
 

Variables

int DECOR_DIALOG_LEGEND = 0
 
int DECOR_DIALOG_BARSCALE = 1
 
 fs = None
 
list PSMAP_COLORS
 
list fontChoices
 parent.font['fontLabel'] = wx.StaticText(parent, id = wx.ID_ANY, label = _("Choose font:")) parent.font['fontCtrl'] = wx.FontPickerCtrl(parent, id = wx.ID_ANY) More...
 
tuple linecapText = wx.StaticText(panel, id = wx.ID_ANY, label = _("Choose linecap:"))
 self.styleCombo = wx.ComboBox(panel, id = wx.ID_ANY, choices = ["solid", "dashed", "dotted", "dashdotted"], validator = TCValidator(flag = 'ZERO_AND_ONE_ONLY')) self.styleCombo.SetToolTipString(_("It's possible to enter a series of 0's and 1's too. "\ "The first block of repeated zeros or ones represents 'draw', "\ "the second block represents 'blank'. An even number of blocks "\ "will repeat the pattern, an odd number of blocks will alternate the pattern.")) More...
 
tuple h = self.unitConv.convert(value = float(legendDict['height']), fromUnit = 'inch', toUnit = legendDict['unit'])
 panel.defaultSize = wx.CheckBox(panel, id = wx.ID_ANY, label = _("Use default size")) panel.defaultSize.SetValue(legendDict['defaultSize']) More...
 
int minVect = 1
 self.rSizeGBSizer.Add(panel.defaultSize, pos = (0,0), span = (1,2), flag = wx.ALIGN_CENTER_VERTICAL, border = 0) More...
 
tuple maxVect = min(10, len(self.instruction[self.vectorId]['list']))
 
tuple cols = wx.StaticText(panel, id = wx.ID_ANY, label = _("Columns:"))
 
list min = legendDict['cols']
 
tuple s = self.unitConv.convert(value = float(legendDict['span']), fromUnit = 'inch', toUnit = legendDict['unit'])
 
tuple box = wx.StaticBox(parent = panel, id = wx.ID_ANY, label = " %s " % _("Font settings"))
 
tuple fontSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
 
tuple flexSizer = wx.FlexGridSizer(cols = 2, hgap = 5, vgap = 5)
 
list fontsize = self.panelVector.font['fontSizeCtrl']
 fontsize = self.panelVector.font['fontCtrl'].GetSelectedFont().GetPointSize() More...
 
tuple unit = self.unitConv.findUnit(self.panelVector.units['unitsCtrl'].GetStringSelection())
 
int w = fontsize/24
 
tuple width = self.unitConv.convert(value = w, fromUnit = 'inch', toUnit = unit)
 
 patternCheck
 
 patFileCtrl
 
 patWidthText
 
 patWidthSpin
 
 patScaleText
 
 patScaleSpin
 
 currLayer
 
 type
 
 isVLegend
 
 vectorListCtrl
 
 btnUp
 
 btnDown
 
 btnLabel
 
 borderCheck
 
 borderColorCtrl
 
 vectorId
 
 rasterId
 

Function Documentation

def dialogs.CreateNewVector (   parent,
  cmd,
  title = _('Create new vector map'),
  exceptMap = None,
  log = None,
  disableAdd = False,
  disableTable = False 
)

Create new vector map layer.

Parameters
cmd(prog, **kwargs)
titlewindow title
exceptMaplist of maps to be excepted
log
disableAdddisable 'add layer' checkbox
disableTabledisable 'create table' checkbox
Returns
dialog instance
None on error

Definition at line 338 of file gui_core/dialogs.py.

References gcmd.RunCommand().

Referenced by dialogs.NewVectorDialog.IsChecked(), manager.AttributeManager.OnExtractSelected(), frame.GMFrame.OnNewVector(), and toolbars.VDigitToolbar.OnSelectMap().

def dialogs.EnableLayerSelection (   self,
  enable = True 
)

Definition at line 2270 of file psmap/dialogs.py.

def dialogs.getColsChoice (   self,
  parent 
)

Returns a wx.Choice with table columns.

Definition at line 2275 of file psmap/dialogs.py.

def dialogs.GetImageHandlers (   image)
def dialogs.OnApply (   self,
  event 
)

parent.font['colorLabel'] = wx.StaticText(parent, id = wx.ID_ANY, label = _("Color:")) colorChoices = [ 'aqua', 'black', 'blue', 'brown', 'cyan', 'gray', 'green', 'indigo', 'magenta',\ 'orange', 'purple', 'red', 'violet', 'white', 'yellow'] parent.colorCtrl = wx.Choice(parent, id = wx.ID_ANY, choices = colorChoices) parent.colorCtrl.SetStringSelection(parent.rLegendDict['color']) parent.font['colorCtrl'] = wx.ColourPickerCtrl(parent, id = wx.ID_ANY) parent.font['colorCtrl'].SetColour(dialogDict['color'])

Definition at line 314 of file psmap/dialogs.py.

Referenced by frame.AddLine(), frame.AddPoint(), frame.AddRectangle(), frame.OnAddImage(), and frame.OnAddText().

def dialogs.OnBorder (   self,
  event 
)

Enables/disables colorPickerCtrl for border.

Definition at line 2962 of file psmap/dialogs.py.

def dialogs.OnCancel (   self,
  event 
)

Close dialog.

Definition at line 328 of file psmap/dialogs.py.

def dialogs.OnClose (   self,
  event 
)

Destroy dialog and delete it from open dialogs.

Definition at line 332 of file psmap/dialogs.py.

def dialogs.OnColor (   self,
  event 
)

Definition at line 2226 of file psmap/dialogs.py.

def dialogs.OnDiscrete (   self,
  event 
)

Change control according to the type of legend.

Definition at line 2856 of file psmap/dialogs.py.

def dialogs.OnDown (   self,
  event 
)

Moves selected map down, changes order in vector legend.

Definition at line 2922 of file psmap/dialogs.py.

def dialogs.OnEditLabel (   self,
  event 
)

Change legend label of vector map.

Definition at line 2939 of file psmap/dialogs.py.

def dialogs.OnFill (   self,
  event 
)

Definition at line 2213 of file psmap/dialogs.py.

def dialogs.OnFont (   self,
  event 
)

Changes default width according to fontsize, width [inch] = fontsize[pt]/24.

Definition at line 2953 of file psmap/dialogs.py.

def dialogs.OnIsLegend (   self,
  event 
)

Enables and disables controls, it depends if raster or vector legend is checked.

Definition at line 2809 of file psmap/dialogs.py.

def dialogs.OnLayer (   self,
  event 
)

Change columns on layer change.

Definition at line 2191 of file psmap/dialogs.py.

def dialogs.OnOK (   self,
  event 
)

Apply changes, close dialog.

Definition at line 322 of file psmap/dialogs.py.

Referenced by frame.PsMapFrame.OnAddMap().

def dialogs.OnOutline (   self,
  event 
)

Definition at line 2208 of file psmap/dialogs.py.

def dialogs.OnPattern (   self,
  event 
)

Definition at line 2248 of file psmap/dialogs.py.

def dialogs.OnRange (   self,
  event 
)

Definition at line 2893 of file psmap/dialogs.py.

def dialogs.OnRaster (   self,
  event 
)

Definition at line 2836 of file psmap/dialogs.py.

References utils.getRasterType().

def dialogs.OnRotation (   self,
  event 
)

Definition at line 2236 of file psmap/dialogs.py.

def dialogs.OnRotationType (   self,
  event 
)

Definition at line 2244 of file psmap/dialogs.py.

def dialogs.OnSize (   self,
  event 
)

Definition at line 2230 of file psmap/dialogs.py.

def dialogs.OnSpan (   self,
  event 
)

Definition at line 2951 of file psmap/dialogs.py.

def dialogs.OnSymbology (   self,
  event 
)

Definition at line 2252 of file psmap/dialogs.py.

def dialogs.OnSymbolSelection (   self,
  event 
)

Definition at line 2259 of file psmap/dialogs.py.

def dialogs.OnUp (   self,
  event 
)

Moves selected map up, changes order in vector legend.

Definition at line 2905 of file psmap/dialogs.py.

def dialogs.sizePositionFont (   self,
  legendType,
  parent,
  mainSizer 
)

Insert widgets for size, position and font control.

Definition at line 2684 of file psmap/dialogs.py.

def dialogs.update (   self)
def dialogs.updateDialog (   self)

Update legend coordinates after moving.

Definition at line 3165 of file psmap/dialogs.py.

References widgets.SetValue().

Referenced by frame.DialogDataChanged(), frame.PsMapBufferedWindow.OnLeftUp(), dialogs.RasterPanel.update(), and dialogs.VectorPanel.update().

def dialogs.updateRasterLegend (   self)

Save information from raster legend dialog to dictionary.

Definition at line 2966 of file psmap/dialogs.py.

References utils.convertRGB(), utils.getRasterType(), and widgets.GetValue().

def dialogs.updateVectorLegend (   self)

Save information from vector legend dialog to dictionary.

Definition at line 3069 of file psmap/dialogs.py.

Variable Documentation

dialogs.borderCheck

Definition at line 2657 of file psmap/dialogs.py.

dialogs.borderColorCtrl

Definition at line 2658 of file psmap/dialogs.py.

tuple dialogs.box = wx.StaticBox(parent = panel, id = wx.ID_ANY, label = " %s " % _("Font settings"))

Definition at line 2787 of file psmap/dialogs.py.

dialogs.btnDown

Definition at line 2637 of file psmap/dialogs.py.

dialogs.btnLabel

Definition at line 2638 of file psmap/dialogs.py.

dialogs.btnUp

Definition at line 2636 of file psmap/dialogs.py.

dialogs.currLayer

Definition at line 2195 of file psmap/dialogs.py.

int dialogs.DECOR_DIALOG_BARSCALE = 1

Definition at line 495 of file gui_core/dialogs.py.

int dialogs.DECOR_DIALOG_LEGEND = 0

Definition at line 494 of file gui_core/dialogs.py.

tuple dialogs.flexSizer = wx.FlexGridSizer(cols = 2, hgap = 5, vgap = 5)

Definition at line 2789 of file psmap/dialogs.py.

list dialogs.fontChoices
Initial value:
1 = [ 'Times-Roman', 'Times-Italic', 'Times-Bold', 'Times-BoldItalic', 'Helvetica',\
2  'Helvetica-Oblique', 'Helvetica-Bold', 'Helvetica-BoldOblique', 'Courier',\
3  'Courier-Oblique', 'Courier-Bold', 'Courier-BoldOblique']

parent.font['fontLabel'] = wx.StaticText(parent, id = wx.ID_ANY, label = _("Choose font:")) parent.font['fontCtrl'] = wx.FontPickerCtrl(parent, id = wx.ID_ANY)

parent.font['fontCtrl'].SetSelectedFont( wx.FontFromNativeInfoString(dialogDict['font'] + " " + str(dialogDict['fontsize']))) parent.font['fontCtrl'].SetMaxPointSize(50)

if color: parent.font['colorLabel'] = wx.StaticText(parent, id = wx.ID_ANY, label = _("Choose color:")) parent.font['colorCtrl'] = wx.ColourPickerCtrl(parent, id = wx.ID_ANY, style=wx.FNTP_FONTDESC_AS_LABEL) parent.font['colorCtrl'].SetColour(dialogDict['color']) parent.font['colorCtrl'].SetColour(convertRGB(dialogDict['color']))

Definition at line 292 of file psmap/dialogs.py.

list dialogs.fontsize = self.panelVector.font['fontSizeCtrl']

fontsize = self.panelVector.font['fontCtrl'].GetSelectedFont().GetPointSize()

Definition at line 2956 of file psmap/dialogs.py.

tuple dialogs.fontSizer = wx.StaticBoxSizer(box, wx.VERTICAL)

Definition at line 2788 of file psmap/dialogs.py.

dialogs.fs = None

Definition at line 50 of file psmap/dialogs.py.

Referenced by G_site_format(), and gs_delete_surf().

string dialogs.h = self.unitConv.convert(value = float(legendDict['height']), fromUnit = 'inch', toUnit = legendDict['unit'])

panel.defaultSize = wx.CheckBox(panel, id = wx.ID_ANY, label = _("Use default size")) panel.defaultSize.SetValue(legendDict['defaultSize'])

Definition at line 2736 of file psmap/dialogs.py.

Referenced by db__send_short(), db_list_databases(), G_lat_format(), G_llres_format(), G_lon_format(), G_svdcmp(), G_tred2(), IL_check_at_points_2d(), IL_grid_calc_2d(), Nviz_flythrough(), and pj_do_proj().

dialogs.isVLegend

Definition at line 2602 of file psmap/dialogs.py.

tuple dialogs.linecapText = wx.StaticText(panel, id = wx.ID_ANY, label = _("Choose linecap:"))

self.styleCombo = wx.ComboBox(panel, id = wx.ID_ANY, choices = ["solid", "dashed", "dotted", "dashdotted"], validator = TCValidator(flag = 'ZERO_AND_ONE_ONLY')) self.styleCombo.SetToolTipString(_("It's possible to enter a series of 0's and 1's too. "\ "The first block of repeated zeros or ones represents 'draw', "\ "the second block represents 'blank'. An even number of blocks "\ "will repeat the pattern, an odd number of blocks will alternate the pattern."))

Definition at line 2128 of file psmap/dialogs.py.

tuple dialogs.maxVect = min(10, len(self.instruction[self.vectorId]['list']))

Definition at line 2755 of file psmap/dialogs.py.

list dialogs.min = legendDict['cols']

Definition at line 2758 of file psmap/dialogs.py.

int dialogs.minVect = 1

self.rSizeGBSizer.Add(panel.defaultSize, pos = (0,0), span = (1,2), flag = wx.ALIGN_CENTER_VERTICAL, border = 0)

Definition at line 2754 of file psmap/dialogs.py.

dialogs.patFileCtrl

Definition at line 2159 of file psmap/dialogs.py.

dialogs.patScaleSpin

Definition at line 2166 of file psmap/dialogs.py.

dialogs.patScaleText

Definition at line 2165 of file psmap/dialogs.py.

dialogs.patternCheck

Definition at line 2158 of file psmap/dialogs.py.

dialogs.patWidthSpin

Definition at line 2164 of file psmap/dialogs.py.

dialogs.patWidthText

Definition at line 2163 of file psmap/dialogs.py.

list dialogs.PSMAP_COLORS
Initial value:
1 = ['aqua', 'black', 'blue', 'brown', 'cyan', 'gray', 'grey', 'green', 'indigo',
2  'magenta','orange', 'purple', 'red', 'violet', 'white', 'yellow']

Definition at line 64 of file psmap/dialogs.py.

dialogs.rasterId

Definition at line 3179 of file psmap/dialogs.py.

dialogs.type

Definition at line 2331 of file psmap/dialogs.py.

Referenced by settings.Settings.Append(), COM_Font_get(), utils.convertRGB(), db_column_Ctype(), db_column_sqltype(), db_select_CatValArray(), db_select_int(), db_set_column_host_type(), frame.DialogDataChanged(), dig_cidx_add_cat(), dig_cidx_add_cat_sorted(), mapwindow.BufferedWindow.DragItem(), tools.EnablePage(), G3d_fillHeader(), G3d_openCellOld(), G3d_readCats(), G3d_setFileType(), G_get_gdal_link(), G_get_raster_row_colors(), G_is_reclass(), G_read_raster_cats(), G_read_vector_cats(), G_site_get(), settings.Settings.Get(), python.task.grassTask.get_param(), render.Map.GetListOfLayers(), gs_set_att_type(), Gv_load_vect(), IL_output_2d(), IL_resample_output_2d(), iso_get_cube_value(), mapwindow.BufferedWindow.MouseDraw(), N_alloc_array_2d(), N_alloc_array_3d(), N_read_rast3d_to_array_3d(), N_read_rast_to_array_2d(), N_write_array_2d_to_rast(), N_write_array_3d_to_rast3d(), NetA_get_node_costs(), NetA_varray_to_nodes(), new_part(), wizard.EPSGPage.OnBrowseCodes(), preferences.PreferencesDialog.OnLoadEpsgCodes(), python.core.parse_command(), parse_freetypecap(), PS_begin_scaled_raster(), settings.Settings.SaveToFile(), vinfo.VectorDBInfo.SelectFromTable(), settings.Settings.Set(), mapwindow.GLWindow.SetMapObjProperties(), slice_get_value(), manager.VirtualAttributeList.Sorter(), wizard.ItemList.Sorter(), sqpAssignment(), sqpColumnDef(), sqpNewValueNode(), sqpValue(), vinfo.unicodeValue(), mapwindow.GLWindow.UpdateSurfaceProperties(), tools.UpdateVectorShow(), mapwindow.GLWindow.UpdateVolumeProperties(), V2_restore_line_nat(), Vect_build_line_area(), Vect_build_nat(), Vect_cidx_dump(), Vect_cidx_find_all(), Vect_clean_small_angles_at_nodes(), Vect_copy(), Vect_copy_map_lines(), Vect_copy_tables(), Vect_net_build_graph(), Vect_option_to_types(), Vect_rename(), Vect_set_constraint_type(), python.vector.vector_what(), Vedit_add_vertex(), Vedit_bulk_labeling(), Vedit_chtype_lines(), Vedit_copy_lines(), Vedit_flip_lines(), Vedit_modify_cats(), Vedit_move_lines(), Vedit_move_vertex(), Vedit_remove_vertex(), Vedit_snap_lines(), and Vedit_split_lines().

tuple dialogs.unit = self.unitConv.findUnit(self.panelVector.units['unitsCtrl'].GetStringSelection())
dialogs.vectorId

Definition at line 3074 of file psmap/dialogs.py.

dialogs.vectorListCtrl

Definition at line 2616 of file psmap/dialogs.py.