Class sh::tools::HistoryTracker

template<class T>
class sh::tools::HistoryTracker

A data structure for tracking a history of data.

It is a templated container It is typically used for tracking the directory history (used by sh::actions::common::ActionHistoryNavigate, et al).

Public Functions

HistoryTracker()
void visitValue(T v)
int count()
QList<HistoryEntry> forwardList()
QList<HistoryEntry> backwardList()
void revisitValue(int idx)

Public Members

const int HISTORY_SIZE = 10

Private Members

QList<T> _items
int _current = -1
class HistoryEntry

Public Functions

HistoryEntry(int i, T v)
int index()
T value()

Private Members

int _index
T _value