RhythmGame 1.4.3
Loading...
Searching...
No Matches
Public Types | Signals | Public Member Functions | Properties | List of all members
gameplay_logic::ColumnState Class Referencefinal

The state of a single column, including its notes and whether it is currently pressed. More...

#include <NoteState.h>

Inheritance diagram for gameplay_logic::ColumnState:
Inheritance graph
[legend]
Collaboration diagram for gameplay_logic::ColumnState:
Collaboration graph
[legend]

Public Types

enum  Role {
  NoteTypeRole = Qt::UserRole + 1 , NotePositionRole , NoteHitRole , NoteOtherEndHitRole ,
  BelowBottomRole , LongNoteEndPositionRole , VisibleNoteRole , HeldLongNoteRole ,
  StaticLongNoteCandidateRole
}
 

Signals

void pressedChanged ()
 
void holdingLongNoteChanged ()
 

Public Member Functions

 ColumnState (QList< NoteState > notes, QObject *parent=nullptr)
 
auto rowCount (const QModelIndex &parent) const -> int override
 
auto data (const QModelIndex &index, int role) const -> QVariant override
 
auto roleNames () const -> QHash< int, QByteArray > override
 
void onHitEvent (HitEvent hit)
 
auto isPressed () const -> bool
 
auto isHoldingLongNote () const -> bool
 
auto getNotes () const -> const QList< NoteState > &
 
auto getNotes () -> QList< NoteState > &
 
auto mapTimeIndexToPositionIndex (int64_t timeIndex) const -> int
 
auto getLnBeginBounds (double position) const -> std::optional< std::pair< int, int > >
 

Properties

bool pressed = false
 
bool holdingLongNote = false
 

Detailed Description

The state of a single column, including its notes and whether it is currently pressed.

See also
NoteState

Member Enumeration Documentation

◆ Role

Enumerator
NoteTypeRole 
NotePositionRole 
NoteHitRole 
NoteOtherEndHitRole 
BelowBottomRole 
LongNoteEndPositionRole 
VisibleNoteRole 
HeldLongNoteRole 
StaticLongNoteCandidateRole 

Constructor & Destructor Documentation

◆ ColumnState()

gameplay_logic::ColumnState::ColumnState ( QList< NoteState >  notes,
QObject *  parent = nullptr 
)
explicit

Member Function Documentation

◆ data()

auto gameplay_logic::ColumnState::data ( const QModelIndex &  index,
int  role 
) const -> QVariant
override

◆ getLnBeginBounds()

auto gameplay_logic::ColumnState::getLnBeginBounds ( double  position) const -> std::optional<std::pair<int, int>>

First and last LN begin rows whose bodies cross this position.

◆ getNotes() [1/2]

auto gameplay_logic::ColumnState::getNotes ( ) -> QList<NoteState>&
inline

◆ getNotes() [2/2]

auto gameplay_logic::ColumnState::getNotes ( ) const -> const QList<NoteState>&
inline

◆ holdingLongNoteChanged

void gameplay_logic::ColumnState::holdingLongNoteChanged ( )
signal

◆ isHoldingLongNote()

auto gameplay_logic::ColumnState::isHoldingLongNote ( ) const -> bool

◆ isPressed()

auto gameplay_logic::ColumnState::isPressed ( ) const -> bool

◆ mapTimeIndexToPositionIndex()

auto gameplay_logic::ColumnState::mapTimeIndexToPositionIndex ( int64_t  timeIndex) const -> int

◆ onHitEvent()

void gameplay_logic::ColumnState::onHitEvent ( HitEvent  hit)

◆ pressedChanged

void gameplay_logic::ColumnState::pressedChanged ( )
signal

◆ roleNames()

auto gameplay_logic::ColumnState::roleNames ( ) const -> QHash<int, QByteArray>
override

◆ rowCount()

auto gameplay_logic::ColumnState::rowCount ( const QModelIndex &  parent) const -> int
override

Property Documentation

◆ holdingLongNote

bool gameplay_logic::ColumnState::holdingLongNote = false
read

◆ pressed

bool gameplay_logic::ColumnState::pressed = false
read

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