PageRenderTime 13ms CodeModel.GetById 9ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/guitone-1.0rc5/src/view/widgets/CertListBrowser.h

#
C Header | 48 lines | 23 code | 8 blank | 17 comment | 0 complexity | c973ce355fec0e62f6d38536404608c7 MD5 | raw file
Possible License(s): GPL-3.0
 1/***************************************************************************
 2 *   Copyright (C) 2010 by Thomas Keller                                   *
 3 *   me@thomaskeller.biz                                                   *
 4 *                                                                         *
 5 *   This program is free software; you can redistribute it and/or modify  *
 6 *   it under the terms of the GNU General Public License as published by  *
 7 *   the Free Software Foundation, either version 3 of the License, or     *
 8 *   (at your option) any later version.                                   *
 9 *                                                                         *
10 *   This program is distributed in the hope that it will be useful,       *
11 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13 *   GNU General Public License for more details.                          *
14 *                                                                         *
15 *   You should have received a copy of the GNU General Public License     *
16 *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
17 ***************************************************************************/
18
19#ifndef CERT_LIST_BROWSER_H
20#define CERT_LIST_BROWSER_H
21
22#include "vocab.h"
23#include "CertList.h"
24
25#include <QTextBrowser>
26#include <QMap>
27
28class CertListBrowser : public QTextBrowser
29{
30    Q_OBJECT
31public:
32    CertListBrowser(QWidget *);
33    ~CertListBrowser();
34    void setKeyMap(const QMap<QString, QString> &);
35
36public slots:
37    void setCertList(const CertList &);
38
39private:
40    QMap<QString, QString> keyMap;
41    QMap<QString, QString> nameI18NMap;
42
43    enum format_type { none, table, definition };
44    QList<QPair<QString, format_type> > certFormat;
45    int certsPerTableRow;
46};
47
48#endif