API Documentation
Loading...
Searching...
No Matches
ContextMenuManager.h
Go to the documentation of this file.
1#pragma once
2#include <NDEVR/PopupInfo.h>
3#include <NDEVR/SelectionInfo.h>
4#include <QMenu>
5namespace NDEVR
6{
31 class QTModelManager;
33 {
34 public:
35 virtual void addContextMenuItems(QTModelManager* manager, QMenu& menu, const Buffer<UUID>& ids, const SelectionInfo& cursor_location) = 0;
36 virtual void contextMenu(QTModelManager* manager, QAction* action, const Buffer<UUID>& ids, const SelectionInfo& cursor_location, PopupInfo origin) = 0;
37 };
39 {
40 public:
42 virtual void addContextMenuItems(QMenu& menu, const Buffer<UUID>& ids = Buffer<UUID>(), const SelectionInfo& selection_info = SelectionInfo());
43 virtual void contextMenu(QAction* action, const Buffer<UUID>& ids, const SelectionInfo& selection_info = SelectionInfo(), PopupInfo origin = PopupInfo());
44 virtual void addContextMenuCallback(const UUID& id, ContextMenuCallback* callback);
45 virtual void removeContextMenuCallback(const UUID& id);
46 virtual bool hasContextMenuCallback(const UUID& id) const;
47 virtual ContextMenuActions actionType(QAction* action);
48 protected:
51 };
52}
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:59
Definition ContextMenuManager.h:33
virtual void contextMenu(QTModelManager *manager, QAction *action, const Buffer< UUID > &ids, const SelectionInfo &cursor_location, PopupInfo origin)=0
virtual void addContextMenuItems(QTModelManager *manager, QMenu &menu, const Buffer< UUID > &ids, const SelectionInfo &cursor_location)=0
Definition ContextMenuManager.h:39
virtual void addContextMenuCallback(const UUID &id, ContextMenuCallback *callback)
virtual void addContextMenuItems(QMenu &menu, const Buffer< UUID > &ids=Buffer< UUID >(), const SelectionInfo &selection_info=SelectionInfo())
Dictionary< UUID, ContextMenuCallback * > m_custom_context_callbacks
Definition ContextMenuManager.h:49
virtual bool hasContextMenuCallback(const UUID &id) const
virtual void removeContextMenuCallback(const UUID &id)
virtual void contextMenu(QAction *action, const Buffer< UUID > &ids, const SelectionInfo &selection_info=SelectionInfo(), PopupInfo origin=PopupInfo())
virtual ContextMenuActions actionType(QAction *action)
ContextMenuManager(QTModelManager *manager)
QTModelManager * m_manager
Definition ContextMenuManager.h:50
A hash-based key-value store, useful for quick associative lookups.
Definition Dictionary.h:59
Definition QTModelManager.h:94
Responsible for turning a user interaction into a selection within a DesignObjectLookup.
Definition Selector.h:50
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:62
Definition ACIColor.h:37
ContextMenuActions
Definition ContextMenuManager.h:8
Definition PopupInfo.h:10