KanoopGuiQt 1.3.0
Qt GUI utility library
Loading...
Searching...
No Matches
HeaderState::SectionState Class Reference

Describes the saved state of a single header section. More...

#include <headerstate.h>

+ Inheritance diagram for HeaderState::SectionState:
+ Collaboration diagram for HeaderState::SectionState:

Classes

class  List
 A serializable list of SectionState objects. More...
 

Public Member Functions

 SectionState ()
 Default constructor — creates an invalid section state.
 
 SectionState (int section, const QString &text, int size, bool visible)
 Construct with explicit section attributes.
 
virtual ~SectionState ()
 Virtual destructor.
 
virtual QJsonObject serializeToJsonObject () const override
 Serialize this section state to a QJsonObject.
 
virtual void deserializeFromJsonObject (const QJsonObject &jsonObject) override
 Deserialize this section state from a QJsonObject.
 
int section () const
 Return the logical section index.
 
QString text () const
 Return the header label text.
 
int size () const
 Return the section pixel width.
 
bool isVisible () const
 Return whether the section is visible.
 
bool isValid () const
 Return whether this section state has a non-empty label.
 

Detailed Description

Describes the saved state of a single header section.

Definition at line 36 of file headerstate.h.

Constructor & Destructor Documentation

◆ SectionState() [1/2]

HeaderState::SectionState::SectionState ( )
inline

Default constructor — creates an invalid section state.

Definition at line 41 of file headerstate.h.

◆ SectionState() [2/2]

HeaderState::SectionState::SectionState ( int  section,
const QString &  text,
int  size,
bool  visible 
)
inline

Construct with explicit section attributes.

Parameters
sectionLogical section index
textHeader label text
sizeSection pixel width
visibleWhether the section is visible

Definition at line 51 of file headerstate.h.

◆ ~SectionState()

virtual HeaderState::SectionState::~SectionState ( )
inlinevirtual

Virtual destructor.

Definition at line 55 of file headerstate.h.

Member Function Documentation

◆ isValid()

bool HeaderState::SectionState::isValid ( ) const
inline

Return whether this section state has a non-empty label.

Returns
true if the text is non-empty

Definition at line 90 of file headerstate.h.

◆ isVisible()

bool HeaderState::SectionState::isVisible ( ) const
inline

Return whether the section is visible.

Returns
true if visible

Definition at line 84 of file headerstate.h.

◆ section()

int HeaderState::SectionState::section ( ) const
inline

Return the logical section index.

Returns
Section index

Definition at line 66 of file headerstate.h.

Referenced by HeaderState::SectionState::List::findForSection().

◆ size()

int HeaderState::SectionState::size ( ) const
inline

Return the section pixel width.

Returns
Width in pixels

Definition at line 78 of file headerstate.h.

◆ text()

QString HeaderState::SectionState::text ( ) const
inline

Return the header label text.

Returns
Header text string

Definition at line 72 of file headerstate.h.


The documentation for this class was generated from the following file: