#ifndef TRAYICON_H
#define TRAYICON_H

#include "fileSend/bluetoothfiletransferwidget.h"
#include "daemon/bluetoothdbus.h"

#include <glib.h>
#include <glib/gprintf.h>
#include <iostream>
#include <QApplication>
#include <QWidget>
#include <QSystemTrayIcon>
#include <QAction>
#include <QString>
#include <QMenu>
#include <QGSettings>
#include <QDebug>

#ifdef KYSEC
#include <kysec/libkysec.h>
#include <kysec/status.h>
#endif

using namespace std;

class TrayIcon : public QWidget
{
    Q_OBJECT

public:
    TrayIcon(QWidget *parent = nullptr);
    ~TrayIcon();
    void InitTrayWidget();
    void SetAdapterFlag(bool set);

signals:
    void showTayWidget();
    void openBluetoothSettings();

public slots:
    void GSettings_value_chanage(const QString &key);
    void SetTrayIcon(bool open);

private:
    QSystemTrayIcon *bluetooth_tray_icon = nullptr;
    QMenu           *tray_Menu           = nullptr;
    QGSettings *StyleSettings            = nullptr;
    QGSettings      *settings            = nullptr;
    bool            hasAdapter           = true;
    bool            secState             = false;
} ;
#endif // TRAYICON_H
