feat: AM 默认程序迁移
默认程序迁移到AM中 Log: 默认程序迁移到AM Task: https://pms.uniontech.com/task-view-140029.html Influence: 默认程序 Change-Id: I0824c503b6ab844f09b3bf3cf740565b1e4215e5
This commit is contained in:
40
src/modules/mimeapp/mime_app.h
Normal file
40
src/modules/mimeapp/mime_app.h
Normal file
@ -0,0 +1,40 @@
|
||||
#ifndef MIME_APP_H
|
||||
#define MIME_APP_H
|
||||
|
||||
#include "../../lib/dfile.h"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
|
||||
class MimeAppPrivate;
|
||||
class MimeApp : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
QScopedPointer<MimeAppPrivate> dd_ptr;
|
||||
Q_DECLARE_PRIVATE_D(qGetPtrHelper(dd_ptr), MimeApp)
|
||||
public:
|
||||
explicit MimeApp(QObject *parent = nullptr);
|
||||
void deleteMimeAssociation(std::string mimeType, std::string desktopId);
|
||||
void initConfigData();
|
||||
bool setDefaultApp(const std::string &mimeType, const std::string &desktopId);
|
||||
std::string findFilePath(std::string fileName);
|
||||
~MimeApp() override;
|
||||
|
||||
Q_SIGNALS:
|
||||
// Standard Notifications dbus implementation
|
||||
void Change();
|
||||
public: // PROPERTIES
|
||||
|
||||
public Q_SLOTS: // METHODS
|
||||
void AddUserApp(QStringList mimeTypes, const QString &desktopId);
|
||||
void DeleteApp(QStringList mimeTypes, const QString &desktopId);
|
||||
void DeleteUserApp(const QString &desktopId);
|
||||
QString GetDefaultApp(const QString &mimeType);
|
||||
QString ListApps(const QString &mimeType);
|
||||
QString ListUserApps(const QString &mimeType);
|
||||
void SetDefaultApp(const QStringList &mimeTypes, const QString &desktopId);
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif // MIME_APP_H
|
Reference in New Issue
Block a user