~indicator-applet-developers/qmenumodel/trunk

« back to all changes in this revision

Viewing changes to libqmenumodel/src/unitymenumodelevents.h

  • Committer: Bileto Bot
  • Author(s): Albert Astals Cid
  • Date: 2017-03-16 16:55:18 UTC
  • mfrom: (128.1.3 batch_menu_adds)
  • Revision ID: ci-train-bot@canonical.com-20170316165518-if8jh31hvmj735d6
Batch add and removes into the model

Works much better with Qt Quick views to have all the insert/removes at once (LP: #1666701)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#define UNITYMENUMODELEVENTS_H
22
22
 
23
23
#include <QEvent>
 
24
#include <glib.h>
24
25
 
25
26
typedef struct _GtkMenuTrackerItem GtkMenuTrackerItem;
26
27
 
39
40
{
40
41
public:
41
42
    static const QEvent::Type eventType;
42
 
    UnityMenuModelAddRowEvent(GtkMenuTrackerItem *item, int position);
 
43
    UnityMenuModelAddRowEvent(GPtrArray *_items, int position);
43
44
    ~UnityMenuModelAddRowEvent();
44
45
 
45
 
    GtkMenuTrackerItem *item;
 
46
    GPtrArray *items;
46
47
    int position;
47
48
};
48
49
 
51
52
{
52
53
public:
53
54
    static const QEvent::Type eventType;
54
 
    UnityMenuModelRemoveRowEvent(int position);
 
55
    UnityMenuModelRemoveRowEvent(int position, int nItems);
55
56
 
56
57
    int position;
 
58
    int nItems;
57
59
};
58
60
 
59
61
/* Event for a row data change for unitymenumodel */