自定义内存分配池
This commit is contained in:
@@ -4,11 +4,13 @@
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
#include <QKeyEvent>
|
||||
#include <QThread>
|
||||
#include <map>
|
||||
|
||||
class Back_End : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QMap<QString, Qt::Key> function_map;
|
||||
std::map<QString, Qt::Key> function_map;
|
||||
bool match(QKeyEvent* e, const QString& function);
|
||||
static Back_End* instance();
|
||||
int YsGetAfGain();
|
||||
@@ -22,12 +24,22 @@ public:
|
||||
QString get_screenshot_save_dir_path();
|
||||
QString get_screenshot_save_file_name();
|
||||
QString get_audio_file_location();
|
||||
void stop_mock_thread() {
|
||||
if (mock_thread) {
|
||||
mock_thread->quit();
|
||||
mock_thread->wait();
|
||||
mock_thread = nullptr;
|
||||
}
|
||||
}
|
||||
Back_End(const Back_End&) = delete;
|
||||
Back_End& operator=(const Back_End&) = delete;
|
||||
void call_back_data_func(int channel, void *pData, int i_length);
|
||||
protected:
|
||||
Back_End();
|
||||
~Back_End() override = default;
|
||||
~Back_End() override {
|
||||
stop_mock_thread();
|
||||
}
|
||||
QThread* mock_thread{};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user