BibleTime
Public Slots | Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BTHistory Class Reference

#include <bthistory.h>

Inheritance diagram for BTHistory:

Public Slots

void add (CSwordKey *newKey)
 
void back ()
 
void fw ()
 
void move (QAction *)
 

Signals

void historyChanged (bool backEnabled, bool fwEnabled)
 
void historyMoved (QString newKey)
 

Public Member Functions

 BTHistory (QObject *parent)
 
QList< QAction * > getBackList ()
 
QList< QAction * > getFwList ()
 

Private Member Functions

bool class_invariant ()
 
void sendChangedSignal ()
 

Private Attributes

QList< QAction * > m_historyList
 
int m_index = -1
 
bool m_inHistoryFunction = false
 

Detailed Description

Definition at line 24 of file bthistory.h.

Constructor & Destructor Documentation

◆ BTHistory()

BTHistory::BTHistory ( QObject parent)

Definition at line 25 of file bthistory.cpp.

References BT_ASSERT, and class_invariant().

Member Function Documentation

◆ add

void BTHistory::add ( CSwordKey newKey)
slot

◆ back

void BTHistory::back ( )
slot

Go back one step in history.

Definition at line 60 of file bthistory.cpp.

References BT_ASSERT, class_invariant(), m_historyList, m_index, and move().

Referenced by CDisplayWindow::initActions().

◆ class_invariant()

bool BTHistory::class_invariant ( )
private

◆ fw

void BTHistory::fw ( )
slot

Go forward one step in history.

Definition at line 67 of file bthistory.cpp.

References BT_ASSERT, class_invariant(), m_historyList, m_index, and move().

Referenced by CDisplayWindow::initActions().

◆ getBackList()

QList< QAction * > BTHistory::getBackList ( )

Return a list of Actions behind the current point, the first of the history list will be the last in the returned list and vice versa.

Definition at line 74 of file bthistory.cpp.

References BT_ASSERT, class_invariant(), m_historyList, and m_index.

◆ getFwList()

QList< QAction * > BTHistory::getFwList ( )

Return a list of Actions after the current point.

Definition at line 85 of file bthistory.cpp.

References BT_ASSERT, class_invariant(), m_historyList, and m_index.

◆ historyChanged

void BTHistory::historyChanged ( bool  backEnabled,
bool  fwEnabled 
)
signal

Signal will be sent when the history has been changed (added, moved)

Referenced by CDisplayWindow::initConnections(), and sendChangedSignal().

◆ historyMoved

void BTHistory::historyMoved ( QString  newKey)
signal

◆ move

void BTHistory::move ( QAction historyItem)
slot

◆ sendChangedSignal()

void BTHistory::sendChangedSignal ( )
private

Definition at line 95 of file bthistory.cpp.

References BT_ASSERT, class_invariant(), historyChanged(), m_historyList, and m_index.

Referenced by add(), and move().

Member Data Documentation

◆ m_historyList

QList<QAction*> BTHistory::m_historyList
private

Definition at line 72 of file bthistory.h.

Referenced by add(), back(), class_invariant(), fw(), getBackList(), getFwList(), move(), and sendChangedSignal().

◆ m_index

int BTHistory::m_index = -1
private

Definition at line 73 of file bthistory.h.

Referenced by add(), back(), class_invariant(), fw(), getBackList(), getFwList(), move(), and sendChangedSignal().

◆ m_inHistoryFunction

bool BTHistory::m_inHistoryFunction = false
private

Definition at line 74 of file bthistory.h.

Referenced by add(), and move().


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