本文整理汇总了Python中Controller.Controller.remove_file方法的典型用法代码示例。如果您正苦于以下问题:Python Controller.remove_file方法的具体用法?Python Controller.remove_file怎么用?Python Controller.remove_file使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller.Controller
的用法示例。
在下文中一共展示了Controller.remove_file方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWindow
# 需要导入模块: from Controller import Controller [as 别名]
# 或者: from Controller.Controller import remove_file [as 别名]
#.........这里部分代码省略.........
fileName = self.controller.fileNameList[currentIndex]
if str(fileName) == 'None':
return
if re.search("\.rnw|\.nw",fileName,flags=re.IGNORECASE):
reportType = "PDF"
else:
reportType = "HTML"
self.bDock.reportSelector.setCurrentIndex(self.bDock.reportList.index(reportType))
if fileLang != None:
self.bDock.langSelector.setCurrentIndex(self.bDock.langList.index(fileLang))
def remove_tab(self,fileName=None):
"""
removes a tab from self.tabWidget and calls appropriate cleanup functions
"""
if self.transitions.isEditor == False:
return
if fileName not in self.controller.fileNameList:
print "ERROR: MainWindow -- trying to remove invalid tab fileName"
return
if fileName == None:
currentIndex = self.tabWidget.currentIndex()
fileName = self.controller.fileNameList[currentIndex]
indexToRemove = self.controller.fileNameList.index(fileName)
self.tabWidget.removeTab(indexToRemove)
self.controller.remove_file(fileName)
#self.ensure_tab_is_current()
self.transitions.move_to_editor()
def create_statusbar(self):
"""
create the bottom status bar
"""
self.sizeLabel = QtGui.QLabel()
self.sizeLabel.setFrameStyle(QtGui.QFrame.StyledPanel|QtGui.QFrame.Sunken)
self.status = self.statusBar()
self.status.setSizeGripEnabled(False)
self.status.addPermanentWidget(self.sizeLabel)
self.status.showMessage("Ready", 5000)
def init_button_dock(self):
"""
initialize the button dock
"""
self.buttonDock = QtGui.QDockWidget(self)
self.buttonDock.setObjectName("ButtonDockWidget")
self.buttonDock.setAllowedAreas(QtCore.Qt.TopDockWidgetArea|QtCore.Qt.BottomDockWidgetArea)
self.bDock = ButtonDock(mainWindow=self,buttonSize=0.09*self.screenWidth)
hbl1 = QtGui.QHBoxLayout()
hbl1.setAlignment(QtCore.Qt.AlignLeft)
hbl1.addWidget(self.bDock)
vbl = QtGui.QHBoxLayout()
vbl.addLayout(hbl1)
vbl.setAlignment(QtCore.Qt.AlignLeft)