Skip to content

Studio/Data/LandmarkItemDelegate.h

Namespaces

Name
shapeworks
User usage reporting (telemetry)

Classes

Name
class shapeworks::LandmarkItemDelegate

Source code

```cpp

pragma once

include

// Qt includes

include

namespace shapeworks {

class LandmarkItemDelegatePrivate; class LandmarkTableModel;

// Delegate for editing length and note columns in measurement table. Note that only one delegate // can be set per view, so this delegate handles all custom columns in the table. class LandmarkItemDelegate : public QStyledItemDelegate { Q_OBJECT

public: LandmarkItemDelegate(QObject* parent = 0);

void paint(QPainter painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override; QWidget createEditor(QWidget parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override; void setEditorData(QWidget editor, const QModelIndex& index) const override; void setModelData(QWidget editor, QAbstractItemModel model, const QModelIndex& index) const override; QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override;

void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override;

void set_button_text(std::string button_text);

void set_model(std::shared_ptr model);

Q_SIGNALS: void button_clicked(int row);

private Q_SLOTS: void set_button_pressed(int row); void cell_entered(QModelIndex index);

private: std::shared_ptr private_; std::shared_ptr model_; }; } // namespace shapeworks ```


Updated on 2026-03-31 at 16:02:11 +0000