servatrice/cockatrice/src/userinfobox.h
Matt Lowe 02043ad4f9 Added Account Age
+ Added the ability to see the account age of registered users. Changes
are both in server and client. The server will now send back the
registration date along with the user data. The client will then use
this to calculate the account age and display it in the user details
window.
2015-01-11 00:45:12 +01:00

29 lines
806 B
C++

#ifndef USERINFOBOX_H
#define USERINFOBOX_H
#include <QWidget>
#include <QLabel>
class QLabel;
class ServerInfo_User;
class AbstractClient;
class Response;
class UserInfoBox : public QWidget {
Q_OBJECT
private:
AbstractClient *client;
bool fullInfo;
QLabel avatarLabel, nameLabel, realNameLabel1, realNameLabel2, genderLabel1, genderLabel2, countryLabel1,
countryLabel2, userLevelLabel1, userLevelLabel2, userLevelLabel3, accountAgeLebel1, accountAgeLabel2;
public:
UserInfoBox(AbstractClient *_client, bool fullInfo, QWidget *parent = 0, Qt::WindowFlags flags = 0);
void retranslateUi();
private slots:
void processResponse(const Response &r);
public slots:
void updateInfo(const ServerInfo_User &user);
void updateInfo(const QString &userName);
};
#endif