def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.setObjectName('advanced_results_widget') # Hardware objects ---------------------------------------------------- # Internal variables -------------------------------------------------- self._tree_view_item = None self._half_widget_size = 900 # Graphic elements ---------------------------------------------------- _snapshot_widget = QtGui.QWidget(self) self.position_widget = uic.loadUi( os.path.join(os.path.dirname(__file__), 'ui_files/Qt4_snapshot_widget_layout.ui')) self.heat_map_widget = HeatMapWidget(self) # Layout -------------------------------------------------------------- _snapshots_vlayout = QtGui.QVBoxLayout(_snapshot_widget) _snapshots_vlayout.addWidget(self.position_widget) _snapshots_vlayout.setContentsMargins(0, 0, 0, 0) _snapshots_vlayout.setSpacing(0) _snapshots_vlayout.addStretch(0) _main_hlayout = QtGui.QHBoxLayout(self) _main_hlayout.addWidget(self.heat_map_widget) _main_hlayout.addWidget(_snapshot_widget) _main_hlayout.setSpacing(2) _main_hlayout.setContentsMargins(0, 0, 0, 0) _main_hlayout.addStretch(0)
def __init__(self, parent=None, allow_adjust_size=True): QWidget.__init__(self, parent) self.setObjectName('advanced_results_widget') # Hardware objects ---------------------------------------------------- # Internal variables -------------------------------------------------- self._initialized = None self._tree_view_item = None # Graphic elements ---------------------------------------------------- self.heat_map_widget = HeatMapWidget(self, allow_adjust_size) # Layout -------------------------------------------------------------- _main_hlayout = QHBoxLayout(self) _main_hlayout.addWidget(self.heat_map_widget) _main_hlayout.setSpacing(2) _main_hlayout.setContentsMargins(0, 0, 0, 0) _main_hlayout.addStretch(0)