32 lines
732 B
C++
32 lines
732 B
C++
#pragma once
|
|
#include <QWidget>
|
|
#include <QPushButton>
|
|
#include <QLabel>
|
|
#include <QPainter>
|
|
#include <QHBoxLayout>
|
|
#include <QMouseEvent>
|
|
#include <QDebug>
|
|
|
|
class ComboBoxItem : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ComboBoxItem(QWidget* parent = nullptr);
|
|
void setLabelText(QString text);
|
|
QString getLabelText();
|
|
signals:
|
|
void signalRemoveClicked(const QString& text);
|
|
void signalRemoveProperty(const QString& text);
|
|
void signalShowClicked(const QString& text);
|
|
protected:
|
|
void mousePressEvent(QMouseEvent* event);
|
|
void mouseReleaseEvent(QMouseEvent* event);
|
|
private:
|
|
bool m_mousePress;
|
|
QPushButton* m_button;
|
|
QLabel* m_label;
|
|
QPixmap* m_pixmap;
|
|
QPainter* painter;
|
|
|
|
};
|