~ubuntu-branches/ubuntu/precise/kgpg/precise

« back to all changes in this revision

Viewing changes to selectsecretkey.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-16 14:56:55 UTC
  • Revision ID: package-import@ubuntu.com-20111216145655-tryg3vy1v761c116
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *                                                                         *
 
3
 *   This program is free software; you can redistribute it and/or modify  *
 
4
 *   it under the terms of the GNU General Public License as published by  *
 
5
 *   the Free Software Foundation; either version 2 of the License, or     *
 
6
 *   (at your option) any later version.                                   *
 
7
 *                                                                         *
 
8
 ***************************************************************************/
 
9
 
 
10
#ifndef KGPGSELECTSECRETKEY_H
 
11
#define KGPGSELECTSECRETKEY_H
 
12
 
 
13
#include <KDialog>
 
14
 
 
15
class QCheckBox;
 
16
class QTableView;
 
17
 
 
18
class KComboBox;
 
19
 
 
20
class KGpgItemModel;
 
21
class SelectSecretKeyProxyModel;
 
22
 
 
23
class KgpgSelectSecretKey : public KDialog
 
24
{
 
25
    Q_OBJECT
 
26
 
 
27
public:
 
28
    /**
 
29
     * Constructor.
 
30
     * @param parent is the parent object
 
31
     * @param model pass a pointer to a KGpgItemModel that stores the keys
 
32
     * to select from
 
33
     * @param countkey set to the number of keys that you are going to sign, 0 if you are going to sign a file
 
34
     * @param allowLocal if option to sign keys locally should be offered (ignored if countkey == 0)
 
35
     * @param allowTerminal if option to sign keys in terminal should be offered (ignored if countkey > 1)
 
36
     */
 
37
    KgpgSelectSecretKey(QWidget *parent, KGpgItemModel *model, const int countkey = 0, const bool allowLocal = true, const bool allowTerminal = true);
 
38
    ~KgpgSelectSecretKey();
 
39
 
 
40
    QString getKeyID() const;
 
41
    QString getKeyMail() const;
 
42
    int getSignTrust() const;
 
43
 
 
44
    /**
 
45
     * @return true if the constructor is called with \em signkey to true
 
46
     * and if the user checked \em localsign
 
47
     * @return false otherwise
 
48
     */
 
49
    bool isLocalSign() const;
 
50
 
 
51
    /**
 
52
     * @return true if the constructor is called with \em signkey to true
 
53
     * and if the user checked \em terminalsign
 
54
     * @return false otherwise
 
55
     */
 
56
    bool isTerminalSign() const;
 
57
 
 
58
private slots:
 
59
    void slotOk();
 
60
    void slotSelectionChanged();
 
61
 
 
62
private:
 
63
    QCheckBox *m_localsign;
 
64
    QCheckBox *m_terminalsign;
 
65
 
 
66
    KComboBox *m_signtrust;
 
67
    QTableView *m_keyslist;
 
68
    SelectSecretKeyProxyModel *m_proxy;
 
69
};
 
70
 
 
71
#endif // KGPGSELECTSECRETKEY_H