qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Classes | Signals | Public Member Functions | List of all members
IChatLog Class Referenceabstract

#include <ichatlog.h>

Inheritance diagram for IChatLog:
Inheritance graph
Collaboration diagram for IChatLog:
Collaboration graph

Classes

struct  DateChatLogIdxPair
 

Signals

void itemUpdated (ChatLogIdx idx)
 

Public Member Functions

virtual ~IChatLog ()=default
 
virtual const ChatLogItemat (ChatLogIdx idx) const =0
 Returns reference to item at idx. More...
 
virtual SearchResult searchForward (SearchPos startIdx, const QString &phrase, const ParameterSearch &parameter) const =0
 searches forwards through the chat log until phrase is found according to parameter More...
 
virtual SearchResult searchBackward (SearchPos startIdx, const QString &phrase, const ParameterSearch &parameter) const =0
 searches backwards through the chat log until phrase is found according to parameter More...
 
virtual ChatLogIdx getFirstIdx () const =0
 The underlying chat log instance may not want to start at 0. More...
 
virtual ChatLogIdx getNextIdx () const =0
 
virtual std::vector< DateChatLogIdxPairgetDateIdxs (const QDate &startDate, size_t maxDates) const =0
 Gets indexes for each new date starting at startDate. More...
 
virtual void addSystemMessage (const SystemMessage &message)=0
 Inserts a system message at the end of the chat. More...
 

Detailed Description

Definition at line 83 of file ichatlog.h.

Constructor & Destructor Documentation

◆ ~IChatLog()

virtual IChatLog::~IChatLog ( )
virtualdefault

Member Function Documentation

◆ addSystemMessage()

virtual void IChatLog::addSystemMessage ( const SystemMessage message)
pure virtual

Inserts a system message at the end of the chat.

Parameters
[in]messagesystemMessage to insert

Implemented in SessionChatLog, and ChatHistory.

Here is the caller graph for this function:

◆ at()

virtual const ChatLogItem& IChatLog::at ( ChatLogIdx  idx) const
pure virtual

Returns reference to item at idx.

Parameters
[in]idx
Returns
Variant type referencing either a ToxFile or Message
Precondition
idx must be between currentFirstIdx() and currentLastIdx()

Implemented in SessionChatLog, and ChatHistory.

Here is the caller graph for this function:

◆ getDateIdxs()

virtual std::vector<DateChatLogIdxPair> IChatLog::getDateIdxs ( const QDate &  startDate,
size_t  maxDates 
) const
pure virtual

Gets indexes for each new date starting at startDate.

Parameters
[in]startDatedate to start searching from
[in]maxDatesmaximum number of dates to be returned

Implemented in SessionChatLog, and ChatHistory.

Here is the caller graph for this function:

◆ getFirstIdx()

virtual ChatLogIdx IChatLog::getFirstIdx ( ) const
pure virtual

The underlying chat log instance may not want to start at 0.

Returns
Current first valid index to call at() with

Implemented in SessionChatLog, and ChatHistory.

Here is the caller graph for this function:

◆ getNextIdx()

virtual ChatLogIdx IChatLog::getNextIdx ( ) const
pure virtual
Returns
current last valid index to call at() with

Implemented in SessionChatLog, and ChatHistory.

Here is the caller graph for this function:

◆ itemUpdated

void IChatLog::itemUpdated ( ChatLogIdx  idx)
signal
Here is the caller graph for this function:

◆ searchBackward()

virtual SearchResult IChatLog::searchBackward ( SearchPos  startIdx,
const QString &  phrase,
const ParameterSearch parameter 
) const
pure virtual

searches backwards through the chat log until phrase is found according to parameter

Parameters
[in]startIdxinclusive start idx
[in]phrasephrase to find (may be modified by parameter)
[in]parametersearch parameters

Implemented in SessionChatLog, and ChatHistory.

Here is the caller graph for this function:

◆ searchForward()

virtual SearchResult IChatLog::searchForward ( SearchPos  startIdx,
const QString &  phrase,
const ParameterSearch parameter 
) const
pure virtual

searches forwards through the chat log until phrase is found according to parameter

Parameters
[in]startIdxinclusive start idx
[in]phrasephrase to find (may be modified by parameter)
[in]parametersearch parameters

Implemented in SessionChatLog, and ChatHistory.

Here is the caller graph for this function:

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