/*
 * Copyright 2022 KylinSoft Co., Ltd.
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <https://www.gnu.org/licenses/>.
 */

#ifndef WEATHERWIDGET_H
#define WEATHERWIDGET_H

#include <QObject>
#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include <QHBoxLayout>
#include <QFont>
#include <QIcon>
#include <QProcess>
#include <QMouseEvent>
#include "../commondata.h"
#include "../gsettingmanager.h"
#include "../dbusmanager.h"

class weatherWidget : public QWidget
{
    Q_OBJECT
public:
    explicit weatherWidget(QWidget *parent = nullptr);
    void initMemberVariables();
    void initLabelData();
    void initLayout();
    void setLabelData();
    void connectGSetting();

private:
    QWidget *m_pWeatherWidget;
    QLabel  *m_pWeatherIconLabel;
    QLabel  *m_pAreaLabel;
    QLabel  *m_pWeatherNumLabel;
    QHBoxLayout  *m_pMainHLayout;
    PictureToWhite *m_pPictureToWhite;

private slots:
    void    weatherChangeSlots(QString key);
    void    styleChangeSlots(QString key);

public slots:
    bool    eventFilter(QObject *obj, QEvent *event);

};

#endif // WEATHERWIDGET_H
