mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 20:44:38 +03:00
32 lines
732 B
C++
32 lines
732 B
C++
#pragma once
|
|
|
|
#include <QString>
|
|
|
|
namespace NekoGui_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, const std::function<void()> &finish = nullptr);
|
|
|
|
void Update(const QString &_str, int _sub_gid = -1, bool _not_sub_as_url = false);
|
|
|
|
signals:
|
|
|
|
void asyncUpdateCallback(int gid);
|
|
};
|
|
|
|
extern GroupUpdater *groupUpdater;
|
|
} // namespace NekoGui_sub
|