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

kpimidentities

  • sources
  • kde-4.12
  • kdepimlibs
  • 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 
132  void setSignature( const Signature & sig );
133 
143  void setImageLocation( const QString &path );
144 
153  void setImageLocation( const Identity &identity );
154 
155  private:
156  void toggleHtmlBtnState( ViewMode state );
157 
158  void initHtmlState();
159 
160  // Returns the current text of the textedit as HTML code, but strips
161  // unnecessary tags Qt inserts
162  QString asCleanedHTML() const;
163 
164  protected Q_SLOTS:
165  void slotEnableEditButton( const QString & );
166  void slotEdit();
167  void slotSetHtml();
168 
169  protected:
170 
171  // TODO: KDE5: BIC: Move to private class!
172  QCheckBox * mEnableCheck;
173  QCheckBox * mHtmlCheck;
174  KComboBox * mSourceCombo;
175  KUrlRequester * mFileRequester;
176  QPushButton * mEditButton;
177  KLineEdit * mCommandEdit;
178  KToolBar * mEditToolBar;
179  KToolBar * mFormatToolBar;
180  KRichTextWidget * mTextEdit; // Grmbl, why is this not in the private class?
181  // This is a KPIMTextEdit::TextEdit, really.
182 
183  private:
184  //@cond PRIVATE
185  class Private;
186  Private *const d;
187  //@endcond
188 };
189 
190 }
191 
192 #endif
KPIMIdentities::SignatureConfigurator::ViewMode
ViewMode
Enum for the different viemodes.
Definition: signatureconfigurator.h:65
KPIMIdentities::Signature
Abstraction of a signature (aka "footer").
Definition: signature.h:89
KPIMIdentities::Identity
User identity information.
Definition: identity.h:82
KPIMIdentities::SignatureConfigurator
This widget gives an interface so users can edit their signature.
Definition: signatureconfigurator.h:48
KPIMIdentities::Signature::Type
Type
Type of signature (ie.
Definition: signature.h:98
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:01:12 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



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