refactor: replace plugin system with native pacman manager
Remove the dynamic plugin loader (pacman/apt/pkg/universal) and drive the UI directly through PacmanManager. Rename sources and headers to kebab-case to match the project's file naming convention. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
1 parent
4a773c63ce
commit
5054f04c54
23 files changed
+276
-1735
No files matched your search
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QAbstractListModel>
|
||||
#include <QVariant>
|
||||
#include <vector>
|
||||
#include "package-manager.h"
|
||||
|
||||
class PackageModel : public QAbstractListModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum Roles {
|
||||
NameRole = Qt::UserRole + 1,
|
||||
VersionRole,
|
||||
DescriptionRole,
|
||||
RepositoryRole,
|
||||
InstalledRole,
|
||||
SizeRole,
|
||||
UpdateAvailableRole
|
||||
};
|
||||
|
||||
explicit PackageModel(QObject* parent = nullptr);
|
||||
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
void setPackages(const std::vector<PackageInfo>& packages);
|
||||
void clear();
|
||||
PackageInfo getPackage(int row) const;
|
||||
|
||||
private:
|
||||
std::vector<PackageInfo> m_packages;
|
||||
};
|
||||
Reference in new issue
Block a user