#ifndef ALLOWLOCATION_H
#define ALLOWLOCATION_H

#include <QObject>
#include <QDialog>
#include <QLabel>
#include <QButtonGroup>
#include <QRadioButton>
#include <QPushButton>
#include <QDebug>
#include "controller/Interaction.h"
#include "global/viewvar.h"
class AllowLocation : public QDialog
{
    Q_OBJECT
public:
    explicit AllowLocation(QWidget *parent = nullptr);

private:
    QLabel *m_label;
    QLabel *m_text;
    QButtonGroup *m_allowLocation;
    QRadioButton *m_allow;
    QRadioButton *m_noAllow;
    QLabel *m_allowText;
    QLabel *m_noAllowText;
    QPushButton *m_cancel;
    QPushButton *m_certain;

    void initLayout();
    void initConnect();

private slots:
    void rejectLocate();
    void allowLocate();

signals:
    void allowLocationYes();
    void setMenuModuleAllowLocationYes();
};

#endif // ALLOWLOCATION_H
