Skip to content
Snippets Groups Projects
systemhandler.h 710 B
Newer Older
  • Learn to ignore specific revisions
  • akiraohgaki's avatar
    akiraohgaki committed
    #pragma once
    
    #include <QObject>
    
    class SystemHandler : public QObject
    {
        Q_OBJECT
    
    public:
    
    akiraohgaki's avatar
    akiraohgaki committed
        explicit SystemHandler(QObject *parent = nullptr);
    
    akiraohgaki's avatar
    akiraohgaki committed
    
    public slots:
    
    akiraohgaki's avatar
    akiraohgaki committed
        bool isUnix() const;
        bool isMobileDevice() const;
        bool openUrl(const QString &url) const;
    
    akiraohgaki's avatar
    akiraohgaki committed
    
    
    akiraohgaki's avatar
    akiraohgaki committed
        QString desktopEnvironment() const;
        bool isApplicableType(const QString &installType) const;
    
    akiraohgaki's avatar
    akiraohgaki committed
    
    #ifdef QTLIB_UNIX
    
    akiraohgaki's avatar
    akiraohgaki committed
        bool applyFile(const QString &path, const QString &installType) const;
    
    akiraohgaki's avatar
    akiraohgaki committed
    #endif
    
    private:
    #ifdef QTLIB_UNIX
    
    akiraohgaki's avatar
    akiraohgaki committed
        bool applyWallpaper(const QString &path) const;
        bool applyIcon(const QString &path) const;
        bool applyCursor(const QString &path) const;
        bool applyWindowTheme(const QString &path) const;
    
    akiraohgaki's avatar
    akiraohgaki committed
    #endif
    };