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

liblancelot

  • sources
  • kde-4.14
  • workspace
  • kdeplasma-addons
  • libs
  • lancelot
  • models
ActionListModel.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007, 2008, 2009, 2010 Ivan Cukic <ivan.cukic(at)kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser/Library General Public License version 2,
6  * or (at your option) any later version, as published by the Free
7  * Software Foundation
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser/Library General Public License for more details
13  *
14  * You should have received a copy of the GNU Lesser/Library General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef LANCELOT_ACTION_LIST_MODEL_H
21 #define LANCELOT_ACTION_LIST_MODEL_H
22 
23 #include <QtCore/QMimeData>
24 #include <QtCore/QString>
25 #include <QtGui/QIcon>
26 #include <QtGui/QAction>
27 
28 #include <lancelot/lancelot_export.h>
29 #include <lancelot/widgets/PopupMenu.h>
30 
31 namespace Lancelot
32 {
33 
37 class LANCELOT_EXPORT ActionListModel: public QObject {
38  Q_OBJECT
39 public:
43  ActionListModel();
44 
48  virtual ~ActionListModel();
49 
54  virtual QString title(int index) const = 0;
55 
60  virtual QString description(int index) const;
61 
66  virtual QIcon icon(int index) const;
67 
72  virtual QMimeData * mimeData(int index) const;
73 
79  virtual void dataDragFinished(int index, Qt::DropAction action);
80 
87  virtual bool dataDropAvailable(int where, const QMimeData * mimeData);
88 
94  virtual void dataDropped(int where, const QMimeData * mimeData);
95 
101  virtual void setDropActions(int index, Qt::DropActions & actions, Qt::DropAction & defaultAction);
102 
107  virtual bool isCategory(int index) const;
108 
112  virtual int size() const = 0;
113 
118  virtual bool hasContextActions(int index) const;
119 
125  virtual void setContextActions(int index, Lancelot::PopupMenu * menu);
126 
132  virtual void contextActivate(int index, QAction * context);
133 
134  virtual QString selfTitle() const;
135  virtual QString selfShortTitle() const;
136  virtual QIcon selfIcon() const;
137  virtual QMimeData * selfMimeData() const;
138 
139 public Q_SLOTS:
144  void activated(int index);
145 
146 Q_SIGNALS:
151  void itemActivated(int index);
152 
158  void updated();
159 
164  void itemInserted(int index);
165 
170  void itemDeleted(int index);
171 
176  void itemAltered(int index);
177 
178 protected:
184  virtual void activate(int index);
185 };
186 
187 } // namespace Lancelot
188 
189 #endif /* LANCELOT_ACTION_LIST_MODEL_H */
190 
Lancelot::ActionListModel
This class represents a list data model.
Definition: ActionListModel.h:37
QMimeData
lancelot_export.h
QObject
LANCELOT_EXPORT
#define LANCELOT_EXPORT
Definition: lancelot_export.h:32
QString
Lancelot::PopupMenu
The popup menu class.
Definition: PopupMenu.h:37
Qt::DropActions
typedef DropActions
QAction
PopupMenu.h
QIcon
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:43:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

liblancelot

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

workspace API Reference

Skip menu "workspace API Reference"
  • kdeplasma-addons
  •       GroupingDesktop
  •     liblancelot

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