21#include <QStyledItemDelegate>
86 const QStyleOptionViewItem& option);
98 const QStyleOptionViewItem& option);
116 const QIcon& entityIcon);
139 const QStyleOptionViewItem& option,
140 const QModelIndex& index)
const override;
147 const QStyleOptionViewItem& option,
148 const QModelIndex& index)
const override;
158 QAbstractItemModel* model,
159 const QStyleOptionViewItem& option,
160 const QModelIndex& index)
override;
188 const QStyleOptionViewItem& option,
189 const QModelIndex& index)
const;
static QPixmap neutralStatusPixmap(int size, const QColor &color)
Builds a neutral-state status-circle pixmap that geometrically matches the status circles painted on ...
static int nameLeftEdge(const QRect &rowRect, const QStyleOptionViewItem &option)
Returns the x-coordinate of the left edge of the station-name text.
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override
Returns the preferred size for a station list item.
void setSpectatorModeDisabledIcon(const QIcon &icon)
Sets the icon used for the spectator mode toggle button (spectator inactive)
QRect spectatorButtonRect(const QStyleOptionViewItem &option, const QModelIndex &index) const
Computes the bounding rect of the spectator mode toggle button.
QRect statusIndicatorRect(const QStyleOptionViewItem &option) const
Computes the bounding rect of the status indicator circle.
void statusIndicatorClicked(QString stationId)
Emitted when the status indicator circle is clicked.
static void paintAssignmentIndicator(QPainter *painter, const QRect &rect, StationAssignmentStatus status, const QIcon &entityIcon)
Paints the assignment-indicator icon at the given rect.
static constexpr int kStatusIconSize
Width of the status icon drawn in each station card.
Definition stationItemDelegate.h:50
QIcon mySpectatorModeDisabledIcon
Icon shown when spectator mode is inactive.
Definition stationItemDelegate.h:192
DtStationItemDelegate(QObject *parent=nullptr)
Constructor.
virtual bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override
Handles mouse events for the embedded spectator mode toggle button.
void spectatorToggleClicked(QString stationId)
Emitted when the spectator mode toggle button is clicked.
virtual ~DtStationItemDelegate() override
Destructor.
static QRect assignmentIndicatorRectInRow(const QRect &rowRect, const QStyleOptionViewItem &option)
Returns the bounding rect of the assignment-indicator within a row.
void setSpectatorModeIcon(const QIcon &icon)
Sets the icon used for the spectator mode toggle button (spectator active)
static constexpr int kCardHPadding
Left padding inside each station card (pixels from item left edge)
Definition stationItemDelegate.h:47
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Paints a station list item with two-line layout.
static constexpr int kIconTextGap
Gap between status icon and station name text.
Definition stationItemDelegate.h:59
QIcon mySpectatorModeIcon
Icon shown when spectator mode is active.
Definition stationItemDelegate.h:191
Export macros for the VREngage Manager library.
#define VREMANAGER_DLL
Platform-specific export/import macro for VREngage Manager library.
Definition export.h:28
!
Definition glsVreMessageUtil.h:50
StationAssignmentStatus
Assignment status for a station.
Definition vreStationListModel.h:88
List model for VR-Engage station display.