当前位置: 首页>>代码示例>>Python>>正文


Python Settings.lastChosenSavesFolder方法代码示例

本文整理汇总了Python中mcedit2.util.settings.Settings.lastChosenSavesFolder方法的典型用法代码示例。如果您正苦于以下问题:Python Settings.lastChosenSavesFolder方法的具体用法?Python Settings.lastChosenSavesFolder怎么用?Python Settings.lastChosenSavesFolder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mcedit2.util.settings.Settings的用法示例。


在下文中一共展示了Settings.lastChosenSavesFolder方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Settings

# 需要导入模块: from mcedit2.util.settings import Settings [as 别名]
# 或者: from mcedit2.util.settings.Settings import lastChosenSavesFolder [as 别名]
from mcedit2.worldview.minimap import MinimapWorldView
from mceditlib.anvil.adapter import AnvilWorldAdapter
from mceditlib.geometry import Vector
from mceditlib.exceptions import LevelFormatError, PlayerNotFound
from mceditlib import worldeditor

import logging
from mceditlib.findadapter import isLevel
from mceditlib.worldeditor import WorldEditor

log = logging.getLogger(__name__)

WorldListSettings = Settings().getNamespace('world_list')
WorldListSettings.allSavesFolders = WorldListSettings.getOption('saves_folders', 'json', [])
WorldListSettings.currentSavesFolder = WorldListSettings.getOption('current_saves_folder', unicode, '')
WorldListSettings.lastChosenSavesFolder = WorldListSettings.getOption('last_chosen_saves_folder', unicode, '')

class WorldListItemWidget(QtGui.QWidget):
    doubleClicked = QtCore.Signal()

    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)

        self.displayNameLabel = QtGui.QLabel("namenamename")
        self.lastPlayedLabel = QtGui.QLabel("lastplayed")
        self.versionInfoLabel = QtGui.QLabel("version")

        #self.sizeLabel = QtGui.QLabel(self.tr("Calculating area..."))
        # areaText = self.tr("%.02f million square meters") % (world.chunkCount * 0.25)
        # diskSize = 0
        # if hasattr(worldAdapter, 'worldFolder'):
开发者ID:KevinKelley,项目名称:mcedit2,代码行数:33,代码来源:worldlist.py


注:本文中的mcedit2.util.settings.Settings.lastChosenSavesFolder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。