• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

kpimidentities

  • kpimidentities
signatureconfigurator.h
1 /* -*- c++ -*-
2  Copyright 2008 Thomas McGuire <Thomas.McGuire@gmx.net>
3  Copyright 2008 Edwin Schepers <yez@familieschepers.nl>
4  Copyright 2008 Tom Albers <tomalbers@kde.nl>
5  Copyright 2004 Marc Mutz <mutz@kde.org>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Lesser General Public
9  License as published by the Free Software Foundation; either
10  version 2.1 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public
18  License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef KPIMIDENTITIES_SIGNATURECONFIGURATOR_H
22 #define KPIMIDENTITIES_SIGNATURECONFIGURATOR_H
23 
24 #include "kpimidentities_export.h"
25 #include "signature.h" // for Signature::Type
26 #include <QWidget>
27 
28 using KPIMIdentities::Signature;
29 
30 class QCheckBox;
31 class KComboBox;
32 class KUrlRequester;
33 class KLineEdit;
34 class KToolBar;
35 class KRichTextWidget;
36 class QString;
37 class QPushButton;
38 class QTextEdit;
39 class QTextCharFormat;
40 
41 namespace KPIMIdentities {
42 
48 class KPIMIDENTITIES_EXPORT SignatureConfigurator : public QWidget
49 {
50  Q_OBJECT
51  public:
55  explicit SignatureConfigurator( QWidget * parent = 0 );
56 
60  virtual ~SignatureConfigurator();
61 
65  enum ViewMode { ShowCode, ShowHtml };
66 
70  bool isSignatureEnabled() const;
71 
75  void setSignatureEnabled( bool enable );
76 
81  Signature::Type signatureType() const;
82 
86  void setSignatureType( Signature::Type type );
87 
92  QString inlineText() const;
93 
97  void setInlineText( const QString & text );
98 
103  QString fileURL() const;
104 
109  void setFileURL( const QString & url );
110 
115  QString commandURL() const;
116 
120  void setCommandURL( const QString & url );
121 
126  Signature signature() const;
127 
131  void setSignature( const Signature & sig );
132 
141  void setImageLocation( const QString &path );
142 
151  void setImageLocation( const Identity &identity );
152 
153  private:
154  void toggleHtmlBtnState( ViewMode state );
155 
156  void initHtmlState();
157 
158  // Returns the current text of the textedit as HTML code, but strips
159  // unnecessary tags Qt inserts
160  QString asCleanedHTML() const;
161 
162  protected Q_SLOTS:
163  void slotEnableEditButton( const QString & );
164  void slotEdit();
165  void slotSetHtml();
166 
167  protected:
168 
169  // TODO: KDE5: BIC: Move to private class!
170  QCheckBox * mEnableCheck;
171  QCheckBox * mHtmlCheck;
172  KComboBox * mSourceCombo;
173  KUrlRequester * mFileRequester;
174  QPushButton * mEditButton;
175  KLineEdit * mCommandEdit;
176  KToolBar * mEditToolBar;
177  KToolBar * mFormatToolBar;
178  KRichTextWidget * mTextEdit; // Grmbl, why is this not in the private class?
179  // This is a KPIMTextEdit::TextEdit, really.
180 
181  private:
182  //@cond PRIVATE
183  class Private;
184  Private *const d;
185  //@endcond
186 };
187 
188 }
189 
190 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:30:05 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kpimidentities

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

kdepimlibs-4.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal