Пример #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':
                        time_util.datetime_to_str(
                            self.getTimeLayerManager().getCurrentTimePosition(),
                            time_util.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(),
                        'labelFont': self.guiControl.getLabelFont(),
                        'labelSize': self.guiControl.getLabelSize(),
                        'labelColor': self.guiControl.getLabelColor(),
                        'labelBgColor': self.guiControl.getLabelBgColor(),
                        'labelPlacement': self.guiControl.getLabelPlacement()}

            TimeManagerProjectHandler.writeSettings(settings)
Пример #2
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(time_util.QDateTime_to_datetime(date))
Пример #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(
             time_util.QDateTime_to_datetime(date))
Пример #4
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':
                time_util.datetime_to_str(
                    self.getTimeLayerManager().getCurrentTimePosition(),
                    time_util.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(),
                'labelFont':
                self.guiControl.getLabelFont(),
                'labelSize':
                self.guiControl.getLabelSize(),
                'labelColor':
                self.guiControl.getLabelColor(),
                'labelBgColor':
                self.guiControl.getLabelBgColor(),
                'labelPlacement':
                self.guiControl.getLabelPlacement()
            }

            TimeManagerProjectHandler.writeSettings(settings)
Пример #5
0
 def toggleArchaeology(self):
     """Toggle archaeology mode on/off"""
     if time_util.is_archaelogical():
         self.setArchaeology(False)
     else:
         self.guiControl.showArchOptions()
Пример #6
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
Пример #8
0
 def toggleArchaeology(self):
     """Toggle archaeology mode on/off"""
     if time_util.is_archaelogical():
         self.setArchaeology(False)
     else:
         self.guiControl.showArchOptions()