11 #include <QMouseEvent>
23 QIcon(
":/Resources/images/svg/pqMinus.svg").pixmap(QSize(16, 16));
25 QIcon(
":/Resources/images/svg/pqPlus.svg").pixmap(QSize(16, 16));
30 #if defined(Q_WS_WIN) || defined(Q_OS_WIN)
31 setFrameShadow(QFrame::Sunken);
39 void cvExpanderButton::setupUi() {
41 setFrameShape(QFrame::StyledPanel);
42 setFrameShadow(QFrame::Raised);
46 m_layout =
new QHBoxLayout(
this);
47 m_layout->setContentsMargins(6, 4, 6, 4);
48 m_layout->setSpacing(6);
51 m_iconLabel =
new QLabel(
this);
53 m_layout->addWidget(m_iconLabel, 0);
56 m_textLabel =
new QLabel(
this);
57 m_textLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Preferred);
58 QFont font = m_textLabel->font();
60 m_textLabel->setFont(font);
61 m_layout->addWidget(m_textLabel, 1);
66 setCursor(Qt::PointingHandCursor);
73 void cvExpanderButton::updateIcon() {
75 m_iconLabel->setPixmap(m_checked ? m_checkedPixmap : m_uncheckedPixmap);
96 m_textLabel->setText(
text);
102 return m_textLabel ? m_textLabel->text() : QString();
107 if (evt->button() == Qt::LeftButton && evt->buttons() == Qt::LeftButton) {
114 if (m_pressed && evt->button() == Qt::LeftButton) {
Tensor Minimum(const Tensor &input, const Tensor &other)
Computes the element-wise minimum of input and other. The tensors must have same data type and device...