Freeciv21
Develop your civilization from humble roots to a global empire
chatline.cpp File Reference
#include "chatline.h"
#include <QActionGroup>
#include <QApplication>
#include <QCheckBox>
#include <QCompleter>
#include <QGridLayout>
#include <QHash>
#include <QPainter>
#include <QPushButton>
#include <QScrollBar>
#include <QTextBlock>
#include <QToolButton>
#include "chat.h"
#include "chatline_common.h"
#include "audio/audio.h"
#include "client_main.h"
#include "climap.h"
#include "colors_common.h"
#include "connectdlg_common.h"
#include "control.h"
#include "dialogs.h"
#include "fc_client.h"
#include "featured_text.h"
#include "fonts.h"
#include "game.h"
#include "icons.h"
#include "messagewin.h"
#include "page_game.h"
#include "views/view_map.h"
#include "views/view_map_common.h"
+ Include dependency graph for chatline.cpp:

Go to the source code of this file.

Functions

static bool is_plain_public_message (const QString &s)
 Copyright (c) 1996-2023 Freeciv21 and Freeciv contributors. More...
 
void set_chat_colors (const QHash< QString, QString > &colors)
 Sets color substitution map. More...
 
QString apply_tags (QString str, const struct text_tag_list *tags, QColor bg_color)
 Applies tags to text. More...
 
void real_output_window_append (const QString &astring, const text_tag_list *tags)
 Appends the string to the chat output window. More...
 
void version_message (const QString &vertext)
 Got version message from metaserver. More...
 

Function Documentation

◆ apply_tags()

QString apply_tags ( QString  str,
const struct text_tag_list *  tags,
QColor  bg_color 
)

Applies tags to text.

Definition at line 710 of file chatline.cpp.

Referenced by chat_widget::chat_message_received(), and page_pregame::chat_message_received().

◆ is_plain_public_message()

static bool is_plain_public_message ( const QString &  s)
static

Copyright (c) 1996-2023 Freeciv21 and Freeciv contributors.

Helper function to determine if a given client input line is intended as a "plain" public message.

oo\ This file is part of Freeciv21. Freeciv21 is free software: you can (_/ \ _ _ redistribute it and/or modify it under the terms of the GNU \ \/ \/ \ General Public License as published by the Free Software ( )\ Foundation, either version 3 of the License, or (at _______/ \ your option) any later version. You should have received [[] [[] a copy of the GNU General Public License along with Freeciv21. [[] [[] If not, see https://www.gnu.org/licenses/.

Definition at line 832 of file chatline.cpp.

Referenced by chat_listener::send_chat_message().

◆ real_output_window_append()

void real_output_window_append ( const QString &  astring,
const text_tag_list *  tags 
)

Appends the string to the chat output window.

The string should be inserted on its own line, although it will have no newline.

Definition at line 881 of file chatline.cpp.

Referenced by fc_client::fc_main(), output_window_append(), output_window_event(), and real_luaconsole_append().

◆ set_chat_colors()

void set_chat_colors ( const QHash< QString, QString > &  colors)

Sets color substitution map.

Definition at line 61 of file chatline.cpp.

◆ version_message()

void version_message ( const QString &  vertext)

Got version message from metaserver.

Definition at line 897 of file chatline.cpp.

Referenced by parse_metaserver_data(), and server_scan_error().