mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Unify import functions for some (on_butImport_clicked) or all (on_butOk_clicked) items. They both call "importIndexes(const QModelIndexList &indexes)" containing some or all indexes to import. db_x509.cpp: Only need to search the treeItem (containing all items without issuer, not all in the rootItem (containing also certificates with known issuer) Re-use "remFromCont()" when stealing items from an other CA.
52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
/* vi: set sw=4 ts=4:
|
|
*
|
|
* Copyright (C) 2001 - 2010 Christian Hohnstaedt.
|
|
*
|
|
* All rights reserved.
|
|
*/
|
|
|
|
#ifndef __IMPORTMULTI_H
|
|
#define __IMPORTMULTI_H
|
|
|
|
#include "ui_ImportMulti.h"
|
|
#include "lib/db_token.h"
|
|
#include "lib/db_base.h"
|
|
#include <QList>
|
|
|
|
class pki_x509;
|
|
class pki_key;
|
|
|
|
class ImportMulti: public QDialog, private Ui::ImportMulti
|
|
{
|
|
Q_OBJECT
|
|
|
|
private:
|
|
slotid slot;
|
|
db_token *mcont;
|
|
void importError(QStringList failed);
|
|
|
|
public:
|
|
ImportMulti(QWidget *parent);
|
|
~ImportMulti();
|
|
void addItem(pki_base *pki);
|
|
pki_base *getSelected();
|
|
pki_base *import(const QModelIndex &idx);
|
|
void importIndexes(const QModelIndexList &indexes);
|
|
void execute(int force=0, QStringList failed = QStringList());
|
|
int entries();
|
|
void tokenInfo(const slotid &s);
|
|
void dragEnterEvent(QDragEnterEvent *event);
|
|
void dropEvent(QDropEvent *event);
|
|
bool openDB() const;
|
|
|
|
public slots:
|
|
void on_butRemove_clicked();
|
|
void on_butImport_clicked();
|
|
void on_butDetails_clicked();
|
|
void on_butOk_clicked();
|
|
void on_deleteToken_clicked();
|
|
void on_renameToken_clicked();
|
|
};
|
|
|
|
#endif
|