servatrice/cockatrice/src/tab_message.h
woogerboy21 6962777ded Rework idle timeout, now server side (#2259)
* Server side idle timeout

Initial commit for server side idle timeout counter.  This adds a new
int value that is updated when room/game/mod/admin commands occur and is
checked during the regular ping timout function that if the users new
"idle" value exceeds the idleclienttimeout value defined in the servers
configuration file the user is logged out.  The user will receive a
warning at the 90% time frame mark about being idle.

* Use round instead of ceil

Travis fix for older xcode issue's.

* Fixed requested items

Mis-spelleed function, added header, added warning message sent check
value.  Also corrected the protobuf declaration file for
event_notifyuser

* Moved bool to protected

* Re-Ordered Declarations

* Removed most stylistic items

Resolved most noted things.

* Remove client side idle timeout

Removed client side idle timeout functionality
2016-11-08 22:18:12 -05:00

53 lines
1.3 KiB
C++

#ifndef TAB_MESSAGE_H
#define TAB_MESSAGE_H
#include "tab.h"
class AbstractClient;
class ChatView;
class QLineEdit;
class Event_UserMessage;
class Response;
class ServerInfo_User;
class TabMessage : public Tab {
Q_OBJECT
private:
AbstractClient *client;
QMenu *messageMenu;
ServerInfo_User *ownUserInfo;
ServerInfo_User *otherUserInfo;
bool userOnline;
ChatView *chatView;
QLineEdit *sayEdit;
QAction *aLeave;
signals:
void talkClosing(TabMessage *tab);
void maximizeClient();
private slots:
void sendMessage();
void actLeave();
void messageSent(const Response &response);
void addMentionTag(QString mentionTag);
void messageClicked();
public:
TabMessage(TabSupervisor *_tabSupervisor, AbstractClient *_client, const ServerInfo_User &_ownUserInfo, const ServerInfo_User &_otherUserInfo);
~TabMessage();
void retranslateUi();
void closeRequest();
void tabActivated();
QString getUserName() const;
QString getTabText() const;
void processUserMessageEvent(const Event_UserMessage &event);
void processUserLeft();
void processUserJoined(const ServerInfo_User &_userInfo);
private:
bool shouldShowSystemPopup(const Event_UserMessage &event);
void showSystemPopup(const Event_UserMessage &event);
};
#endif