blob: dbad87573095dcea0a4e0ba0d7d2bf32acf6723d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
//===========================================
// Lumina-DE source code
// Copyright (c) 2012-2016, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
#ifndef _LUMINA_LIBRARY_DESKTOP_UTILS_H
#define _LUMINA_LIBRARY_DESKTOP_UTILS_H
#include <QString>
#include <QStringList>
#include <QFile>
#include <QDir>
#include <QDateTime>
//Other classes needed
#include <LUtils.h>
#include <LuminaXDG.h>
#include <LuminaOS.h>
class LDesktopUtils{
public:
//Get the current version/build of the Lumina desktop
static QString LuminaDesktopVersion();
static QString LuminaDesktopBuildDate();
//Various function for finding valid QtQuick plugins on the system
static bool validQuickPlugin(QString ID);
static QString findQuickPluginFile(QString ID);
static QStringList listQuickPlugins(); //List of valid ID's
static QStringList infoQuickPlugin(QString ID); //Returns: [Name, Description, Icon]
//Various functions for the favorites sub-system
// Formatting Note: "<name>::::[dir/app/<mimetype>]::::<path>"
// the <name> field might not be used for "app" flagged entries
static QStringList listFavorites();
static bool saveFavorites(QStringList);
static bool isFavorite(QString path);
static bool addFavorite(QString path, QString name = "");
static void removeFavorite(QString path);
static void upgradeFavorites(int fromoldversionnumber);
//Load the default setup for the system
static void LoadSystemDefaults(bool skipOS = false);
static bool checkUserFiles(QString lastversion); //returns true if something changed
static int VersionStringToNumber(QString version); //convert the lumina version string to a number for comparisons
};
#endif
|