xca/widgets/hashBox.h
Christian Hohnstaedt 6e432238e7 Generalize, simplify and unify settings management
Add settings class to access the settings table in the database
Cache values and improve database writes.
Options dialog simplified
Replace getSetting / storeSetting
Unpack option flags to rows in the settings
2018-03-10 09:04:54 +01:00

39 lines
768 B
C++

/* vi: set sw=4 ts=4:
*
* Copyright (C) 2007 - 2011 Christian Hohnstaedt.
*
* All rights reserved.
*/
#ifndef __HASH_BOX_H
#define __HASH_BOX_H
#include <QComboBox>
#include <openssl/evp.h>
class hashBox: public QComboBox
{
Q_OBJECT
private:
static int default_md;
QString wanted_md;
int backup;
int key_type;
public:
hashBox(QWidget *parent);
void setKeyType(int type);
const EVP_MD *currentHash() const;
QString currentHashName() const;
int currentHashIdx() const;
bool isInsecure() const;
void setCurrentMD(const EVP_MD *md);
void setDefaultHash();
void setupHashes(QList<int> nids);
void setupAllHashes();
void setCurrentString(QString md);
static void setDefault(QString def);
static QString getDefault();
};
#endif