Esempio n. 1
0
 def _restore_header(self) -> None:
     self._view.horizontalHeader().blockSignals(True)
     restoreHeader(self._view.horizontalHeader(),
                   self._state.config_key_prefix)
     self._set_column_sizes()
     self._set_sort_indicator()
     self._view.horizontalHeader().blockSignals(False)
Esempio n. 2
0
 def _restore_header(self) -> None:
     self._view.horizontalHeader().blockSignals(True)
     restoreHeader(self._view.horizontalHeader(),
                   self._state.GEOMETRY_KEY_PREFIX)
     self._set_column_sizes()
     self._set_sort_indicator()
     self._view.horizontalHeader().blockSignals(False)
Esempio n. 3
0
 def _setup_headers(self) -> None:
     vh = self._view.verticalHeader()
     hh = self._view.horizontalHeader()
     if not isWin:
         vh.hide()
         hh.show()
     restoreHeader(hh, "editor")
     hh.setHighlightSections(False)
     hh.setMinimumSectionSize(50)
     hh.setSectionsMovable(True)
     self._set_column_sizes()
     hh.setContextMenuPolicy(Qt.CustomContextMenu)
     qconnect(hh.customContextMenuRequested, self._on_header_context)
     self._set_sort_indicator()
     qconnect(hh.sortIndicatorChanged, self._on_sort_column_changed)
     qconnect(hh.sectionMoved, self._on_column_moved)
Esempio n. 4
0
 def setupHeaders(self):
     vh = self.form.tableView.verticalHeader()
     hh = self.form.tableView.horizontalHeader()
     if not isWin:
         vh.hide()
         hh.show()
     restoreHeader(hh, "editor")
     hh.setHighlightSections(False)
     hh.setMinimumSectionSize(50)
     hh.setMovable(True)
     self.setColumnSizes()
     hh.setContextMenuPolicy(Qt.CustomContextMenu)
     hh.connect(hh, SIGNAL("customContextMenuRequested(QPoint)"),
                self.onHeaderContext)
     self.setSortIndicator()
     hh.connect(hh, SIGNAL("sortIndicatorChanged(int, Qt::SortOrder)"),
                self.onSortChanged)
Esempio n. 5
0
 def setupHeaders(self):
     vh = self.form.tableView.verticalHeader()
     hh = self.form.tableView.horizontalHeader()
     if not isWin:
         vh.hide()
         hh.show()
     restoreHeader(hh, "editor")
     hh.setHighlightSections(False)
     hh.setMinimumSectionSize(50)
     hh.setMovable(True)
     self.setColumnSizes()
     hh.setContextMenuPolicy(Qt.CustomContextMenu)
     hh.connect(hh, SIGNAL("customContextMenuRequested(QPoint)"),
                self.onHeaderContext)
     self.setSortIndicator()
     hh.connect(hh, SIGNAL("sortIndicatorChanged(int, Qt::SortOrder)"),
                self.onSortChanged)
Esempio n. 6
0
 def setupHeaders(self):
     """Restore and setup headers"""
     self.hh.setSectionsMovable(True)
     self.hh.setSectionsClickable(False)
     self.hh.setHighlightSections(False)
     self.hh.setMinimumSectionSize(50)
     self.hh.setDefaultSectionSize(100)
     self.hh.setSectionResizeMode(QHeaderView.Interactive)
     self.hh.setStretchLastSection(True)
     self.hh.resizeSection(self.hh.logicalIndex(0), 120)
     self.hh.resizeSection(self.hh.logicalIndex(1), 240)
     restoreHeader(self.hh, "organizer")
     vh = self.table.verticalHeader()
     vh.setSectionsClickable(False)
     vh.setSectionResizeMode(QHeaderView.Fixed)
     vh.setDefaultSectionSize(24)
     vh_font = vh.font()
     vh_font.setPointSize(10)
     vh.setFont(vh_font)
Esempio n. 7
0
 def _restore_header(self) -> None:
     restoreHeader(self._view.horizontalHeader(),
                   self._state.config_key_prefix)