/*
 * 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 SIDEBARDBUSSERVICE_H
#define SIDEBARDBUSSERVICE_H
#include <QObject>
#include <QRect>
#include <QWidget>
#include <QDBusConnection>
#include <QProcess>

class SidebarDbusService : public QObject
{
    Q_OBJECT
    //申明该类有D-BUS服务接口
    Q_CLASSINFO("D-Bus Interface", "org.ukui.Sidebar")
public:
    SidebarDbusService(QWidget *parent = nullptr);
    bool m_bSidebarState;                                         //展开中/展开完成-true；
    int m_PresentsidebarWidth;

    int m_SidebarHeight;
    int m_SidebarWidth;

private:
    QWidget *m_parent;

public slots:

    //设置&获取当前sidebar宽度接口
    void setPresentSidebarWidth(int width);
    int getPresentSidebarWidth(); //获取侧边栏当前位置

    //整体轮廓
    void setSidebarHeight(int height);
    void setSidebarWidth(int width);

    int getSidebarHeight();
    int getSidebarWidth();

    //当前状态
    void setSidebarState(bool state);
    bool getSidebarState();

    void sidebarActive();


signals:
    void animationAction(const uint time, const int distance);
    void sidebarStateChange(QString arg);
};

#endif // SIDEBARDBUSSERVICE_H

