def setupUi(self): try: ui_find_coll_tx_dlg.Ui_ListCollateralTxsDlg.setupUi(self, self) self.setWindowTitle('Find collateral transaction') self.collaterals_table_model.set_view(self.collsTableView) self.collsTableView.setSortingEnabled(True) self.collsTableView.setItemDelegate( wnd_utils.ReadOnlyTableCellDelegate(self.collsTableView)) self.collsTableView.verticalHeader().setDefaultSectionSize( self.collsTableView.verticalHeader().fontMetrics().height() + 4) self.collsTableView.horizontalHeader().setSortIndicator( self.collaterals_table_model.col_index_by_name('time_stamp'), Qt.DescendingOrder) self.collsTableView.selectionModel().selectionChanged.connect( self.on_collsTableView_selectionChanged) for idx, col in enumerate(self.collaterals_table_model.columns()): if col.name != 'txid': self.collsTableView.resizeColumnToContents(idx) self.updateUi() self.display_title() except: logging.exception('Exception occurred') raise
def setupUi(self): ui_masternode_full.Ui_MasternodeFull.setupUi(self, self) self.update_tab_graphics() self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint | Qt.WindowMaximizeButtonHint) self.mymn_table_model.set_view(self.myMnsTable) self.allmn_table_model.set_view(self.allMnsTable) self.myMnsTable.setItemDelegate( wnd_utils.ReadOnlyTableCellDelegate(self.myMnsTable)) self.allMnsTable.setItemDelegate( wnd_utils.ReadOnlyTableCellDelegate(self.allMnsTable)) self.myMnsTable.verticalHeader().setDefaultSectionSize( self.myMnsTable.verticalHeader().fontMetrics().height() + 8) self.allMnsTable.verticalHeader().setDefaultSectionSize( self.allMnsTable.verticalHeader().fontMetrics().height() + 5) self.myMnsTable.horizontalHeader().setSortIndicator( self.mymn_table_model.col_index_by_name("status"), Qt.AscendingOrder) self.allMnsTable.horizontalHeader().setSortIndicator( self.allmn_table_model.col_index_by_name("lastseen"), Qt.DescendingOrder) self.snap_column_width() self.tabWidget.currentChanged.connect(self.on_tabWidget_currentChanged)