add base install and delete
This commit is contained in:
@@ -11,4 +11,37 @@ class SearchManager : public QObject
|
||||
|
||||
public:
|
||||
explicit SearchManager(QObject* parent = nullptr);
|
||||
|
||||
public:
|
||||
void set_package_manager(const QString& pm);
|
||||
QVariantList results() const;
|
||||
bool searching() const;
|
||||
QString error() const;
|
||||
void search(const QString& query);
|
||||
void clear();
|
||||
|
||||
private:
|
||||
void start_search();
|
||||
void on_process_finished(int exit_code, QProcess::ExitStatus status);
|
||||
void on_process_error(QProcess::ProcessError error);
|
||||
void parse_output(const QByteArray& output);
|
||||
void set_searching(bool value);
|
||||
void set_error(const QString& error);
|
||||
|
||||
private:
|
||||
QProcess m_process;
|
||||
QTimer m_debounce;
|
||||
QString m_package_manager = "yay";
|
||||
QString m_query;
|
||||
QString m_error;
|
||||
QVariantList m_results;
|
||||
int m_generation = 0;
|
||||
int m_running_generation = 0;
|
||||
bool m_searching = false;
|
||||
bool m_pending = false;
|
||||
|
||||
signals:
|
||||
void results_changed();
|
||||
void searching_changed();
|
||||
void error_changed();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user