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

kpimidentities

signatureconfigurator.h

00001 /*  -*- c++ -*-
00002     Copyright 2008 Thomas McGuire <Thomas.McGuire@gmx.net>
00003     Copyright 2008 Edwin Schepers <yez@familieschepers.nl>
00004     Copyright 2008 Tom Albers <tomalbers@kde.nl>
00005     Copyright 2004 Marc Mutz <mutz@kde.org>
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Lesser General Public
00009     License as published by the Free Software Foundation; either
00010     version 2.1 of the License, or (at your option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     Lesser General Public License for more details.
00016 
00017     You should have received a copy of the GNU Lesser General Public
00018     License along with this library.  If not, see <http://www.gnu.org/licenses/>.
00019 */
00020 
00021 #ifndef KPIMIDENTITIES_SIGNATURECONFIGURATOR_H
00022 #define KPIMIDENTITIES_SIGNATURECONFIGURATOR_H
00023 
00024 #include "kpimidentities_export.h"
00025 #include "signature.h" // for Signature::Type
00026 #include <QtGui/QWidget>
00027 
00028 using KPIMIdentities::Signature;
00029 
00030 class QCheckBox;
00031 class KComboBox;
00032 class KUrlRequester;
00033 class KLineEdit;
00034 class KToolBar;
00035 class KRichTextWidget;
00036 class QString;
00037 class QPushButton;
00038 class QTextEdit;
00039 class QTextCharFormat;
00040 
00041 namespace KPIMIdentities {
00042 
00048 class KPIMIDENTITIES_EXPORT SignatureConfigurator : public QWidget
00049 {
00050   Q_OBJECT
00051   public:
00055     SignatureConfigurator( QWidget * parent=0 );
00056 
00060     virtual ~SignatureConfigurator();
00061 
00065     enum ViewMode { ShowCode, ShowHtml };
00066 
00070     bool isSignatureEnabled() const;
00071 
00075     void setSignatureEnabled( bool enable );
00076 
00081     Signature::Type signatureType() const;
00082 
00086     void setSignatureType( Signature::Type type );
00087 
00092     QString inlineText() const;
00093 
00097     void setInlineText( const QString & text );
00098 
00103     QString fileURL() const;
00104 
00109     void setFileURL( const QString & url );
00110 
00115     QString commandURL() const;
00116 
00120     void setCommandURL( const QString & url );
00121 
00126     Signature signature() const;
00127 
00131     void setSignature( const Signature & sig );
00132 
00133   private:
00134     void toggleHtmlBtnState( ViewMode state );
00135 
00136     void initHtmlState();
00137 
00138     // Returns the current text of the textedit as HTML code, but strips
00139     // unnecessary tags Qt inserts
00140     QString asCleanedHTML() const;
00141 
00142   protected Q_SLOTS:
00143     void slotEnableEditButton( const QString & );
00144     void slotEdit();
00145     void slotSetHtml();
00146 
00147   protected:
00148     QCheckBox       * mEnableCheck;
00149     QCheckBox       * mHtmlCheck;
00150     KComboBox       * mSourceCombo;
00151     KUrlRequester   * mFileRequester;
00152     QPushButton     * mEditButton;
00153     KLineEdit       * mCommandEdit;
00154     KToolBar        * mEditToolBar;
00155     KToolBar        * mFormatToolBar;
00156     KRichTextWidget * mTextEdit;
00157 
00158   private:
00159     //@cond PRIVATE
00160     class Private;
00161     Private *const d;
00162     //@endcond
00163 };
00164 
00165 }
00166 
00167 #endif

kpimidentities

Skip menu "kpimidentities"
  • Main Page
  • Class Hierarchy
  • 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
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.7
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