41 , HierarchyElement(parent) |
41 , HierarchyElement(parent) |
42 , _ui(*new Ui_PartDownloader) |
42 , _ui(*new Ui_PartDownloader) |
43 , _source(SourceType{}) |
43 , _source(SourceType{}) |
44 { |
44 { |
45 _ui.setupUi(this); |
45 _ui.setupUi(this); |
46 |
|
47 #ifdef USE_QT5 |
|
48 _ui.progressTable->horizontalHeader()->setSectionResizeMode (QHeaderView::Stretch); |
46 _ui.progressTable->horizontalHeader()->setSectionResizeMode (QHeaderView::Stretch); |
49 #else |
|
50 _ui.progressTable->horizontalHeader()->setResizeMode (PartLabelColumn, QHeaderView::Stretch); |
|
51 #endif |
|
52 |
|
53 _downloadButton = new QPushButton {tr("Download")}; |
47 _downloadButton = new QPushButton {tr("Download")}; |
54 _ui.buttonBox->addButton(_downloadButton, QDialogButtonBox::ActionRole); |
48 _ui.buttonBox->addButton(_downloadButton, QDialogButtonBox::ActionRole); |
55 button(Abort)->setEnabled(false); |
49 button(Abort)->setEnabled(false); |
56 connect(_ui.source, SIGNAL(currentIndexChanged(int)), this, SLOT(sourceChanged(int))); |
50 connect(_ui.source, SIGNAL(currentIndexChanged(int)), this, SLOT(sourceChanged(int))); |
57 connect(_ui.buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(buttonClicked(QAbstractButton*))); |
51 connect(_ui.buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(buttonClicked(QAbstractButton*))); |