first commit
This commit is contained in:
39
project/fm_viewer/cfg/rm_radio_buttons.h
Normal file
39
project/fm_viewer/cfg/rm_radio_buttons.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef RM_RADIO_BUTTONS_H
|
||||
#define RM_RADIO_BUTTONS_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QRadioButton>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPaintEvent>
|
||||
#include <QLabel>
|
||||
#include "rm_value_selector.h"
|
||||
|
||||
class RMRadioButtons : public QWidget, public RMValueSelector
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
#if (USE_JSON_SETTINGS)
|
||||
explicit RMRadioButtons(QWidget *parent,QString title, int object);
|
||||
explicit RMRadioButtons(QWidget *parent,QString title, int object, bool rowType);
|
||||
#else // USE_JSON_SETTINGS
|
||||
explicit RMRadioButtons(QWidget *parent,QString title, QStringList titles,unsigned char* value, QList<int> indexMap = QList<int>());
|
||||
explicit RMRadioButtons(QWidget *parent,QString title, QStringList titles,unsigned char* value, bool rowType = false,QList<int> indexMap = QList<int>());
|
||||
#endif // USE_JSON_SETTINGS
|
||||
QBoxLayout* layout;
|
||||
//QHBoxLayout* layout;
|
||||
QLabel* titleLabel;
|
||||
void setCurrentIndex(int index);
|
||||
int currentIndex();
|
||||
private:
|
||||
QList<QRadioButton*> buttons;
|
||||
void paintEvent(QPaintEvent *pe);
|
||||
|
||||
signals:
|
||||
void selected(int index);
|
||||
|
||||
private slots:
|
||||
void onSelected();
|
||||
void onUpdateByValue();
|
||||
};
|
||||
|
||||
#endif // RM_RADIO_BUTTONS_H
|
||||
Reference in New Issue
Block a user