def prune(self): if PureTree.prune(self): self.emit(PYSIGNAL("prune"), (self, )) return True else: return False
def splice(self): if PureTree.splice(self): self.emit(PYSIGNAL("splice"), (self, )) return True else: return False
def cancelButtonSlot(self): """ Slot for cancel-button; emits PYSIGNAL "quit". """ self.button = "cancel" self.emit(PYSIGNAL("quit"), ())
def okButtonSlot(self): """ Slot for ok-button; emits PYSIGNAL "quit". """ self.button = "ok" self.emit(PYSIGNAL("quit"), ())
def setHeader(self, col, header): self.super.setHeader(col, header) self.emitter.emit(PYSIGNAL("setHeader"), (col, header))
def select(self, sel): self.selection = sel self.emitter.emit(PYSIGNAL("select"), (sel, ))
def sort(self, *args): self.super.sort(*args) for i, row in enumerate(self.table): row.num = i self.emitter.emit(PYSIGNAL("sort"), ())
def contextMenuEvent(self, evt): evt.accept() self.emit(PYSIGNAL('aboutToShowMenu'), (evt, ))
def __init__(self, repositoryManager): """ Constructor. """ # Init GUI AdminWindow.__init__(self) # set icon in window-title: self.setIcon(QPixmap.fromMimeSource("DF_Logo_24x24.png")) iconSet = QIconSet(QPixmap.fromMimeSource("dataType16.png")) self.dataNavigator.setTabIconSet(self.dataTypes, iconSet) iconSet = QIconSet(QPixmap.fromMimeSource("relationType16.png")) self.dataNavigator.setTabIconSet(self.relationTypes, iconSet) iconSet = QIconSet(QPixmap.fromMimeSource("dataStore16.png")) self.dataNavigator.setTabIconSet(self.dataStores, iconSet) logger_handler.installGuiLoggingHandler(self.__logger, self.logList) self.myStatusBar = self.statusBar() self.statusLabel1 = QLabel("DataFinder", self.myStatusBar) self.statusLabel2 = QLabel("OK", self.myStatusBar) self.myStatusBar.addWidget(self.statusLabel1, 80) self.myStatusBar.addWidget(self.statusLabel2, 20) self.statusLabel1.show() self.statusLabel2.show() self.myStatusBar.show() # prepare "About"-dialog: self.dfAboutDialog = about_dialog.AboutDialog() self.dfAboutDialog.setPixmap( QPixmap.fromMimeSource("about_datafinder_admin.png")) # Login-dialog: self.dfLoginDialog = login_dialog.LoginDialog( repositoryManager.preferences, parent=self, showurl=True) # IconView: propertyPanelLayout = QGridLayout(self.propertyPanel, 1, 1, 2, 6, "propertyPanelLayout") self.iconView = canvas_view.CanvasView(self.propertyPanel, self, "iconView", 0) propertyPanelLayout.addWidget(self.iconView, 0, 0) self.iconViewCanvas = self.iconView.canvas() self.connect(self.dfLoginDialog.okPushButton, PYSIGNAL("updateWebdavServerView"), self.updateWebdavServerSlot) self.connect(self.dataTypeBrowser, SIGNAL("doubleClicked(QListViewItem*)"), self.__addDataTypeIconSlot) self.connect(self.relationTypeBrowser, SIGNAL("doubleClicked(QListViewItem*)"), self.__addRelationTypeIconSlot) self.connect(self.dataStoreBrowser, SIGNAL("clicked(QListViewItem*)"), self.iconView.updateCanvasView) self.connect(self.dataStoreBrowser, SIGNAL("doubleClicked(QListViewItem*)"), self.editSlot) # Init model self._repositoryManager = repositoryManager self.repositoryConfiguration = None self._preferences = self._repositoryManager.preferences self._lastUploadDirectory = os.path.expanduser("~") self._dataTypes = list() self._relationTypes = list() self._dataStores = list() self.__setConnectionState(False)