示例#1
0
        def _size(width, height):
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Width:"), False)
            self.s_width = SpinBtn(width, 450, 1024, 100, 4)
            hbox.pack_start(self.s_width)

            hbox.pack_start(lbl("Height:"), False)
            self.s_height = SpinBtn(height, 400, 768, 100, 4)
            hbox.pack_start(self.s_height)
            return myFrame(" Size ", hbox)
        def _size(width, height):
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Width:"), False)
            self.s_width = SpinBtn(width, 450, 1024, 100, 4)
            hbox.pack_start(self.s_width)

            hbox.pack_start(lbl("Height:"), False)
            self.s_height = SpinBtn(height, 400, 768, 100, 4)
            hbox.pack_start(self.s_height)
            return myFrame(" Size ", hbox)
示例#3
0
        def _center(lat0, lon0):
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("latitude:"))
            self.e_lat0 = myEntry("%.6f" % lat0, 15, False)
            hbox.pack_start(self.e_lat0, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("longitude:"))
            self.e_lon0 = myEntry("%.6f" % lon0, 15, False)
            hbox.pack_start(self.e_lon0, False)
            vbox.pack_start(hbox)
            return myFrame(" Center ", vbox)
示例#4
0
        def _area(kmx, kmy):
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("width:"))
            self.e_kmx = myEntry("%.6g" % kmx, 10, False)
            hbox.pack_start(self.e_kmx, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("height:"))
            self.e_kmy = myEntry("%.6g" % kmy, 10, False)
            hbox.pack_start(self.e_kmy, False)
            vbox.pack_start(hbox)
            return myFrame(" Area (km) ", vbox)
示例#5
0
        def _target_sk42():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Latitude:"))
            self._target_sk42_Lat = myEntry("%.9g" % 0, 10, False)
            hbox.pack_start(self._target_sk42_Lat, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Longitude:"))
            self._target_sk42_Lon = myEntry("%.9g" % 0, 10, False)
            hbox.pack_start(self._target_sk42_Lon, False)
            vbox.pack_start(hbox)
            return myFrame(" Target sk42", vbox)
        def _center(lat0, lon0):
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("latitude:"))
            self.e_lat0 = myEntry("%.6f" % lat0, 15, False)
            hbox.pack_start(self.e_lat0, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("longitude:"))
            self.e_lon0 = myEntry("%.6f" % lon0, 15, False)
            hbox.pack_start(self.e_lon0, False)
            vbox.pack_start(hbox)
            return myFrame(" Center ", vbox)
        def _area(kmx, kmy):
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("width:"))
            self.e_kmx = myEntry("%.6g" % kmx, 10, False)
            hbox.pack_start(self.e_kmx, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("height:"))
            self.e_kmy = myEntry("%.6g" % kmy, 10, False)
            hbox.pack_start(self.e_kmy, False)
            vbox.pack_start(hbox)
            return myFrame(" Area (km) ", vbox)
示例#8
0
    def gps_track_settings(self, gps_track, track_width, track_interval):
        self.cb_gps_track = gtk.CheckButton('Log GPS track')
        self.cb_gps_track.set_active(gps_track)
        self.sb_gps_track_width = SpinBtn(track_width, 1, 20, 1, 2)
        self.sb_gps_track_interval = SpinBtn(track_interval, 1, 1000, 10, 4)

        vbox = gtk.VBox(False, 10)
        hbox = gtk.HBox(False, 10)
        hbox.pack_start(self.cb_gps_track)
        hbox.pack_start(lbl("Track width: "))
        hbox.pack_start(self.sb_gps_track_width)
        hbox.pack_start(lbl("Point interval (in meters): "))
        hbox.pack_start(self.sb_gps_track_interval)
        vbox.pack_start(hbox)
        return myFrame(" GPS track ", vbox)
示例#9
0
        def _first_point():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("широта:"))
            self.entry = myEntry("%.6f" % first_point[0], 10, False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("долгота:"))
            self.distance = myEntry("%.6f" % first_point[1], 10, False)
            hbox.pack_start(self.distance, False)
            vbox.pack_start(hbox)

            return myFrame("базовая точка", vbox)
示例#10
0
        def _second_point():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("широта:"))
            self.entry = myEntry("%.6f" % second_point[0], 10, False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("долгота:"))
            self.entry = myEntry("%.6f" % second_point[1], 10, False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            return myFrame("цель", vbox)
示例#11
0
文件: widMyGPS.py 项目: nateseay/gbv
    def gps_track_settings(self, gps_track, track_width, track_interval):
        self.cb_gps_track = gtk.CheckButton('Draw GPS track')
        self.cb_gps_track.set_active(gps_track)
        self.sb_gps_track_width = SpinBtn(track_width, 1, 20, 1, 2)
        self.sb_gps_track_interval = SpinBtn(track_interval, 1, 1000, 10, 4)

        vbox = gtk.VBox(False, 10)
        hbox = gtk.HBox(False, 10)
        hbox.pack_start(self.cb_gps_track)
        hbox.pack_start(lbl("Track width: "))
        hbox.pack_start(self.sb_gps_track_width)
        hbox.pack_start(lbl("Point interval (in meters): "))
        hbox.pack_start(self.sb_gps_track_interval)
        vbox.pack_start(hbox)
        return myFrame(" GPS track ", vbox)
示例#12
0
    def show(self, conf):
        def inner_box():
            vbox = gtk.VBox(False, 10)
            vbox.pack_start(self.scale_cross_element(conf.scale_visible, conf.show_cross))
            vbox.pack_start(self.service_combo(conf.map_service, conf.oneDirPerMap))
            hbox = gtk.HBox(False, 10)
            hbox.set_border_width(20)
            hbox.pack_start(vbox)
            return hbox

        vbox = gtk.VBox(False, 10)
        vbox.set_border_width(10)
        hbox = gtk.HBox(False, 10)
        hbox.pack_start(lbl("Select new theme and restart GMapCatcher."))
        self.cmb_themes = gtk.combo_box_new_text()

        self.load_combo(self.cmb_themes)
        hbox.pack_start(self.cmb_themes)
        vbox.pack_start(myFrame(" Available themes ", hbox), False)
        vbox.pack_start(inner_box(), False)

        hpaned = gtk.VPaned()
        hpaned.pack1(vbox, True, True)
        buttons = self.__action_buttons(conf)
        hpaned.connect('key-press-event', self.key_press, conf)
        hpaned.pack2(buttons, False, False)
        return hpaned
示例#13
0
    def show(self, conf):
        def inner_box():
            vbox = gtk.VBox(False, 10)
            vbox.pack_start(self.gps_updt_rate(conf.gps_update_rate))
            vbox.pack_start(self.gps_max_zoom(conf.max_gps_zoom))
            vbox.pack_start(self.gps_mode_combo(conf.gps_mode))
            hbox = gtk.HBox(False, 10)
            hbox.set_border_width(20)
            hbox.pack_start(vbox)
            return hbox

        vbox = gtk.VBox(False, 10)
        vbox.set_border_width(10)
        hbox = gtk.HBox(False, 10)
        hbox.pack_start(lbl("Select new theme and restart GMapCatcher."))
        self.cmb_themes = gtk.combo_box_new_text()

        hbox.pack_start(self.cmb_themes)
        #vbox.pack_start(myFrame(" Available themes ", hbox), False)
        vbox.pack_start(inner_box(), False)

        hpaned = gtk.VPaned()
        hpaned.pack1(vbox, True, True)
        buttons = self.__action_buttons(conf)
        hpaned.pack2(buttons, False, False)
        hpaned.connect('key-press-event', self.key_press, conf)
        return hpaned
示例#14
0
 def gps_max_zoom(self, max_gps_zoom):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("Here you can set the maximum zoom for the GPS: "))
     self.s_gps_max_zoom = SpinBtn(max_gps_zoom, MAP_MIN_ZOOM_LEVEL,
                                   MAP_MAX_ZOOM_LEVEL - 1)
     hbox.pack_start(self.s_gps_max_zoom)
     return myFrame(" GPS Max Zoom ", hbox)
示例#15
0
    def service_combo(self, conf):
        vbox = gtk.VBox(False, 5)
        hbox = gtk.HBox(False, 10)
        hbox.pack_start(lbl("Select your favorite map service: "))
        self.cmb_service = gtk.combo_box_new_text()
        intActive = 0
        bad_map_servers = conf.hide_map_servers.split(',')
        for intPos in range(len(MAP_SERVERS)):
            if not str(intPos) in bad_map_servers:
                self.cmb_service.append_text(MAP_SERVERS[intPos])
                if MAP_SERVERS[intPos] == conf.map_service:
                    intActive = len(self.cmb_service.get_model()) - 1
        self.cmb_service.set_active(intActive)
        hbox.pack_start(self.cmb_service)
        vbox.pack_start(hbox)

        # Check box for option to create a dir per Map service
        hbox = gtk.HBox()
        self.cb_oneDirPerMap = gtk.CheckButton("Use a different folder per Map Service")
        self.cb_oneDirPerMap.set_active(conf.oneDirPerMap)
        hbox.pack_start(self.cb_oneDirPerMap)

        event_box = gtk.EventBox()
        label = gtk.Label()
        label.set_text("<span foreground=\"blue\" underline=\"single\">Select Map Servers</span>")
        label.set_use_markup(True)
        event_box.add(label)
        event_box.set_events(gtk.gdk.BUTTON_PRESS_MASK)
        event_box.connect("button_press_event", self.open_editor)
        hbox.pack_start(event_box)
        vbox.pack_start(hbox)
        return myFrame(" Map service ", vbox)
示例#16
0
    def service_combo(self, conf):
        vbox = gtk.VBox(False, 5)
        hbox = gtk.HBox(False, 10)
        hbox.pack_start(lbl("Select your favorite map service: "))
        self.cmb_service = gtk.combo_box_new_text()
        intActive = 0
        bad_map_servers = conf.hide_map_servers.split(',')
        for intPos in range(len(MAP_SERVERS)):
            if not str(intPos) in bad_map_servers:
                self.cmb_service.append_text(MAP_SERVERS[intPos])
                if MAP_SERVERS[intPos] == conf.map_service:
                    intActive = len(self.cmb_service.get_model()) - 1
        self.cmb_service.set_active(intActive)
        hbox.pack_start(self.cmb_service)
        vbox.pack_start(hbox)

        # Check box for option to create a dir per Map service
        hbox = gtk.HBox()
        self.cb_oneDirPerMap = gtk.CheckButton(
            "Use a different folder per Map Service")
        self.cb_oneDirPerMap.set_active(conf.oneDirPerMap)
        hbox.pack_start(self.cb_oneDirPerMap)

        event_box = gtk.EventBox()
        label = gtk.Label()
        label.set_text(
            "<span foreground=\"blue\" underline=\"single\">Select Map Servers</span>"
        )
        label.set_use_markup(True)
        event_box.add(label)
        event_box.set_events(gtk.gdk.BUTTON_PRESS_MASK)
        event_box.connect("button_press_event", self.open_editor)
        hbox.pack_start(event_box)
        vbox.pack_start(hbox)
        return myFrame(" Map service ", vbox)
示例#17
0
 def _center(center):
     hbox = gtk.HBox(False, 0)
     hbox.pack_start(lbl(" (( "), False)
     self.s_center00 = SpinBtn(center[0][0], 0, 999999, 1, 6)
     hbox.pack_start(self.s_center00, False)
     hbox.pack_start(lbl(" ,  "), False)
     self.s_center01 = SpinBtn(center[0][1], 0, 999999, 1, 6)
     hbox.pack_start(self.s_center01, False)
     hbox.pack_start(lbl(" ), ( "), False)
     self.s_center10 = SpinBtn(center[1][0], 0, 256, 32, 3)
     hbox.pack_start(self.s_center10, False)
     hbox.pack_start(lbl(" ,  "), False)
     self.s_center11 = SpinBtn(center[1][1], 0, 256, 32, 3)
     hbox.pack_start(self.s_center11, False)
     hbox.pack_start(lbl(" )) "), False)
     return myFrame(" Center ", hbox)
示例#18
0
 def gps_max_zoom(self, max_gps_zoom):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("Maximum zoom for GPS: "))
     self.s_gps_max_zoom = SpinBtn(max_gps_zoom, MAP_MIN_ZOOM_LEVEL,
                                   MAP_MAX_ZOOM_LEVEL - 1)
     hbox.pack_start(self.s_gps_max_zoom)
     return hbox
示例#19
0
    def show(self, conf):
        def inner_box():
            vbox = gtk.VBox(False, 10)
            vbox.pack_start(self.gps_updt_rate(conf.gps_update_rate))
            vbox.pack_start(self.gps_max_zoom(conf.max_gps_zoom))
            vbox.pack_start(self.gps_mode_combo(conf.gps_mode))
            hbox = gtk.HBox(False, 10)
            hbox.set_border_width(20)
            hbox.pack_start(vbox)
            return hbox

        vbox = gtk.VBox(False, 10)
        vbox.set_border_width(10)
        hbox = gtk.HBox(False, 10)
        hbox.pack_start(lbl("Select new theme and restart GMapCatcher."))
        self.cmb_themes = gtk.combo_box_new_text()

        hbox.pack_start(self.cmb_themes)
        #vbox.pack_start(myFrame(" Available themes ", hbox), False)
        vbox.pack_start(inner_box(), False)

        hpaned = gtk.VPaned()
        hpaned.pack1(vbox, True, True)
        buttons = self.__action_buttons(conf)
        hpaned.pack2(buttons, False, False)
        hpaned.connect('key-press-event', self.key_press, conf)
        return hpaned
示例#20
0
文件: widMyGPS.py 项目: nateseay/gbv
 def gps_updt_rate(self, gps_update_rate):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("GPS update rate in seconds: "))
     self.e_gps_updt_rate = SpinBtn(gps_update_rate, 0.1, 100, 0.1, 5, False)
     self.e_gps_updt_rate.set_digits(1)
     hbox.pack_start(self.e_gps_updt_rate)
     return hbox
 def _center(center):
     hbox = gtk.HBox(False, 0)
     hbox.pack_start(lbl(" (( "), False)
     self.s_center00 = SpinBtn(center[0][0], 0, 999999, 1, 6)
     hbox.pack_start(self.s_center00, False)
     hbox.pack_start(lbl(" ,  "), False)
     self.s_center01 = SpinBtn(center[0][1], 0, 999999, 1, 6)
     hbox.pack_start(self.s_center01, False)
     hbox.pack_start(lbl(" ), ( "), False)
     self.s_center10 = SpinBtn(center[1][0], 0, 256, 32, 3)
     hbox.pack_start(self.s_center10, False)
     hbox.pack_start(lbl(" ,  "), False)
     self.s_center11 = SpinBtn(center[1][1], 0, 256, 32, 3)
     hbox.pack_start(self.s_center11, False)
     hbox.pack_start(lbl(" )) "), False)
     return myFrame(" Center ", hbox)
示例#22
0
        def _color_debug():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Color:"))

            self.store = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING)

            options = [["red", "marker_combo_red.png"],
                       ["blue", "marker_combo_blue.png"],
                       ["yellow", "marker_combo_yellow.png"],
                       ["green", "marker_combo_green.png"],
                       ["camera_purple", "camera_combo_purple.png"]]

            self._marker_color = gtk.ComboBox(self.store)

            self._marker_color.set_active(1)
            cell = gtk.CellRendererText()
            self._marker_color.pack_start(cell, True)
            self._marker_color.add_attribute(cell, 'text', 1)

            cell = gtk.CellRendererPixbuf()
            self._marker_color.pack_start(cell, True)
            self._marker_color.add_attribute(cell, 'pixbuf', 0)

            markers = MyMarkers()
            for color, img in options:
                iter = self.store.append()
                pixbuf = markers.get_marker_pixbuf(15, img)
                self.store.set(iter, 0, pixbuf, 1, color)

            self._marker_color.set_active(1)
            hbox.pack_start(self._marker_color, False)
            vbox.pack_start(hbox)

            return myFrame(" Color", vbox)
示例#23
0
 def gps_max_zoom(self, max_gps_zoom):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("Here you can set the maximum zoom for the GPS: "))
     self.s_gps_max_zoom = SpinBtn(max_gps_zoom,
             MAP_MIN_ZOOM_LEVEL, MAP_MAX_ZOOM_LEVEL-1)
     hbox.pack_start(self.s_gps_max_zoom)
     return myFrame(" GPS Max Zoom ", hbox)
示例#24
0
文件: widMyGPS.py 项目: nateseay/gbv
 def gps_max_zoom(self, max_gps_zoom):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("Maximum zoom for GPS: "))
     self.s_gps_max_zoom = SpinBtn(max_gps_zoom,
             MAP_MIN_ZOOM_LEVEL, MAP_MAX_ZOOM_LEVEL - 1)
     hbox.pack_start(self.s_gps_max_zoom)
     return hbox
示例#25
0
 def gps_updt_rate(self, gps_update_rate):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("GPS update rate in seconds: "))
     self.e_gps_updt_rate = SpinBtn(gps_update_rate, 0.1, 100, 0.1, 5,
                                    False)
     self.e_gps_updt_rate.set_digits(1)
     hbox.pack_start(self.e_gps_updt_rate)
     return hbox
示例#26
0
 def gps_mode_combo(self, gps_mode):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("Select your initial GPS mode: "))
     self.cmb_gps_mode = gtk.combo_box_new_text()
     for strMode in GPS_NAMES:
         self.cmb_gps_mode.append_text(strMode)
     self.cmb_gps_mode.set_active(gps_mode)
     hbox.pack_start(self.cmb_gps_mode)
     return myFrame(" GPS Mode ", hbox)
示例#27
0
文件: widMyGPS.py 项目: nateseay/gbv
 def gps_type_combo(self):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("GPS type: "))
     self.cmb_gps_type = gtk.combo_box_new_text()
     for strType in GPS_TYPES:
         self.cmb_gps_type.append_text(strType)
     self.cmb_gps_type.connect('changed', self.cmb_gps_changed)
     hbox.pack_start(self.cmb_gps_type)
     return hbox
示例#28
0
        def _angle2():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("angle:"))
            self.angle2 = myEntry("%.9g" % 0, 10, False)
            hbox.pack_start(self.angle2, False)
            vbox.pack_start(hbox)

            return myFrame(" angle 2", vbox)
示例#29
0
 def status_combo(active_type_id):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl(" Select status bar type "))
     self.cmb_status_type = gtk.combo_box_new_text()
     for strType in STATUS_TYPE:
         self.cmb_status_type.append_text(strType)
     self.cmb_status_type.set_active(active_type_id)
     hbox.pack_start(self.cmb_status_type)
     return hbox
示例#30
0
 def gps_type_combo(self):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("GPS type: "))
     self.cmb_gps_type = gtk.combo_box_new_text()
     for strType in GPS_TYPES:
         self.cmb_gps_type.append_text(strType)
     self.cmb_gps_type.connect('changed', self.cmb_gps_changed)
     hbox.pack_start(self.cmb_gps_type)
     return hbox
示例#31
0
 def gps_mode_combo(self, gps_mode):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("Initial GPS mode: "))
     self.cmb_gps_mode = gtk.combo_box_new_text()
     for strMode in GPS_NAMES:
         self.cmb_gps_mode.append_text(strMode)
     self.cmb_gps_mode.set_active(gps_mode)
     hbox.pack_start(self.cmb_gps_mode)
     return hbox
示例#32
0
        def _target_wgs84():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Latitude:"))
            self._target_wgs84_Lat = myEntry("%.9g" % 0, 10, False)
            hbox.pack_start(self._target_wgs84_Lat, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Longitude:"))
            self._target_wgs84_Lon = myEntry("%.9g" % 0, 10, False)
            hbox.pack_start(self._target_wgs84_Lon, False)
            vbox.pack_start(hbox)

            self._target_wgs84_Lon.connect("changed", _target_wg84_changed)
            self._target_wgs84_Lat.connect("changed", _target_wg84_changed)

            return myFrame(" Target Wgs84", vbox)
示例#33
0
 def status_combo(active_type_id):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl(" Select status bar type "))
     self.cmb_status_type = gtk.combo_box_new_text()
     for strType in STATUS_TYPE:
         self.cmb_status_type.append_text(strType)
     self.cmb_status_type.set_active(active_type_id)
     hbox.pack_start(self.cmb_status_type)
     return hbox
示例#34
0
        def _markerName():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Choose Name:"))
            self._marker_name = gtk.Entry()
            self._marker_name.set_text("")
            hbox.pack_start(self._marker_name, False)
            vbox.pack_start(hbox)

            return myFrame(" Marker Name", vbox)
示例#35
0
 def _center(center):
     hbox = gtk.HBox(False, 0)
     hbox.pack_start(lbl(" (( "), False)
     self.s_center00 = SpinBtn(center[0][0], 0, 999999, 1, 6)
     hbox.pack_start(self.s_center00, False)
     hbox.pack_start(lbl(" ,  "), False)
     self.s_center01 = SpinBtn(center[0][1], 0, 999999, 1, 6)
     hbox.pack_start(self.s_center01, False)
     hbox.pack_start(lbl(" ), ( "), False)
     self.s_center10 = SpinBtn(center[1][0], 0, 256, 32, 3)
     hbox.pack_start(self.s_center10, False)
     hbox.pack_start(lbl(" ,  "), False)
     self.s_center11 = SpinBtn(center[1][1], 0, 256, 32, 3)
     hbox.pack_start(self.s_center11, False)
     hbox.pack_start(lbl(" )) "), False)
     button = gtk.Button("Use Current")
     button.connect('clicked', btn_use_current, parent)
     hbox.pack_start(button)
     return myFrame(" Center ", hbox)
示例#36
0
 def _center(center):
     hbox = gtk.HBox(False, 0)
     hbox.pack_start(lbl(" (( "), False)
     self.s_center00 = SpinBtn(center[0][0], 0, 999999, 1, 6)
     hbox.pack_start(self.s_center00, False)
     hbox.pack_start(lbl(" ,  "), False)
     self.s_center01 = SpinBtn(center[0][1], 0, 999999, 1, 6)
     hbox.pack_start(self.s_center01, False)
     hbox.pack_start(lbl(" ), ( "), False)
     self.s_center10 = SpinBtn(center[1][0], 0, 256, 32, 3)
     hbox.pack_start(self.s_center10, False)
     hbox.pack_start(lbl(" ,  "), False)
     self.s_center11 = SpinBtn(center[1][1], 0, 256, 32, 3)
     hbox.pack_start(self.s_center11, False)
     hbox.pack_start(lbl(" )) "), False)
     button = gtk.Button("Use Current")
     button.connect('clicked', btn_use_current, parent)
     hbox.pack_start(button)
     return myFrame(" Center ", hbox)
示例#37
0
        def _compass():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("compass:"******"%.6g" % 0, 10, False)
            hbox.pack_start(self._compass, False)
            vbox.pack_start(hbox)
            self._compass.connect("changed", _update_target_cb)

            return myFrame(" Compass", vbox)
示例#38
0
        def _distance():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("distance:"))
            self._distance = myEntry("%.6g" % 0, 10, False)
            hbox.pack_start(self._distance, False)
            vbox.pack_start(hbox)
            self._distance.connect("changed", _update_target_cb)

            return myFrame(" Distance", vbox)
示例#39
0
        def _zoom(zoom0, zoom1):
            out_hbox = gtk.HBox(False, 50)
            out_hbox.set_border_width(10)
            in_hbox = gtk.HBox(False, 20)
            in_hbox.pack_start(lbl("min:"), False)
            self.s_zoom0 = SpinBtn(zoom0)
            self.s_zoom0.set_digits(0)
            in_hbox.pack_start(self.s_zoom0)
            out_hbox.pack_start(in_hbox)

            in_hbox = gtk.HBox(False, 20)
            in_hbox.pack_start(lbl("max:"), False)
            self.s_zoom1 = SpinBtn(zoom1)
            self.s_zoom1.set_digits(0)
            in_hbox.pack_start(self.s_zoom1)
            out_hbox.pack_start(in_hbox)
            hbox = gtk.HBox()
            hbox.set_border_width(10)
            hbox.pack_start(myFrame(" Zoom ", out_hbox, 0))
            return hbox
示例#40
0
文件: widMyGPS.py 项目: nateseay/gbv
 def gps_serial_box():
     vbox = gtk.VBox(False, 5)
     if serialAvailable:
         boxes = [self.gps_serial_port_combo(conf.gps_serial_port), self.gps_baudrate_combo(conf.gps_serial_baudrate)]
         for box in boxes:
             hbox = gtk.HBox(False, 10)
             hbox.pack_start(box)
             vbox.pack_start(hbox)
     else:
         vbox.pack_start(lbl('Install python-serial to use serial GPS.'))
     return myFrame(" Serial ", vbox)
示例#41
0
        def _wgs84():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Latitude:"))
            self._wgs84_Lat = myEntry("%.9g" % 39.930474, 10, False)
            hbox.pack_start(self._wgs84_Lat, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Longitude:"))
            self._wgs84_Lon = myEntry("%.9g" % 46.84519, 10, False)
            hbox.pack_start(self._wgs84_Lon, False)
            vbox.pack_start(hbox)

            self._wgs84_Lon.connect("changed", _wg84_changed)
            self._wgs84_Lat.connect("changed", _wg84_changed)

            self._wgs84_Lon.connect("focus_in_event", _wgs84_activated)
            self._wgs84_Lat.connect("focus_in_event", _wgs84_activated)
            return myFrame(" Wgs84", vbox)
        def _zoom(zoom0, zoom1):
            out_hbox = gtk.HBox(False, 50)
            out_hbox.set_border_width(10)
            in_hbox = gtk.HBox(False, 20)
            in_hbox.pack_start(lbl("min:"), False)
            self.s_zoom0 = SpinBtn(zoom0)
            self.s_zoom0.set_digits(0)
            in_hbox.pack_start(self.s_zoom0)
            out_hbox.pack_start(in_hbox)

            in_hbox = gtk.HBox(False, 20)
            in_hbox.pack_start(lbl("max:"), False)
            self.s_zoom1 = SpinBtn(zoom1)
            self.s_zoom1.set_digits(0)
            in_hbox.pack_start(self.s_zoom1)
            out_hbox.pack_start(in_hbox)
            hbox = gtk.HBox()
            hbox.set_border_width(10)
            hbox.pack_start(myFrame(" Zoom ", out_hbox, 0))
            return hbox
示例#43
0
        def _end_point_height():
            mapElevation = MapElevation()
            height = mapElevation.getHeight(end_point)
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("высота:"))
            self.azimuth = myEntry(str(height), 10, False)
            hbox.pack_start(self.azimuth, False)
            vbox.pack_start(hbox)

            return myFrame("цель", vbox)
示例#44
0
 def gps_baudrate_combo(self, baudrate):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("Serial port baudrate: "))
     self.cmb_gps_baudrate = gtk.combo_box_new_text()
     i = 0
     for baud in BAUDRATES:
         self.cmb_gps_baudrate.append_text(str(baud))
         if baud == baudrate:
             self.cmb_gps_baudrate.set_active(i)
         i += 1
     hbox.pack_start(self.cmb_gps_baudrate)
     return hbox
示例#45
0
文件: widMyGPS.py 项目: nateseay/gbv
 def gps_baudrate_combo(self, baudrate):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("Serial port baudrate: "))
     self.cmb_gps_baudrate = gtk.combo_box_new_text()
     i = 0
     for baud in BAUDRATES:
         self.cmb_gps_baudrate.append_text(str(baud))
         if baud == baudrate:
             self.cmb_gps_baudrate.set_active(i)
         i += 1
     hbox.pack_start(self.cmb_gps_baudrate)
     return hbox
示例#46
0
        def _sk42_full():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("X:"))
            self._sk42_Lat_full = myEntry("%.6g" % 0, 10, False)
            hbox.pack_start(self._sk42_Lat_full, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Y:"))
            self._sk42_Lon_full = myEntry("%.6g" % 0, 10, False)
            hbox.pack_start(self._sk42_Lon_full, False)
            vbox.pack_start(hbox)

            self._sk42_Lon_full.connect("changed", _sk42_full_changed)
            self._sk42_Lat_full.connect("changed", _sk42_full_changed)

            self._sk42_Lon_full.connect("focus_in_event", _sk42_full_activated)
            self._sk42_Lat_full.connect("focus_in_event", _sk42_full_activated)

            return myFrame("SK42 full EPSG:28468", vbox)
示例#47
0
        def _wgs_to_sk42_start_full():
            height = 900
            # convertedLat = converter.WGS84_SK42_Lat(np.float64(first_point[0]),np.float64(first_point[1]),height)
            # convertedLon = converter.WGS84_SK42_Long(np.float64(first_point[0]),np.float64(first_point[1]),height)
            convertedLon, convertedLat = pyproj.transform(
                self.proj_wgs84, self.proj_sk42, np.float64(first_point[1]),
                np.float64(first_point[0]))

            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("X:"))
            self.entry = myEntry(str("%.0f" % convertedLat), 10, False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Y:"))
            self.entry = myEntry(str("%.0f" % convertedLon), 10, False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            return myFrame("базовая точка ск-42 EPSG:28468", vbox)
示例#48
0
文件: widMyGPS.py 项目: nateseay/gbv
 def gps_serial_port_combo(self, serial_port):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("Serial port: "))
     self.cmb_gps_serial_port = gtk.combo_box_new_text()
     i = 0
     ports = serialPortScan()
     # Adding current port from config to the list,
     # in case the GPS just isn't currently connected, we don't want to lose it...
     if serial_port not in ports:
         ports.insert(0, serial_port)
     for strPort in ports:
         self.cmb_gps_serial_port.append_text(strPort)
         if strPort == serial_port:
             self.cmb_gps_serial_port.set_active(i)
         i += 1
     hbox.pack_start(self.cmb_gps_serial_port)
     return hbox
示例#49
0
        def custom_path(conf):
            def repository_type_combo(repos_type_id):
                self.cmb_repos_type = gtk.combo_box_new_text()
                for strMode in REPOS_TYPE:
                    self.cmb_repos_type.append_text(strMode)
                self.cmb_repos_type.set_active(repos_type_id)
                return self.cmb_repos_type

            def get_folder(button):
                folderName = FolderChooser()
                if folderName:
                    self.entry_custom_path.set_text(folderName)

            def set_folder(button):
                self.cmb_repos_type.set_active(REPOS_TYPE_FILES)
                self.entry_custom_path.set_text(DEFAULT_PATH)

            vbox = gtk.VBox(False, 5)
            vbox.set_border_width(5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start( \
                lbl(" This is the directory with all the images. "))
            button = gtk.Button("Reset to default")
            button.connect('clicked', set_folder)
            hbox.pack_start(button)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            myEntry = gtk.Entry()
            if conf.init_path:
                myEntry.set_text(conf.init_path)
            else:
                myEntry.set_text("None")
            cmbbox = repository_type_combo(conf.repository_type)
            hbox.pack_start(cmbbox, False)
            hbox.pack_start(myEntry)
            self.entry_custom_path = myEntry
            button = gtk.Button(" ... ")
            button.connect('clicked', get_folder)
            hbox.pack_start(button, False)
            vbox.pack_start(hbox)
            return myFrame(" Custom Maps Directory ", vbox)
示例#50
0
    def service_combo(self, map_service, oneDirPerMap):
        vbox = gtk.VBox(False, 5)
        hbox = gtk.HBox(False, 10)
        hbox.pack_start(lbl("Select your favorite map service: "))
        self.cmb_service = gtk.combo_box_new_text()
        intActive = 0
        for intPos in range(1, len(MAP_SERVERS)):
            self.cmb_service.append_text(MAP_SERVERS[intPos])
            if MAP_SERVERS[intPos] == map_service:
                intActive = intPos - 1
        self.cmb_service.set_active(intActive)
        hbox.pack_start(self.cmb_service)
        vbox.pack_start(hbox)

        # Check box for option to create a dir per Map service
        hbox = gtk.HBox()
        self.cb_oneDirPerMap = gtk.CheckButton( \
            "Use a different folder per Map Service")
        self.cb_oneDirPerMap.set_active(oneDirPerMap)
        hbox.pack_start(self.cb_oneDirPerMap)
        vbox.pack_start(hbox)
        return myFrame(" Map service ", vbox)
示例#51
0
 def gps_updt_rate(self, gps_update_rate):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("Here you can change the GPS update rate: "))
     self.e_gps_updt_rate = myEntry(str(gps_update_rate), 4, False)
     hbox.pack_start(self.e_gps_updt_rate)
     return myFrame(" GPS Update Rate ", hbox)