Ejemplo n.º 1
0
 def __init__(self, name=None, view=None, parent=None, designMode=False):
     if name is None:
         name = "Base toolbar"
     self._viewWidget = view or parent
     QtGui.QToolBar.__init__(self, name, parent)
     self.setIconSize(QtCore.QSize(16, 16))
     self.setFloatable(False)
     self.setMovable(False)
Ejemplo n.º 2
0
    def setTitleHeight(self, height):
        """Sets this widget's title height

        :param height: the new widget title height
        :type height: int"""
        s = QtCore.QSize(height, height)
        self.titleButton().setIconSize(s)
        self.collapseButton().setIconSize(s)
Ejemplo n.º 3
0
    def headerData(self, section, orientation, role=QtCore.Qt.DisplayRole):
        ret = None
        if orientation == QtCore.Qt.Horizontal:
            if role == QtCore.Qt.TextAlignmentRole:
                ret = int(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
            elif role == QtCore.Qt.DisplayRole:
                ret = self.ColumnNames[section]
            elif role == QtCore.Qt.SizeHintRole:
                ret = QtCore.QSize(self.columnSize(section))
                ret.setHeight(24)
            elif role == QtCore.Qt.ToolTipRole:
                ret = self.columnToolTip(section)
            elif role == QtCore.Qt.DecorationRole:
                ret = self.columnIcon(section)

        return ret
Ejemplo n.º 4
0
 def roleSize(self, taurus_role):
     return QtCore.QSize(300, 70)
Ejemplo n.º 5
0
    def minimumSizeHint(self):
        """Overwrite the default minimum size hint (0,0) to be (8, 8)

        :return: the minimum size hint 8, 8
        :rtype: QSize"""
        return QtCore.QSize(8, 8)
Ejemplo n.º 6
0
 def sizeHint(self):
     return QtCore.QSize(800, 600)
Ejemplo n.º 7
0
 def minimumSizeHint(self):
     h = get_minimum_height_hint()
     return QtCore.QSize(h, h)
Ejemplo n.º 8
0
 def sizeHint(self):
     h = get_height_hint()
     return QtCore.QSize(h, h)
Ejemplo n.º 9
0
 def __init__(self, axis, icon=None, parent=None):
     super(IconButton, self).__init__(parent)
     self.axis = axis
     if icon is not None:
         self.setIcon(icon)
     self.setIconSize(QtCore.QSize(16, 16))
Ejemplo n.º 10
0
 def minimumSizeHint(self):
     size = super(StepSize, self).minimumSizeHint()
     size = QtCore.QSize(size.width(), get_minimum_height_hint())
     return size