21 #include <QVBoxLayout>
29 QVBoxLayout* mainLayout =
new QVBoxLayout;
30 mainLayout->setContentsMargins(0, 0, 0, 0);
31 mainLayout->setSpacing(0);
32 setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
33 mainLayout->addWidget(content);
34 setLayout(mainLayout);
37 QSize
sizeHint()
const {
return QSize(128, 500); }
42 , m_listView(new QListView)
46 , m_maskModel(nullptr)
47 , m_intensityDataItem(nullptr)
49 setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
50 setObjectName(QLatin1String(
"MaskEditorToolPanel"));
52 m_listView->setContextMenuPolicy(Qt::CustomContextMenu);
53 connect(
m_listView, &QListView::customContextMenuRequested,
this,
56 QVBoxLayout* mainLayout =
new QVBoxLayout;
57 mainLayout->setContentsMargins(0, 0, 0, 0);
58 mainLayout->setSpacing(0);
67 setLayout(mainLayout);
72 return QSize(128, 128);
77 return QSize(128, 128);
81 const QModelIndex& maskContainerIndex,
89 m_listView->setSelectionMode(QAbstractItemView::ExtendedSelection);
93 connect(
m_listView->selectionModel(), &QItemSelectionModel::selectionChanged,
this,
118 this->setHidden(value);
128 if (!indexes.empty())
136 const QItemSelection&)
138 if (!selected.empty())
157 QVBoxLayout* layout =
new QVBoxLayout();
158 layout->setContentsMargins(0, 0, 0, 0);
161 contentFrame->setLayout(layout);
168 cp->
setHeaderTooltip(
"List of created masks representing mask stacking order.");
172 QVBoxLayout* layout =
new QVBoxLayout();
173 layout->setContentsMargins(0, 0, 0, 0);
176 contentFrame->setLayout(layout);
187 QVBoxLayout* layout =
new QVBoxLayout();
188 layout->setContentsMargins(0, 0, 0, 0);
190 contentFrame->setLayout(layout);
#define ASSERT(condition)
Defines ComponentEditor class.
Defines ContentPane class.
Defines class IntensityDataItem.
Defines class MaskEditorPropertyPanel.
Defines class SessionModel.
Component editor for SessionItem.
void setItem(SessionItem *item)
void setHeaderTooltip(QString tooltip)
Set header tooltip.
QFrame * getContentFrame()
Get the content frame of the content pane.
void setMaximumHeight(int maxHeight)
Set the maximum height of the content pane container.
void headerClicked()
Slot that is called when the header has been triggered.
void setContainerFrameStyle(int style)
Set the container frame style.
void setup_MaskStack(AccordionWidget *accordion)
ComponentEditor * m_plotPropertyEditor
ComponentEditor * m_maskPropertyEditor
AccordionWidget * m_accordion
void setPanelHidden(bool value)
Show/Hide panel. When panel is hidden, all property editors are disabled.
void onSelectionChanged(const QItemSelection &selected, const QItemSelection &)
QSize minimumSizeHint() const
SessionModel * m_maskModel
void itemContextMenuRequest(const QPoint &point)
IntensityDataItem * m_intensityDataItem
void setMaskContext(SessionModel *model, const QModelIndex &maskContainerIndex, IntensityDataItem *intensityItem)
void onCustomContextMenuRequested(const QPoint &point)
QItemSelectionModel * selectionModel()
MaskEditorPropertyPanel(QWidget *parent=nullptr)
void setup_MaskProperties(AccordionWidget *accordion)
void setup_PlotProperties(AccordionWidget *accordion)
SessionItem * itemForIndex(const QModelIndex &index) const