The-OpenROAD-Project / OpenROAD

OpenROAD's unified application implementing an RTL-to-GDS Flow. Documentation at https://openroad.readthedocs.io/en/latest/
https://theopenroadproject.org/
BSD 3-Clause "New" or "Revised" License
1.35k stars 481 forks source link

staGui: End column is now visible #5001

Closed oharboe closed 3 weeks ago

oharboe commented 3 weeks ago

there's no great way in C++ to get the maximum value/count for an enum, but at least it's no longer hardcoded if new columns are added.

The "End" column was hidden since there was a gaffe when adding End and not updating the hardcoded count of the enum everywhere:

image

github-actions[bot] commented 3 weeks ago

clang-tidy review says "All clean, LGTM! :+1:"

oharboe commented 3 weeks ago

@maliberty Possible future refinement, use QMetaEnum, since there is a dependency on Qt anyway?

QMetaEnum might help reduce brittle unqiue solutions within each module to deal with enums and make the code easier to read as there is a lot of implicit documentation in using QMetaEnum to e.g. translate from enum to string, get count of enums and such.

maliberty commented 3 weeks ago

Q_ENUM could be used (though only in gui).