def mapLayout(self): layout = BaseFormLayout() layout.addRow(self.items['address']) layout.addRow(self.items['latitude'], self.items['longitude']) coordinates_enabled = not (self.items['latitude'].isHidden() or self.items['longitude'].isHidden()) if importedQtWebKit and coordinates_enabled: settings = Settings() if settings['map_type'] == 0 or not gmapsAvailable: self.map_item = OSMWidget(self) else: self.map_item = GMapsWidget(self) self.map_item.markerMoved.connect(self.mapMarkerMoved) self.map_item.markerRemoved.connect(self.mapMarkerRemoved) layout.addWidget(self.map_item, layout.row, 0, 1, layout.columnCount) self.items['address'].widget().findClicked.connect( self.map_item.geocode) self.items['latitude'].widget().textChanged.connect( self.mapChanged) self.items['longitude'].widget().textChanged.connect( self.mapChanged) return layout
def mapLayout(self): layout = BaseFormLayout() coordinates_enabled = not (self.items['latitude'].isHidden() or self.items['longitude'].isHidden()) if importedQtWebKit and coordinates_enabled: settings = Settings() if settings['map_type'] == 0 or not gmapsAvailable: self.map_item = StaticOSMWidget(self) else: self.map_item = StaticGMapsWidget(self) layout.addWidget(self.map_item) return layout
def mapLayout(self): layout = BaseFormLayout() coordinates_enabled = not (self.items['latitude'].isHidden() or self.items['longitude'].isHidden()) if importedQtWebKit and coordinates_enabled: settings = Settings() if settings['map_type'] == 0: self.map_item = StaticOSMWidget(self) else: self.map_item = StaticGMapsWidget(self) layout.addWidget(self.map_item) return layout
def mapLayout(self): layout = BaseFormLayout() layout.addRow(self.items['address']) layout.addRow(self.items['latitude'], self.items['longitude']) coordinates_enabled = not (self.items['latitude'].isHidden() or self.items['longitude'].isHidden()) if importedQtWebKit and coordinates_enabled: settings = Settings() if settings['map_type'] == 0: self.map_item = OSMWidget(self) else: self.map_item = GMapsWidget(self) self.map_item.markerMoved.connect(self.mapMarkerMoved) self.map_item.markerRemoved.connect(self.mapMarkerRemoved) layout.addWidget(self.map_item, layout.row, 0, 1, layout.columnCount) self.items['address'].widget().findClicked.connect(self.map_item.geocode) self.items['latitude'].widget().textChanged.connect(self.mapChanged) self.items['longitude'].widget().textChanged.connect(self.mapChanged) return layout
def rarityLayout(self, parent=None): layout = BaseFormLayout(parent) item = self.items['rarity'] layout.addWidget(item.label(), 1, 0) layout.addWidget(item.widget(), 1, 1) layout.addWidget(QWidget(), 1, 2) item.widget().setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed) return layout