| 31 | #include "ui_DescriptorViewer.h" |
| 32 | |
| 33 | struct ButtonTag |
| 34 | { |
| 35 | ButtonTag() = default; |
| 36 | ButtonTag(bool buffer, const Descriptor &descriptor) |
| 37 | : valid(true), buffer(buffer), descriptor(descriptor) |
| 38 | { |
| 39 | } |
| 40 | ButtonTag(ResourceId heap) : valid(true), buffer(false), heap(heap) {} |
| 41 | |
| 42 | // all constructe tags compare equal so this value can contain data but still be used to enable buttons |
| 43 | bool operator==(const ButtonTag &o) const { return valid && o.valid; } |
| 44 | bool operator<(const ButtonTag &o) const { return valid < o.valid; } |
| 45 | |
| 46 | bool valid = false; |
| 47 | bool buffer = false; |
| 48 | Descriptor descriptor; |
| 49 | ResourceId heap; |
| 50 | }; |
| 51 | |
| 52 | Q_DECLARE_METATYPE(ButtonTag); |
| 53 |
no outgoing calls
no test coverage detected