Logo Search packages:      
Sourcecode: qbzr version File versions

def qbzr::lib::logwidget::LogList::__init__ (   self,
  processEvents,
  throbber,
  no_graph,
  parent = None,
  view_commands = True,
  action_commands = False 
)

Costructing new widget.
@param  throbber:   throbber widget in parent window
@param  parent:     parent window

Definition at line 33 of file logwidget.py.

                                                           :
        """Costructing new widget.
        @param  throbber:   throbber widget in parent window
        @param  parent:     parent window
        """
        QtGui.QTreeView.__init__(self, parent)
        self.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        self.setSelectionMode(QtGui.QAbstractItemView.ContiguousSelection)
        self.setUniformRowHeights(True)
        self.setAllColumnsShowFocus(True)
        self.setRootIsDecorated (False)
        self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
        self.connect(self.verticalScrollBar(), QtCore.SIGNAL("valueChanged (int)"),
                     self.scroll_changed)

        self.setItemDelegateForColumn(logmodel.COL_MESSAGE,
                                        GraphTagsBugsItemDelegate(self))

        self.processEvents = processEvents
        self.throbber = throbber

        self.graph_provider = logmodel.QLogGraphProvider(self.processEvents,
                                                         self.throbber,
                                                         no_graph)

        self.model = logmodel.LogModel(self.graph_provider, self)

        self.filter_proxy_model = logmodel.LogFilterProxyModel(self.graph_provider, self)
        self.filter_proxy_model.setSourceModel(self.model)
        self.filter_proxy_model.setDynamicSortFilter(True)

        self.setModel(self.filter_proxy_model)
        self.connect(self.model,
                     QtCore.SIGNAL("dataChanged(QModelIndex, QModelIndex)"),
                     self.model_data_changed)

        header = self.header()
        header.setStretchLastSection(False)
        header.setResizeMode(logmodel.COL_REV, QtGui.QHeaderView.Interactive)
        header.setResizeMode(logmodel.COL_MESSAGE, QtGui.QHeaderView.Stretch)
        header.setResizeMode(logmodel.COL_DATE, QtGui.QHeaderView.Interactive)
        header.setResizeMode(logmodel.COL_AUTHOR, QtGui.QHeaderView.Interactive)
        fm = self.fontMetrics()
        col_margin = 6
        header.resizeSection(logmodel.COL_REV,
                             fm.width("8888.8.888") + col_margin)
        header.resizeSection(logmodel.COL_DATE,
                             fm.width("88-88-8888 88:88") + col_margin)
        header.resizeSection(logmodel.COL_AUTHOR,
                             fm.width("Joe I have a Long Name") + col_margin)

        self.load_revisions_call_count = 0
        self.load_revisions_throbber_shown = False
        
        self.view_commands = view_commands
        self.action_commands = action_commands
        
        if self.view_commands:
            self.connect(self,
                         QtCore.SIGNAL("doubleClicked(QModelIndex)"),
                         self.show_diff_index)
        self.context_menu = QtGui.QMenu(self)

    def create_context_menu(self):


Generated by  Doxygen 1.6.0   Back to index