示例#1
0
void ActionButton::setAction(Action *AAction)
{
	if (FAction != AAction)
	{
		if (FAction)
		{
			disconnect(FAction,0,this,0);
		}

		FAction = AAction;
		onActionChanged();

		if (FAction)
		{
			connect(this,SIGNAL(clicked()),FAction,SLOT(trigger()));
			connect(FAction,SIGNAL(changed()),SLOT(onActionChanged()));
			connect(FAction,SIGNAL(actionDestroyed(Action *)),SLOT(onActionDestroyed(Action *)));
			setActionString(AAction->data(Action::DR_UserDefined  + 1).toString());
		}

		emit actionChanged();
	}
}
示例#2
0
ConsolePlan::ConsolePlan(QObject* parent):QObject(parent)
{
    resetSonicationParam();
    setErrorString();
    setActionString();
}
{
    m_sourceFolder = sourceFolder;
    m_targetTag = targetFolder;
    m_downloader = downloader;
    m_combineFolders = combineFolders;
    //
    m_thread = new QThread();
    moveToThread(m_thread);
    connect(m_thread, SIGNAL(started()), SLOT(movePersonalFolderToGroupDB()));
    m_thread->start();
}

void CWizDocumentOperator::bindSignalsToProgressDialog(CWizProgressDialog* progress)
{
    QObject::connect(this, SIGNAL(progress(int,int)), progress, SLOT(setProgress(int,int)));
    QObject::connect(this, SIGNAL(newAction(QString)), progress, SLOT(setActionString(QString)));
    QObject::connect(this, SIGNAL(finished()), progress, SLOT(accept()));
    QObject::connect(progress, SIGNAL(stopRequest()), this, SLOT(stop()), Qt::DirectConnection);
}

void CWizDocumentOperator::stop()
{
    m_stop = true;
}

void CWizDocumentOperator::copyDocumentToPersonalFolder()
{
    int nCounter = 0;
    CWizDocumentDataArray::iterator it;
    for (it = m_arrayDocument.begin(); it != m_arrayDocument.end() && !m_stop; it++)
    {