Exemple #1
0
    def __layout(self):
        """Do layout"""
        sizer = wx.BoxSizer(wx.VERTICAL)

        dataSizer = wx.BoxSizer(wx.VERTICAL)

        dataSizer.Add(item=wx.StaticText(
            parent=self.panel,
            id=wx.ID_ANY,
            label=_("Enter name of new vector map:")),
                      proportion=0,
                      flag=wx.ALL,
                      border=3)
        self.vectorNameCtrl = gselect.Select(
            parent=self.panel,
            type='vector',
            mapsets=[grass.gisenv()['MAPSET']],
            size=globalvar.DIALOG_GSELECT_SIZE)
        if self.vectorName:
            self.vectorNameCtrl.SetValue(self.vectorName)
        dataSizer.Add(item=self.vectorNameCtrl,
                      proportion=0,
                      flag=wx.ALL | wx.EXPAND,
                      border=3)
        self.withTableCtrl = wx.CheckBox(parent=self.panel,
                                         id=wx.ID_ANY,
                                         label=_("Export attribute table"))
        self.withTableCtrl.SetValue(True)
        self.withTableCtrl.SetToolTipString(
            _("Export attribute table containing"
              " computed statistical data"))

        dataSizer.Add(item=self.withTableCtrl,
                      proportion=0,
                      flag=wx.ALL,
                      border=3)

        # buttons
        btnSizer = wx.StdDialogButtonSizer()
        btnSizer.AddButton(self.btnCancel)
        btnSizer.AddButton(self.btnOK)
        btnSizer.Realize()

        sizer.Add(item=dataSizer,
                  proportion=1,
                  flag=wx.EXPAND | wx.ALL | wx.ALIGN_CENTER,
                  border=5)

        sizer.Add(item=btnSizer,
                  proportion=0,
                  flag=wx.EXPAND | wx.ALL | wx.ALIGN_CENTER,
                  border=5)

        self.panel.SetSizer(sizer)
        sizer.Fit(self)

        self.SetMinSize(self.GetSize())
Exemple #2
0
    def _createSimplePanel(self):
        panel = wx.Panel(self)
        sizer = wx.BoxSizer(wx.VERTICAL)

        self._firstRaster = gselect.Select(
            parent=panel,
            type='raster',
            size=globalvar.DIALOG_GSELECT_SIZE,
            validator=SimpleValidator(
                callback=self.ValidatorCallback))

        self._secondRaster = gselect.Select(
            parent=panel,
            type='raster',
            size=globalvar.DIALOG_GSELECT_SIZE,
            validator=SimpleValidator(
                callback=self.ValidatorCallback))
        sizer.Add(
            StaticText(
                panel,
                label=_("Name of top/left raster map:")),
            proportion=0,
            flag=wx.EXPAND | wx.ALL,
            border=5)
        sizer.Add(self._firstRaster, proportion=0,
                  flag=wx.EXPAND | wx.ALL, border=1)
        sizer.Add(
            StaticText(
                panel,
                label=_("Name of bottom/right raster map:")),
            proportion=0,
            flag=wx.EXPAND | wx.ALL,
            border=1)
        sizer.Add(self._secondRaster, proportion=0,
                  flag=wx.EXPAND | wx.ALL, border=1)

        self._firstRaster.SetFocus()

        panel.SetSizer(sizer)
        sizer.Fit(panel)

        return panel
Exemple #3
0
    def __init__(
        self,
        parent,
        group=None,
        subgroup=None,
        title=_("Select imagery group"),
        id=wx.ID_ANY,
    ):
        """
        Does post init and layout.

        :param parent: gui parent
        :param title: dialog window title
        :param id: wx id
        """
        SimpleDialog.__init__(self, parent, title)

        self.use_subg = True

        self.groupSelect = gselect.Select(
            parent=self.panel,
            type="group",
            mapsets=[grass.gisenv()["MAPSET"]],
            size=globalvar.DIALOG_GSELECT_SIZE,
            validator=SimpleValidator(callback=self.ValidatorCallback),
        )

        # TODO use when subgroup will be optional
        # self.subg_chbox = wx.CheckBox(parent = self.panel, id = wx.ID_ANY,
        #                              label = _("Use subgroup"))
        self.subGroupSelect = gselect.SubGroupSelect(parent=self.panel)

        self.groupSelect.SetFocus()
        if group:
            self.groupSelect.SetValue(group)
            self.GroupSelected()
        if subgroup:
            self.subGroupSelect.SetValue(subgroup)

        self.editGroup = Button(
            parent=self.panel, id=wx.ID_ANY, label=_("Create/edit group...")
        )

        self.editGroup.Bind(wx.EVT_BUTTON, self.OnEditGroup)
        self.groupSelect.GetTextCtrl().Bind(
            wx.EVT_TEXT, lambda event: wx.CallAfter(self.GroupSelected)
        )

        self.warning = _("Name of imagery group is missing.")
        self._layout()
        self.SetMinSize(self.GetSize())
    def __init__(self, parent, settings={}):
        wx.ScrolledWindow.__init__(
            self,
            parent,
            wx.ID_ANY,
            wx.DefaultPosition,
            wx.DefaultSize,
            wx.HSCROLL | wx.VSCROLL,
        )
        self.SetScrollRate(5, 5)
        self.settings = settings

        self.stBoxTWIN = wx.StaticBox(self, wx.ID_ANY, "Time windows MW")

        # =================DATA=========================
        self.linksAll = wx.RadioButton(self, label="All", style=wx.RB_GROUP)
        self.linksOnly = wx.RadioButton(self, label="Use links")
        self.linksIngnore = wx.RadioButton(self, label="Ignore links")
        self.linksAll.Bind(wx.EVT_RADIOBUTTON, self.refreshLinkSet)
        self.linksIngnore.Bind(wx.EVT_RADIOBUTTON, self.refreshLinkSet)
        self.linksOnly.Bind(wx.EVT_RADIOBUTTON, self.refreshLinkSet)
        self.vectorMap = wx.RadioButton(self, label="Vector map")
        self.vectorMap.Bind(wx.EVT_RADIOBUTTON, self.refreshLinkSet)

        # self.links = BaseInput(self,'Set links according to radio above',True)
        self.links = BaseInput(self, "Set links according to radio above")
        self.mapLabel = wx.StaticText(self, label="Select vector map")
        self.map = gselect.Select(self, type="vector", multiple=False)

        self.start = BaseInput(self, label="Start time")
        self.end = BaseInput(self, label="End time")
        self.getStartBtt = wx.Button(self, label="Get min")
        self.getEndBtt = wx.Button(self, label="Get max")
        self.sumStep = wx.ComboBox(self,
                                   id=wx.ID_ANY,
                                   value="minute",
                                   choices=["minute", "hour", "day"])

        self.stBoxGauge = wx.StaticBox(self, wx.ID_ANY, "Rain gauge")
        self.inpRainGauge = FileInput(self,
                                      "Select folder with raingauges data")
        self.inpRainGauge.pathInput.Bind(wx.EVT_TEXT, self.disableLinksInp)
        # self.sb1 = wx.StaticBox(self, wx.ID_ANY, 'Baseline')
        # self.type = self.rb1 = wx.RadioButton(self, label='Number of points', style=wx.RB_GROUP)
        if len(settings) > 0:
            self.loadSettings()
        self._layout()
Exemple #5
0
    def __init__(self, parent, title=_("Choose raster map")):
        """!Calls super class constructor.

        @param parent gui parent
        @param title dialog window title
        @param id id
        """
        SimpleDialog.__init__(self, parent, title)

        # here is the place to determine element type
        self.element = gselect.Select(parent=self.panel,
                                      type="raster",
                                      size=globalvar.DIALOG_GSELECT_SIZE)

        self._layout()

        self.SetMinSize(self.GetSize())
Exemple #6
0
    def __init__(self, parent, title, element):
        """
        
        :param parent: gui parent
        :param title: dialog title
        :param element: element type ('raster', 'vector')
        """
        
        SimpleDialog.__init__(self, parent, title = title)
        
        self.elementType = element
        self.element = gselect.Select(parent = self.panel, type = element,
                                      size = globalvar.DIALOG_GSELECT_SIZE,
                                      validator = SimpleValidator(callback = self.ValidatorCallback))
        self.element.SetFocus()

        self.warning = _("Name of map is missing.")
        self._layout()
        self.SetMinSize(self.GetSize())
Exemple #7
0
    def _layout(self):
        """Creates the main panel with all the controls on it:
             * mpl canvas
             * mpl navigation toolbar
             * Control panel for interaction
        """
        self.panel = wx.Panel(self)

        # Create the mpl Figure and FigCanvas objects.
        # 5x4 inches, 100 dots-per-inch
        #
        # color =  wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND)
        self.fig = Figure((5.0, 4.0), facecolor=(1, 1, 1))
        self.canvas = FigCanvas(self.panel, wx.ID_ANY, self.fig)
        # axes are initialized later
        self.axes2d = None
        self.axes3d = None

        # Create the navigation toolbar, tied to the canvas
        #
        self.toolbar = NavigationToolbar(self.canvas)

        #
        # Layout
        #

        self.vbox = wx.BoxSizer(wx.VERTICAL)
        self.vbox.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.EXPAND)
        self.vbox.Add(self.toolbar, 0, wx.EXPAND)
        self.vbox.AddSpacer(10)

        gridSizer = wx.GridBagSizer(hgap=5, vgap=5)

        self.datasetSelect = gselect.Select(parent=self.panel, id=wx.ID_ANY,
                                            size=globalvar.DIALOG_GSELECT_SIZE,
                                            type='stds', multiple=True)
        self.drawButton = wx.Button(self.panel, id=wx.ID_ANY, label=_("Draw"))
        self.drawButton.Bind(wx.EVT_BUTTON, self.OnRedraw)
        self.helpButton = wx.Button(self.panel, id=wx.ID_ANY, label=_("Help"))
        self.helpButton.Bind(wx.EVT_BUTTON, self.OnHelp)
        self.view3dCheck = wx.CheckBox(
            self.panel, id=wx.ID_ANY,
            label=_("3D plot of spatio-temporal extents"))
        self.view3dCheck.Bind(wx.EVT_CHECKBOX, self.OnRedraw)
        if not check_version(1, 0, 0):
            self.view3dCheck.SetLabel(_("3D plot of spatio-temporal extents "
                                        "(matplotlib >= 1.0.0)"))
            self.view3dCheck.Disable()

        gridSizer.Add(wx.StaticText(self.panel, id=wx.ID_ANY,
                                    label=_("Select space time dataset(s):")),
                      pos=(0, 0), flag=wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)
        gridSizer.Add(self.datasetSelect, pos=(1, 0), flag=wx.EXPAND)
        gridSizer.Add(self.drawButton, pos=(1, 1), flag=wx.EXPAND)
        gridSizer.Add(self.helpButton, pos=(1, 2), flag=wx.EXPAND)
        gridSizer.Add(
            self.view3dCheck, pos=(2, 0),
            flag=wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)

        self.vbox.Add(
            gridSizer,
            proportion=0,
            flag=wx.EXPAND | wx.ALL,
            border=10)

        self.panel.SetSizer(self.vbox)
        self.vbox.Fit(self)
Exemple #8
0
    def _layout(self):
        """Creates the main panel with all the controls on it:
             * mpl canvas
             * mpl navigation toolbar
             * Control panel for interaction
        """
        self.mainPanel = wx.Panel(self)
        # Create the mpl Figure and FigCanvas objects.
        # 5x4 inches, 100 dots-per-inch
        #
        # color =  wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND)
        # ------------CANVAS AND TOOLBAR------------
        self.fig = Figure((5.0, 4.0), facecolor=(1, 1, 1))
        self.canvas = FigCanvas(self.mainPanel, wx.ID_ANY, self.fig)
        # axes are initialized later
        self.axes2d = None
        self.axes3d = None

        # Create the navigation toolbar, tied to the canvas
        #
        self.toolbar = NavigationToolbar(self.canvas)

        #
        # Layout
        #
        # ------------MAIN VERTICAL SIZER------------
        self.vbox = wx.BoxSizer(wx.VERTICAL)
        self.vbox.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.EXPAND)
        self.vbox.Add(self.toolbar, 0, wx.EXPAND)
        # self.vbox.AddSpacer(10)

        # ------------ADD NOTEBOOK------------
        self.ntb = GNotebook(parent=self.mainPanel, style=FN.FNB_FANCY_TABS)

        # ------------ITEMS IN NOTEBOOK PAGE (RASTER)------------------------

        self.controlPanelRaster = wx.Panel(parent=self.ntb, id=wx.ID_ANY)
        self.datasetSelectLabelR = wx.StaticText(
            parent=self.controlPanelRaster,
            id=wx.ID_ANY,
            label=_('Raster temporal '
                    'dataset (strds)'))

        self.datasetSelectR = gselect.Select(
            parent=self.controlPanelRaster,
            id=wx.ID_ANY,
            size=globalvar.DIALOG_GSELECT_SIZE,
            type='strds',
            multiple=True)
        self.coor = wx.StaticText(parent=self.controlPanelRaster,
                                  id=wx.ID_ANY,
                                  label=_('X and Y coordinates separated by '
                                          'comma:'))
        try:
            self._giface.GetMapWindow()
            self.coorval = gselect.CoordinatesSelect(
                parent=self.controlPanelRaster, giface=self._giface)
        except:
            self.coorval = wx.TextCtrl(parent=self.controlPanelRaster,
                                       id=wx.ID_ANY,
                                       size=globalvar.DIALOG_TEXTCTRL_SIZE,
                                       validator=CoordinatesValidator())

        self.coorval.SetToolTipString(
            _("Coordinates can be obtained for example"
              " by right-clicking on Map Display."))
        self.controlPanelSizerRaster = wx.BoxSizer(wx.VERTICAL)
        # self.controlPanelSizer.Add(wx.StaticText(self.panel, id=wx.ID_ANY,
        # label=_("Select space time raster dataset(s):")),
        # pos=(0, 0), flag=wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)
        self.controlPanelSizerRaster.Add(self.datasetSelectLabelR,
                                         flag=wx.EXPAND)
        self.controlPanelSizerRaster.Add(self.datasetSelectR, flag=wx.EXPAND)

        self.controlPanelSizerRaster.Add(self.coor, flag=wx.EXPAND)
        self.controlPanelSizerRaster.Add(self.coorval, flag=wx.EXPAND)

        self.controlPanelRaster.SetSizer(self.controlPanelSizerRaster)
        self.controlPanelSizerRaster.Fit(self)
        self.ntb.AddPage(page=self.controlPanelRaster,
                         text=_('STRDS'),
                         name='STRDS')

        # ------------ITEMS IN NOTEBOOK PAGE (VECTOR)------------------------
        self.controlPanelVector = wx.Panel(parent=self.ntb, id=wx.ID_ANY)
        self.datasetSelectLabelV = wx.StaticText(
            parent=self.controlPanelVector,
            id=wx.ID_ANY,
            label=_('Vector temporal '
                    'dataset (stvds)\n'
                    'Press ENTER if you'
                    ' type the name of the'
                    ' stvds instead of'
                    ' selecting with the'
                    ' combobox'))
        self.datasetSelectV = gselect.Select(
            parent=self.controlPanelVector,
            id=wx.ID_ANY,
            size=globalvar.DIALOG_GSELECT_SIZE,
            type='stvds',
            multiple=True)
        self.datasetSelectV.Bind(wx.EVT_TEXT, self.OnVectorSelected)

        self.attribute = gselect.ColumnSelect(parent=self.controlPanelVector)
        self.attributeLabel = wx.StaticText(parent=self.controlPanelVector,
                                            id=wx.ID_ANY,
                                            label=_('Select attribute column'))
        # TODO fix the category selection as done for coordinates
        try:
            self._giface.GetMapWindow()
            self.cats = gselect.VectorCategorySelect(
                parent=self.controlPanelVector, giface=self._giface)
        except:
            self.cats = wx.TextCtrl(parent=self.controlPanelVector,
                                    id=wx.ID_ANY,
                                    size=globalvar.DIALOG_TEXTCTRL_SIZE)
        self.catsLabel = wx.StaticText(parent=self.controlPanelVector,
                                       id=wx.ID_ANY,
                                       label=_('Select category of vector(s)'))

        self.controlPanelSizerVector = wx.BoxSizer(wx.VERTICAL)
        # self.controlPanelSizer.Add(wx.StaticText(self.panel, id=wx.ID_ANY,
        # label=_("Select space time raster dataset(s):")),
        # pos=(0, 0), flag=wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)
        self.controlPanelSizerVector.Add(self.datasetSelectLabelV,
                                         flag=wx.EXPAND)
        self.controlPanelSizerVector.Add(self.datasetSelectV, flag=wx.EXPAND)

        self.controlPanelSizerVector.Add(self.attributeLabel, flag=wx.EXPAND)
        self.controlPanelSizerVector.Add(self.attribute, flag=wx.EXPAND)

        self.controlPanelSizerVector.Add(self.catsLabel, flag=wx.EXPAND)
        self.controlPanelSizerVector.Add(self.cats, flag=wx.EXPAND)

        self.controlPanelVector.SetSizer(self.controlPanelSizerVector)
        self.controlPanelSizerVector.Fit(self)
        self.ntb.AddPage(page=self.controlPanelVector,
                         text=_('STVDS'),
                         name='STVDS')

        # ------------Buttons on the bottom(draw,help)------------
        self.vButtPanel = wx.Panel(self.mainPanel, id=wx.ID_ANY)
        self.vButtSizer = wx.BoxSizer(wx.HORIZONTAL)

        self.drawButton = wx.Button(self.vButtPanel,
                                    id=wx.ID_ANY,
                                    label=_("Draw"))
        self.drawButton.Bind(wx.EVT_BUTTON, self.OnRedraw)
        self.helpButton = wx.Button(self.vButtPanel,
                                    id=wx.ID_ANY,
                                    label=_("Help"))
        self.helpButton.Bind(wx.EVT_BUTTON, self.OnHelp)
        self.vButtSizer.Add(self.drawButton)
        self.vButtSizer.Add(self.helpButton)
        self.vButtPanel.SetSizer(self.vButtSizer)

        self.mainPanel.SetSizer(self.vbox)
        self.vbox.Add(self.ntb, flag=wx.EXPAND)
        self.vbox.Add(self.vButtPanel, flag=wx.EXPAND)
        self.vbox.Fit(self)
        self.mainPanel.Fit()
Exemple #9
0
    def _layout(self):
        """Creates the main panel with all the controls on it:
             * mpl canvas
             * mpl navigation toolbar
             * Control panel for interaction
        """
        self.panel = wx.Panel(self)

        # Create the mpl Figure and FigCanvas objects.
        # 5x4 inches, 100 dots-per-inch
        #
        # color =  wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND)
        self.fig = Figure((5.0, 4.0), facecolor=(1, 1, 1))
        self.canvas = FigCanvas(self.panel, wx.ID_ANY, self.fig)
        # axes are initialized later
        self.axes2d = None
        self.axes3d = None

        # Create the navigation toolbar, tied to the canvas
        #
        self.toolbar = NavigationToolbar(self.canvas)

        #
        # Layout
        #

        self.vbox = wx.BoxSizer(wx.VERTICAL)
        self.vbox.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.EXPAND)
        self.vbox.Add(self.toolbar, 0, wx.EXPAND)
        self.vbox.AddSpacer(10)

        gridSizer = wx.GridBagSizer(hgap=5, vgap=5)

        self.datasetSelect = gselect.Select(parent=self.panel,
                                            id=wx.ID_ANY,
                                            size=globalvar.DIALOG_GSELECT_SIZE,
                                            type='strds',
                                            multiple=True)
        self.drawButton = wx.Button(self.panel, id=wx.ID_ANY, label=_("Draw"))
        self.drawButton.Bind(wx.EVT_BUTTON, self.OnRedraw)
        self.helpButton = wx.Button(self.panel, id=wx.ID_ANY, label=_("Help"))
        self.helpButton.Bind(wx.EVT_BUTTON, self.OnHelp)

        self.coor = wx.StaticText(
            parent=self.panel,
            id=wx.ID_ANY,
            label=_('X and Y coordinates separated by comma:'))

        self.coorval = wx.TextCtrl(parent=self.panel, id=wx.ID_ANY)
        self.coorval.SetToolTipString(
            _("Coordinates can be obtained for example "
              "by right-clicking on Map Display."))

        gridSizer.Add(wx.StaticText(
            self.panel,
            id=wx.ID_ANY,
            label=_("Select space time raster dataset(s):")),
                      pos=(0, 0),
                      flag=wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)
        gridSizer.Add(self.datasetSelect, pos=(1, 0), flag=wx.EXPAND)

        gridSizer.Add(self.coor, pos=(2, 0), flag=wx.EXPAND)

        gridSizer.Add(self.coorval, pos=(3, 0), flag=wx.EXPAND)
        gridSizer.Add(self.drawButton, pos=(3, 1), flag=wx.EXPAND)
        gridSizer.Add(self.helpButton, pos=(3, 2), flag=wx.EXPAND)

        self.vbox.Add(gridSizer,
                      proportion=0,
                      flag=wx.EXPAND | wx.ALL,
                      border=10)

        self.panel.SetSizer(self.vbox)
        self.vbox.Fit(self)
Exemple #10
0
    def __init__(self, parent, Rinstance, controller, *args, **kwargs):
        wx.Panel.__init__(self, parent, *args, **kwargs)

        self.parent = parent
        self.border = 4

        #    1. Input data
        InputBoxSizer = wx.StaticBoxSizer(
            wx.StaticBox(self, id=wx.ID_ANY, label=_("Input Data")),
            orient=wx.HORIZONTAL,
        )

        flexSizer = wx.FlexGridSizer(cols=3, hgap=5, vgap=5)
        flexSizer.AddGrowableCol(1)

        flexSizer.Add(
            wx.StaticText(self, id=wx.ID_ANY, label=_("Point dataset:")),
            flag=wx.ALIGN_CENTER_VERTICAL,
        )
        self.InputDataMap = gselect.VectorSelect(parent=self,
                                                 ftype="points",
                                                 updateOnPopup=False)
        self.InputDataMap.SetFocus()
        flexSizer.Add(self.InputDataMap, flag=wx.ALIGN_CENTER_VERTICAL)

        RefreshButton = wx.Button(self, id=wx.ID_REFRESH)
        RefreshButton.Bind(wx.EVT_BUTTON, self.OnButtonRefresh)
        flexSizer.Add(RefreshButton, flag=wx.ALIGN_CENTER_VERTICAL)

        flexSizer.Add(
            wx.StaticText(self, id=wx.ID_ANY, label=_("Numeric column:")),
            flag=wx.ALIGN_CENTER_VERTICAL,
        )
        self.InputDataColumn = gselect.ColumnSelect(self, id=wx.ID_ANY)
        flexSizer.Add(self.InputDataColumn)

        self.InputDataMap.GetChildren()[0].Bind(wx.EVT_TEXT,
                                                self.OnInputMapChanged)
        self.InputDataColumn.GetChildren()[0].Bind(wx.EVT_TEXT,
                                                   self.OnInputColumnChanged)

        InputBoxSizer.Add(flexSizer)

        # 2. Kriging. In book pages one for each R package. Includes variogram
        # fit.
        KrigingSizer = wx.StaticBoxSizer(
            wx.StaticBox(self, id=wx.ID_ANY, label=_("Kriging")),
            wx.HORIZONTAL)

        self.RPackagesBook = GNotebook(parent=self,
                                       style=globalvar.FNPageDStyle)

        # , "geoR"]: #@TODO: enable it if/when it'll be implemented.
        for Rpackage in ["gstat"]:
            self.CreatePage(package=Rpackage,
                            Rinstance=Rinstance,
                            controller=controller)

        # Command output. From menuform module, cmdPanel class
        self._gconsole = gconsole.GConsole(guiparent=self)
        self.goutput = goutput.GConsoleWindow(parent=self,
                                              gconsole=self._gconsole,
                                              margin=False)
        self.goutputId = self.RPackagesBook.GetPageCount()
        self.outpage = self.RPackagesBook.AddPage(page=self.goutput,
                                                  text=_("Command output"),
                                                  name="output")
        self._gconsole.Bind(
            gconsole.EVT_CMD_RUN,
            lambda event: self._switchPageHandler(
                event=event, notification=Notification.MAKE_VISIBLE),
        )
        self._gconsole.Bind(
            gconsole.EVT_CMD_DONE,
            lambda event: self._switchPageHandler(
                event=event, notification=Notification.RAISE_WINDOW),
        )
        self.RPackagesBook.SetSelection(0)
        KrigingSizer.Add(self.RPackagesBook, proportion=1, flag=wx.EXPAND)

        #    3. Output Parameters.
        OutputSizer = wx.StaticBoxSizer(
            wx.StaticBox(self, id=wx.ID_ANY, label=_("Output")), wx.HORIZONTAL)

        OutputParameters = wx.GridBagSizer(hgap=5, vgap=5)
        OutputParameters.Add(
            wx.StaticText(self,
                          id=wx.ID_ANY,
                          label=_("Name for the output raster map:")),
            flag=wx.ALIGN_CENTER_VERTICAL,
            pos=(0, 0),
        )
        self.OutputMapName = gselect.Select(parent=self,
                                            id=wx.ID_ANY,
                                            type="raster",
                                            mapsets=[grass.gisenv()["MAPSET"]])
        OutputParameters.Add(self.OutputMapName,
                             flag=wx.EXPAND | wx.ALL,
                             pos=(0, 1))
        self.VarianceRasterCheckbox = wx.CheckBox(
            self, id=wx.ID_ANY, label=_("Export variance map as well: "))
        self.VarianceRasterCheckbox.SetValue(state=True)
        OutputParameters.Add(self.VarianceRasterCheckbox,
                             flag=wx.ALIGN_CENTER_VERTICAL,
                             pos=(1, 0))
        self.OutputVarianceMapName = gselect.Select(
            parent=self,
            id=wx.ID_ANY,
            type="raster",
            mapsets=[grass.gisenv()["MAPSET"]])
        self.VarianceRasterCheckbox.Bind(wx.EVT_CHECKBOX,
                                         self.OnVarianceCBChecked)
        OutputParameters.Add(self.OutputVarianceMapName,
                             flag=wx.EXPAND | wx.ALL,
                             pos=(1, 1))

        self.OverwriteCheckBox = wx.CheckBox(
            self,
            id=wx.ID_ANY,
            label=_("Allow output files to overwrite existing files"),
        )
        self.OverwriteCheckBox.SetValue(
            UserSettings.Get(group="cmd", key="overwrite", subkey="enabled"))
        OutputParameters.Add(self.OverwriteCheckBox, pos=(2, 0), span=(1, 2))

        OutputParameters.AddGrowableCol(1)
        OutputSizer.Add(OutputParameters,
                        proportion=0,
                        flag=wx.EXPAND | wx.ALL,
                        border=self.border)

        #    4. Run Button and Quit Button
        ButtonSizer = wx.BoxSizer(wx.HORIZONTAL)
        HelpButton = wx.Button(self, id=wx.ID_HELP)
        HelpButton.Bind(wx.EVT_BUTTON, self.OnHelpButton)
        QuitButton = wx.Button(self, id=wx.ID_EXIT)
        QuitButton.Bind(wx.EVT_BUTTON, self.OnCloseWindow)
        # no stock ID for Run button..
        self.RunButton = wx.Button(self, id=wx.ID_ANY, label=_("&Run"))
        self.RunButton.Bind(wx.EVT_BUTTON, self.OnRunButton)
        # disable it on loading the interface, as input map is not set
        self.RunButton.Enable(False)
        ButtonSizer.Add(HelpButton,
                        proportion=0,
                        flag=wx.ALIGN_LEFT | wx.ALL,
                        border=self.border)
        ButtonSizer.Add(QuitButton,
                        proportion=0,
                        flag=wx.ALIGN_RIGHT | wx.ALL,
                        border=self.border)
        ButtonSizer.Add(
            self.RunButton,
            proportion=0,
            flag=wx.ALIGN_RIGHT | wx.ALL,
            border=self.border,
        )

        #    Main Sizer. Add each child sizer as soon as it is ready.
        Sizer = wx.BoxSizer(wx.VERTICAL)
        Sizer.Add(InputBoxSizer,
                  proportion=0,
                  flag=wx.EXPAND | wx.ALL,
                  border=self.border)
        Sizer.Add(KrigingSizer,
                  proportion=1,
                  flag=wx.EXPAND | wx.ALL,
                  border=self.border)
        Sizer.Add(OutputSizer,
                  proportion=0,
                  flag=wx.EXPAND | wx.ALL,
                  border=self.border)
        Sizer.Add(ButtonSizer,
                  proportion=0,
                  flag=wx.ALIGN_RIGHT | wx.ALL,
                  border=self.border)
        self.SetSizerAndFit(Sizer)

        # last action of __init__: update imput data list.
        # it's performed in the few seconds gap while user examines interface before clicking anything.
        # @TODO: implement a splashcreen IF the maps cause a noticeable lag [markus' suggestion]
        self.InputDataMap.GetElementList()