#pragma once#include<memory>// Qt includes#include<QStyledItemDelegate>namespaceshapeworks{classLandmarkItemDelegatePrivate;classLandmarkTableModel;// 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.classLandmarkItemDelegate:publicQStyledItemDelegate{Q_OBJECTpublic:LandmarkItemDelegate(QObject*parent=0);voidpaint(QPainter*painter,constQStyleOptionViewItem&option,constQModelIndex&index)constoverride;QWidget*createEditor(QWidget*parent,constQStyleOptionViewItem&option,constQModelIndex&index)constoverride;voidsetEditorData(QWidget*editor,constQModelIndex&index)constoverride;voidsetModelData(QWidget*editor,QAbstractItemModel*model,constQModelIndex&index)constoverride;QSizesizeHint(constQStyleOptionViewItem&option,constQModelIndex&index)constoverride;voidupdateEditorGeometry(QWidget*editor,constQStyleOptionViewItem&option,constQModelIndex&index)constoverride;voidset_button_text(std::stringbutton_text);voidset_model(std::shared_ptr<LandmarkTableModel>model);Q_SIGNALS:voidbutton_clicked(introw);privateQ_SLOTS:voidset_button_pressed(introw);voidcell_entered(QModelIndexindex);private:std::shared_ptr<LandmarkItemDelegatePrivate>private_;std::shared_ptr<LandmarkTableModel>model_;};}// namespace shapeworks