1
0
forked from BRT/arc
arc/android/dushanbe/GetLastTransactionsScript.h
slava d9479cd3ea Refactor EventHandler and Dushanbe scripts to centralize screenshot handling:
- Introduce `connectScreenshotDushanbe` for consistent signal-slot connections in `EventHandler`.
- Emit screenshots via `CommonScript` across `PayByCard`, `PayByPhone`, and `GetLastTransactions`.
- Eliminate redundant screenshot signals in `GetLastTransactionsScript`.
2026-04-17 11:17:59 +07:00

42 lines
1.1 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include "CommonScript.h"
#include <QDateTime>
#include <QJsonObject>
#include "db/DeviceInfo.h"
#include "db/BankProfileInfo.h"
namespace Dushanbe {
class GetLastTransactionsScript final : public CommonScript {
Q_OBJECT
public:
explicit GetLastTransactionsScript(
QString deviceId,
QString appCode,
double searchAmount = 0,
QDateTime searchTime = {},
QObject *parent = nullptr
);
~GetLastTransactionsScript() override;
signals:
// Испускается, когда транзакция найдена и распарсена с экрана деталей.
// EventHandler использует эти данные напрямую для task_result вместо
// повторного чтения из БД.
void transactionParsed(const QJsonObject &tx);
protected:
void doStart() override;
private:
QString m_deviceId;
const QString m_appCode;
const double m_searchAmount; // сумма в сомони (0 = все последние)
const QDateTime m_searchTime; // примерное время (UTC)
QString m_error;
};
} // namespace Dushanbe