Example #1
0
Functions
=========
:func:`fill_treectrl`
---------------------
:func:`add_tree_nodes`
----------------------
:func:`search_in_menu`
----------------------
'''

import six
# Soma import
from soma.qt_gui.qt_backend import QtGui

# Global parameters
font = QtGui.QFont("", 9, QtGui.QFont.Bold)


def fill_treectrl(treectrl, menu, match=""):
    """ Fill a tree control with the different menu items.

    This procedure is able to filter the menu items.
    Loadable pipelines appear in bold in the tree control.
    Insert three elements (current module name, url, parent module name)
    When the url and then parent module name are different from 'None' we have
    reached a leaf that contain a pipeline description.

    Parameters
    ----------
    treectrl: QTreeControl (mandatory)
        the tree control where we want to insert the menu
Example #2
0
 def drawText(self, event, qp):
     qp.setPen(self.textColor())
     qp.setFont(QtGui.QFont('Arial', 10))