| 236 | } |
| 237 | |
| 238 | void InputEditorView::resizeAllColumns() |
| 239 | { |
| 240 | horizontalHeader()->resizeSection(InputEditorModel::COLUMN_SAVESTATE, 20); |
| 241 | horizontalHeader()->resizeSection(InputEditorModel::COLUMN_FRAME, 80); |
| 242 | horizontalHeader()->resizeSection(inputEditorModel->columnCount() - 1, 20); |
| 243 | |
| 244 | /* Set analog columns to be resizable by users. |
| 245 | * Increase the other columns by a small amount, because even if it's |
| 246 | * supposed to take the same place as the header, sometimes it considers |
| 247 | * that it doesn't have enough space. */ |
| 248 | for (int c = InputEditorModel::COLUMN_SPECIAL_SIZE; c < inputEditorModel->columnCount()-1; c++) { |
| 249 | if (inputEditorModel->isInputAnalog(c)) { |
| 250 | horizontalHeader()->setSectionResizeMode(c, QHeaderView::Interactive); |
| 251 | } |
| 252 | else { |
| 253 | resizeColumnToContents(c); |
| 254 | int size = horizontalHeader()->sectionSize(c); |
| 255 | horizontalHeader()->resizeSection(c, size + 2); |
| 256 | } |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | void InputEditorView::update() |
| 261 | { |
nothing calls this directly
no test coverage detected