| 55 | } |
| 56 | |
| 57 | void ExportDialog::setupExportFormat(int disable_flag) |
| 58 | { |
| 59 | QList<const pki_export*> usual, normal; |
| 60 | for (const pki_export *t : alltypes) { |
| 61 | if (t->flags & disable_flag) |
| 62 | continue; |
| 63 | if (t->flags & F_USUAL) |
| 64 | usual << t; |
| 65 | else |
| 66 | normal << t; |
| 67 | } |
| 68 | exportFormat->clear(); |
| 69 | foreach(const pki_export *t, usual + normal) { |
| 70 | exportFormat->addItem(QString("%1 (*.%2)"). |
| 71 | arg(t->desc).arg(t->extension), QVariant(t->id)); |
| 72 | } |
| 73 | if (usual.size() > 0 && normal.size() > 0) |
| 74 | exportFormat->insertSeparator(usual.size()); |
| 75 | |
| 76 | exportFormat->setCurrentIndex(0); |
| 77 | on_exportFormat_highlighted(0); |
| 78 | } |
| 79 | |
| 80 | ExportDialog::~ExportDialog() |
| 81 | { |