mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
parent
54556803d1
commit
f870bf1953
|
@ -168,10 +168,8 @@ FriendWidget* ContentDialog::addFriend(int friendId, QString id)
|
|||
friendLayout->addFriendWidget(friendWidget, FriendList::findFriend(friendId)->getStatus());
|
||||
|
||||
Friend* frnd = friendWidget->getFriend();
|
||||
const Settings& s = Settings::getInstance();
|
||||
|
||||
connect(frnd, &Friend::displayedNameChanged, this, &ContentDialog::updateFriendWidget);
|
||||
connect(&s, &Settings::compactLayoutChanged, friendWidget, &FriendWidget::compactChange);
|
||||
connect(friendWidget, &FriendWidget::chatroomWidgetClicked, this, &ContentDialog::onChatroomWidgetClicked);
|
||||
connect(friendWidget, SIGNAL(chatroomWidgetClicked(GenericChatroomWidget*)), frnd->getChatForm(), SLOT(focusInput()));
|
||||
connect(Core::getInstance(), &Core::friendAvatarChanged, friendWidget, &FriendWidget::onAvatarChange);
|
||||
|
@ -193,11 +191,9 @@ GroupWidget* ContentDialog::addGroup(int groupId, const QString& name)
|
|||
GroupWidget* groupWidget = new GroupWidget(groupId, name);
|
||||
groupLayout.addSortedWidget(groupWidget);
|
||||
|
||||
const Settings& s = Settings::getInstance();
|
||||
Group* group = groupWidget->getGroup();
|
||||
connect(group, &Group::titleChanged, this, &ContentDialog::updateGroupWidget);
|
||||
connect(group, &Group::userListChanged, this, &ContentDialog::updateGroupWidget);
|
||||
connect(&s, &Settings::compactLayoutChanged, groupWidget, &GroupWidget::compactChange);
|
||||
connect(groupWidget, &GroupWidget::chatroomWidgetClicked, this, &ContentDialog::onChatroomWidgetClicked);
|
||||
|
||||
ContentDialog* lastDialog = getGroupDialog(groupId);
|
||||
|
|
|
@ -16,33 +16,36 @@
|
|||
*/
|
||||
|
||||
#include "friendwidget.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QBitmap>
|
||||
#include <QCollator>
|
||||
#include <QContextMenuEvent>
|
||||
#include <QDebug>
|
||||
#include <QDrag>
|
||||
#include <QFileDialog>
|
||||
#include <QInputDialog>
|
||||
#include <QMenu>
|
||||
#include <QMimeData>
|
||||
|
||||
#include "circlewidget.h"
|
||||
#include "contentdialog.h"
|
||||
#include "core/core.h"
|
||||
#include "form/chatform.h"
|
||||
#include "friend.h"
|
||||
#include "friendlist.h"
|
||||
#include "friendlistwidget.h"
|
||||
#include "group.h"
|
||||
#include "grouplist.h"
|
||||
#include "groupwidget.h"
|
||||
#include "circlewidget.h"
|
||||
#include "friendlistwidget.h"
|
||||
#include "friendlist.h"
|
||||
#include "friend.h"
|
||||
#include "core/core.h"
|
||||
#include "form/chatform.h"
|
||||
#include "maskablepixmapwidget.h"
|
||||
#include "contentdialog.h"
|
||||
#include "widget/tool/croppinglabel.h"
|
||||
#include "widget/style.h"
|
||||
#include "persistence/settings.h"
|
||||
#include "widget/widget.h"
|
||||
#include "widget/about/aboutuser.h"
|
||||
#include <QContextMenuEvent>
|
||||
#include <QMenu>
|
||||
#include <QDrag>
|
||||
#include <QMimeData>
|
||||
#include <QApplication>
|
||||
#include <QBitmap>
|
||||
#include <QFileDialog>
|
||||
#include <QDebug>
|
||||
#include <QInputDialog>
|
||||
#include <QCollator>
|
||||
#include <cassert>
|
||||
#include "widget/style.h"
|
||||
#include "widget/tool/croppinglabel.h"
|
||||
#include "widget/widget.h"
|
||||
|
||||
FriendWidget::FriendWidget(int FriendId, QString id)
|
||||
: friendId(FriendId)
|
||||
|
|
|
@ -44,6 +44,10 @@ GenericChatroomWidget::GenericChatroomWidget(QWidget *parent)
|
|||
|
||||
nameLabel->setForegroundRole(QPalette::WindowText);
|
||||
|
||||
Settings& s = Settings::getInstance();
|
||||
connect(&s, &Settings::compactLayoutChanged,
|
||||
this, &GenericChatroomWidget::compactChange);
|
||||
|
||||
setAutoFillBackground(true);
|
||||
reloadTheme();
|
||||
|
||||
|
|
|
@ -1721,8 +1721,6 @@ Group *Widget::createGroup(int groupId)
|
|||
newgroup->getGroupWidget()->updateStatusLight();
|
||||
contactListWidget->activateWindow();
|
||||
|
||||
const Settings& s = Settings::getInstance();
|
||||
connect(&s, &Settings::compactLayoutChanged, newgroup->getGroupWidget(), &GenericChatroomWidget::compactChange);
|
||||
connect(newgroup->getGroupWidget(), SIGNAL(chatroomWidgetClicked(GenericChatroomWidget*,bool)), this, SLOT(onChatroomWidgetClicked(GenericChatroomWidget*,bool)));
|
||||
connect(newgroup->getGroupWidget(), SIGNAL(removeGroup(int)), this, SLOT(removeGroup(int)));
|
||||
connect(newgroup->getGroupWidget(), SIGNAL(chatroomWidgetClicked(GenericChatroomWidget*)), newgroup->getChatForm(), SLOT(focusInput()));
|
||||
|
|
Loading…
Reference in New Issue
Block a user