Index: terepaima-0.4.16/moc/moc_mainwindow.cpp
===================================================================
--- terepaima-0.4.16/moc/moc_mainwindow.cpp	(revision 1487f05dbbaee1f4def7af3890c76efff5e0d60e)
+++ terepaima-0.4.16/moc/moc_mainwindow.cpp	(revision 35bdadca1b1b0b73086245cb7830c030f64ce8b6)
@@ -20,6 +20,6 @@
 QT_BEGIN_MOC_NAMESPACE
 struct qt_meta_stringdata_qpdfview__MainWindow_t {
-    QByteArrayData data[171];
-    char stringdata0[3993];
+    QByteArrayData data[178];
+    char stringdata0[4106];
 };
 #define QT_MOC_LITERAL(idx, ofs, len) \
@@ -197,8 +197,15 @@
 QT_MOC_LITERAL(165, 3864, 19), // "on_verify_signature"
 QT_MOC_LITERAL(166, 3884, 12), // "on_signature"
-QT_MOC_LITERAL(167, 3897, 30), // "on_windowSelecctionCertificate"
-QT_MOC_LITERAL(168, 3928, 16), // "verify_signature"
-QT_MOC_LITERAL(169, 3945, 19), // "QStandardItemModel*"
-QT_MOC_LITERAL(170, 3965, 27) // "view_table_verify_signature"
+QT_MOC_LITERAL(167, 3897, 20), // "on_windowCertificate"
+QT_MOC_LITERAL(168, 3918, 20), // "on_selectCertificate"
+QT_MOC_LITERAL(169, 3939, 12), // "on_managePIN"
+QT_MOC_LITERAL(170, 3952, 12), // "on_windowPIN"
+QT_MOC_LITERAL(171, 3965, 1), // "x"
+QT_MOC_LITERAL(172, 3967, 27), // "on_currentChanged_selection"
+QT_MOC_LITERAL(173, 3995, 26), // "on_close_windowCertificate"
+QT_MOC_LITERAL(174, 4022, 18), // "on_close_windowPIN"
+QT_MOC_LITERAL(175, 4041, 16), // "verify_signature"
+QT_MOC_LITERAL(176, 4058, 19), // "QStandardItemModel*"
+QT_MOC_LITERAL(177, 4078, 27) // "view_table_verify_signature"
 
     },
@@ -314,7 +321,10 @@
     "on_search_clicked\0on_saveDatabase_timeout\0"
     "on_verify_signature\0on_signature\0"
-    "on_windowSelecctionCertificate\0"
-    "verify_signature\0QStandardItemModel*\0"
-    "view_table_verify_signature"
+    "on_windowCertificate\0on_selectCertificate\0"
+    "on_managePIN\0on_windowPIN\0x\0"
+    "on_currentChanged_selection\0"
+    "on_close_windowCertificate\0"
+    "on_close_windowPIN\0verify_signature\0"
+    "QStandardItemModel*\0view_table_verify_signature"
 };
 #undef QT_MOC_LITERAL
@@ -326,5 +336,5 @@
        0,       // classname
        0,    0, // classinfo
-     136,   14, // methods
+     142,   14, // methods
        0,    0, // properties
        0,    0, // enums/sets
@@ -334,140 +344,146 @@
 
  // slots: name, argc, parameters, tag, flags
-       1,    0,  694,    2, 0x0a /* Public */,
-       3,    4,  695,    2, 0x0a /* Public */,
-       3,    3,  704,    2, 0x2a /* Public | MethodCloned */,
-       3,    2,  711,    2, 0x2a /* Public | MethodCloned */,
-       3,    1,  716,    2, 0x2a /* Public | MethodCloned */,
-       8,    4,  719,    2, 0x0a /* Public */,
-       8,    3,  728,    2, 0x2a /* Public | MethodCloned */,
-       8,    2,  735,    2, 0x2a /* Public | MethodCloned */,
-       8,    1,  740,    2, 0x2a /* Public | MethodCloned */,
-       9,    5,  743,    2, 0x0a /* Public */,
-       9,    4,  754,    2, 0x2a /* Public | MethodCloned */,
-       9,    3,  763,    2, 0x2a /* Public | MethodCloned */,
-       9,    2,  770,    2, 0x2a /* Public | MethodCloned */,
-       9,    1,  775,    2, 0x2a /* Public | MethodCloned */,
-      11,    1,  778,    2, 0x0a /* Public */,
-      13,    1,  781,    2, 0x09 /* Protected */,
-      15,    1,  784,    2, 0x09 /* Protected */,
-      16,    2,  787,    2, 0x09 /* Protected */,
-      18,    0,  792,    2, 0x09 /* Protected */,
-      19,    0,  793,    2, 0x09 /* Protected */,
-      20,    1,  794,    2, 0x09 /* Protected */,
-      22,    1,  797,    2, 0x09 /* Protected */,
-      24,    2,  800,    2, 0x09 /* Protected */,
-      27,    1,  805,    2, 0x09 /* Protected */,
-      29,    1,  808,    2, 0x09 /* Protected */,
-      32,    1,  811,    2, 0x09 /* Protected */,
-      34,    1,  814,    2, 0x09 /* Protected */,
-      37,    1,  817,    2, 0x09 /* Protected */,
-      39,    1,  820,    2, 0x09 /* Protected */,
-      42,    1,  823,    2, 0x09 /* Protected */,
-      42,    3,  826,    2, 0x09 /* Protected */,
-      44,    1,  833,    2, 0x09 /* Protected */,
-      47,    1,  836,    2, 0x09 /* Protected */,
-      49,    1,  839,    2, 0x09 /* Protected */,
-      51,    1,  842,    2, 0x09 /* Protected */,
-      53,    1,  845,    2, 0x09 /* Protected */,
-      56,    1,  848,    2, 0x09 /* Protected */,
-      58,    1,  851,    2, 0x09 /* Protected */,
-      61,    0,  854,    2, 0x09 /* Protected */,
-      62,    1,  855,    2, 0x09 /* Protected */,
-      64,    1,  858,    2, 0x09 /* Protected */,
-      66,    0,  861,    2, 0x09 /* Protected */,
-      67,    0,  862,    2, 0x09 /* Protected */,
-      68,    1,  863,    2, 0x09 /* Protected */,
-      69,    0,  866,    2, 0x09 /* Protected */,
-      70,    0,  867,    2, 0x09 /* Protected */,
-      71,    0,  868,    2, 0x09 /* Protected */,
-      72,    0,  869,    2, 0x09 /* Protected */,
-      73,    0,  870,    2, 0x09 /* Protected */,
-      74,    0,  871,    2, 0x09 /* Protected */,
-      75,    0,  872,    2, 0x09 /* Protected */,
-      76,    0,  873,    2, 0x09 /* Protected */,
-      77,    0,  874,    2, 0x09 /* Protected */,
-      78,    0,  875,    2, 0x09 /* Protected */,
-      79,    1,  876,    2, 0x09 /* Protected */,
-      80,    0,  879,    2, 0x09 /* Protected */,
-      81,    0,  880,    2, 0x09 /* Protected */,
-      82,    0,  881,    2, 0x09 /* Protected */,
-      83,    0,  882,    2, 0x09 /* Protected */,
-      84,    0,  883,    2, 0x09 /* Protected */,
-      85,    0,  884,    2, 0x09 /* Protected */,
-      86,    0,  885,    2, 0x09 /* Protected */,
-      87,    0,  886,    2, 0x09 /* Protected */,
-      88,    0,  887,    2, 0x09 /* Protected */,
-      89,    0,  888,    2, 0x09 /* Protected */,
-      90,    0,  889,    2, 0x09 /* Protected */,
-      91,    0,  890,    2, 0x09 /* Protected */,
-      92,    1,  891,    2, 0x09 /* Protected */,
-      94,    1,  894,    2, 0x09 /* Protected */,
-      95,    0,  897,    2, 0x09 /* Protected */,
-      96,    1,  898,    2, 0x09 /* Protected */,
-      97,    1,  901,    2, 0x09 /* Protected */,
-      98,    1,  904,    2, 0x09 /* Protected */,
-      99,    1,  907,    2, 0x09 /* Protected */,
-     100,    1,  910,    2, 0x09 /* Protected */,
-     101,    0,  913,    2, 0x09 /* Protected */,
-     102,    0,  914,    2, 0x09 /* Protected */,
-     103,    0,  915,    2, 0x09 /* Protected */,
-     104,    1,  916,    2, 0x09 /* Protected */,
-     105,    1,  919,    2, 0x09 /* Protected */,
-     106,    0,  922,    2, 0x09 /* Protected */,
-     107,    0,  923,    2, 0x09 /* Protected */,
-     108,    1,  924,    2, 0x09 /* Protected */,
-     109,    1,  927,    2, 0x09 /* Protected */,
-     110,    1,  930,    2, 0x09 /* Protected */,
-     111,    1,  933,    2, 0x09 /* Protected */,
-     112,    1,  936,    2, 0x09 /* Protected */,
-     113,    0,  939,    2, 0x09 /* Protected */,
-     114,    1,  940,    2, 0x09 /* Protected */,
-     115,    0,  943,    2, 0x09 /* Protected */,
-     116,    0,  944,    2, 0x09 /* Protected */,
-     117,    0,  945,    2, 0x09 /* Protected */,
-     118,    0,  946,    2, 0x09 /* Protected */,
-     119,    0,  947,    2, 0x09 /* Protected */,
-     120,    0,  948,    2, 0x09 /* Protected */,
-     121,    0,  949,    2, 0x09 /* Protected */,
-     122,    1,  950,    2, 0x09 /* Protected */,
-     125,    0,  953,    2, 0x09 /* Protected */,
-     126,    0,  954,    2, 0x09 /* Protected */,
-     127,    0,  955,    2, 0x09 /* Protected */,
-     128,    0,  956,    2, 0x09 /* Protected */,
-     129,    0,  957,    2, 0x09 /* Protected */,
-     130,    0,  958,    2, 0x09 /* Protected */,
-     131,    0,  959,    2, 0x09 /* Protected */,
-     132,    0,  960,    2, 0x09 /* Protected */,
-     133,    1,  961,    2, 0x09 /* Protected */,
-     135,    1,  964,    2, 0x09 /* Protected */,
-     136,    2,  967,    2, 0x09 /* Protected */,
-     137,    1,  972,    2, 0x09 /* Protected */,
-     138,    0,  975,    2, 0x09 /* Protected */,
-     139,    0,  976,    2, 0x09 /* Protected */,
-     140,    0,  977,    2, 0x09 /* Protected */,
-     141,    0,  978,    2, 0x09 /* Protected */,
-     142,    1,  979,    2, 0x09 /* Protected */,
-     143,    1,  982,    2, 0x09 /* Protected */,
-     144,    2,  985,    2, 0x09 /* Protected */,
-     146,    1,  990,    2, 0x09 /* Protected */,
-     147,    1,  993,    2, 0x09 /* Protected */,
-     150,    0,  996,    2, 0x09 /* Protected */,
-     151,    1,  997,    2, 0x09 /* Protected */,
-     152,    0, 1000,    2, 0x09 /* Protected */,
-     153,    0, 1001,    2, 0x09 /* Protected */,
-     154,    1, 1002,    2, 0x09 /* Protected */,
-     155,    1, 1005,    2, 0x09 /* Protected */,
-     157,    0, 1008,    2, 0x09 /* Protected */,
-     158,    1, 1009,    2, 0x09 /* Protected */,
-     159,    1, 1012,    2, 0x09 /* Protected */,
-     160,    0, 1015,    2, 0x09 /* Protected */,
-     161,    1, 1016,    2, 0x09 /* Protected */,
-     163,    1, 1019,    2, 0x09 /* Protected */,
-     164,    0, 1022,    2, 0x09 /* Protected */,
-     165,    0, 1023,    2, 0x09 /* Protected */,
-     166,    0, 1024,    2, 0x09 /* Protected */,
-     167,    0, 1025,    2, 0x09 /* Protected */,
-     168,    0, 1026,    2, 0x09 /* Protected */,
-     170,    0, 1027,    2, 0x09 /* Protected */,
+       1,    0,  724,    2, 0x0a /* Public */,
+       3,    4,  725,    2, 0x0a /* Public */,
+       3,    3,  734,    2, 0x2a /* Public | MethodCloned */,
+       3,    2,  741,    2, 0x2a /* Public | MethodCloned */,
+       3,    1,  746,    2, 0x2a /* Public | MethodCloned */,
+       8,    4,  749,    2, 0x0a /* Public */,
+       8,    3,  758,    2, 0x2a /* Public | MethodCloned */,
+       8,    2,  765,    2, 0x2a /* Public | MethodCloned */,
+       8,    1,  770,    2, 0x2a /* Public | MethodCloned */,
+       9,    5,  773,    2, 0x0a /* Public */,
+       9,    4,  784,    2, 0x2a /* Public | MethodCloned */,
+       9,    3,  793,    2, 0x2a /* Public | MethodCloned */,
+       9,    2,  800,    2, 0x2a /* Public | MethodCloned */,
+       9,    1,  805,    2, 0x2a /* Public | MethodCloned */,
+      11,    1,  808,    2, 0x0a /* Public */,
+      13,    1,  811,    2, 0x09 /* Protected */,
+      15,    1,  814,    2, 0x09 /* Protected */,
+      16,    2,  817,    2, 0x09 /* Protected */,
+      18,    0,  822,    2, 0x09 /* Protected */,
+      19,    0,  823,    2, 0x09 /* Protected */,
+      20,    1,  824,    2, 0x09 /* Protected */,
+      22,    1,  827,    2, 0x09 /* Protected */,
+      24,    2,  830,    2, 0x09 /* Protected */,
+      27,    1,  835,    2, 0x09 /* Protected */,
+      29,    1,  838,    2, 0x09 /* Protected */,
+      32,    1,  841,    2, 0x09 /* Protected */,
+      34,    1,  844,    2, 0x09 /* Protected */,
+      37,    1,  847,    2, 0x09 /* Protected */,
+      39,    1,  850,    2, 0x09 /* Protected */,
+      42,    1,  853,    2, 0x09 /* Protected */,
+      42,    3,  856,    2, 0x09 /* Protected */,
+      44,    1,  863,    2, 0x09 /* Protected */,
+      47,    1,  866,    2, 0x09 /* Protected */,
+      49,    1,  869,    2, 0x09 /* Protected */,
+      51,    1,  872,    2, 0x09 /* Protected */,
+      53,    1,  875,    2, 0x09 /* Protected */,
+      56,    1,  878,    2, 0x09 /* Protected */,
+      58,    1,  881,    2, 0x09 /* Protected */,
+      61,    0,  884,    2, 0x09 /* Protected */,
+      62,    1,  885,    2, 0x09 /* Protected */,
+      64,    1,  888,    2, 0x09 /* Protected */,
+      66,    0,  891,    2, 0x09 /* Protected */,
+      67,    0,  892,    2, 0x09 /* Protected */,
+      68,    1,  893,    2, 0x09 /* Protected */,
+      69,    0,  896,    2, 0x09 /* Protected */,
+      70,    0,  897,    2, 0x09 /* Protected */,
+      71,    0,  898,    2, 0x09 /* Protected */,
+      72,    0,  899,    2, 0x09 /* Protected */,
+      73,    0,  900,    2, 0x09 /* Protected */,
+      74,    0,  901,    2, 0x09 /* Protected */,
+      75,    0,  902,    2, 0x09 /* Protected */,
+      76,    0,  903,    2, 0x09 /* Protected */,
+      77,    0,  904,    2, 0x09 /* Protected */,
+      78,    0,  905,    2, 0x09 /* Protected */,
+      79,    1,  906,    2, 0x09 /* Protected */,
+      80,    0,  909,    2, 0x09 /* Protected */,
+      81,    0,  910,    2, 0x09 /* Protected */,
+      82,    0,  911,    2, 0x09 /* Protected */,
+      83,    0,  912,    2, 0x09 /* Protected */,
+      84,    0,  913,    2, 0x09 /* Protected */,
+      85,    0,  914,    2, 0x09 /* Protected */,
+      86,    0,  915,    2, 0x09 /* Protected */,
+      87,    0,  916,    2, 0x09 /* Protected */,
+      88,    0,  917,    2, 0x09 /* Protected */,
+      89,    0,  918,    2, 0x09 /* Protected */,
+      90,    0,  919,    2, 0x09 /* Protected */,
+      91,    0,  920,    2, 0x09 /* Protected */,
+      92,    1,  921,    2, 0x09 /* Protected */,
+      94,    1,  924,    2, 0x09 /* Protected */,
+      95,    0,  927,    2, 0x09 /* Protected */,
+      96,    1,  928,    2, 0x09 /* Protected */,
+      97,    1,  931,    2, 0x09 /* Protected */,
+      98,    1,  934,    2, 0x09 /* Protected */,
+      99,    1,  937,    2, 0x09 /* Protected */,
+     100,    1,  940,    2, 0x09 /* Protected */,
+     101,    0,  943,    2, 0x09 /* Protected */,
+     102,    0,  944,    2, 0x09 /* Protected */,
+     103,    0,  945,    2, 0x09 /* Protected */,
+     104,    1,  946,    2, 0x09 /* Protected */,
+     105,    1,  949,    2, 0x09 /* Protected */,
+     106,    0,  952,    2, 0x09 /* Protected */,
+     107,    0,  953,    2, 0x09 /* Protected */,
+     108,    1,  954,    2, 0x09 /* Protected */,
+     109,    1,  957,    2, 0x09 /* Protected */,
+     110,    1,  960,    2, 0x09 /* Protected */,
+     111,    1,  963,    2, 0x09 /* Protected */,
+     112,    1,  966,    2, 0x09 /* Protected */,
+     113,    0,  969,    2, 0x09 /* Protected */,
+     114,    1,  970,    2, 0x09 /* Protected */,
+     115,    0,  973,    2, 0x09 /* Protected */,
+     116,    0,  974,    2, 0x09 /* Protected */,
+     117,    0,  975,    2, 0x09 /* Protected */,
+     118,    0,  976,    2, 0x09 /* Protected */,
+     119,    0,  977,    2, 0x09 /* Protected */,
+     120,    0,  978,    2, 0x09 /* Protected */,
+     121,    0,  979,    2, 0x09 /* Protected */,
+     122,    1,  980,    2, 0x09 /* Protected */,
+     125,    0,  983,    2, 0x09 /* Protected */,
+     126,    0,  984,    2, 0x09 /* Protected */,
+     127,    0,  985,    2, 0x09 /* Protected */,
+     128,    0,  986,    2, 0x09 /* Protected */,
+     129,    0,  987,    2, 0x09 /* Protected */,
+     130,    0,  988,    2, 0x09 /* Protected */,
+     131,    0,  989,    2, 0x09 /* Protected */,
+     132,    0,  990,    2, 0x09 /* Protected */,
+     133,    1,  991,    2, 0x09 /* Protected */,
+     135,    1,  994,    2, 0x09 /* Protected */,
+     136,    2,  997,    2, 0x09 /* Protected */,
+     137,    1, 1002,    2, 0x09 /* Protected */,
+     138,    0, 1005,    2, 0x09 /* Protected */,
+     139,    0, 1006,    2, 0x09 /* Protected */,
+     140,    0, 1007,    2, 0x09 /* Protected */,
+     141,    0, 1008,    2, 0x09 /* Protected */,
+     142,    1, 1009,    2, 0x09 /* Protected */,
+     143,    1, 1012,    2, 0x09 /* Protected */,
+     144,    2, 1015,    2, 0x09 /* Protected */,
+     146,    1, 1020,    2, 0x09 /* Protected */,
+     147,    1, 1023,    2, 0x09 /* Protected */,
+     150,    0, 1026,    2, 0x09 /* Protected */,
+     151,    1, 1027,    2, 0x09 /* Protected */,
+     152,    0, 1030,    2, 0x09 /* Protected */,
+     153,    0, 1031,    2, 0x09 /* Protected */,
+     154,    1, 1032,    2, 0x09 /* Protected */,
+     155,    1, 1035,    2, 0x09 /* Protected */,
+     157,    0, 1038,    2, 0x09 /* Protected */,
+     158,    1, 1039,    2, 0x09 /* Protected */,
+     159,    1, 1042,    2, 0x09 /* Protected */,
+     160,    0, 1045,    2, 0x09 /* Protected */,
+     161,    1, 1046,    2, 0x09 /* Protected */,
+     163,    1, 1049,    2, 0x09 /* Protected */,
+     164,    0, 1052,    2, 0x09 /* Protected */,
+     165,    0, 1053,    2, 0x09 /* Protected */,
+     166,    0, 1054,    2, 0x09 /* Protected */,
+     167,    0, 1055,    2, 0x09 /* Protected */,
+     168,    0, 1056,    2, 0x09 /* Protected */,
+     169,    0, 1057,    2, 0x09 /* Protected */,
+     170,    1, 1058,    2, 0x09 /* Protected */,
+     172,    0, 1061,    2, 0x09 /* Protected */,
+     173,    0, 1062,    2, 0x09 /* Protected */,
+     174,    0, 1063,    2, 0x09 /* Protected */,
+     175,    0, 1064,    2, 0x09 /* Protected */,
+     177,    0, 1065,    2, 0x09 /* Protected */,
 
  // slots: parameters
@@ -606,6 +622,12 @@
     QMetaType::Void,
     QMetaType::Void,
-    0x80000000 | 169,
-    0x80000000 | 169,
+    QMetaType::Void,
+    QMetaType::Void,
+    QMetaType::Void, QMetaType::Int,  171,
+    QMetaType::Void,
+    QMetaType::Void,
+    QMetaType::Void,
+    0x80000000 | 176,
+    0x80000000 | 176,
 
        0        // eod
@@ -764,8 +786,14 @@
         case 131: _t->on_verify_signature(); break;
         case 132: _t->on_signature(); break;
-        case 133: _t->on_windowSelecctionCertificate(); break;
-        case 134: { QStandardItemModel* _r = _t->verify_signature();
+        case 133: _t->on_windowCertificate(); break;
+        case 134: _t->on_selectCertificate(); break;
+        case 135: _t->on_managePIN(); break;
+        case 136: _t->on_windowPIN((*reinterpret_cast< int(*)>(_a[1]))); break;
+        case 137: _t->on_currentChanged_selection(); break;
+        case 138: _t->on_close_windowCertificate(); break;
+        case 139: _t->on_close_windowPIN(); break;
+        case 140: { QStandardItemModel* _r = _t->verify_signature();
             if (_a[0]) *reinterpret_cast< QStandardItemModel**>(_a[0]) = _r; }  break;
-        case 135: { QStandardItemModel* _r = _t->view_table_verify_signature();
+        case 141: { QStandardItemModel* _r = _t->view_table_verify_signature();
             if (_a[0]) *reinterpret_cast< QStandardItemModel**>(_a[0]) = _r; }  break;
         default: ;
@@ -799,11 +827,11 @@
         return _id;
     if (_c == QMetaObject::InvokeMetaMethod) {
-        if (_id < 136)
+        if (_id < 142)
             qt_static_metacall(this, _c, _id, _a);
-        _id -= 136;
+        _id -= 142;
     } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
-        if (_id < 136)
+        if (_id < 142)
             *reinterpret_cast<int*>(_a[0]) = -1;
-        _id -= 136;
+        _id -= 142;
     }
     return _id;
