|
KanoopGuiQt 1.3.0
Qt GUI utility library
|
|
Serializable snapshot of a QHeaderView's section sizes and visibility. More...
#include <headerstate.h>
Inheritance diagram for HeaderState:
Collaboration diagram for HeaderState:Classes | |
| class | SectionState |
| Describes the saved state of a single header section. More... | |
Public Member Functions | |
| virtual | ~HeaderState () |
| Virtual destructor. | |
| virtual QByteArray | serializeToJson () const override |
| Serialize this header state to a JSON byte array. | |
| virtual void | deserializeFromJson (const QByteArray &json) override |
| Deserialize a header state from a JSON byte array. | |
| void | addSection (int section, const QString &text, int size, bool visible) |
| Record a section in this header state. | |
| SectionState | getSection (int section) |
| Return the saved state for a given section index. | |
Serializable snapshot of a QHeaderView's section sizes and visibility.
HeaderState captures per-section metadata (index, label, pixel width, and visibility) so that a header view layout can be saved to JSON and restored later.
Definition at line 14 of file headerstate.h.
|
inlinevirtual |
Virtual destructor.
Definition at line 19 of file headerstate.h.
| void HeaderState::addSection | ( | int | section, |
| const QString & | text, | ||
| int | size, | ||
| bool | visible | ||
| ) |
Record a section in this header state.
| section | Logical section index |
| text | Header label text |
| size | Section pixel width |
| visible | Whether the section is visible |
|
overridevirtual |
Deserialize a header state from a JSON byte array.
| json | JSON-encoded representation |
|
inline |
Return the saved state for a given section index.
| section | Logical section index |
Definition at line 135 of file headerstate.h.
|
overridevirtual |
Serialize this header state to a JSON byte array.