forked from blue/squawk
icon and tooltip information in participants, saving bookmarks, subscription and unsubscription, deletion of MUCs
This commit is contained in:
parent
5547d78608
commit
5f8d38bd9a
19 changed files with 216 additions and 9 deletions
|
@ -66,11 +66,6 @@ void Chat::updateState()
|
|||
statusIcon->setToolTip(Shared::availabilityNames[av]);
|
||||
}
|
||||
|
||||
void Chat::setStatus(const QString& status)
|
||||
{
|
||||
statusLabel->setText(status);
|
||||
}
|
||||
|
||||
void Chat::handleSendMessage(const QString& text)
|
||||
{
|
||||
Shared::Message msg(Shared::Message::chat);
|
||||
|
|
|
@ -37,14 +37,13 @@ public:
|
|||
|
||||
protected slots:
|
||||
void onContactChanged(Models::Item* item, int row, int col);
|
||||
void handleSendMessage(const QString & text) override;
|
||||
|
||||
protected:
|
||||
void setName(const QString & name) override;
|
||||
void handleSendMessage(const QString & text) override;
|
||||
|
||||
private:
|
||||
void updateState();
|
||||
void setStatus(const QString& status);
|
||||
|
||||
private:
|
||||
Models::Contact* contact;
|
||||
|
|
|
@ -254,3 +254,8 @@ void Conversation::onFileSelected()
|
|||
|
||||
d->deleteLater();
|
||||
}
|
||||
|
||||
void Conversation::setStatus(const QString& status)
|
||||
{
|
||||
statusLabel->setText(status);
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ protected:
|
|||
virtual void setName(const QString& name);
|
||||
void applyVisualEffects();
|
||||
virtual void handleSendMessage(const QString& text) = 0;
|
||||
void setStatus(const QString& status);
|
||||
|
||||
protected slots:
|
||||
void onEnterPressed();
|
||||
|
|
|
@ -24,6 +24,9 @@ Room::Room(Models::Room* p_room, QWidget* parent):
|
|||
{
|
||||
setName(p_room->getName());
|
||||
line->setMyName(room->getNick());
|
||||
setStatus(room->getSubject());
|
||||
|
||||
connect(room, SIGNAL(childChanged(Models::Item*, int, int)), this, SLOT(onRoomChanged(Models::Item*, int, int)));
|
||||
}
|
||||
|
||||
Room::~Room()
|
||||
|
@ -48,3 +51,17 @@ bool Room::autoJoined() const
|
|||
{
|
||||
return room->getAutoJoin();
|
||||
}
|
||||
|
||||
void Room::onRoomChanged(Models::Item* item, int row, int col)
|
||||
{
|
||||
if (item == room) {
|
||||
switch (col) {
|
||||
case 0:
|
||||
setName(room->getRoomName());
|
||||
break;
|
||||
case 6:
|
||||
setStatus(room->getSubject());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,9 @@ public:
|
|||
|
||||
bool autoJoined() const;
|
||||
|
||||
protected slots:
|
||||
void onRoomChanged(Models::Item* item, int row, int col);
|
||||
|
||||
protected:
|
||||
void handleSendMessage(const QString & text) override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue