QGIS API Documentation  3.8.0-Zanzibar (11aff65)
qgsdataitemguiprovider.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdataitemguiprovider.cpp
3  --------------------------------------
4  Date : October 2018
5  Copyright : (C) 2018 by Nyall Dawson
6  Email : nyall dot dawson at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #include "qgsdataitemguiprovider.h"
17 
18 //
19 // QgsDataItemGuiContext
20 //
21 
23 {
24  return mMessageBar;
25 }
26 
28 {
29  mMessageBar = messageBar;
30 }
31 
32 
33 //
34 // QgsDataItemGuiProvider
35 //
36 
37 void QgsDataItemGuiProvider::populateContextMenu( QgsDataItem *, QMenu *, const QList<QgsDataItem *> &, QgsDataItemGuiContext )
38 {
39 
40 }
41 
43 {
44  return false;
45 }
QgsMessageBar * messageBar() const
Returns the associated message bar.
virtual void populateContextMenu(QgsDataItem *item, QMenu *menu, const QList< QgsDataItem *> &selectedItems, QgsDataItemGuiContext context)
Called when the given context menu is being populated for the given item, allowing the provider to ad...
A bar for displaying non-blocking messages to the user.
Definition: qgsmessagebar.h:45
Base class for all items in the model.
Definition: qgsdataitem.h:49
Encapsulates the context in which a QgsDataItem is shown within the application GUI.
virtual bool handleDoubleClick(QgsDataItem *item, QgsDataItemGuiContext context)
Called when a user double clicks on an item.
void setMessageBar(QgsMessageBar *bar)
Sets the associated message bar.