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

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

        :return     <projexui.widgets.xoverlaywizard.XOverlayWizard>
        """
        return projexui.ancestor(self, XOverlayWizard)
Exemplo 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)
Exemplo 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)
Exemplo 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()
Exemplo 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()
Exemplo 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)
Exemplo n.º 8
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, projexui.widgets.xganttwidget.XGanttWidget)
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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()
Exemplo 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()