MCPcopy Create free account
hub / github.com/QNapi/qnapi / frmProgress

Method frmProgress

gui/src/forms/frmprogress.cpp:26–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24#include "qnapiapp.h"
25
26frmProgress::frmProgress(QWidget *parent, Qt::WindowFlags f)
27 : QWidget(parent, f) {
28 qRegisterMetaType<SubtitleInfoList>("QNapiSubtitleInfoList");
29
30 ui.setupUi(this);
31
32 setAttribute(Qt::WA_DeleteOnClose, false);
33 setAttribute(Qt::WA_QuitOnClose, false);
34
35 setBatchMode(false);
36
37 connect(&getThread, SIGNAL(fileNameChange(const QString &)), ui.lbFileName,
38 SLOT(setText(const QString &)));
39 connect(&getThread, SIGNAL(actionChange(const QString &)), ui.lbAction,
40 SLOT(setText(const QString &)));
41 connect(&getThread, SIGNAL(progressChange(int, int, float)), this,
42 SLOT(updateProgress(int, int, float)));
43 connect(&getThread, SIGNAL(selectSubtitles(QString, SubtitleInfoList)), this,
44 SLOT(selectSubtitles(QString, SubtitleInfoList)));
45 connect(this, SIGNAL(subtitlesSelected(int)), &getThread,
46 SLOT(subtitlesSelected(int)));
47 connect(&getThread, SIGNAL(finished()), this, SLOT(downloadFinished()));
48
49 QRect position = frameGeometry();
50 position.moveCenter(QDesktopWidget().availableGeometry().center());
51 move(position.topLeft());
52}
53
54void frmProgress::receiveRequest(const QString &request) {
55 enqueueFile(request);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected