예제 #1
0
파일: NewX509.cpp 프로젝트: J-Javan/xca
void NewX509::on_certList_currentIndexChanged(int)
{
	a1time snb, sna;
	pki_x509 *cert = getSelectedSigner();

	switchHashAlgo();

	if (!cert)
		return;

	QString templ = cert->getTemplate();
	snb = cert->getNotBefore();
	sna = cert->getNotAfter();
	if (snb > notBefore->getDate())
		notBefore->setDate(snb);
	if (sna < notAfter->getDate())
		notAfter->setDate(sna);

	if (templ.isEmpty())
		return;

	templateChanged(templ);
}
예제 #2
0
파일: NewX509.cpp 프로젝트: J-Javan/xca
void NewX509::templateChanged(pki_temp *templ)
{
	QString tempname = templ->getIntName();
	templateChanged(tempname);
}
예제 #3
0
파일: NewX509.cpp 프로젝트: J-Javan/xca
void NewX509::defineTemplate(pki_temp *temp)
{
	fromTemplate(temp);
	templateChanged(temp);
}
예제 #4
0
void QUmlTemplateSignatureObject::setTemplate(QObject *template_)
{
    qmodelingelementproperty_cast<QUmlTemplateSignature *>(this)->setTemplate(qmodelingelementproperty_cast<QUmlTemplateableElement *>(template_));
    emit templateChanged(this->template_());
}
예제 #5
0
void CasparDevice::sendNotification()
{
    switch (AmcpDevice::command)
    {
        case AmcpDevice::CLS:
        {
            emit responseChanged(AmcpDevice::response.at(0), *this);

            AmcpDevice::response.removeFirst(); // First post is the header, 200 CLS OK.

            QList<CasparMedia> items;
            foreach (QString response, AmcpDevice::response)
            {
                QString name = response.split("\" ").at(0);
                name.replace("\\", "/");
                if (name.startsWith("\""))
                    name.remove(0, 1);

                if (name.endsWith("\""))
                    name.remove(name.length() - 1, 1);

                QString type = response.split("\" ").at(1).trimmed().split(" ").at(0);

                QString timecode;
                if (response.split("\" ").at(1).trimmed().split(" ").count() > 5)
                {
                    // Format:
                    // "AMB"  MOVIE  6445960 20121101160514 643 1/60
                    // "CG1080I50"  MOVIE  6159792 20121101150514 264 1/25
                    // "GO1080P25"  MOVIE  16694084 20121101150514 445 1/25
                    // "WIPE"  MOVIE  1268784 20121101150514 31 1/25
                    QString totalFrames = response.split("\" ").at(1).trimmed().split(" ").at(4);
                    QString timebase = response.split("\" ").at(1).trimmed().split(" ").at(5);

                    int frames = totalFrames.toInt();
                    int fps = timebase.split("/").at(1).toInt();

                    double time = frames * (1.0 / fps);
                    timecode = convertToTimecode(time, fps);
                }

                items.push_back(CasparMedia(name, type, timecode));
            }

            emit mediaChanged(items, *this);

            break;
        }
        case AmcpDevice::TLS:
        {
            emit responseChanged(AmcpDevice::response.at(0), *this);

            AmcpDevice::response.removeFirst(); // First post is the header, 200 TLS OK.

            QList<CasparTemplate> items;
            foreach (QString response, AmcpDevice::response)
            {
                QString name = response.split("\" ").at(0);
                name.replace("\\", "/");
                if (name.startsWith("\""))
                    name.remove(0, 1);

                if (name.endsWith("\""))
                    name.remove(name.length() - 1, 1);

                items.push_back(CasparTemplate(name));
            }

            emit templateChanged(items, *this);

            break;
        }       
예제 #6
0
void EventManager::fireTemplateChangedEvent(const TemplateChangedEvent& event)
{
    emit templateChanged(event);
}