当前位置: 首页>>代码示例>>C++>>正文


C++ IAccount::GetQObject方法代码示例

本文整理汇总了C++中IAccount::GetQObject方法的典型用法代码示例。如果您正苦于以下问题:C++ IAccount::GetQObject方法的具体用法?C++ IAccount::GetQObject怎么用?C++ IAccount::GetQObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IAccount的用法示例。


在下文中一共展示了IAccount::GetQObject方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: handleAccountValidated

	void AccountsListWidget::handleAccountValidated (QObject *accObj, bool validated)
	{
		IAccount *acc = qobject_cast<IAccount*> (accObj);
		if (!acc)
		{
			qWarning () << Q_FUNC_INFO
					<< accObj
					<< "is not an IAccount";
			return;
		}

		if (!Account2Item_.contains (acc))
		{
			qWarning () << Q_FUNC_INFO
					<< "account"
					<< acc->GetAccountName ()
					<< acc->GetQObject ()
					<< "from"
					<< sender ()
					<< "not found here";
			return;
		}

		QStandardItem *item = Account2Item_ [acc];
		AccountsModel_->item (item->row (), Columns::IsValidated)->setText (validated ?
				tr ("Validated") :
				tr ("Not validated"));
		Ui_.Accounts_->header ()->setResizeMode (QHeaderView::ResizeToContents);
	}
开发者ID:SboichakovDmitriy,项目名称:leechcraft,代码行数:29,代码来源:accountslistwidget.cpp

示例2: on_Delete__released

	void AccountsListWidget::on_Delete__released ()
	{
		auto index = Ui_.Accounts_->selectionModel ()->currentIndex ();
		index = index.sibling (index.row (), Columns::Name);
		if (!index.isValid ())
			return;

		QStandardItem *item = AccountsModel_->itemFromIndex (index);
		IAccount *acc = 0;
		if (item &&
				Item2Account_.contains (item))
			acc = Item2Account_ [item];
		else
			return;

		if (QMessageBox::question (this,
				"LeechCraft",
				tr ("Are you sure you want to remove the account %1?")
						.arg ("<em>" + acc->GetAccountName () + "</em>"),
				QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes)
			return;

		QObject *bpObj = acc->GetParentBloggingPlatform ();
		IBloggingPlatform *ibp = qobject_cast<IBloggingPlatform*> (bpObj);
		if (!ibp)
		{
			qWarning () << Q_FUNC_INFO
					<< "parent blogging platform for"
					<< acc->GetAccountID ()
					<< "doesn't implement IBloggingPlatform";
			return;
		}
		ibp->RemoveAccount (acc->GetQObject ());
	}
开发者ID:SboichakovDmitriy,项目名称:leechcraft,代码行数:34,代码来源:accountslistwidget.cpp

示例3: joinAccountConfFromBM

	void AccountActionsManager::joinAccountConfFromBM ()
	{
		IAccount *account = GetAccountFromSender (sender (), Q_FUNC_INFO);
		if (!account)
			return;

		const QVariant& bmData = sender ()->property ("Azoth/BMData");
		if (bmData.isNull ())
			return;

		const auto proto = qobject_cast<IMUCProtocol*> (account->GetParentProtocol ());
		if (!proto)
		{
			qWarning () << Q_FUNC_INFO
					<< account->GetAccountName ()
					<< "parent protocol does not implement IMUCProtocol";
			return;
		}

		auto jWidget = proto->GetMUCJoinWidget ();
		IMUCJoinWidget *imjw = qobject_cast<IMUCJoinWidget*> (jWidget);
		imjw->SetIdentifyingData (bmData.toMap ());
		imjw->Join (account->GetQObject ());

		jWidget->deleteLater ();
	}
开发者ID:ForNeVeR,项目名称:leechcraft,代码行数:26,代码来源:accountactionsmanager.cpp

示例4: handleAccountSD

	void AccountActionsManager::handleAccountSD ()
	{
		IAccount *account = GetAccountFromSender (sender (), Q_FUNC_INFO);
		if (!account)
			return;

		auto w = new ServiceDiscoveryWidget ();
		w->SetAccount (account->GetQObject ());
		emit gotSDWidget (w);
	}
开发者ID:ForNeVeR,项目名称:leechcraft,代码行数:10,代码来源:accountactionsmanager.cpp

示例5: handleAccountValidated

	void LocalBloggingPlatform::handleAccountValidated (bool valid)
	{
		IAccount *acc = qobject_cast<IAccount*> (sender ());
		if (!acc)
		{
			qWarning () << Q_FUNC_INFO
					<< sender ()
					<< "is not an IAccount";;
			return;
		}

		emit accountValidated (acc->GetQObject (), valid);
	}
开发者ID:zhao07,项目名称:leechcraft,代码行数:13,代码来源:localbloggingplatform.cpp

示例6: handleAccountConsole

	void AccountActionsManager::handleAccountConsole ()
	{
		IAccount *account = GetAccountFromSender (sender (), Q_FUNC_INFO);
		if (!account)
			return;

		if (!Account2CW_.contains (account))
		{
			ConsoleWidget *cw = new ConsoleWidget (account->GetQObject ());
			Account2CW_ [account] = cw;
			connect (cw,
					SIGNAL (removeTab (QWidget*)),
					this,
					SLOT (consoleRemoved (QWidget*)));
		}
开发者ID:ForNeVeR,项目名称:leechcraft,代码行数:15,代码来源:accountactionsmanager.cpp

示例7: handleAccountValidated

	void LJBloggingPlatform::handleAccountValidated (bool validated)
	{
		IAccount *acc = qobject_cast<IAccount*> (sender ());
		if (!acc)
		{
			qWarning () << Q_FUNC_INFO
					<< sender ()
					<< "is not an IAccount";;
			return;
		}

		emit accountValidated (acc->GetQObject (), validated);
		if (validated &&
				XmlSettingsManager::Instance ().Property ("CheckingInboxEnabled", true).toBool ())
			checkForMessages ();;
	}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例8: Save

	void BookmarksManagerDialog::Save ()
	{
		QVariantList datas;
		for (int i = 0; i < BMModel_->rowCount (); ++i)
			datas << BMModel_->item (i)->data ();

		const int index = Ui_.AccountBox_->currentIndex ();
		IAccount *account = Ui_.AccountBox_->itemData (index).value<IAccount*> ();
		if (!account)
		{
			qWarning () << Q_FUNC_INFO
					<< "no account available for index"
					<< index;
			return;
		}

		qobject_cast<ISupportBookmarks*> (account->GetQObject ())->SetBookmarkedMUCs (datas);

		on_AccountBox__currentIndexChanged (index);
	}
开发者ID:ttldtor,项目名称:leechcraft,代码行数:20,代码来源:bookmarksmanagerdialog.cpp

示例9: handleAccountSetLocation

	void AccountActionsManager::handleAccountSetLocation ()
	{
		IAccount *account = GetAccountFromSender (sender (), Q_FUNC_INFO);
		if (!account)
			return;

		QObject *obj = account->GetQObject ();
		ISupportGeolocation *loc = qobject_cast<ISupportGeolocation*> (obj);
		if (!loc)
		{
			qWarning () << Q_FUNC_INFO
					<< obj
					<< "doesn't support geolocation";
			return;
		}

		LocationDialog dia (MW_);
		if (dia.exec () != QDialog::Accepted)
			return;

		loc->SetGeolocationInfo (dia.GetInfo ());
	}
开发者ID:ForNeVeR,项目名称:leechcraft,代码行数:22,代码来源:accountactionsmanager.cpp


注:本文中的IAccount::GetQObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。