• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

kpimidentities

signature.h

00001 /*
00002     Copyright (c) 2002-2004 Marc Mutz <mutz@kde.org>
00003     Copyright (c) 2007 Tom Albers <tomalbers@kde.nl>
00004     Author: Stefan Taferner <taferner@kde.org>
00005 
00006     This library is free software; you can redistribute it and/or modify it
00007     under the terms of the GNU Library General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or (at your
00009     option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful, but WITHOUT
00012     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00013     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00014     License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to the
00018     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019     02110-1301, USA.
00020 */
00021 
00022 #ifndef KPIMIDENTITIES_SIGNATURE_H
00023 #define KPIMIDENTITIES_SIGNATURE_H
00024 
00025 #include "kpimidentities_export.h"
00026 
00027 #include <kdemacros.h>
00028 
00029 #include <QtCore/QString>
00030 #include <QtCore/QStringList>
00031 #include <QtCore/QList>
00032 #include <QtCore/QHash>
00033 #include <QtCore/QVariant>
00034 
00035 namespace KPIMIdentities
00036 {
00037   class Signature;
00038 }
00039 class KConfigGroup;
00040 
00041 namespace KPIMIdentities
00042 {
00043 
00044   KPIMIDENTITIES_EXPORT QDataStream &operator<<
00045   ( QDataStream &stream, const KPIMIdentities::Signature &sig );
00046   KPIMIDENTITIES_EXPORT QDataStream &operator>>
00047   ( QDataStream &stream, KPIMIdentities::Signature &sig );
00048 
00053   class KPIMIDENTITIES_EXPORT Signature
00054   {
00055       friend class Identity;
00056 
00057       friend KPIMIDENTITIES_EXPORT QDataStream &operator<< ( QDataStream &stream, const Signature &sig );
00058       friend KPIMIDENTITIES_EXPORT QDataStream &operator>> ( QDataStream &stream, Signature &sig );
00059 
00060     public:
00062       enum Type {
00063         Disabled = 0,
00064         Inlined = 1,
00065         FromFile = 2,
00066         FromCommand = 3
00067       };
00068 
00070       bool operator== ( const Signature &other ) const;
00071 
00073       Signature();
00075       Signature( const QString &text );
00077       Signature( const QString &url, bool isExecutable );
00078 
00080       QString rawText( bool *ok=0 ) const;
00081 
00084       QString withSeparator( bool *ok=0 ) const;
00085 
00088       void setText( const QString &text );
00089       QString text() const;
00090 
00093       void setUrl( const QString &url, bool isExecutable=false );
00094       QString url() const;
00095 
00097       Type type() const;
00098       void setType( Type type );
00099 
00105       void setInlinedHtml( bool isHtml );
00106 
00111       bool isInlinedHtml() const;
00112 
00113     protected:
00114       void writeConfig( KConfigGroup &config ) const;
00115       void readConfig( const KConfigGroup &config );
00116 
00117     private:
00118       QString textFromFile( bool *ok ) const;
00119       QString textFromCommand( bool *ok ) const;
00120 
00121       QString mUrl;
00122       QString mText;
00123       Type    mType;
00124       bool mInlinedHtml;
00125   };
00126 
00127 }
00128 
00129 #endif /*kpim_signature_h*/

kpimidentities

Skip menu "kpimidentities"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.7.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal