2020-05-02 13:23:37 +03:00
/*
* Copyright 2020 Michail Vourlakos < mvourlakos @ gmail . com >
*
* This file is part of Latte - Dock
*
* Latte - Dock 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 2 of
* the License , or ( at your option ) any later version .
*
* Latte - Dock 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 < http : //www.gnu.org/licenses/>.
*
*/
# ifndef APPINTERFACES_H
# define APPINTERFACES_H
// Qt
# include <QObject>
// Plasma
# include <PlasmaQuick/AppletQuickItem>
namespace Latte {
class Interfaces : public QObject
{
Q_OBJECT
2020-05-02 19:09:54 +03:00
Q_PROPERTY ( QObject * plasmoidInterface READ plasmoidInterface WRITE setPlasmoidInterface NOTIFY interfaceChanged )
2020-05-02 13:23:37 +03:00
2020-05-02 19:09:54 +03:00
Q_PROPERTY ( QObject * globalShortcuts READ globalShortcuts NOTIFY globalShortcutsChanged )
Q_PROPERTY ( QObject * layoutsManager READ layoutsManager NOTIFY layoutsManagerChanged )
Q_PROPERTY ( QObject * themeExtended READ themeExtended NOTIFY themeExtendedChanged )
Q_PROPERTY ( QObject * universalSettings READ universalSettings NOTIFY universalSettingsChanged )
Q_PROPERTY ( QObject * view READ view NOTIFY viewChanged )
2020-05-02 13:23:37 +03:00
public :
explicit Interfaces ( QObject * parent = nullptr ) ;
QObject * globalShortcuts ( ) const ;
QObject * layoutsManager ( ) const ;
QObject * themeExtended ( ) const ;
QObject * universalSettings ( ) const ;
QObject * view ( ) const ;
QObject * plasmoidInterface ( ) const ;
void setPlasmoidInterface ( QObject * interface ) ;
2020-05-12 14:45:31 +03:00
public slots :
Q_INVOKABLE void updateView ( ) ;
2020-05-02 13:23:37 +03:00
signals :
2020-05-02 19:09:54 +03:00
void interfaceChanged ( ) ;
void globalShortcutsChanged ( ) ;
void layoutsManagerChanged ( ) ;
void themeExtendedChanged ( ) ;
void universalSettingsChanged ( ) ;
void viewChanged ( ) ;
2020-05-02 13:23:37 +03:00
2020-05-02 16:04:26 +03:00
private :
2020-05-02 19:09:54 +03:00
void setGlobalShortcuts ( QObject * shortcuts ) ;
void setLayoutsManager ( QObject * manager ) ;
void setThemeExtended ( QObject * theme ) ;
void setUniversalSettings ( QObject * settings ) ;
2020-05-02 16:04:26 +03:00
void setView ( QObject * view ) ;
2020-05-02 13:23:37 +03:00
private :
QObject * m_globalShortcuts { nullptr } ;
QObject * m_layoutsManager { nullptr } ;
QObject * m_themeExtended { nullptr } ;
QObject * m_universalSettings { nullptr } ;
QObject * m_view { nullptr } ;
PlasmaQuick : : AppletQuickItem * m_plasmoid { nullptr } ;
} ;
}
# endif