MCPcopy Create free account
hub / github.com/cutechess/cutechess / ImportProgressDialog

Method ImportProgressDialog

projects/gui/src/importprogressdlg.cpp:25–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23#include <QFileInfo>
24
25ImportProgressDialog::ImportProgressDialog(PgnImporter* pgnImporter,
26 QWidget* parent)
27 : QDialog(parent),
28 m_lastUpdateSecs(0),
29 m_importError(false),
30 ui(new Ui::ImportProgressDialog)
31{
32 ui->setupUi(this);
33
34 setAttribute(Qt::WA_DeleteOnClose, true);
35
36 QFileInfo info(pgnImporter->fileName());
37
38 ui->m_fileNameLabel->setText(
39 QString(tr("Importing \"%1\"").arg(info.fileName())));
40
41 m_totalFileSize = info.size();
42
43 connect(ui->m_buttonBox, SIGNAL(rejected()), pgnImporter,
44 SLOT(cancel()));
45 connect(pgnImporter, SIGNAL(finished()), this,
46 SLOT(onImporterFinished()));
47 connect(pgnImporter, SIGNAL(error(int)), this,
48 SLOT(onImportError(int)));
49 connect(pgnImporter, SIGNAL(databaseReadStatus(const QTime&, int, qint64)),
50 this, SLOT(updateImportStatus(const QTime&, int, qint64)));
51}
52
53ImportProgressDialog::~ImportProgressDialog()
54{

Callers

nothing calls this directly

Calls 4

setTextMethod · 0.80
QStringClass · 0.50
fileNameMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected