9#ifndef MATRIXCOMBOBOX_H
10#define MATRIXCOMBOBOX_H
19#include <QApplication>
22#include <QGraphicsDropShadowEffect>
27#include <QStyleOptionComboBox>
41 QComboBox* parent =
nullptr);
53 QComboBox* parentCombo;
70 const QStringList& otherParams);
85 QStringList otherParams;
98 : QPushButton(text, parent) {
100 setMouseTracking(
true);
103 setStyleSheet(
"QPushButton {"
106 " background-color: transparent;"
109 "QPushButton:hover {"
110 " background-color: rgba(0, 0, 0, 10%);"
111 " border-radius: 3px;"
115 shadowEffect =
new QGraphicsDropShadowEffect(
this);
116 shadowEffect->setBlurRadius(10);
117 shadowEffect->setColor(QColor(0, 0, 0, 80));
118 shadowEffect->setOffset(0, 0);
119 shadowEffect->setEnabled(
false);
120 setGraphicsEffect(shadowEffect);
129 if (
event->type() == QEvent::HoverEnter) {
130 shadowEffect->setEnabled(
true);
131 }
else if (
event->type() == QEvent::HoverLeave) {
132 shadowEffect->setEnabled(
false);
134 return QPushButton::event(
event);
138 QGraphicsDropShadowEffect* shadowEffect;
ComboBox with custom matrix-style popup for parameter selection.
Definition matrixcombopopup.h:57
void showPopup() override
Shows custom matrix popup instead of standard dropdown.
Definition matrixcombopopup.cpp:135
void hidePopup() override
Hides the custom popup.
Definition matrixcombopopup.cpp:158
void setParameters(const QStringList &sParams, const QStringList &otherParams)
Sets parameters to display in popup.
Definition matrixcombopopup.cpp:125
void paintEvent(QPaintEvent *event) override
Custom paint to show popup state.
Definition matrixcombopopup.cpp:167