Exemple #1
0
    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))
Exemple #3
0
 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))
Exemple #4
0
 def getTimeWidget(self):
     if time_util.is_archaelogical():
         return self.bcdateSpinBox
     else:
         return self.dock.dateTimeEditCurrentTime
 def getTimeWidget(self):
     if time_util.is_archaelogical():
         return self.bcdateSpinBox
     else:
         return self.dock.dateTimeEditCurrentTime
Exemple #6
0
 def toggleArchaeology(self):
     if time_util.is_archaelogical():
         self.setArchaeology(False)
     else:
         self.guiControl.showArchOptions()
 def toggleArchaeology(self):
     if time_util.is_archaelogical():
         self.setArchaeology(False)
     else:
         self.guiControl.showArchOptions()
Exemple #8
0
 def toggleArchaeology(self):
     """Toggle archaeology mode on/off"""
     if time_util.is_archaelogical():
         self.setArchaeology(False)
     else:
         self.guiControl.showArchOptions()