Freeciv-3.2
|
#include <chatline.h>
Public Member Functions | |
chat_listener () | |
virtual void | chat_message_received (const QString &, const struct text_tag_list *) |
virtual void | chat_word_list_changed (const QStringList &cmplt_word_list) |
void | send_chat_message (const QString &message) |
int | position_in_history () |
QString | back_in_history () |
QString | forward_in_history () |
void | reset_history_position () |
QStringList | current_word_list () |
Static Public Member Functions | |
static void | update_word_list () |
![]() | |
static void | invoke (_member_fct_ function) |
static void | invoke (_member_fct_ function, _arg1_t_ arg) |
static void | invoke (_member_fct_ function, _arg1_t_ arg1, _arg2_t_ arg2) |
Static Public Attributes | |
static const int | HISTORY_END = -1 |
Private Attributes | |
int | position |
Static Private Attributes | |
static QStringList | history = QStringList() |
static QStringList | word_list = QStringList() |
Additional Inherited Members | |
![]() | |
typedef chat_listener | type_t |
![]() | |
listener () | |
virtual | ~listener () |
void | listen () |
Definition at line 46 of file chatline.h.
|
explicit |
Constructor.
Definition at line 84 of file chatline.cpp.
QString chat_listener::back_in_history | ( | ) |
Goes back one position in history, and returns the message at the new position.
Definition at line 173 of file chatline.cpp.
Referenced by chat_input::event().
|
virtual |
Called whenever a message is received. Default implementation does nothing.
Reimplemented in chatwdg, and fc_client.
Definition at line 92 of file chatline.cpp.
Referenced by qtg_real_output_window_append().
|
virtual |
Called whenever the completion word list changes. Default implementation does nothing.
Reimplemented in chat_input.
Definition at line 100 of file chatline.cpp.
Referenced by update_word_list().
|
inline |
Definition at line 75 of file chatline.h.
Referenced by chat_input::chat_input().
QString chat_listener::forward_in_history | ( | ) |
Goes forward one position in history, and returns the message at the new position. An empty string is returned if the new position is HISTORY_END.
Definition at line 187 of file chatline.cpp.
Referenced by chat_input::event().
|
inline |
Definition at line 70 of file chatline.h.
void chat_listener::reset_history_position | ( | ) |
Go to the end of the history.
Definition at line 204 of file chatline.cpp.
Referenced by send_chat_message().
Sends commands to server, but first searches for custom keys, if it finds then it makes custom action.
The history position is reset to HISTORY_END.
Definition at line 109 of file chatline.cpp.
Referenced by chat_input::send(), and fc_client::send_fake_chat_message().
|
static |
Updates the chat completion word list.
Definition at line 58 of file chatline.cpp.
Referenced by qtg_real_output_window_append().
|
staticprivate |
Definition at line 49 of file chatline.h.
Referenced by back_in_history(), forward_in_history(), and send_chat_message().
Definition at line 58 of file chatline.h.
Referenced by back_in_history(), forward_in_history(), and reset_history_position().
|
private |
Definition at line 51 of file chatline.h.
Referenced by back_in_history(), forward_in_history(), position_in_history(), and reset_history_position().
|
staticprivate |
Definition at line 54 of file chatline.h.
Referenced by current_word_list(), and update_word_list().