mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 04:54:38 +03:00
upload code
This commit is contained in:
33
sub/GroupUpdater.hpp
Normal file
33
sub/GroupUpdater.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
|
||||
namespace NekoRay::sub {
|
||||
class RawUpdater {
|
||||
public:
|
||||
void updateClash(const QString &str);
|
||||
|
||||
void update(const QString &str);
|
||||
|
||||
int gid_add_to = -1; // 导入到指定组 -1 为当前选中组
|
||||
|
||||
int update_counter = 0; // 新增了多少个配置
|
||||
};
|
||||
|
||||
class GroupUpdater : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
void AsyncUpdate(const QString &str, int _sub_gid = -1,
|
||||
QObject *caller = nullptr, const std::function<void()> &callback = nullptr);
|
||||
|
||||
void Update(const QString &_str, int _sub_gid = -1, bool _not_sub_as_url = false);
|
||||
|
||||
signals:
|
||||
|
||||
void AsyncUpdateCallback(QObject *caller);
|
||||
};
|
||||
|
||||
extern GroupUpdater *groupUpdater;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user