示例#1
0
文件: __init__.py 项目: wcpe/mcedit2
class FindReplaceDialog(QtGui.QDialog, Ui_findReplaceDialog):
    def __init__(self, editorSession, *args, **kwargs):
        super(FindReplaceDialog, self).__init__(*args, **kwargs)
        self.editorSession = editorSession
        self.blocktypes = editorSession.worldEditor.blocktypes
        self.setupUi(self)

        self.findReplaceBlocks = FindReplaceBlocks(editorSession, self)
        self.replaceBlocksTab.setLayout(
            Column(self.findReplaceBlocks.widget, margin=0))

        self.findReplaceCommandText = FindReplaceCommandText(
            editorSession, self)
        self.commandBlocksTab.setLayout(
            Column(self.findReplaceCommandText.widget, margin=0))

        self.findReplaceNBT = FindReplaceNBT(editorSession, self)
        self.nbtTab.setLayout(Column(self.findReplaceNBT, margin=0))

        self.resultsWidgets = [
            # self.findReplaceBlocks.resultsDockWidget,
            self.findReplaceNBT.resultsDockWidget,
        ]

    def execFindBlocks(self):
        self.execTab(0)

    def execFindReplaceBlocks(self):
        self.execTab(1)

    def execFindReplaceItems(self):
        self.execTab(2)

    def execFindReplaceCommands(self):
        self.execTab(3)

    def execFindReplaceNBT(self):
        self.execTab(4)

    def execTab(self, tabIndex):
        self.tabWidget.setCurrentIndex(tabIndex)
        self.exec_()

    def exec_(self):
        self.findReplaceNBT.dialogOpened()
        # self.findReplaceBlocks.dialogOpened()
        super(FindReplaceDialog, self).exec_()
示例#2
0
class FindReplaceDialog(QtGui.QDialog, Ui_findReplaceDialog):
    def __init__(self, editorSession, *args, **kwargs):
        super(FindReplaceDialog, self).__init__(*args, **kwargs)
        self.editorSession = editorSession
        self.blocktypes = editorSession.worldEditor.blocktypes
        self.setupUi(self)

        self.findReplaceBlocks = FindReplaceBlocks(editorSession, self)
        self.replaceBlocksTab.setLayout(Column(self.findReplaceBlocks.widget, margin=0))

        self.findReplaceCommandText = FindReplaceCommandText(editorSession, self)
        self.commandBlocksTab.setLayout(Column(self.findReplaceCommandText.widget, margin=0))

        self.findReplaceNBT = FindReplaceNBT(editorSession, self)
        self.nbtTab.setLayout(Column(self.findReplaceNBT, margin=0))

        self.resultsWidgets = [
            # self.findReplaceBlocks.resultsDockWidget,
            self.findReplaceNBT.resultsDockWidget,
        ]

    def execFindBlocks(self):
        self.execTab(0)

    def execFindReplaceBlocks(self):
        self.execTab(1)

    def execFindReplaceItems(self):
        self.execTab(2)

    def execFindReplaceCommands(self):
        self.execTab(3)

    def execFindReplaceNBT(self):
        self.execTab(4)

    def execTab(self, tabIndex):
        self.tabWidget.setCurrentIndex(tabIndex)
        self.exec_()

    def exec_(self):
        self.findReplaceNBT.dialogOpened()
        # self.findReplaceBlocks.dialogOpened()
        super(FindReplaceDialog, self).exec_()
示例#3
0
文件: __init__.py 项目: wcpe/mcedit2
    def __init__(self, editorSession, *args, **kwargs):
        super(FindReplaceDialog, self).__init__(*args, **kwargs)
        self.editorSession = editorSession
        self.blocktypes = editorSession.worldEditor.blocktypes
        self.setupUi(self)

        self.findReplaceBlocks = FindReplaceBlocks(editorSession, self)
        self.replaceBlocksTab.setLayout(
            Column(self.findReplaceBlocks.widget, margin=0))

        self.findReplaceCommandText = FindReplaceCommandText(
            editorSession, self)
        self.commandBlocksTab.setLayout(
            Column(self.findReplaceCommandText.widget, margin=0))

        self.findReplaceNBT = FindReplaceNBT(editorSession, self)
        self.nbtTab.setLayout(Column(self.findReplaceNBT, margin=0))

        self.resultsWidgets = [
            # self.findReplaceBlocks.resultsDockWidget,
            self.findReplaceNBT.resultsDockWidget,
        ]
示例#4
0
    def __init__(self, editorSession, *args, **kwargs):
        super(FindReplaceDialog, self).__init__(*args, **kwargs)
        self.editorSession = editorSession
        self.blocktypes = editorSession.worldEditor.blocktypes
        load_ui("find_replace.ui", baseinstance=self)

        self.findReplaceBlocks = FindReplaceBlocks(editorSession, self)

        self.findReplaceCommandText = FindReplaceCommandText(editorSession, self)
        self.commandBlocksTab.setLayout(Column(self.findReplaceCommandText.widget, margin=0))

        self.findReplaceNBT = FindReplaceNBT(editorSession, self)
        self.nbtTab.setLayout(Column(self.findReplaceNBT.widget, margin=0))

        self.resultsWidgets = [
            # self.findReplaceBlocks.resultsDockWidget,
            self.findReplaceNBT.resultsDockWidget,
        ]