Akonadi

agentinstancewidget.h
1 /*
2  Copyright (c) 2006-2008 Tobias Koenig <[email protected]>
3  Copyright (C) 2012-2020 Laurent Montel <[email protected]>
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 AKONADI_AGENTINSTANCEWIDGET_H
22 #define AKONADI_AGENTINSTANCEWIDGET_H
23 
24 #include "akonadiwidgets_export.h"
25 
26 #include <QWidget>
27 
28 class QAbstractItemView;
29 namespace Akonadi
30 {
31 
32 class AgentInstance;
33 class AgentFilterProxyModel;
34 
67 class AKONADIWIDGETS_EXPORT AgentInstanceWidget : public QWidget
68 {
69  Q_OBJECT
70 
71 public:
77  explicit AgentInstanceWidget(QWidget *parent = nullptr);
78 
83 
88  Q_REQUIRED_RESULT AgentInstance currentAgentInstance() const;
89 
94  Q_REQUIRED_RESULT QVector<AgentInstance> selectedAgentInstances() const;
95 
100  Q_REQUIRED_RESULT AgentFilterProxyModel *agentFilterProxyModel() const;
101 
106  Q_REQUIRED_RESULT QAbstractItemView *view() const;
107 
108 Q_SIGNALS:
115  void currentChanged(const Akonadi::AgentInstance &current, const Akonadi::AgentInstance &previous);
116 
122  void doubleClicked(const Akonadi::AgentInstance &current);
123 
130  void clicked(const Akonadi::AgentInstance &current);
131 
132 private:
133  //@cond PRIVATE
134  class Private;
135  Private *const d;
136 
137  Q_PRIVATE_SLOT(d, void currentAgentInstanceChanged(const QModelIndex &, const QModelIndex &))
138  Q_PRIVATE_SLOT(d, void currentAgentInstanceClicked(const QModelIndex &currentIndex))
139  //@endcond
140 };
141 
142 }
143 
144 #endif
Represents one agent instance and takes care of communication with it.
Provides a widget that lists all available agent instances.
Helper integration between Akonadi and Qt.
A proxy model for filtering AgentType or AgentInstance.
A representation of an agent instance.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue May 26 2020 22:46:17 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.