VR-Engage  2.2
Loading...
Searching...
No Matches
vreTableView.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreTableView.h
7//! \ingroup vreManager
8//! \brief Custom table view for VREngage Manager
9//!
10//! This file defines the DtVreTableView class, which provides a specialized table view
11//! for displaying and editing VREngage application information in the manager interface.
12
13#pragma once
14
15#include "vreManager/export.h"
16
17#include <QTableView>
18
20namespace makVre
21{
23class DtVreModelSet;
24} // namespace makVre
25
26namespace makVrv
27{
28class DtDe;
29}
30
31//! \brief Custom table view for VREngage application information
32//!
33//! This class extends QTableView with VREngage-specific functionality, including
34//! custom delegates for role selection and spectator mode toggling, and handling
35//! of edit completion signals.
36class VREMANAGER_DLL DtVreTableView : public QTableView
37{
38 Q_OBJECT
39public:
40 //! \brief Constructor
41 //! \param parent The parent widget
42 //!
43 //! Initializes a new table view for VREngage application data with
44 //! custom delegates for role selection and spectator mode.
45 DtVreTableView(QWidget* parent = Q_NULLPTR);
46
47 //! \brief Destructor
48 //!
49 //! Cleans up resources used by the table view, including custom delegates.
50 virtual ~DtVreTableView() override;
51 //! \brief Sets the distributed environment reference
52 //! \param de The distributed environment reference
53 //!
54 //! Sets the distributed environment reference used by the table view
55 //! and its delegates for accessing simulation state information.
56 virtual void setDe(makVrv::DtDe& de);
57signals:
58 //! \brief Signal emitted when a user completes an edit operation
59 //!
60 //! This signal is emitted when the user completes an edit in the table,
61 //! allowing the manager widget to update its state accordingly.
63
64protected slots:
65 //! \brief Handles committing of editor data to the model
66 //! \param editor The editor widget containing the data to commit
67 //!
68 //! Overrides QTableView's commitData to emit the userEditComplete signal
69 //! when data is committed from an editor.
70 virtual void commitData(QWidget* editor) override;
71
72protected:
73 //! \brief Delegate for role selection columns
74 //!
75 //! Custom delegate that provides a combobox editor for role selection.
77
78 //! \brief Delegate for spectator mode columns
79 //!
80 //! Custom delegate that provides a checkbox editor for spectator mode toggling.
82
83 //! \brief Pointer to the distributed environment
84 //!
85 //! Used to access simulation state information.
86 makVrv::DtDe* myDe;
87};
Custom item delegate for spectator mode selection.
Definition spectatorItemDelegate.h:26
makVrv::DtDe * myDe
Pointer to the distributed environment.
Definition vreTableView.h:86
virtual void commitData(QWidget *editor) override
Handles committing of editor data to the model.
DtSpectatorItemDelegate * mySpectatorDelegate
Delegate for spectator mode columns.
Definition vreTableView.h:81
DtVreTableView(QWidget *parent=Q_NULLPTR)
Constructor.
virtual ~DtVreTableView() override
Destructor.
void userEditComplete()
Signal emitted when a user completes an edit operation.
virtual void setDe(makVrv::DtDe &de)
Sets the distributed environment reference.
makVre::DtRoleItemDelegate * myRoleDelegate
Delegate for role selection columns.
Definition vreTableView.h:76
Custom item delegate for role selection.
Definition roleItemDelegate.h:30
VREngage-specific model set implementation.
Definition vreModelSet.h:30
Export macros for the VREngage Manager library.
#define VREMANAGER_DLL
Platform-specific export/import macro for VREngage Manager library.
Definition export.h:28
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
Definition appLauncherComponent.h:28
makVrv::DtDe * de()
Gets the display element pointer used by the plugin.