porymap/include/ui/noscrollcombobox.h

28 lines
665 B
C
Raw Normal View History

#ifndef NOSCROLLCOMBOBOX_H
#define NOSCROLLCOMBOBOX_H
#include <QComboBox>
class NoScrollComboBox : public QComboBox
{
Q_OBJECT
public:
explicit NoScrollComboBox(QWidget *parent = nullptr);
void wheelEvent(QWheelEvent *event);
void setTextItem(const QString &text);
2023-08-23 07:32:32 +01:00
void setNumberItem(int value);
2023-12-19 18:42:07 +00:00
void setHexItem(uint32_t value);
2024-07-12 19:05:37 +01:00
void setClearButtonEnabled(bool enabled);
void setEditable(bool editable);
void setLineEdit(QLineEdit *edit);
void setFocusedScrollingEnabled(bool enabled);
private:
2023-08-23 07:32:32 +01:00
void setItem(int index, const QString &text);
bool focusedScrollingEnabled = true;
};
#endif // NOSCROLLCOMBOBOX_H