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

kmail

  • sources
  • kde-4.12
  • kdepim
  • kmail
foldershortcutactionmanager.h
Go to the documentation of this file.
1 /* Copyright 2010 Thomas McGuire <mcguire@kde.org>
2 
3  This program is free software; you can redistribute it and/or
4  modify it under the terms of the GNU General Public License as
5  published by the Free Software Foundation; either version 2 of
6  the License or (at your option) version 3 or any later version
7  accepted by the membership of KDE e.V. (or its successor approved
8  by the membership of KDE e.V.), which shall act as a proxy
9  defined in Section 14 of version 3 of the license.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 #ifndef FOLDERSHORTCUTACTIONMANAGER_H
20 #define FOLDERSHORTCUTACTIONMANAGER_H
21 
22 #include "kmail_export.h"
23 
24 #include <Akonadi/Entity>
25 #include <Akonadi/Collection>
26 
27 #include <QMap>
28 #include <QModelIndex>
29 #include <QObject>
30 
31 class QAction;
32 
33 class KActionCollection;
34 
35 namespace KMail {
36 
37 class FolderShortcutCommand : public QObject
38 {
39  Q_OBJECT
40 
41 public:
42  FolderShortcutCommand( QWidget* mainwidget, const Akonadi::Collection & col );
43  ~FolderShortcutCommand();
44 
45 public slots:
46  void start();
50  void setAction( QAction* );
51 
52 signals:
53  void selectCollectionFolder( const Akonadi::Collection & col );
54 
55 private:
56  Akonadi::Collection mCollectionFolder;
57  QWidget *mMainWidget;
58  QAction *mAction;
59 };
60 
61 class KMAIL_EXPORT FolderShortcutActionManager : public QObject
62 {
63  Q_OBJECT
64 
65 public:
66  explicit FolderShortcutActionManager( QWidget *parent, KActionCollection *actionCollection );
67  void createActions();
68 
69 public slots:
70 
75  void shortcutChanged( const Akonadi::Collection &collection );
76 
77 private slots:
81  void slotCollectionRemoved( const Akonadi::Collection &collection );
82 
83  void slotRowsInserted( const QModelIndex &parent, int start, int end );
84 
85 private:
86  void updateShortcutsForIndex( const QModelIndex &parent, int start, int end );
87  QMap< Akonadi::Entity::Id, FolderShortcutCommand* > mFolderShortcutCommands;
88  KActionCollection *mActionCollection;
89  QWidget *mParent;
90 };
91 
92 }
93 
94 #endif
kmail_export.h
KMail::FolderShortcutCommand::selectCollectionFolder
void selectCollectionFolder(const Akonadi::Collection &col)
QWidget
QObject
KMail::FolderShortcutCommand::~FolderShortcutCommand
~FolderShortcutCommand()
Definition: foldershortcutactionmanager.cpp:48
KMail::FolderShortcutCommand::start
void start()
Definition: foldershortcutactionmanager.cpp:55
KMAIL_EXPORT
#define KMAIL_EXPORT
Definition: kmail_export.h:35
KMail::FolderShortcutActionManager
Definition: foldershortcutactionmanager.h:61
KMail::FolderShortcutCommand
Definition: foldershortcutactionmanager.h:37
KMail::FolderShortcutCommand::setAction
void setAction(QAction *)
Assign a KAction to the command which is used to trigger it.
Definition: foldershortcutactionmanager.cpp:60
KMail::FolderShortcutCommand::FolderShortcutCommand
FolderShortcutCommand(QWidget *mainwidget, const Akonadi::Collection &col)
Definition: foldershortcutactionmanager.cpp:37
QMap
Definition: kmmainwidget.h:58
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kmail

Skip menu "kmail"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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