def wizard(self): """ Returns the wizard associated with this page. :return <projexui.widgets.xoverlaywizard.XOverlayWizard> """ return projexui.ancestor(self, XOverlayWizard)
def browserWidget(self): """ Returns the browser widget this card is linked to. :return <XOrbBrowserWidget> || None """ from projexui.widgets.xorbbrowserwidget import XOrbBrowserWidget return projexui.ancestor(self, XOrbBrowserWidget)
def browserWidget( self ): """ Returns the browser widget this card is linked to. :return <XOrbBrowserWidget> || None """ from projexui.widgets.xorbbrowserwidget import XOrbBrowserWidget return projexui.ancestor(self, XOrbBrowserWidget)
def updateCurrentView(self, oldWidget, newWidget): """ Updates the current view widget. :param oldWidget | <QtGui.QWidget> newWidget | <QtGui.QWidget> """ view = projexui.ancestor(newWidget, XView) if view is not None: view.setCurrent()
def ganttWidget(self): """ Returns the gantt widget that this item is linked to. :return <XGanttWidget> || None """ tree = self.treeWidget() if (not tree): return None from projexui.widgets.xganttwidget import XGanttWidget return projexui.ancestor(tree, XGanttWidget)
def ganttWidget( self ): """ Returns the gantt widget that this item is linked to. :return <XGanttWidget> || None """ tree = self.treeWidget() if ( not tree ): return None #from projexui.widgets.xganttwidget import XGanttWidget return projexui.ancestor(tree, projexui.widgets.xganttwidget.XGanttWidget)
def viewAt(self, point): """ Looks up the view at the inputed point. :param point | <QtCore.QPoint> :return <projexui.widgets.xviewwidget.XView> || None """ widget = self.childAt(point) if widget: return projexui.ancestor(widget, XView) else: return None
def currentPanel(self): """ Returns the currently active panel based on whether or not it has \ focus. :return <XViewPanel> || None """ focus_widget = QtGui.QApplication.instance().focusWidget() focus_panel = projexui.ancestor(focus_widget, XViewPanel) panels = self.panels() if focus_panel in panels: return focus_panel try: return panels[0] except AttributeError: return None
def currentPanel(self): """ Returns the currently active panel based on whether or not it has \ focus. :return <XViewPanel> || None """ focus_widget = QtGui.QApplication.instance().focusWidget() focus_panel = projexui.ancestor(focus_widget, XViewPanel) panels = self.panels() if focus_panel in panels: return focus_panel try: return panels[0] except IndexError: return None
def createEditor(self, parent, option, index): """ Overloads the create editor method to assign the parent's completer to any line edit created. :param parent | <QWidget> option | <QStyleOption> index | <QModelIndex> :return <QWidget> || None """ multi_tag = projexui.ancestor(self, XMultiTagEdit) edit = QLineEdit(parent) edit.setFrame(False) edit.setCompleter(multi_tag.completer()) edit.installEventFilter(multi_tag) return edit
def createEditor( self, parent, option, index ): """ Overloads the create editor method to assign the parent's completer to any line edit created. :param parent | <QWidget> option | <QStyleOption> index | <QModelIndex> :return <QWidget> || None """ multi_tag = projexui.ancestor(self, XMultiTagEdit) edit = QLineEdit(parent) edit.setFrame(False) edit.setCompleter(multi_tag.completer()) edit.installEventFilter(multi_tag) return edit
def setModelData(self, editor, model, index): super(XMultiTagDelegate, self).setModelData(editor, model, index) multi_tag = projexui.ancestor(editor, XMultiTagEdit) multi_tag.setFocus()