def __init__(self, tableView, mainWindow, parentController, itemActionController): """ Constructor. """ AbstractController.__init__(self, tableView, mainWindow, None, True, parentController) self.horizontalHeader().setSortIndicator(0, QtCore.Qt.AscendingOrder) self._delegates = [_SearchResultDelegate(self, itemActionController)]
def __init__(self, mainWindow, repositoryManager): """ Constructor. @param mainWindow: The main window component of the DataFinder User Client. @type mainWindow: L{MainWindow<datafinder.gui.user.application.MainWindow>} @param repositoryManager: Management component of data repositories. @type repositoryManager: L{RepositoryManager<datafinder.core.repository_manager.RepositoryManager>} """ AbstractController.__init__(self, mainWindow.localDockWidget, mainWindow) self._repositoryManager = repositoryManager self._toolbarController = ToolbarController( mainWindow.localForwardAction, mainWindow.localBackwardAction, mainWindow.localParentDirectoryAction, mainWindow.localRefreshAction, mainWindow.localToolbarAction, mainWindow.localToolBar, mainWindow, self) self._pathController = PathController(mainWindow.localPathLineEdit, mainWindow, self) self._treeController = TreeController(mainWindow.localTreeView, mainWindow, self) self.collectionController = StackedCollectionsController( mainWindow.localStackedWidget, mainWindow.localTableView, mainWindow.localListView, mainWindow.localViewsListAction, mainWindow.localViewsTableAction, mainWindow.localViewsIconsAction, mainWindow, self) self.model = RepositoryModel(repositoryManager.preferences) self._itemActionController = None
def __init__(self, mainWindow, searchModel, itemActionController): """ Constructor. """ AbstractController.__init__(self, mainWindow.outputTabWidget, mainWindow) self._searchModel = searchModel self.__rootLogController = LoggingTableController( mainWindow.rootLogTableView, self) self.__scriptLogController = LoggingTableController( mainWindow.scriptLogTableView, self) self.__resultController = SearchResultController( mainWindow.searchResultTableView, mainWindow, self, itemActionController) self.__resultController.model = searchModel self.__properties = dict(myRootLogView=self.__rootLogController, myScriptLogView=self.__scriptLogController, myResultView=self.__resultController) self._delegates = [OutputDelegate(self)] self.connect(self._searchModel, QtCore.SIGNAL("updateSignal"), self.updateSlot) self.connect(mainWindow.outputTabWidget, QtCore.SIGNAL("currentChanged(int)"), self._currentTabChanged) self.fetchTabs()
def __init__(self, mainWindow, repositoryManager): """ Constructor. @param mainWindow: The main window component of the DataFinder User Client. @type mainWindow: L{MainWindow<datafinder.gui.user.application.MainWindow>} @param repositoryManager: Management component of data repositories. @type repositoryManager: L{RepositoryManager<datafinder.core.repository_manager.RepositoryManager>} """ AbstractController.__init__(self, mainWindow.localDockWidget, mainWindow) self._repositoryManager = repositoryManager self._toolbarController = ToolbarController(mainWindow.localForwardAction, mainWindow.localBackwardAction, mainWindow.localParentDirectoryAction, mainWindow.localRefreshAction, mainWindow.localToolbarAction, mainWindow.localToolBar, mainWindow, self) self._pathController = PathController(mainWindow.localPathLineEdit, mainWindow, self) self._treeController = TreeController(mainWindow.localTreeView, mainWindow, self) self.collectionController = StackedCollectionsController(mainWindow.localStackedWidget, mainWindow.localTableView, mainWindow.localListView, mainWindow.localViewsListAction, mainWindow.localViewsTableAction, mainWindow.localViewsIconsAction, mainWindow, self) self.model = RepositoryModel(repositoryManager.preferences) self._itemActionController = None
def __init__(self, pathLineEdit, mainWindow, parentController): """ Constructor. """ AbstractController.__init__(self, pathLineEdit, mainWindow, parentController=parentController) self._delegates = [PathDelegate(self)]
def __init__(self, treeView, mainWindow, parentController): """ Constructor. """ AbstractController.__init__(self, treeView, mainWindow, None, True, parentController) treeView.setUniformRowHeights(True) self._delegates = [_TreeDelegate(self)]
def __init__(self, mainWindow, parentController): """ Constructor. """ AbstractController.__init__(self, mainWindow.serverAttributeTableView, mainWindow, parentController=parentController) self.horizontalHeader().setSortIndicator(0, QtCore.Qt.AscendingOrder) self._delegates = [_PropertiesDelegate(self)]
def __init__(self, listView, mainWindow, parentController): """ Constructor. """ AbstractController.__init__(self, listView, mainWindow, None, True, parentController) self.itemActionController = None self.model = None self._delegates = [_CollectionDelegate(self)]
def __init__(self, tableView, mainWindow, parentController): """ Constructor. """ AbstractController.__init__(self, tableView, mainWindow, None, True, parentController) self.itemActionController = None self.model = None self.setFocusPolicy(QtCore.Qt.StrongFocus) self.setSortingEnabled(True) self.horizontalHeader().setSortIndicator(0, QtCore.Qt.AscendingOrder) self._delegates = [_CollectionDelegate(self)]
def __init__(self, listView, parentController): """ Constructor. """ AbstractController.__init__(self, listView, parentController=parentController) self.__valid = False self.connect(self.widget, QtCore.SIGNAL("modelUpdateSignal"), self.__modelUpdateSlot) self.connect(self.parentController.saveSearchButton, QtCore.SIGNAL("clicked()"), self.saveSearchClickedSlot) self.connect(self.parentController.deleteSearchButton, QtCore.SIGNAL("clicked()"), self.deleteSearchClickedSlot) self.connect(self.parentController.searchNameLineEdit, QtCore.SIGNAL("textChanged(QString)"), self.searchNameTextChanged)
def __getattr__(self, name): """ Returns the internal attribute referenced under the given name. @param name: Name of the attribute that has to be returned. @type name: C{unicode} """ if self.__properties.has_key(name): return self.__properties[name] return AbstractController.__getattr__(self, name)
def __init__(self, widget, parentController): """ Constructor. @param widget: The L{QtGui.QTableView} that has to be used for the presentation. @type widget: L{QTableView<PyQt4.QtGui.QTableView>} @param parentController: Parent controller of this one. @type parentController: L{AbstractController<datafinder.gui.user.common.controller.AbstractController>} """ AbstractController.__init__(self, widget, parentController=parentController) self.horizontalHeader().setSortIndicator(1, QtCore.Qt.DescendingOrder) self.setSelectionMode(QtGui.QAbstractItemView.NoSelection) self.connect(self.widget, QtCore.SIGNAL("modelUpdateSignal"), self.__modelUpdateSlot) self.connect(self.widget, QtCore.SIGNAL("customContextMenuRequested(QPoint)"), self.showContextMenuSlot)
def __init__(self, mainWindow, searchModel, itemActionController): """ Constructor. """ AbstractController.__init__(self, mainWindow.outputTabWidget, mainWindow) self._searchModel = searchModel self.__rootLogController = LoggingTableController(mainWindow.rootLogTableView, self) self.__scriptLogController = LoggingTableController(mainWindow.scriptLogTableView, self) self.__resultController = SearchResultController(mainWindow.searchResultTableView, mainWindow, self, itemActionController) self.__resultController.model = searchModel self.__properties = dict(myRootLogView=self.__rootLogController, myScriptLogView=self.__scriptLogController, myResultView=self.__resultController) self._delegates = [OutputDelegate(self)] self.connect(self._searchModel, QtCore.SIGNAL("updateSignal"), self.updateSlot) self.connect(mainWindow.outputTabWidget, QtCore.SIGNAL("currentChanged(int)"), self._currentTabChanged) self.fetchTabs()
def __init__(self, stackedWidget, tableView, listView, viewsListAction, viewsTableAction, viewsIconsAction, mainWindow, parentController): """ Constructor. """ AbstractController.__init__(self, stackedWidget, mainWindow, None, True, parentController) self._tableController = _TableController(tableView, mainWindow, self) self._listController = _ListController(listView, mainWindow, self) listView.setUniformItemSizes(True) self.connect(viewsTableAction, QtCore.SIGNAL("triggered()"), self._viewsTableClickedSlot) self.connect(viewsListAction, QtCore.SIGNAL("triggered()"), self._viewsListClickedSlot) self.connect(viewsIconsAction, QtCore.SIGNAL("triggered()"), self._viewsIconClickedSlot) self.connect(self.widget, QtCore.SIGNAL("modelUpdateSignal"), self._modelUpdateSlot)
def __init__(self, mainWindow, repositoryManager): """ Constructor. @param mainWindow: The main window component of the DataFinder User Client. @type mainWindow: L{MainWindow<datafinder.gui.user.application.MainWindow>} @param repositoryManager: Management component of data repositories. @type repositoryManager: L{RepositoryManager<datafinder.core.repository_manager.RepositoryManager>} """ AbstractController.__init__(self, mainWindow.serverDockWidget, mainWindow) self._toolbarController = ToolbarController(mainWindow.serverForwardAction, mainWindow.serverBackwardAction, mainWindow.serverParentCollectionAction, mainWindow.serverRefreshAction, mainWindow.serverToolbarAction, mainWindow.serverToolBar, mainWindow, self) self._pathController = PathController(mainWindow.serverPathLineEdit, mainWindow, self) self._treeController = TreeController(mainWindow.serverTreeView, mainWindow, self) self._propertiesController = PropertiesController(mainWindow, self) self.collectionController = StackedCollectionsController(mainWindow.serverStackedWidget, mainWindow.serverTableView, mainWindow.serverListView, mainWindow.serverViewsListAction, mainWindow.serverViewsTableAction, mainWindow.serverViewsIconsAction, mainWindow, self) self.setEnabled(False) self.model = RepositoryModel(repositoryManager.preferences) self._itemActionController = None self._unmanagedRepositoryController = None self._scriptController = None self._repositoryManager = repositoryManager self._delegate = None
def __init__(self, mainWindow, repositoryManager): """ Constructor. @param mainWindow: The main window component of the DataFinder User Client. @type mainWindow: L{MainWindow<datafinder.gui.user.application.MainWindow>} @param repositoryManager: Management component of data repositories. @type repositoryManager: L{RepositoryManager<datafinder.core.repository_manager.RepositoryManager>} """ AbstractController.__init__(self, mainWindow.serverDockWidget, mainWindow) self._toolbarController = ToolbarController( mainWindow.serverForwardAction, mainWindow.serverBackwardAction, mainWindow.serverParentCollectionAction, mainWindow.serverRefreshAction, mainWindow.serverToolbarAction, mainWindow.serverToolBar, mainWindow, self) self._pathController = PathController(mainWindow.serverPathLineEdit, mainWindow, self) self._treeController = TreeController(mainWindow.serverTreeView, mainWindow, self) self._propertiesController = PropertiesController(mainWindow, self) self.collectionController = StackedCollectionsController( mainWindow.serverStackedWidget, mainWindow.serverTableView, mainWindow.serverListView, mainWindow.serverViewsListAction, mainWindow.serverViewsTableAction, mainWindow.serverViewsIconsAction, mainWindow, self) self.setEnabled(False) self.model = RepositoryModel(repositoryManager.preferences) self._itemActionController = None self._unmanagedRepositoryController = None self._scriptController = None self._repositoryManager = repositoryManager self._delegate = None
def __init__(self, forwardAction, backwardAction, parentDirectoryAction, refreshAction, toolbarAction, widget, mainWindow, parentController): """ Constructor. """ AbstractController.__init__(self, widget, mainWindow, parentController=parentController) self._toolbarAction = toolbarAction self.forwardAction = forwardAction self.forwardMenu = QtGui.QMenu(widget) self.forwardAction.setData(QtCore.QVariant(1)) self.forwardAction.setMenu(self.forwardMenu) self.backwardAction = backwardAction self.backwardMenu = QtGui.QMenu(widget) self.backwardAction.setData(QtCore.QVariant(-1)) self.backwardAction.setMenu(self.backwardMenu) self.parentDirectoryAction = parentDirectoryAction self.refreshAction = refreshAction self._delegate = _ToolbarDelegate(self) self.setActivated(False)