Files
fmviewer3/project/fm_viewer/cfg/rm_combo_box.h
2026-02-21 17:11:31 +09:00

33 lines
802 B
C++

#ifndef RM_COMBO_BOX_H
#define RM_COMBO_BOX_H
#include <QWidget>
#include <QComboBox>
#include <QList>
#include <QHBoxLayout>
#include <QLabel>
#include "rm_value_selector.h"
class RMComboBox : public QWidget, public RMValueSelector
{
Q_OBJECT
public:
#if (USE_JSON_SETTINGS)
explicit RMComboBox(QWidget *parent,QString title, int index);
#else // USE_JSON_SETTINGS
explicit RMComboBox(QWidget *parent,QString title, QStringList items,unsigned char* value,QList<int> indexMap = QList<int>());
#endif // USE_JSON_SETTINGS
QHBoxLayout* layout;
QComboBox* comboBox;
QLabel* titleLabel;
private:
void paintEvent(QPaintEvent *pe);
signals:
void selected(int index);
private slots:
void onSelected(int index);
void onUpdateByValue();
};
#endif // RM_COMBO_BOX_H