• 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
ActionTreeModelProxy.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_TREE_MODEL_PROXY_H
21 #define LANCELOT_ACTION_TREE_MODEL_PROXY_H
22 
23 #include <lancelot/lancelot_export.h>
24 #include <lancelot/models/ActionTreeModel.h>
25 #include <lancelot/models/ActionListModel.h>
26 
27 namespace Lancelot
28 {
29 
30 class LANCELOT_EXPORT ActionTreeModelProxy: public ActionTreeModel {
31  Q_OBJECT
32 public:
33  explicit ActionTreeModelProxy(ActionListModel * model,
34  QString title = QString(), QIcon icon = QIcon());
35  ~ActionTreeModelProxy();
36 
37  ActionListModel * model() const;
38 
39  // ActionTreeModel
40  L_Override ActionTreeModel * child(int index);
41  L_Override QString selfTitle() const;
42  L_Override QIcon selfIcon() const;
43 
44  // ActionListModel
45  L_Override QString title(int index) const;
46  L_Override QString description(int index) const;
47  L_Override QIcon icon(int index) const;
48  L_Override bool isCategory(int index) const;
49  L_Override bool hasContextActions(int index) const;
50  L_Override void setContextActions(int index, Lancelot::PopupMenu * menu);
51  L_Override void contextActivate(int index, QAction * context);
52  L_Override QMimeData * mimeData(int index) const;
53  L_Override void setDropActions(int index,
54  Qt::DropActions & actions, Qt::DropAction & defaultAction);
55  L_Override bool dataDropAvailable(int where, const QMimeData * mimeData);
56  L_Override void dataDropped(int where, const QMimeData * mimeData);
57  L_Override void dataDragFinished(int index, Qt::DropAction action);
58 
59  L_Override int size() const;
60 
61 Q_SIGNALS:
62  void itemActivated(int index);
63 
64  void updated();
65  void itemInserted(int index);
66  void itemDeleted(int index);
67  void itemAltered(int index);
68 
69 protected:
70  L_Override void activate(int index);
71 
72 private:
73  class Private;
74  Private * const d;
75 };
76 
77 } // namespace Lancelot
78 
79 #endif /* LANCELOT_ACTION_TREE_MODEL_PROXY_H */
80 
Lancelot::ActionTreeModelProxy
Definition: ActionTreeModelProxy.h:30
Lancelot::ActionListModel
This class represents a list data model.
Definition: ActionListModel.h:37
QMimeData
L_Override
#define L_Override
Definition: lancelot_export.h:41
lancelot_export.h
LANCELOT_EXPORT
#define LANCELOT_EXPORT
Definition: lancelot_export.h:32
ActionListModel.h
QString
Lancelot::ActionTreeModel
Definition: ActionTreeModel.h:30
Lancelot::PopupMenu
The popup menu class.
Definition: PopupMenu.h:37
Qt::DropActions
typedef DropActions
QAction
ActionTreeModel.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