void BookmarksManagerDialog::SuggestSaving (QObject *entryObj)
	{
		const auto entry = qobject_cast<ICLEntry*> (entryObj);
		if (!entry)
		{
			qWarning () << Q_FUNC_INFO
					<< "object doesn't implement ICLEntry"
					<< entryObj;
			return;
		}

		const bool found = FocusOn (entry->GetParentAccount ());

		if (!found)
		{
			qWarning () << Q_FUNC_INFO
					<< "unable to find parent protocol for entry"
					<< entryObj
					<< entry->GetEntryID ();
			return;
		}

		const auto& data = GetIdentifyingData (entryObj);
		if (data.isEmpty ())
		{
			qWarning () << Q_FUNC_INFO
					<< "empty identifying data returned by"
					<< entryObj;
			return;
		}

		AddBookmark (data);
	}
Пример #2
0
void CMD_Focus(F_CMD_ARGS)
{
  if (DeferExecution(eventp,&w,&tmp_win,&context,CRS_SELECT,ButtonRelease))
    return;

  FocusOn(tmp_win, FALSE, action);
}
Пример #3
0
void CMD_FlipFocus(F_CMD_ARGS)
{
  if (DeferExecution(eventp,&w,&tmp_win,&context,CRS_SELECT,ButtonRelease))
    return;

  /* Reorder the window list */
  FocusOn(tmp_win, TRUE, action);
}
Пример #4
0
	void AccountActionsManager::manageAccountBookmarks ()
	{
		IAccount *account = GetAccountFromSender (sender (), Q_FUNC_INFO);
		if (!account)
			return;

		auto dia = new BookmarksManagerDialog (MW_);
		dia->FocusOn (account);
		dia->show ();
	}
Пример #5
0
void SceneCamera::SwitchCameraMode(CONTROL_TYPE type)
{
    currentType = type;
    
    if (type == CONTROL_TYPE::CAMERA_FOCUS)
    {
        FocusOn((StageObject&)Scene::GetSelection());
    }
    
    control[type]->ComputeInverse();
}