(self)
Init all controls in the main area
Init all controls in the main area
Init all controls in the main area
def __init_main_area(self) -> None:
        """Init all controls in the main area"""
        # aggregation table
        self.agg_table_view = tableview = QTableView()
        tableview.setModel(self.agg_table_model)
        tableview.setSelectionBehavior(QAbstractItemView.SelectRows)
        tableview.selectionModel().selectionChanged.connect(self.__rows_selected)
        tableview.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)

        vbox = gui.vBox(self.mainArea, " ")
        vbox.layout().addWidget(tableview)

        # aggregations checkboxes
        grid_layout = QGridLayout()
        gui.widgetBox(self.mainArea, orientation=grid_layout, box="Aggregations")

        col = 0
        row = 0
        break_rows = (5, 5, 99)
        for agg in AGGREGATIONS:
            self.agg_checkboxes[agg] = cb = CheckBox(agg, self)
            cb.setDisabled(True)
            cb.stateChanged.connect(partial(self.__aggregation_changed, agg))
            grid_layout.addWidget(cb, row, col)
            row += 1
            if row == break_rows[col]:
                row = 0
                col += 1
def __init_main_area ( self ) -> None : # aggregation table self . agg_table_view = tableview = QTableView ( ) tableview . setModel ( self . agg_table_model ) tableview . setSelectionBehavior ( QAbstractItemView . SelectRows ) tableview . selectionModel ( ) . selectionChanged . connect ( self . __rows_selected ) tableview . horizontalHeader ( ) . setSectionResizeMode ( QHeaderView . Stretch ) vbox = gui . vBox ( self . mainArea , " " ) vbox . layout ( ) . addWidget ( tableview ) # aggregations checkboxes grid_layout = QGridLayout ( ) gui . widgetBox ( self . mainArea , orientation = grid_layout , box = "Aggregations" ) col = 0 row = 0 break_rows = ( 5 , 5 , 99 ) for agg in AGGREGATIONS : self . agg_checkboxes [ agg ] = cb = CheckBox ( agg , self ) cb . setDisabled ( True ) cb . stateChanged . connect ( partial ( self . __aggregation_changed , agg ) ) grid_layout . addWidget ( cb , row , col ) row += 1 if row == break_rows [ col ] : row = 0 col += 1