|
|
@ -45,7 +45,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
#define SETTINGS_KEY(name) "PreviewSelectDialog/" name |
|
|
|
#define SETTINGS_KEY(name) "PreviewSelectDialog/" name |
|
|
|
|
|
|
|
|
|
|
|
PreviewSelectDialog::PreviewSelectDialog(QWidget *parent, BitTorrent::TorrentHandle *const torrent) |
|
|
|
PreviewSelectDialog::PreviewSelectDialog(QWidget *parent, const BitTorrent::TorrentHandle *torrent) |
|
|
|
: QDialog(parent) |
|
|
|
: QDialog(parent) |
|
|
|
, m_ui(new Ui::PreviewSelectDialog) |
|
|
|
, m_ui(new Ui::PreviewSelectDialog) |
|
|
|
, m_torrent(torrent) |
|
|
|
, m_torrent(torrent) |
|
|
@ -53,13 +53,12 @@ PreviewSelectDialog::PreviewSelectDialog(QWidget *parent, BitTorrent::TorrentHan |
|
|
|
, m_storeTreeHeaderState(SETTINGS_KEY("HeaderState")) |
|
|
|
, m_storeTreeHeaderState(SETTINGS_KEY("HeaderState")) |
|
|
|
{ |
|
|
|
{ |
|
|
|
m_ui->setupUi(this); |
|
|
|
m_ui->setupUi(this); |
|
|
|
setAttribute(Qt::WA_DeleteOnClose); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Preview")); |
|
|
|
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Preview")); |
|
|
|
connect(m_ui->buttonBox, &QDialogButtonBox::accepted, this, &PreviewSelectDialog::previewButtonClicked); |
|
|
|
connect(m_ui->buttonBox, &QDialogButtonBox::accepted, this, &PreviewSelectDialog::previewButtonClicked); |
|
|
|
connect(m_ui->buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); |
|
|
|
connect(m_ui->buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); |
|
|
|
|
|
|
|
|
|
|
|
Preferences *const pref = Preferences::instance(); |
|
|
|
const Preferences *pref = Preferences::instance(); |
|
|
|
// Preview list
|
|
|
|
// Preview list
|
|
|
|
m_previewListModel = new QStandardItemModel(0, NB_COLUMNS, this); |
|
|
|
m_previewListModel = new QStandardItemModel(0, NB_COLUMNS, this); |
|
|
|
m_previewListModel->setHeaderData(NAME, Qt::Horizontal, tr("Name")); |
|
|
|
m_previewListModel->setHeaderData(NAME, Qt::Horizontal, tr("Name")); |
|
|
|