home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kleo / keyapprovaldialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-09-10  |  2.8 KB  |  93 lines

  1. /*  -*- c++ -*-
  2.     keyselectiondialog.h
  3.  
  4.     This file is part of libkleopatra, the KDE keymanagement library
  5.     Copyright (c) 2004 KlarΣlvdalens Datakonsult AB
  6.  
  7.     Based on kpgpui.h
  8.     Copyright (C) 2001,2002 the KPGP authors
  9.     See file libkdenetwork/AUTHORS.kpgp for details
  10.  
  11.     Libkleopatra is free software; you can redistribute it and/or
  12.     modify it under the terms of the GNU General Public License as
  13.     published by the Free Software Foundation; either version 2 of the
  14.     License, or (at your option) any later version.
  15.  
  16.     Libkleopatra is distributed in the hope that it will be useful,
  17.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  19.     General Public License for more details.
  20.  
  21.     You should have received a copy of the GNU General Public License
  22.     along with this program; if not, write to the Free Software
  23.     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  24.  
  25.     In addition, as a special exception, the copyright holders give
  26.     permission to link the code of this program with any edition of
  27.     the Qt library by Trolltech AS, Norway (or with modified versions
  28.     of Qt that use the same license as Qt), and distribute linked
  29.     combinations including the two.  You must obey the GNU General
  30.     Public License in all respects for all of the code used other than
  31.     Qt.  If you modify this file, you may extend this exception to
  32.     your version of the file, but you are not obligated to do so.  If
  33.     you do not wish to do so, delete this exception statement from
  34.     your version.
  35. */
  36.  
  37. #ifndef __KLEO_KEYAPPROVALDIALOG_H__
  38. #define __KLEO_KEYAPPROVALDIALOG_H__
  39.  
  40. #include <kleo/enum.h>
  41.  
  42. #include <kdialogbase.h>
  43. #include <kdepimmacros.h>
  44.  
  45. #include <kpgpkey.h> // for EncryptPref
  46. #include <gpgmepp/key.h>
  47.  
  48. #include <vector>
  49.  
  50. namespace GpgME {
  51.   class Key;
  52. }
  53.  
  54. class QStringList;
  55.  
  56. namespace Kleo {
  57.  
  58.   class KDE_EXPORT KeyApprovalDialog : public KDialogBase {
  59.     Q_OBJECT
  60.   public:
  61.     struct Item {
  62.       Item() : pref( UnknownPreference ) {}
  63.       Item( const QString & a, const std::vector<GpgME::Key> & k,
  64.         EncryptionPreference p=UnknownPreference )
  65.     : address( a ), keys( k ), pref( p ) {}
  66.       QString address;
  67.       std::vector<GpgME::Key> keys;
  68.       EncryptionPreference pref;
  69.     };
  70.  
  71.     KeyApprovalDialog( const std::vector<Item> & recipients,
  72.                const std::vector<GpgME::Key> & sender,
  73.                QWidget * parent=0, const char * name=0,
  74.                        bool modal=true );
  75.     ~KeyApprovalDialog();
  76.  
  77.     std::vector<Item> items() const;
  78.     std::vector<GpgME::Key> senderKeys() const;
  79.  
  80.     bool preferencesChanged() const;
  81.  
  82.   private slots:
  83.     void slotPrefsChanged();
  84.  
  85.   private:
  86.     class Private;
  87.     Private * d;
  88.   };
  89.  
  90. } // namespace Kleo
  91.  
  92. #endif // __KLEO_KEYAPPROVALDIALOG_H__
  93.