xca/widgets/Options.h
Christian Hohnstaedt ced0995862 Close #91: Change order of "PKCS#11 provider"
With this commit PKCS#11 libraries may be reordered
and enabled or disabled.

The slot selection dialog iterates over all enabled and successfully
loaded libraries in the configured order and collects the slots
of each of them.

In the options dialog the library info is shown in the tool-tip
2019-03-21 06:12:51 +01:00

51 lines
1.1 KiB
C++

/* vi: set sw=4 ts=4:
*
* Copyright (C) 2001 - 20012 Christian Hohnstaedt.
*
* All rights reserved.
*/
#ifndef __OPTIONS_H
#define __OPTIONS_H
#include "ui_Options.h"
#include <QDialog>
#include "lib/base.h"
#include "SearchPkcs11.h"
#include "MainWindow.h"
class Options: public QDialog, public Ui::Options
{
Q_OBJECT
private:
SearchPkcs11 *searchP11;
QStringList string_opts;
QString getDnString(QListWidget *w);
void setDnString(QString dn, QListWidget *w);
void setupPkcs11Provider(QString list);
QString getPkcs11Provider();
MainWindow *mw;
QString listItem2Name(const QListWidgetItem *item) const;
void updatePkcs11Item(QListWidgetItem *item) const;
public:
Options(MainWindow *parent);
~Options();
int exec();
QListWidgetItem *addLibItem(const QString &) const;
public slots:
void on_extDNadd_clicked();
void on_extDNdel_clicked();
void on_expDNadd_clicked();
void on_expDNdel_clicked();
void on_expDNdefault_clicked();
void on_addButton_clicked(void);
void on_removeButton_clicked(void);
void on_searchPkcs11_clicked(void);
void addLib(QString);
void Pkcs11ItemChanged(QListWidgetItem *);
};
#endif