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

mailcommon

  • sources
  • kde-4.12
  • kdepim
  • mailcommon
  • snippets
snippetsmanager.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
3  Author Tobias Koenig <tokoe@kdab.com>
4 
5  This library is free software; you can redistribute it and/or modify it
6  under the terms of the GNU Library General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or (at your
8  option) any later version.
9 
10  This library is distributed in the hope that it will be useful, but WITHOUT
11  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13  License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to the
17  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  02110-1301, USA.
19 */
20 
21 #ifndef MAILCOMMON_SNIPPETSMANAGER_H
22 #define MAILCOMMON_SNIPPETSMANAGER_H
23 
24 #include "mailcommon_export.h"
25 
26 #include <QObject>
27 
28 class KActionCollection;
29 
30 class QAbstractItemModel;
31 class QAction;
32 class QItemSelectionModel;
33 
34 namespace MailCommon {
35 
36 class MAILCOMMON_EXPORT SnippetsManager : public QObject
37 {
38  Q_OBJECT
39 
40  Q_PROPERTY( QAbstractItemModel *model READ model )
41  Q_PROPERTY( QItemSelectionModel *selectionModel READ selectionModel )
42  Q_PROPERTY( QAction *addSnippetAction READ addSnippetAction )
43  Q_PROPERTY( QAction *editSnippetAction READ editSnippetAction )
44  Q_PROPERTY( QAction *deleteSnippetAction READ deleteSnippetAction )
45  Q_PROPERTY( QAction *addSnippetGroupAction READ addSnippetGroupAction )
46  Q_PROPERTY( QAction *editSnippetGroupAction READ editSnippetGroupAction )
47  Q_PROPERTY( QAction *deleteSnippetGroupAction READ deleteSnippetGroupAction )
48  Q_PROPERTY( QAction *insertSnippetAction READ insertSnippetAction )
49 
50  Q_PROPERTY( bool snippetGroupSelected READ snippetGroupSelected )
51  Q_PROPERTY( QString selectedName READ selectedName )
52 
53 public:
61  explicit SnippetsManager( KActionCollection *actionCollection,
62  QObject *parent = 0, QWidget *widget = 0 );
63 
67  ~SnippetsManager();
68 
89  void setEditor( QObject *editor, const char *insertSnippetMethod, const char *dropSignal );
90 
94  QAbstractItemModel *model() const;
95 
100  QItemSelectionModel *selectionModel() const;
101 
105  QAction *addSnippetAction() const;
106 
110  QAction *editSnippetAction() const;
111 
115  QAction *deleteSnippetAction() const;
116 
120  QAction *addSnippetGroupAction() const;
121 
125  QAction *editSnippetGroupAction() const;
126 
130  QAction *deleteSnippetGroupAction() const;
131 
135  QAction *insertSnippetAction() const;
136 
140  bool snippetGroupSelected() const;
141 
145  QString selectedName() const;
146 
147 private:
148  //@cond PRIVATE
149  class Private;
150  Private *const d;
151 
152  Q_PRIVATE_SLOT( d, void selectionChanged() )
153  Q_PRIVATE_SLOT( d, void addSnippet() )
154  Q_PRIVATE_SLOT( d, void editSnippet() )
155  Q_PRIVATE_SLOT( d, void deleteSnippet() )
156  Q_PRIVATE_SLOT( d, void addSnippetGroup() )
157  Q_PRIVATE_SLOT( d, void editSnippetGroup() )
158  Q_PRIVATE_SLOT( d, void deleteSnippetGroup() )
159  Q_PRIVATE_SLOT( d, void insertSelectedSnippet() )
160  Q_PRIVATE_SLOT( d, void insertActionSnippet() )
161  Q_PRIVATE_SLOT( d, void dndDone() )
162  //@endcond
163 };
164 
165 }
166 
167 #endif
QWidget
QObject
mailcommon_export.h
QAbstractItemModel
MAILCOMMON_EXPORT
#define MAILCOMMON_EXPORT
Definition: mailcommon_export.h:35
MailCommon::SnippetsManager
Definition: snippetsmanager.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailcommon

Skip menu "mailcommon"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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