![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <chatline.h>
Inheritance diagram for chat_widget:
Collaboration diagram for chat_widget:Public Member Functions | |
| chat_widget (QWidget *parent) | |
| Constructor for chat_widget. More... | |
| virtual | ~chat_widget () |
| Destructor. More... | |
| void | append (const QString &str) |
| Adds news string to chat_widget. More... | |
| void | make_link (struct tile *ptile) |
| Makes link to tile/unit or city. More... | |
| void | update_widgets () |
| Hides allies and links button for local game. More... | |
| int | default_size (int lines) |
| Returns how much space chatline of given number of lines would require, or zero if it can't be determined. More... | |
| void | take_focus () |
| Shows the chat and ensures the chat line has focus. More... | |
| void | update_font () |
| Updates font for chat_widget. More... | |
| bool | is_chat_visible () const |
| Returns whether the chat widget is currently visible. More... | |
| void | set_chat_visible (bool visible) |
| Manages toggling minimization. More... | |
Public Member Functions inherited from resizable_widget | |
| void | setResizable (Qt::Edges edges) |
| Set resizable flags. More... | |
| Qt::Edges | getResizable () const |
| Get resizable flags of wdiget. More... | |
Public Member Functions inherited from fcwidget | |
| fcwidget (QWidget *parent=nullptr) | |
| Constructor. More... | |
| virtual void | update_menu ()=0 |
Public Attributes | |
| chat_input * | chat_line |
Protected Member Functions | |
| void | paintEvent (QPaintEvent *event) override |
| Paint event for chat_widget. More... | |
| bool | eventFilter (QObject *obj, QEvent *event) override |
| Processess history for chat. More... | |
Protected Member Functions inherited from resizable_widget | |
| void | mousePressEvent (QMouseEvent *event) override |
| Checks if info_tab can be moved. More... | |
| void | mouseMoveEvent (QMouseEvent *event) override |
| Called when mouse moved (mouse track is enabled). More... | |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| Restores cursor when resizing is done. More... | |
Private Slots | |
| void | update_menu () override |
| void | rm_links () |
| User clicked clear links button. More... | |
| void | anchor_clicked (const QUrl &link) |
| User clicked some custom link. More... | |
Private Member Functions | |
| void | chat_message_received (const QString &message, const struct text_tag_list *tags) override |
| Adds news string to chat_widget (from chat_listener interface) More... | |
Private Member Functions inherited from chat_listener | |
| chat_listener () | |
| Constructor. More... | |
| void | send_chat_message (const QString &message) |
| Sends commands to server, but first searches for custom keys, if it finds then it makes custom action. More... | |
| QString | back_in_history () |
| Goes back one position in history, and returns the message at the new position. More... | |
| QString | forward_in_history () |
| Goes forward one position in history, and returns the message at the new position. More... | |
| void | reset_history_position () |
| Go to the end of the history. More... | |
Private Member Functions inherited from listener< chat_listener > | |
| listener () | |
| virtual | ~listener () |
| void | listen () |
Private Attributes | |
| bool | m_chat_visible = true |
| QTextBrowser * | chat_output |
| QPushButton * | remove_links |
| QPushButton * | show_hide |
| QToolButton * | cb |
| QMenu * | cb_menu |
| move_widget * | mw |
Additional Inherited Members | |
Signals inherited from resizable_widget | |
| void | resized (QRect rect) |
Private Types inherited from listener< chat_listener > | |
| typedef chat_listener | type_t |
Static Private Member Functions inherited from listener< chat_listener > | |
| static void | invoke (_member_fct_ function, _args_ &&...args) |
Static Private Attributes inherited from chat_listener | |
| static const int | HISTORY_END = -1 |
Definition at line 100 of file chatline.h.
| chat_widget::chat_widget | ( | QWidget * | parent | ) |
Constructor for chat_widget.
Definition at line 342 of file chatline.cpp.
|
virtual |
Destructor.
Definition at line 452 of file chatline.cpp.
|
privateslot |
User clicked some custom link.
Definition at line 535 of file chatline.cpp.
Referenced by chat_widget().
| void chat_widget::append | ( | const QString & | str | ) |
Adds news string to chat_widget.
Definition at line 596 of file chatline.cpp.
Referenced by trade_generator::add_city(), chat_message_received(), trade_generator::remove_city(), trade_generator::remove_virtual_city(), and mr_menu::slot_autocaravan().
|
overrideprivatevirtual |
Adds news string to chat_widget (from chat_listener interface)
Reimplemented from chat_listener.
Definition at line 586 of file chatline.cpp.
| int chat_widget::default_size | ( | int | lines | ) |
Returns how much space chatline of given number of lines would require, or zero if it can't be determined.
Definition at line 656 of file chatline.cpp.
|
overrideprotected |
Processess history for chat.
Definition at line 623 of file chatline.cpp.
|
inline |
Returns whether the chat widget is currently visible.
Definition at line 116 of file chatline.h.
Referenced by fc_game_tab_widget::event().
| void chat_widget::make_link | ( | struct tile * | ptile | ) |
Makes link to tile/unit or city.
Definition at line 690 of file chatline.cpp.
Referenced by map_view::shortcut_pressed().
|
overrideprotected |
Paint event for chat_widget.
Definition at line 606 of file chatline.cpp.
|
privateslot |
User clicked clear links button.
Definition at line 530 of file chatline.cpp.
Referenced by chat_widget().
| void chat_widget::set_chat_visible | ( | bool | visible | ) |
Manages toggling minimization.
Definition at line 461 of file chatline.cpp.
Referenced by chat_widget(), and fc_client::current_page().
| void chat_widget::take_focus | ( | ) |
Shows the chat and ensures the chat line has focus.
Definition at line 513 of file chatline.cpp.
Referenced by map_view::keyPressEvent().
| void chat_widget::update_font | ( | ) |
Updates font for chat_widget.
Definition at line 522 of file chatline.cpp.
Referenced by gui_qt_apply_font().
|
inlineoverrideprivateslot |
Definition at line 120 of file chatline.h.
| void chat_widget::update_widgets | ( | ) |
Hides allies and links button for local game.
Definition at line 643 of file chatline.cpp.
Referenced by fc_client::current_page().
|
private |
Definition at line 136 of file chatline.h.
Referenced by chat_widget(), set_chat_visible(), and update_widgets().
|
private |
Definition at line 137 of file chatline.h.
Referenced by chat_widget(), and ~chat_widget().
| chat_input* chat_widget::chat_line |
Definition at line 108 of file chatline.h.
Referenced by chat_widget(), default_size(), eventFilter(), make_link(), set_chat_visible(), and take_focus().
|
private |
Definition at line 133 of file chatline.h.
Referenced by append(), chat_message_received(), chat_widget(), default_size(), set_chat_visible(), and update_font().
|
private |
Definition at line 132 of file chatline.h.
Referenced by is_chat_visible(), and set_chat_visible().
|
private |
Definition at line 138 of file chatline.h.
Referenced by chat_widget().
|
private |
Definition at line 134 of file chatline.h.
Referenced by chat_widget(), and set_chat_visible().
|
private |
Definition at line 135 of file chatline.h.
Referenced by chat_widget(), set_chat_visible(), and take_focus().