def writeSettings(self): """write all relevant settings to the project file XML """ if not self.getTimeLayerManager().isEnabled(): return (timeLayerManagerSettings, timeLayerList) = self.getTimeLayerManager().getSaveString() if timeLayerManagerSettings is not None: settings = {'animationFrameLength': self.animationFrameLength, 'playBackwards': self.playBackwards, 'loopAnimation': self.loopAnimation, 'timeLayerManager': timeLayerManagerSettings, 'timeLayerList': timeLayerList, 'currentMapTimePosition': datetime_to_str( self.getTimeLayerManager().getCurrentTimePosition(), DEFAULT_FORMAT ), 'timeFrameType': self.getTimeLayerManager().getTimeFrameType(), 'timeFrameSize': self.getTimeLayerManager().getTimeFrameSize(), 'active': self.getTimeLayerManager().isEnabled(), 'mode': int(time_util.is_archaelogical()), 'digits': time_util.getArchDigits(), 'labelFormat': self.guiControl.getLabelFormat()} TimeManagerProjectHandler.writeSettings(settings)
def updateTimePositionFromTextBox(self,date): if not self.propagateGuiChanges: return if time_util.is_archaelogical(): bcdate = bcdate_util.BCDate.from_str(date, strict_zeros=False) bcdate.setDigits(bcdate_util.getGlobalDigitSetting()) self.getTimeLayerManager().setCurrentTimePosition(bcdate) else: self.getTimeLayerManager().setCurrentTimePosition(QDateTime_to_datetime(date))
def updateTimePositionFromTextBox(self, date): if not self.propagateGuiChanges: return if time_util.is_archaelogical(): bcdate = bcdate_util.BCDate.from_str(date, strict_zeros=False) bcdate.setDigits(bcdate_util.getGlobalDigitSetting()) self.getTimeLayerManager().setCurrentTimePosition(bcdate) else: self.getTimeLayerManager().setCurrentTimePosition(QDateTime_to_datetime(date))
def getTimeWidget(self): if time_util.is_archaelogical(): return self.bcdateSpinBox else: return self.dock.dateTimeEditCurrentTime
def toggleArchaeology(self): if time_util.is_archaelogical(): self.setArchaeology(False) else: self.guiControl.showArchOptions()
def toggleArchaeology(self): """Toggle archaeology mode on/off""" if time_util.is_archaelogical(): self.setArchaeology(False) else: self.guiControl.showArchOptions()