File indexing completed on 2024-04-28 05:35:34

0001 /*
0002     SPDX-FileCopyrightText: 2021 Henri Chain <henri.chain@enioka.com>
0003     SPDX-License-Identifier: LGPL-2.1-or-later
0004 */
0005 
0006 #pragma once
0007 #include "kworkspace_export.h"
0008 
0009 #include <KDesktopFile>
0010 #include <QDir>
0011 #include <QString>
0012 
0013 /**
0014  * Corresponds to a .desktop file in $XDG_CONFIG_HOME/autostart that points to
0015  * an autostart script and has X-KDE-AutostartScript=true
0016  */
0017 class KWORKSPACE_EXPORT AutostartScriptDesktopFile : public KDesktopFile
0018 {
0019 public:
0020     explicit AutostartScriptDesktopFile(const QString &name, const QString &execPath, const QString &iconName);
0021 
0022     /**
0023      * Checks whether this KDesktopFile has X-KDE-AutostartScript=true
0024      */
0025     static bool isAutostartScript(const KDesktopFile &file);
0026 
0027     /**
0028      * The location of autostart .desktop application and script files
0029      * ($XDG_CONFIG_HOME/autostart)
0030      */
0031     static QDir autostartLocation();
0032 };