#ifndef NOTICEMENU_H
#define NOTICEMENU_H

#include <QObject>
#include <QMenu>
#include <QRadioButton>
#include <QButtonGroup>
#include <QFrame>

#include "kswitchbutton.h"
using namespace kdk;

class NoticeMenu : public QMenu
{
    Q_OBJECT
public:
    NoticeMenu(QWidget *parent = nullptr);

    void initStaus(bool voiceEnable, bool detailEnable, bool showEnable, int id);
    static QFrame *setLine();
private:
    void initUi();
    void setFrame(QFrame *frame, QString str, KSwitchButton *btn);
    void setFrame(QFrame *frame, QString str, QRadioButton *btn);
    void setConnect();

private:
    KSwitchButton *mVoiceBtn = nullptr;
    KSwitchButton *mDetailBtn = nullptr;
    KSwitchButton *mShowBtn = nullptr;
    QButtonGroup *mStyleGrounp = nullptr;
    QRadioButton *mNoneBtn = nullptr;
    QRadioButton *mMutativeBtn = nullptr;
    QRadioButton *mAlwaysBtn = nullptr;

protected:
    void showEvent(QShowEvent *event);

Q_SIGNALS:
    void voiceSignals(bool checked);
    void detailSignals(bool checked);
    void showSignals(bool checked);
    void styleBtnSignals(int id);
};

#endif // NOTICEMENU_H
