def __init__(self, parent, configuration): QTableWidget.__init__(self, 5, 1, parent) self._configuration = configuration self._manual_change = True self.setVerticalHeaderLabels( ["Duration (cycles)", "Duration (ms)", "Cycles / ms", 'RAM access time', 'Execution Time Model']) self.horizontalHeader().setStretchLastSection(True) self.horizontalHeader().hide() self.setItem(0, 0, QTableWidgetItem(str(configuration.duration))) self.setItem(1, 0, QTableWidgetItem(str( float(configuration.duration) / configuration.cycles_per_ms))) self.setItem(2, 0, QTableWidgetItem(str(configuration.cycles_per_ms))) self.setItem( 3, 0, QTableWidgetItem(str(configuration.memory_access_time))) item = QComboBox(self) selected = 0 for i, (etm_name, etm_code) in \ enumerate(execution_time_model_names.items()): item.addItem(etm_name) if etm_code == configuration.etm: selected = i item.setCurrentIndex(selected) self.setCellWidget(4, 0, item) def activation_handler(x): configuration.etm = execution_time_model_names[str(x)] configuration.conf_changed() item.activated['QString'].connect(activation_handler) # self._update_observe_window() self.cellChanged.connect(self._cell_changed)
def __init__(self, rows, columns, parent): """Table with Context Menu event handling""" QTableWidget.__init__(self, rows, columns) self.mainWindow = parent self.menu = QMenu(self) self.addOutlierAction = self.menu.addAction("Add to outliers") self.sendAction = self.menu.addAction("Send Message")
def __init__(self, parent = None): QTableWidget.__init__(self, parent) # init # ------------------------------------------------ #FIXME: move this somewhere else maybe? self.tmpSelectedItems = [] #FIXME: what does this do? put a comment, why 30,30? self._sigmaList = None self._featureGroupMapping = None # Schema: [ (groupName1, [entry, entry...]), # (groupName2, [entry, entry...]) ] #layout # ------------------------------------------------ self.setCornerButtonEnabled(False) self.setEditTriggers(QAbstractItemView.NoEditTriggers) self.setSelectionMode(QAbstractItemView.NoSelection) self.setShowGrid(False) self.viewport().installEventFilter(self) self.setMouseTracking(1) self.verticalHeader().setHighlightSections(False) self.verticalHeader().setClickable(True) self.horizontalHeader().setHighlightSections(False) self.horizontalHeader().setClickable(True) self.horizontalHeader().setMouseTracking(True) self.horizontalHeader().installEventFilter(self) self.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents) self.verticalHeader().setResizeMode(QHeaderView.ResizeToContents) self.itemSelectionChanged.connect(self._tableItemSelectionChanged) self.cellDoubleClicked.connect(self._featureTableItemDoubleClicked) self.verticalHeader().sectionClicked.connect(self._expandOrCollapseVHeader)
def __init__(self, *args): QTableWidget.__init__(self, *args) self.setData() self.setRowHeight(0, 29) self.setRowHeight(1, 29) self.setRowHeight(2, 30) self.setRowHeight(3, 30) self.setColumnWidth(0, 30) self.setColumnWidth(1, 100) self.setColumnWidth(2, 50) self.setColumnWidth(3, 30) self.setColumnWidth(4, 100) self.setColumnWidth(5, 50) self.setColumnWidth(6, 30) self.setColumnWidth(7, 94) headerVert = self.verticalHeader() headerVert.setVisible(False) headerVert.setResizeMode(QtGui.QHeaderView.Stretch) headerHoriz = self.horizontalHeader() headerHoriz.setVisible(False) headerHoriz.setResizeMode(QtGui.QHeaderView.Stretch) self.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.setMouseTracking(True) self.edited_location = None self.cellDoubleClicked.connect(self.set_edited_location) self.itemChanged.connect(self.update_internal_registers)
def __init__(self, parent): QTableWidget.__init__(self, parent=parent) self._data = [] self.hheaders = [] # horizontal headers self.vheaders = [] # vertical headers self._display_total = False self._column_totals = {} self._total_label = u"TOTAL" self.stretch_columns = [] self.display_hheaders = True self.display_vheaders = True self.align_map = {} self.display_fixed = False self.live_refresh = True self.sorter = False self.setEditTriggers(QAbstractItemView.NoEditTriggers) self.horizontalHeader().setStretchLastSection(True) self.cellClicked.connect(self.click_item) self.verticalHeader().setVisible(False) self.setSelectionBehavior(QAbstractItemView.SelectRows) # style au tr self.setStyleSheet("color: #2C2C2C;") self.setAlternatingRowColors(True) self.setAutoScroll(True) self.wc = self.width() self.hc = self.height()
def __init__(self, modules): QTableWidget.__init__(self) self.setColumnCount(2) self.setRowCount(len(modules)) self.setHorizontalHeaderLabels(["Name", "Count"]) self.horizontalHeader().setStretchLastSection(True) self.verticalHeader().hide() self.populate(modules)
def __init__(self, window_class, data, tabName, *args): QTableWidget.__init__(self, *args) self.data = data self.setmydata() self.resizeColumnsToContents() self.resizeRowsToContents() self.tabName = tabName self.window = window_class # we need pointer to this class to add jobs to the queue
def __init__(self, result, parent=None): QTableWidget.__init__(self, len(result.model.task_list), 6, parent) self.result = result self.setHorizontalHeaderLabels(['Task', 'min', 'avg', 'max', 'std dev', 'occupancy']) self.setEditTriggers(QAbstractItemView.NoEditTriggers) self.verticalHeader().hide() self.update()
def __init__(self, parent, configuration, simulation_tab): QTableWidget.__init__(self, 4, 2, parent) self._header = ['Scheduler', 'Overhead schedule (cycles)', 'Overhead on activate (cycles)', 'Overhead on terminate (cycles)'] self._configuration = configuration self._simulation_tab = simulation_tab self.refresh_table() self.cellChanged.connect(self._cell_changed) self.cellActivated.connect(self._cell_activated)
def __init__(self, parent): QTableWidget.__init__(self, parent) self.setSelectionMode(QAbstractItemView.NoSelection) self.setColumnCount(0) self.setRowCount(0) self.horizontalHeader().setMinimumSectionSize(15) self.verticalHeader().setVisible(False) self.verticalHeader().setDefaultSectionSize(25) #self.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) self.columns()
def __init__(self, parent, result): QTableWidget.__init__(self, len(result.model.logs), 3, parent=parent) self.setWindowTitle("Logs") self.setHorizontalHeaderLabels(["Date (cycles)", "Date (ms)", "Message"]) self.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents) self.horizontalHeader().setStretchLastSection(True) self.horizontalHeader().setMinimumSectionSize(60) self.verticalHeader().hide() self._sim = result.model self.result = result self.update()
def __init__(self, parent, result): QTableWidget.__init__(self, len(result.model.logs), 3, parent=parent) self.setWindowTitle("Logs") self.setHorizontalHeaderLabels( ["Date (cycles)", "Date (ms)", "Message"]) self.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents) self.horizontalHeader().setStretchLastSection(True) self.horizontalHeader().setMinimumSectionSize(60) self.verticalHeader().hide() self._sim = result.model self.result = result self.update()
def __init__( self, parent = None ): QTableWidget.__init__( self, parent ) self.labels = [ "Name", "Lines", "Gates", "Quantum Costs", "Transistor Costs", "Run-Time" ] self.setColumnCount( len( self.labels ) ) self.setHorizontalHeaderLabels( self.labels ) self.setColumnHidden( 4, True ) self.setColumnHidden( 5, True ) self.horizontalHeader().setContextMenuPolicy( Qt.CustomContextMenu ) self.connect( self.horizontalHeader(), SIGNAL( 'customContextMenuRequested( const QPoint& )' ), self.headerContextMenu )
def __init__(self, parent, result): QTableWidget.__init__(self, len(result.model.processors) + 1, 3, parent) self.result = result self.setHorizontalHeaderLabels( ["Total load", "Payload", "System load", "Theoric min"]) self.setVerticalHeaderLabels([x.name for x in result.model.processors] + ["Average"]) self.setEditTriggers(QAbstractItemView.NoEditTriggers) self.update()
def __init__(self, parent, result, task): self.result = result self.task = task jobs = result.tasks[task].jobs QTableWidget.__init__(self, len(jobs), 9, parent) self.setHorizontalHeaderLabels(["Activation", "Start", "End", "Deadline", "Comp. time", "Resp. time", "CPI", "Preemptions", "Migrations"]) self.setEditTriggers(QAbstractItemView.NoEditTriggers) self.verticalHeader().hide() self.update()
def __init__(self, *args): QTableWidget.__init__(self, *args) self.setGeometry(QtCore.QRect(15, 400, 391, 301)) self.setMaximumSize(QtCore.QSize(400, 16777215)) self.setObjectName("Thermometers Table") self.setColumnCount(4) self.setRowCount(0) for i in range(4): item = QtGui.QTableWidgetItem() self.setHorizontalHeaderItem(i, item) self.horizontalHeaderItem(i).setText(QtGui.QApplication.translate("FloorplanMaker", self.columns_names[i], None, QtGui.QApplication.UnicodeUTF8)) self.setColumnWidth(i,90) self.setColumnWidth(0,120)
def __init__(self, parent, configuration): QTableWidget.__init__(self, len(configuration.proc_info_list), 7, parent) self._configuration = configuration self._manual_change = True self.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents) self.horizontalHeader().setStretchLastSection(True) self._header = ['id', 'Name', 'CS overhead', 'CL overhead', 'Caches', 'Cycles / mem access', 'Speed'] self.setVerticalHeaderLabels([""]) self.verticalHeader().hide() self.setSelectionBehavior(QAbstractItemView.SelectRows) self.refresh_table()
def __init__(self, parent, configuration): QTableWidget.__init__(self, 0, 0, parent) self._ignore_cell_changed = False self.horizontalHeader().setResizeMode(QHeaderView.Interactive) self.horizontalHeader().setStretchLastSection(True) self.verticalHeader().hide() self._configuration = configuration self.setSelectionBehavior(QAbstractItemView.SelectRows) self._header = [ "id", "Name", "Task type", "Abort on miss", "Act. Date (ms)", "Period (ms)", "List of Act. dates (ms)", "Deadline (ms)", "WCET (ms)", "ACET (ms)", "ET Std Dev (ms)", "Base CPI", "Instructions", "MIX", "Stack file", "Preemption cost", "Followed by" ] self._dict_header = { 'id': 0, 'name': 1, 'task_type': 2, 'abort': 3, 'activation_date': 4, 'period': 5, 'list_activation_dates': 6, 'deadline': 7, 'wcet': 8, 'acet': 9, 'et_stddev': 10, 'base_cpi': 11, 'n_instr': 12, 'mix': 13, 'sdp': 14, 'preemption_cost': 15, 'followed': 16 } # def add_task(self, name, identifier, task_type="Periodic", # abort_on_miss=True, period=20, activation_date=0, # n_instr=0, mix=0.5, stack_file="", wcet=3, acet=0, # et_stddev=0, deadline=20, base_cpi=1.0, followed_by=None, # list_activation_dates=[], preemption_cost=0, data=None): #self.add_task(task("T1", 1, period=4, wcet=2, deadline=4)); self.refresh_table() self.resizeColumnsToContents() self.cellChanged.connect(self._cell_changed) self.cellActivated.connect(self._cell_activated)
def __init__(self, splitter, parent): QTableWidget.__init__(self, splitter) self.menu = EvtxSelectorMenu(self) self.parent = parent self.setColumnCount(6) self.hideColumn(4) self.hideColumn(5) self.checked = {} self.setHorizontalHeaderLabels(['level', 'id', 'date', 'source']) self.horizontalHeader().setStretchLastSection(True) self.verticalHeader().hide() self.setSortingEnabled(True) self.setSelectionBehavior(QAbstractItemView.SelectRows) self.setEditTriggers(QAbstractItemView.NoEditTriggers)
def __init__(self, result, field, metrics=('min', 'avg', 'max', 'sum'), parent=None, map_=lambda x: x): QTableWidget.__init__(self, len(result.model.task_list), 1 + len(metrics), parent) self.result = result self.field = field self.metrics = metrics self.map_ = map_ self.setHorizontalHeaderLabels(['Task'] + metrics) self.setEditTriggers(QAbstractItemView.NoEditTriggers) self.verticalHeader().hide() self.update()
def __init__(self, parent=None): QTableWidget.__init__(self, parent) self.setSelectionMode(QAbstractItemView.SingleSelection) self.setSelectionBehavior(QAbstractItemView.SelectRows) self.verticalHeader().setVisible(False) self.verticalHeader().setDefaultSectionSize(25) headersText = ("Type", "Observation", "Precision") for c, headerText in enumerate(headersText): self.insertColumn(c) item = QTableWidgetItem(headerText) self.setHorizontalHeaderItem(c, item) spinDelegate = SpinBoxDelegate() self.setItemDelegateForColumn(2, spinDelegate)
def __init__(self, parent): QTableWidget.__init__(self, parent) self.data = None self.projectId = None self.sectionId = None self.inspectionId = None self.setSelectionMode(QAbstractItemView.SingleSelection) self.setSelectionBehavior(QAbstractItemView.SelectRows) self.setColumnCount(0) self.setRowCount(0) self.horizontalHeader().setVisible(True) self.horizontalHeader().setMinimumSectionSize(15) self.verticalHeader().setVisible(True) self.verticalHeader().setDefaultSectionSize(25) self.itemClicked.connect(self.import_checkbox_clicked)
def __init__(self, parent=None): QTableWidget.__init__(self, parent) self.labels = [ "Name", "Lines", "Gates", "Quantum Costs", "Transistor Costs", "Run-Time" ] self.setColumnCount(len(self.labels)) self.setHorizontalHeaderLabels(self.labels) self.setColumnHidden(4, True) self.setColumnHidden(5, True) self.horizontalHeader().setContextMenuPolicy(Qt.CustomContextMenu) self.connect(self.horizontalHeader(), SIGNAL('customContextMenuRequested( const QPoint& )'), self.headerContextMenu)
def __init__(self, parent, configuration, simulation_tab): QTableWidget.__init__(self, 5, 2, parent) self._header = [ 'Scheduler', 'Scheduler Path', 'Overhead schedule (cycles)', 'Overhead on activate (cycles)', 'Overhead on terminate (cycles)' ] self._dict_header = { 'scheduler': 0, 'scheduler_path': 1, 'overhead_schedule': 2, 'overhead_activate': 3, 'overhead_terminate': 4 } self._configuration = configuration self._simulation_tab = simulation_tab self.refresh_table() self.cellChanged.connect(self._cell_changed) self.cellActivated.connect(self._cell_activated)
def __init__(self, parent): QTableWidget.__init__(self, parent) self.settings = MySettings() self.geomColumn = True self.setSortingEnabled(True) self.setSelectionMode(QAbstractItemView.SingleSelection) self.setSelectionBehavior(QAbstractItemView.SelectRows) self.setColumnCount(0) self.setRowCount(0) self.horizontalHeader().setMinimumSectionSize(15) self.verticalHeader().setVisible(False) self.verticalHeader().setDefaultSectionSize(25) #self.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) self.displayColumns() self.adjustSize()
def __init__(self, parent, configuration): self._ignore_cell_changed = False self._manual_change = True self._configuration = configuration self._caches_list = configuration.caches_list QTableWidget.__init__(self, len(self._caches_list), 5, parent) self.horizontalHeader().setStretchLastSection(True) self.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents) self.setHorizontalHeaderLabels( ["id", "Name", "Size", 'Access Time', "Miss penalty"]) self.setVerticalHeaderLabels([""]) self.verticalHeader().hide() self.setSelectionBehavior(QAbstractItemView.SelectRows) curRow = 0 for cache in self._caches_list: self._add_cache_to_table(curRow, cache) curRow += 1 self.cellChanged.connect(self._cell_changed)
def __init__(self, parent, configuration): QTableWidget.__init__(self, 0, 0, parent) self._ignore_cell_changed = False self.horizontalHeader().setResizeMode(QHeaderView.Interactive) self.horizontalHeader().setStretchLastSection(True) self.verticalHeader().hide() self._configuration = configuration self.setSelectionBehavior(QAbstractItemView.SelectRows) self._header = [ "id", "Name", "Task type", "Abort on miss", "Act. Date (ms)", "Period (ms)", "List of Act. dates (ms)", "Deadline (ms)", "WCET (ms)", "ACET (ms)", "ET Std Dev (ms)", "Base CPI", "Instructions", "MIX", "Stack file", "Preemption cost", "Followed by" ] self._dict_header = { 'id': 0, 'name': 1, 'task_type': 2, 'abort': 3, 'activation_date': 4, 'period': 5, 'list_activation_dates': 6, 'deadline': 7, 'wcet': 8, 'acet': 9, 'et_stddev': 10, 'base_cpi': 11, 'n_instr': 12, 'mix': 13, 'sdp': 14, 'preemption_cost': 15, 'followed': 16 } self.refresh_table() self.resizeColumnsToContents() self.cellChanged.connect(self._cell_changed) self.cellActivated.connect(self._cell_activated)
def __init__(self, parent=None): QTableWidget.__init__(self, parent) self.setColumnCount(6) self.setHorizontalHeaderLabels(['level', 'id', 'date', 'source']) self.horizontalHeader().setStretchLastSection(True) self.verticalHeader().hide() self.setSortingEnabled(True) self.setSelectionBehavior(QAbstractItemView.SelectRows) self.setSelectionMode(QAbstractItemView.ExtendedSelection) self.setEditTriggers(QAbstractItemView.NoEditTriggers) self.setShowGrid(False) self.setAlternatingRowColors(True) self.hideColumn(4) self.hideColumn(5) self.cellDoubleClicked.connect(self.dispSingleEvent) self.menu = EvtSelectorMenu(self)
def __init__(self, parent, configuration): QTableWidget.__init__(self, 0, 0, parent) self._ignore_cell_changed = False self.horizontalHeader().setResizeMode(QHeaderView.Interactive) self.horizontalHeader().setStretchLastSection(True) self.verticalHeader().hide() self._configuration = configuration self.setSelectionBehavior(QAbstractItemView.SelectRows) self._header = ["id", "Name", "Task type", "Abort on miss", "Act. Date (ms)", "Period (ms)", "List of Act. dates (ms)", "Deadline (ms)", "WCET (ms)", "ACET (ms)", "ET Std Dev (ms)", "Base CPI", "Instructions", "MIX", "Stack file", "Preemption cost", "Followed by"] self._dict_header = { 'id': 0, 'name': 1, 'task_type': 2, 'abort': 3, 'activation_date': 4, 'period': 5, 'list_activation_dates': 6, 'deadline': 7, 'wcet': 8, 'acet': 9, 'et_stddev': 10, 'base_cpi': 11, 'n_instr': 12, 'mix': 13, 'sdp': 14, 'preemption_cost': 15, 'followed': 16 } self.refresh_table() self.resizeColumnsToContents() self.cellChanged.connect(self._cell_changed) self.cellActivated.connect(self._cell_activated)
def __init__(self, *args): QTableWidget.__init__(self, *args) self.setData() self.setColumnWidth(0, 40) self.setColumnWidth(1, 50) self.setColumnWidth(2, 163) self.setColumnWidth(3, 60) self.setColumnWidth(4, 60) self.setColumnWidth(5, 140) self.verticalHeader().setVisible(False) header = self.horizontalHeader() header.setVisible(False) header.setResizeMode(2, QtGui.QHeaderView.Stretch) header.setResizeMode(4, QtGui.QHeaderView.Stretch) self.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.setMouseTracking(True) self.edited_location = None self.cellDoubleClicked.connect(self.set_edited_location) self.itemChanged.connect(self.update_internal_memory) self.doubleClicked.connect(self.handle_double_click) self.labels = None
def __init__(self, parent=None, name=None): """ Constructor """ #logging.debug(self.__class__.__name__ + ": __init__()") AbstractView.__init__(self) QTableWidget.__init__(self, parent) self._operationId = 0 self._updatingFlag=0 self.updateIni = False self._currentCategoryName = "" self._relativePath=None self.setSortingEnabled(False) self.verticalHeader().hide() self.setSelectionMode(QTableWidget.NoSelection) self.clear() # sets header self._readOnly = False self._showAddDeleteButtonFlag = False self.connect(self.horizontalHeader(), SIGNAL("sectionResized(int,int,int)"), self.sectionResized) self.connect(self, SIGNAL("itemDoubleClicked(QTableWidgetItem *)"), self.itemDoubleClickedSlot)
def __init__(self, parent, configuration): QTableWidget.__init__(self, 5, 1, parent) self._configuration = configuration self._manual_change = True self.setVerticalHeaderLabels([ "Duration (cycles)", "Duration (ms)", "Cycles / ms", 'RAM access time', 'Execution Time Model' ]) self.horizontalHeader().setStretchLastSection(True) self.horizontalHeader().hide() self.setItem(0, 0, QTableWidgetItem(str(configuration.duration))) self.setItem( 1, 0, QTableWidgetItem( str( float(configuration.duration) / configuration.cycles_per_ms))) self.setItem(2, 0, QTableWidgetItem(str(configuration.cycles_per_ms))) self.setItem(3, 0, QTableWidgetItem(str(configuration.memory_access_time))) item = QComboBox(self) selected = 0 for i, (etm_name, etm_code) in \ enumerate(execution_time_model_names.items()): item.addItem(etm_name) if etm_code == configuration.etm: selected = i item.setCurrentIndex(selected) self.setCellWidget(4, 0, item) def activation_handler(x): configuration.etm = execution_time_model_names[str(x)] configuration.conf_changed() item.activated['QString'].connect(activation_handler) # self._update_observe_window() self.cellChanged.connect(self._cell_changed)
def __init__(self, client, parent, main_window, reload_frequency): QTableWidget.__init__(self, parent) self.main_window = main_window self.msg_no_services = False self.msg_no_connexion = False self.setContentsMargins(0, 0, 0, 0) self.horizontalHeader().hide() self.verticalHeader().hide() self.setGridStyle(Qt.NoPen) self.setSelectionMode(QAbstractItemView.NoSelection) self.setEditTriggers(QAbstractItemView.NoEditTriggers) self.setWhatsThis( tr("This panel lists the services configured in ufwi_conf " "and tells whether they are running or not.")) self.client = client self.services_list = [] self.services_status = {} self.showable_states = set(ServiceStatusValues.monitor_status) #initial filling self.data = {} # key : component name, value : status self.refresh()
def __init__(self, *args): QTableWidget.__init__(self, *args) self.setHorizontalHeaderLabels(['Energy', 'Occu', 'Orbital']) print self.getActif()
def __init__(self, parent=None): QTableWidget.__init__(self, parent) self.axistags = None
def __init__(self, parent): QTableWidget.__init__(self, parent) self.configure() self.addHeaders()
def __init__( self, parent = None ): QTableWidget.__init__( self, parent ) self.verticalHeader().hide() self.spec = None
def __init__(self,parent): QTableWidget.__init__(self,parent) self.logModel = log.LogModel.Instance() self.logModel.itemAdded.connect(self.update) self.maximumLevel = log.warning
def __init__(self, parent=None): QTableWidget.__init__(self, parent) self.__column_width_list = []
def __init__(self, parent=None): QTableWidget.__init__(self, 5, 3) self.item_widget = None self.initUi()
def __init__( self, parent = None ): QTableWidget.__init__( self, parent )
def __init__(self, parent): """Init for the table widget, nothing special here""" QTableWidget.__init__(self, parent) self.parent = parent
def __init__(self, result, parent=None): QTableWidget.__init__(self, len(result.model.task_list) + 1, 2, parent) self.result = result self.setHorizontalHeaderLabels(['Task', 'Task migrations']) self.setEditTriggers(QAbstractItemView.NoEditTriggers) self.verticalHeader().hide()
def __init__(self, parent): QTableWidget.__init__(self, parent)
def __init__(self, parent=None): QTableWidget.__init__(self, parent) self.verticalHeader().hide() self.spec = None