Beispiel #1
0
    def resizeEvent(self, event):
        """Override Qt method."""
        w = self.width()
        width_start = 8
        width_end = 0

        if self._advanced_mode:
            action_cols = [C.COL_ACTION]
        else:
            action_cols = [
                C.COL_UPGRADE, C.COL_INSTALL, C.COL_REMOVE, C.COL_DOWNGRADE
            ]

        self.setColumnWidth(C.COL_START, width_start)
        self.setColumnWidth(C.COL_PACKAGE_TYPE, self.WIDTH_TYPE)
        self.setColumnWidth(C.COL_NAME, self.WIDTH_NAME)
        self.setColumnWidth(C.COL_VERSION, self.WIDTH_VERSION)
        w_new = w - (width_start + self.WIDTH_ACTIONS + self.WIDTH_TYPE +
                     self.WIDTH_NAME + self.WIDTH_VERSION +
                     (len(action_cols)) * self.WIDTH_ACTIONS + width_end) + 10
        self.setColumnWidth(C.COL_DESCRIPTION, w_new)
        self.setColumnWidth(C.COL_END, width_end)

        for col in action_cols:
            self.setColumnWidth(col, self.WIDTH_ACTIONS)
        QTableView.resizeEvent(self, event)
        self.resize_rows()
Beispiel #2
0
    def resizeEvent(self, event):
        """Override Qt method"""
        w = self.width()
        width_start = 20
        width_end = width_start

        if self._advanced_mode:
            action_cols = [const.COL_ACTION]
        else:
            action_cols = [const.COL_UPGRADE, const.COL_INSTALL,
                           const.COL_REMOVE, const.COL_DOWNGRADE]

        self.setColumnWidth(const.COL_START, width_start)
        self.setColumnWidth(const.COL_PACKAGE_TYPE, self.WIDTH_TYPE)
        self.setColumnWidth(const.COL_NAME, self.WIDTH_NAME)
        self.setColumnWidth(const.COL_VERSION, self.WIDTH_VERSION)
        w_new = w - (width_start + self.WIDTH_ACTIONS + self.WIDTH_TYPE +
                     self.WIDTH_NAME + self.WIDTH_VERSION +
                     (len(action_cols))*self.WIDTH_ACTIONS + width_end)
        self.setColumnWidth(const.COL_DESCRIPTION, w_new)
        self.setColumnWidth(const.COL_END, width_end)

        for col in action_cols:
            self.setColumnWidth(col, self.WIDTH_ACTIONS)
        QTableView.resizeEvent(self, event)
        self.resize_rows()
Beispiel #3
0
    def resizeEvent(self, event):
        """Update the frozen column dimensions.

        Updates takes place when the enclosing window of this 
        table reports a dimension change
        """
        QTableView.resizeEvent(self, event)
        self.frozen_table_view.update_geometry()
Beispiel #4
0
    def resizeEvent(self, event):
        """Update the frozen column dimensions.

        Updates takes place when the enclosing window of this 
        table reports a dimension change
        """
        QTableView.resizeEvent(self, event)
        self.frozen_table_view.update_geometry()
Beispiel #5
0
    def resizeEvent(self, event):
        """Override Qt method"""
        w = self.width()
        self.setColumnWidth(const.NAME, self.WIDTH_NAME)
        self.setColumnWidth(const.VERSION, self.WIDTH_VERSION)
        w_new = w - (self.WIDTH_NAME + self.WIDTH_VERSION + (len(const.ACTION_COLUMNS) + 1) * self.WIDTH_ACTIONS)
        self.setColumnWidth(const.DESCRIPTION, w_new)

        for col in const.ACTION_COLUMNS:
            self.setColumnWidth(col, self.WIDTH_ACTIONS)
        QTableView.resizeEvent(self, event)
        self.resize_rows()
Beispiel #6
0
 def resizeEvent(self, event):
     QTableView.resizeEvent(self, event)
     self.updateFrozenTableGeometry()