ukui-notification/notification-ukcc-plugin/notification-ukcc-plugin.h

91 lines
2.5 KiB
C++

#ifndef NOTIFICATION_UKCC_PLUGIN_H
#define NOTIFICATION_UKCC_PLUGIN_H
#include <QObject>
#include <QtPlugin>
#include <QPushButton>
#include <QDebug>
#include <QVector>
#include <QVBoxLayout>
#include <QDir>
#include <QComboBox>
#include <ukui-search/application-info.h>
#include <kysdk/applications/kswitchbutton.h>
#include <ukcc/interface/interface.h>
#include <ukcc/widgets/titlelabel.h>
#include <ukcc/widgets/lightlabel.h>
#include "applications-settings.h"
#include "notification-global-settings.h"
using namespace kdk;
class Notice : public QObject, CommonInterface
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.ukcc.CommonInterface")
Q_INTERFACES(CommonInterface)
public:
Notice();
~Notice();
QString plugini18nName() Q_DECL_OVERRIDE;
int pluginTypes() Q_DECL_OVERRIDE;
QWidget * pluginUi() Q_DECL_OVERRIDE;
const QString name() const Q_DECL_OVERRIDE;
bool isShowOnHomePage() const Q_DECL_OVERRIDE;
QIcon icon() const Q_DECL_OVERRIDE;
bool isEnable() const Q_DECL_OVERRIDE;
void initUi(QWidget *widget);
void initNotFaze(QFrame *frame);
void setFrame(QFrame *frame, KSwitchButton *btn, QString str);
void initSearchText();
void initConnection();
void initNoticeStatus();
void initListUI();
void initItemUi(const QString &desktopPath, UkuiNotification::SingleApplicationSettings *settings);
void setAppIcon(QLabel *iconlabel, const QString &icon);
private:
void setHiddenNoticeApp(bool status);
void setComBoxStatus(bool status);
private:
QString m_pluginName;
int m_pluginType;
QWidget *m_pluginWidget = nullptr;
TitleLabel *m_noticeLabel = nullptr;
TitleLabel *m_notFazeLabel = nullptr;
QLabel *m_getNoticeLabel = nullptr;
QFrame *m_noticeAppFrame = nullptr;
QFrame *m_getNoticeFrame = nullptr;
KSwitchButton *m_autoOpenSwitchBtn = nullptr;
KSwitchButton *m_multiScreenSwitchBtn = nullptr;
KSwitchButton *m_fullScreenSwitchBtn = nullptr;
KSwitchButton *m_allowAlarmrSwitchBtn = nullptr;
KSwitchButton *m_enableSwitchBtn = nullptr;
QComboBox *m_openTimeHCombox = nullptr;
QComboBox *m_openTimeMCombox = nullptr;
QComboBox *m_closeTimeHCombox = nullptr;
QComboBox *m_closeTimeMCombox = nullptr;
QGSettings *m_themeSetting = nullptr;
QVBoxLayout *m_applistverticalLayout = nullptr;
UkuiNotification::NotificationGlobalSettings *m_globalSettings = nullptr;
UkuiSearch::ApplicationInfo *m_appInfo = nullptr;
};
#endif // NOTIFICATION_UKCC_PLUGIN_H