MCPcopy Create free account
hub / github.com/Cubitect/cubiomes-viewer / onSort

Method onSort

src/formsearchcontrol.cpp:569–589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

567}
568
569void FormSearchControl::onSort(int, Qt::SortOrder)
570{
571 // We want to achieve: none -> descending -> ascending -> none
572 // The headerview flips the indicator with the logic:
573 // if (same_section)
574 // new_order = old_order == descending ? ascending : descending
575 // else
576 // new_order = InitialSortOrder (else ascending)
577 QHeaderView *header = ui->results->horizontalHeader();
578
579 if (proxy->order == Qt::AscendingOrder && proxy->column != -1)
580 {
581 header->setSortIndicatorShown(false);
582 header->setSortIndicator(-1, Qt::DescendingOrder);
583 proxy->column = -1;
584 }
585 else
586 {
587 header->setSortIndicatorShown(true);
588 }
589}
590
591void FormSearchControl::searchResult(uint64_t seed)
592{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected