mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Add status message setter and getter
This commit is contained in:
parent
8a3c9d14c0
commit
170eb931ff
|
@ -92,10 +92,16 @@ void Friend::setAlias(QString name)
|
||||||
|
|
||||||
void Friend::setStatusMessage(QString message)
|
void Friend::setStatusMessage(QString message)
|
||||||
{
|
{
|
||||||
|
statusMessage = message;
|
||||||
widget->setStatusMsg(message);
|
widget->setStatusMsg(message);
|
||||||
chatForm->setStatusMessage(message);
|
chatForm->setStatusMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Friend::getStatusMessage()
|
||||||
|
{
|
||||||
|
return statusMessage;
|
||||||
|
}
|
||||||
|
|
||||||
QString Friend::getDisplayedName() const
|
QString Friend::getDisplayedName() const
|
||||||
{
|
{
|
||||||
if (userAlias.size() == 0)
|
if (userAlias.size() == 0)
|
||||||
|
|
|
@ -46,6 +46,7 @@ public:
|
||||||
bool hasAlias() const;
|
bool hasAlias() const;
|
||||||
|
|
||||||
void setStatusMessage(QString message);
|
void setStatusMessage(QString message);
|
||||||
|
QString getStatusMessage();
|
||||||
|
|
||||||
void setEventFlag(int f);
|
void setEventFlag(int f);
|
||||||
int getEventFlag() const;
|
int getEventFlag() const;
|
||||||
|
@ -64,7 +65,7 @@ signals:
|
||||||
void displayedNameChanged(FriendWidget* widget, Status s, int hasNewEvents);
|
void displayedNameChanged(FriendWidget* widget, Status s, int hasNewEvents);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString userAlias, userName;
|
QString userAlias, userName, statusMessage;
|
||||||
ToxId userID;
|
ToxId userID;
|
||||||
uint32_t friendId;
|
uint32_t friendId;
|
||||||
int hasNewEvents;
|
int hasNewEvents;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user