Esempio n. 1
0
    def wizard(self):
        """
        Returns the wizard associated with this page.

        :return     <projexui.widgets.xoverlaywizard.XOverlayWizard>
        """
        return projexui.ancestor(self, XOverlayWizard)
Esempio n. 2
0
    def wizard(self):
        """
        Returns the wizard associated with this page.

        :return     <projexui.widgets.xoverlaywizard.XOverlayWizard>
        """
        return projexui.ancestor(self, XOverlayWizard)
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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()
Esempio n. 6
0
 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()
Esempio n. 7
0
    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)
Esempio n. 9
0
    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
Esempio n. 10
0
    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
Esempio n. 11
0
    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
Esempio n. 12
0
    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
Esempio n. 13
0
    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
Esempio n. 14
0
 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
Esempio n. 15
0
    def setModelData(self, editor, model, index):
        super(XMultiTagDelegate, self).setModelData(editor, model, index)

        multi_tag = projexui.ancestor(editor, XMultiTagEdit)
        multi_tag.setFocus()
Esempio n. 16
0
 def setModelData(self, editor, model, index):
     super(XMultiTagDelegate, self).setModelData(editor, model, index)
     
     multi_tag = projexui.ancestor(editor, XMultiTagEdit)
     multi_tag.setFocus()