Changeset e8a029e in visorpdf
- Timestamp:
- Oct 13, 2016, 3:01:33 PM (8 years ago)
- Branches:
- master
- Children:
- 8964fdc
- Parents:
- 439da38
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sources/mainwindow.cpp
r7eb08ea re8a029e 101 101 102 102 103 /*const char * getReadableSigState(SignatureValidationStatus sig_vs)104 {105 switch(sig_vs) {106 case SIGNATURE_VALID:107 return "Signature is Valid.";108 109 case SIGNATURE_INVALID:110 return "Signature is Invalid.";111 112 case SIGNATURE_DIGEST_MISMATCH:113 return "Digest Mismatch.";114 115 case SIGNATURE_DECODING_ERROR:116 return "Document isn't signed or corrupted data.";117 118 case SIGNATURE_NOT_VERIFIED:119 return "Signature has not yet been verified.";120 121 default:122 return "Unknown Validation Failure.";123 }124 }125 126 const char * getReadableCertState(CertificateValidationStatus cert_vs)127 {128 switch(cert_vs) {129 case CERTIFICATE_TRUSTED:130 return "Certificate is Trusted.";131 132 case CERTIFICATE_UNTRUSTED_ISSUER:133 return "Certificate issuer isn't Trusted.";134 135 case CERTIFICATE_UNKNOWN_ISSUER:136 return "Certificate issuer is unknown.";137 138 case CERTIFICATE_REVOKED:139 return "Certificate has been Revoked.";140 141 case CERTIFICATE_EXPIRED:142 return "Certificate has Expired";143 144 case CERTIFICATE_NOT_VERIFIED:145 return "Certificate has not yet been verified.";146 147 default:148 return "Unknown issue with Certificate or corrupted data.";149 }150 }151 152 char *getReadableTime(time_t unix_time)153 {154 char * time_str = (char *) gmalloc(64);155 strftime(time_str, 64, "%b %d %Y %H:%M:%S", localtime(&unix_time));156 return time_str;157 }*/158 159 //static GBool printVersion = gFalse;160 //static GBool printHelp = gFalse;161 //static GBool dontVerifyCert = gFalse;162 163 //static const ArgDesc argDesc[] = {164 // {"-nocert", argFlag, &dontVerifyCert, 0,165 // "don't perform certificate validation"},166 167 // {"-v", argFlag, &printVersion, 0,168 // "print copyright and version info"},169 // {"-h", argFlag, &printHelp, 0,170 // "print usage information"},171 // {"-help", argFlag, &printHelp, 0,172 // "print usage information"},173 // {"-?", argFlag, &printHelp, 0,174 // "print usage information"},175 // {NULL}176 //};177 178 179 103 //********************************* POPPLER 180 104 … … 2684 2608 } 2685 2609 2686 setWindowTitle(tabText + QLatin1String("qpdfview") + instanceName); 2610 // setWindowTitle(tabText + QLatin1String("qpdfview") + instanceName); 2611 setWindowTitle(tabText + QLatin1String("TibisayPDFView") + instanceName); 2687 2612 } 2688 2613 … … 2925 2850 m_printAction = createAction(tr("&Print..."), QLatin1String("print"), QLatin1String("document-print"), QKeySequence::Print, SLOT(on_print_triggered())); 2926 2851 m_exitAction = createAction(tr("E&xit"), QLatin1String("exit"), QIcon::fromTheme("application-exit"), QKeySequence::Quit, SLOT(close())); 2927 m_verify_signature = createAction(tr("&Verify Signature..."), QLatin1String("Verify signature"), QLatin1String(" document-print"), QKeySequence(), SLOT(on_verify_signature()));2852 m_verify_signature = createAction(tr("&Verify Signature..."), QLatin1String("Verify signature"), QLatin1String("verify-signature"), QKeySequence(), SLOT(on_verify_signature())); 2928 2853 2929 2854 // edit … … 3211 3136 m_detailsSignatureView->setEditTriggers(QAbstractItemView::NoEditTriggers); 3212 3137 m_detailsSignatureView->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); 3138 m_detailsSignatureView->verticalHeader()->hide(); 3213 3139 3214 3140 //prueba->addItems(QStringList() << verify_signature().toStdString()); … … 3696 3622 int numColumns = 2; 3697 3623 int numRows = sigCount*5; 3624 QStringList horzHeaders; 3625 horzHeaders << "Atributo" << "Valor"; 3698 3626 QStandardItemModel* model = new QStandardItemModel(numRows, numColumns); 3627 model->setHorizontalHeaderLabels(horzHeaders); 3699 3628 QString rowtype, rowvalue; 3700 3629 int countRow = 0; … … 3704 3633 3705 3634 //**Sección para llenar la tabla 3635 //qDebug() << countRow; 3706 3636 rowtype = trUtf8("Firma número %1").arg(i+1); 3707 3637 QStandardItem* item = new QStandardItem(rowtype); 3708 3638 model->setItem(countRow, 0, item); 3709 3639 countRow ++; 3710 rowtype = trUtf8(" - Nombre común ");3640 rowtype = trUtf8(" - Nombre común "); 3711 3641 item = new QStandardItem(rowtype); 3712 3642 model->setItem(countRow, 0, item); … … 3715 3645 model->setItem(countRow, 1, item); 3716 3646 countRow ++; 3717 rowtype = trUtf8(" - Hora de la firma ");3647 rowtype = trUtf8(" - Hora de la firma "); 3718 3648 item = item = new QStandardItem(rowtype); 3719 3649 model->setItem(countRow, 0, item); … … 3722 3652 model->setItem(countRow, 1, item); 3723 3653 countRow ++; 3724 rowtype = trUtf8(" - Validación de la firma ");3654 rowtype = trUtf8(" - Validación de la firma "); 3725 3655 item = item = new QStandardItem(rowtype); 3726 3656 model->setItem(countRow, 0, item); … … 3729 3659 model->setItem(countRow, 1, item); 3730 3660 countRow ++; 3731 rowtype = trUtf8(" - Validación del certificado ");3661 rowtype = trUtf8(" - Validación del certificado "); 3732 3662 item = item = new QStandardItem(rowtype); 3733 3663 model->setItem(countRow, 0, item); … … 3736 3666 model->setItem(countRow, 1, item); 3737 3667 countRow ++; 3668 model->takeVerticalHeaderItem(countRow); 3738 3669 } 3739 3670 return model; … … 3785 3716 int numColumns = 2; 3786 3717 int numRows = sigCount*5; 3718 QStringList horzHeaders; 3719 horzHeaders << "Atributo" << "Valor"; 3787 3720 3788 3721 QStandardItemModel* model = new QStandardItemModel(numRows, numColumns); 3789 3722 model->setHorizontalHeaderLabels(horzHeaders); 3723 qDebug()<<horzHeaders[0]; 3724 qDebug()<<horzHeaders[1]; 3725 // model->setHorizontalHeaderLabels(horzheaders); 3790 3726 QStringList itens; 3791 3727 //QStandardItem* item;
Note: See TracChangeset
for help on using the changeset viewer.