mattrussmill / qcvTouchUp

Simple image viewer and editor for photographs - OpenCV and Qt Widgets application
GNU General Public License v3.0
5 stars 1 forks source link

Enums for Array Parameter #15

Closed mattrussmill closed 6 years ago

mattrussmill commented 6 years ago

For the parameter arrays from menu items, enumerations should be added such that the arrays can be accessed and maintained more efficiently. The question that should be worked through is where should the enumerations for each menu be added and maintained?

mattrussmill commented 6 years ago

In "adjustmenu" class, heap float array was replaced with a statically allocated QVector and registered as a qmetatype in main.cpp. Doing this causes a deep copy to be made when passed via signal/slot in a queued connection. The deep copy no longer needs to take place in the worker thread at the beginning of the "doadjustcomputation" slot. The "imageworker" and "adjustmenu" classes were also updated to include enumerations for the passed QVector parameter for better code readability and maintainability. Filtermenu still needs to be updated.

mattrussmill commented 6 years ago

"filtermenu" was updated accordingly. All additional menus shall be created with a similar structure.