Пример #1
0
	void ProfileWidget::handleUserGroupChanged (const QString& username,
			const QString& bgColor, const QString& fgColor, int groupId)
	{
		LJAccount *account = qobject_cast<LJAccount*> (Profile_->GetParentAccount ());
		if (!account)
			return;

		account->AddNewFriend (username, bgColor, fgColor, groupId);
	}
Пример #2
0
	void ProfileWidget::on_AddFriend__released ()
	{
		std::unique_ptr<AddEditFriendDialog> aefd (new AddEditFriendDialog (Profile_));
		aefd->setWindowTitle (tr ("Add new friend."));

		if (aefd->exec () == QDialog::Rejected)
			return;

		const QString& userName = aefd->GetUserName ();
		const QString& bgcolor = aefd->GetBackgroundColorName ();
		const QString& fgcolor = aefd->GetForegroundColorName ();
		uint realId =  aefd->GetGroupRealId ();

		LJAccount *account = qobject_cast<LJAccount*> (Profile_->GetParentAccount ());
		if (!account)
			return;

		account->AddNewFriend (userName, bgcolor, fgcolor, realId);
	}