GRASS Programmer's Manual  6.5.svn(2012)-r51648
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
dialogs Namespace Reference

Data Structures

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

Functions

def CreateNewVector
 Create new vector map layer.
def GetImageHandlers
 Get list of supported image handlers.
def OnApply
 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'])
def OnOK
 Apply changes, close dialog.
def OnCancel
 Close dialog.
def OnClose
 Destroy dialog and delete it from open dialogs.
def OnLayer
 Change columns on layer change.
def OnOutline
def OnFill
def OnColor
def OnSize
def OnRotation
def OnRotationType
def OnPattern
def OnSymbology
def OnSymbolSelection
def EnableLayerSelection
def getColsChoice
 Returns a wx.Choice with table columns.
def update
def sizePositionFont
 Insert widgets for size, position and font control.
def OnIsLegend
 Enables and disables controls, it depends if raster or vector legend is checked.
def OnRaster
def OnDiscrete
 Change control according to the type of legend.
def OnRange
def OnUp
 Moves selected map up, changes order in vector legend.
def OnDown
 Moves selected map down, changes order in vector legend.
def OnEditLabel
 Change legend label of vector map.
def OnSpan
def OnFont
 Changes default width according to fontsize, width [inch] = fontsize[pt]/24.
def OnBorder
 Enables/disables colorPickerCtrl for border.
def updateRasterLegend
 Save information from raster legend dialog to dictionary.
def updateVectorLegend
 Save information from vector legend dialog to dictionary.
def updateDialog
 Update legend coordinates after moving.

Variables

 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)
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."))
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'])
int minVect = 1
 self.rSizeGBSizer.Add(panel.defaultSize, pos = (0,0), span = (1,2), flag = wx.ALIGN_CENTER_VERTICAL, border = 0)
tuple maxVect = min(10, len(self.instruction[self.vectorId]['list']))
tuple cols = wx.StaticText(panel, id = wx.ID_ANY, label = _("Columns:"))
list min = minVect,maxmaxVect,initiallegendDict['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()
tuple unit = self.unitConv.findUnit(self.panelVector.units['unitsCtrl'].GetStringSelection())
int w = 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 335 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.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.

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.updateDialog (   self)

Update legend coordinates after moving.

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

References widgets.SetValue().

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

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

Save information from vector legend dialog to dictionary.

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


Variable Documentation

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

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.

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

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

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

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

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

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

Initial value:
00001 [ 'Times-Roman', 'Times-Italic', 'Times-Bold', 'Times-BoldItalic', 'Helvetica',\
00002                         'Helvetica-Oblique', 'Helvetica-Bold', 'Helvetica-BoldOblique', 'Courier',\
00003                         '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 atou1(), atovm(), cminv(), csolv(), db__send_short(), db_list_databases(), evmax(), G_lat_format(), G_llres_format(), G_lon_format(), hevmax(), house(), housev(), IL_check_at_points_2d(), IL_grid_calc_2d(), ldumat(), ldvmat(), Nviz_flythrough(), pj_do_proj(), qrecvc(), qreval(), qrevec(), setunfl(), sv2u1v(), sv2uv(), sv2val(), svdu1v(), svduv(), svdval(), unfl(), and unitary().

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 = minVect,maxmaxVect,initiallegendDict['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.

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

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

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

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

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

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

Initial value:
00001 ['aqua', 'black', 'blue', 'brown', 'cyan', 'gray', 'grey', 'green', 'indigo',
00002                 'magenta','orange', 'purple', 'red', 'violet', 'white', 'yellow']

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

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

tuple dialogs.s = self.unitConv.convert(value = float(legendDict['span']), fromUnit = 'inch', toUnit = legendDict['unit'])

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

Referenced by add_chain(), add_ipoint1(), atou1(), atovm(), avl_delete(), cminv(), cmmul(), csolv(), dagostino_d(), db__recv_string(), db__send_string(), db_calloc(), db_legal_tablename(), db_malloc(), db_nocase_compare(), db_realloc(), evmax(), G3d_getVolumeA(), G_lat_format(), G_legal_filename(), G_llres_format(), G_lon_format(), G_math_d_asum_norm(), G_math_d_euclid_norm(), G_math_d_x_dot_y(), G_math_f_asum_norm(), G_math_f_euclid_norm(), G_math_f_x_dot_y(), G_math_i_asum_norm(), G_math_i_euclid_norm(), G_math_i_x_dot_y(), G_math_pivot_create(), G_meridional_radius_of_curvature(), G_radius_of_conformal_tangent_sphere(), G_rotate_around_point(), G_site_new_struct(), G_transverse_radius_of_curvature(), G_window_percentage_overlap(), geary_test(), gs_get_databounds_planes(), gsd_model2real(), gsd_real2model(), hconj(), hevmax(), I_cluster_means(), I_read_one_signature(), I_write_signatures(), IL_dist_square(), ldumat(), ldvmat(), minv(), mmul(), nc_fgets_html(), NetA_betweenness_closeness(), Nviz_draw_all(), Nviz_draw_scalebar(), Nviz_new_scalebar(), Nviz_set_cplane_here(), Nviz_set_scalebar(), ortho(), otrma(), otrsm(), pj_get_string(), psinv(), qrbdi(), qrbdu1(), qrbdv(), RTreeContained(), RTreeOverlap(), ruinv(), S_stroke(), setunfl(), smgen(), solv(), solvps(), solvru(), solvtd(), sv2u1v(), sv2uv(), sv2val(), svdu1v(), svduv(), svdval(), tavl_delete(), trncm(), trnm(), unfl(), utrncm(), utrnhm(), Vect_build_nat(), Vect_hist_read(), Vect_legal_filename(), Vect_set_constraint_region(), Vect_str_to_cat_list(), vmul(), and vnrm().

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_copyFromXdr(), G3d_copyToXdr(), G3d_fillHeader(), G3d_initCopyFromXdr(), G3d_initCopyToXdr(), 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())

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

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