Browse Source

Change "Add new torrent" dialog to horizontal layout

adaptive-webui-19844
Evgeny Lensky 6 years ago committed by Chocobo1
parent
commit
62c72091ce
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/base/unicodestrings.h
  2. 89
      src/gui/addnewtorrentdialog.cpp
  3. 7
      src/gui/addnewtorrentdialog.h
  4. 359
      src/gui/addnewtorrentdialog.ui

2
src/base/unicodestrings.h

@ -38,8 +38,6 @@
// See issue #3059 for more details (https://github.com/qbittorrent/qBittorrent/issues/3059). // See issue #3059 for more details (https://github.com/qbittorrent/qBittorrent/issues/3059).
const char C_INFINITY[] = ""; const char C_INFINITY[] = "";
const char C_NON_BREAKING_SPACE[] = " "; const char C_NON_BREAKING_SPACE[] = " ";
const char C_UP[] = "";
const char C_DOWN[] = "";
const char C_COPYRIGHT[] = "©"; const char C_COPYRIGHT[] = "©";
const char C_THIN_SPACE[] = ""; const char C_THIN_SPACE[] = "";
const char C_UTP[] = "μTP"; const char C_UTP[] = "μTP";

89
src/gui/addnewtorrentdialog.cpp

@ -30,9 +30,9 @@
#include <QDebug> #include <QDebug>
#include <QDir> #include <QDir>
#include <QFile>
#include <QMenu> #include <QMenu>
#include <QPushButton> #include <QPushButton>
#include <QShortcut>
#include <QString> #include <QString>
#include <QUrl> #include <QUrl>
#include <QVector> #include <QVector>
@ -41,13 +41,11 @@
#include "base/bittorrent/magneturi.h" #include "base/bittorrent/magneturi.h"
#include "base/bittorrent/session.h" #include "base/bittorrent/session.h"
#include "base/bittorrent/torrenthandle.h" #include "base/bittorrent/torrenthandle.h"
#include "base/bittorrent/torrentinfo.h"
#include "base/global.h" #include "base/global.h"
#include "base/net/downloadmanager.h" #include "base/net/downloadmanager.h"
#include "base/preferences.h" #include "base/preferences.h"
#include "base/settingsstorage.h" #include "base/settingsstorage.h"
#include "base/torrentfileguard.h" #include "base/torrentfileguard.h"
#include "base/unicodestrings.h"
#include "base/utils/fs.h" #include "base/utils/fs.h"
#include "base/utils/misc.h" #include "base/utils/misc.h"
#include "base/utils/string.h" #include "base/utils/string.h"
@ -62,16 +60,14 @@
namespace namespace
{ {
#define SETTINGS_KEY(name) QStringLiteral("AddNewTorrentDialog/" name) #define SETTINGS_KEY(name) "AddNewTorrentDialog/" name
const QString KEY_ENABLED = SETTINGS_KEY("Enabled"); const QString KEY_ENABLED = QStringLiteral(SETTINGS_KEY("Enabled"));
const QString KEY_DEFAULTCATEGORY = SETTINGS_KEY("DefaultCategory"); const QString KEY_DEFAULTCATEGORY = QStringLiteral(SETTINGS_KEY("DefaultCategory"));
const QString KEY_TREEHEADERSTATE = SETTINGS_KEY("TreeHeaderState"); const QString KEY_TREEHEADERSTATE = QStringLiteral(SETTINGS_KEY("TreeHeaderState"));
const QString KEY_WIDTH = SETTINGS_KEY("Width"); const QString KEY_TOPLEVEL = QStringLiteral(SETTINGS_KEY("TopLevel"));
const QString KEY_EXPANDED = SETTINGS_KEY("Expanded"); const QString KEY_SAVEPATHHISTORY = QStringLiteral(SETTINGS_KEY("SavePathHistory"));
const QString KEY_TOPLEVEL = SETTINGS_KEY("TopLevel"); const QString KEY_SAVEPATHHISTORYLENGTH = QStringLiteral(SETTINGS_KEY("SavePathHistoryLength"));
const QString KEY_SAVEPATHHISTORY = SETTINGS_KEY("SavePathHistory"); const QString KEY_REMEMBERLASTSAVEPATH = QStringLiteral(SETTINGS_KEY("RememberLastSavePath"));
const QString KEY_SAVEPATHHISTORYLENGTH = SETTINGS_KEY("SavePathHistoryLength");
const QString KEY_REMEMBERLASTSAVEPATH = SETTINGS_KEY("RememberLastSavePath");
// just a shortcut // just a shortcut
inline SettingsStorage *settings() inline SettingsStorage *settings()
@ -91,6 +87,8 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
, m_hasMetadata(false) , m_hasMetadata(false)
, m_oldIndex(0) , m_oldIndex(0)
, m_torrentParams(inParams) , m_torrentParams(inParams)
, m_storeDialogSize(SETTINGS_KEY("DialogSize"))
, m_storeSplitterState(SETTINGS_KEY("SplitterState"))
{ {
// TODO: set dialog file properties using m_torrentParams.filePriorities // TODO: set dialog file properties using m_torrentParams.filePriorities
m_ui->setupUi(this); m_ui->setupUi(this);
@ -155,7 +153,6 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
m_ui->contentTreeView->header()->setSortIndicator(0, Qt::AscendingOrder); m_ui->contentTreeView->header()->setSortIndicator(0, Qt::AscendingOrder);
loadState(); loadState();
// Signal / slots // Signal / slots
connect(m_ui->toolButtonAdvanced, &QToolButton::clicked, this, &AddNewTorrentDialog::showAdvancedSettings);
connect(m_ui->doNotDeleteTorrentCheckBox, &QCheckBox::clicked, this, &AddNewTorrentDialog::doNotDeleteTorrentClicked); connect(m_ui->doNotDeleteTorrentCheckBox, &QCheckBox::clicked, this, &AddNewTorrentDialog::doNotDeleteTorrentClicked);
QShortcut *editHotkey = new QShortcut(Qt::Key_F2, m_ui->contentTreeView, nullptr, nullptr, Qt::WidgetShortcut); QShortcut *editHotkey = new QShortcut(Qt::Key_F2, m_ui->contentTreeView, nullptr, nullptr, Qt::WidgetShortcut);
connect(editHotkey, &QShortcut::activated, this, &AddNewTorrentDialog::renameSelectedFile); connect(editHotkey, &QShortcut::activated, this, &AddNewTorrentDialog::renameSelectedFile);
@ -213,22 +210,17 @@ void AddNewTorrentDialog::setSavePathHistoryLength(int value)
void AddNewTorrentDialog::loadState() void AddNewTorrentDialog::loadState()
{ {
Utils::Gui::resize(this, m_storeDialogSize);
m_ui->splitter->restoreState(m_storeSplitterState);
m_headerState = settings()->loadValue(KEY_TREEHEADERSTATE).toByteArray(); m_headerState = settings()->loadValue(KEY_TREEHEADERSTATE).toByteArray();
const QSize newSize = Utils::Gui::scaledSize(this, size());
const int width = settings()->loadValue(KEY_WIDTH, newSize.width()).toInt();
const int height = newSize.height();
resize(width, height);
m_ui->toolButtonAdvanced->setChecked(settings()->loadValue(KEY_EXPANDED).toBool());
} }
void AddNewTorrentDialog::saveState() void AddNewTorrentDialog::saveState()
{ {
m_storeDialogSize = size();
m_storeSplitterState = m_ui->splitter->saveState();
if (m_contentModel) if (m_contentModel)
settings()->storeValue(KEY_TREEHEADERSTATE, m_ui->contentTreeView->header()->saveState()); settings()->storeValue(KEY_TREEHEADERSTATE, m_ui->contentTreeView->header()->saveState());
settings()->storeValue(KEY_WIDTH, width());
settings()->storeValue(KEY_EXPANDED, m_ui->toolButtonAdvanced->isChecked());
} }
void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorrentParams &inParams, QWidget *parent) void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorrentParams &inParams, QWidget *parent)
@ -303,7 +295,7 @@ bool AddNewTorrentDialog::loadTorrentImpl()
return false; return false;
} }
m_ui->lblhash->setText(m_hash); m_ui->labelHashData->setText(m_hash);
setupTreeview(); setupTreeview();
TMMChanged(m_ui->comboTTM->currentIndex()); TMMChanged(m_ui->comboTTM->currentIndex());
return true; return true;
@ -348,7 +340,7 @@ bool AddNewTorrentDialog::loadMagnet(const BitTorrent::MagnetUri &magnetUri)
BitTorrent::Session::instance()->loadMetadata(magnetUri); BitTorrent::Session::instance()->loadMetadata(magnetUri);
setMetadataProgressIndicator(true, tr("Retrieving metadata...")); setMetadataProgressIndicator(true, tr("Retrieving metadata..."));
m_ui->lblhash->setText(m_hash); m_ui->labelHashData->setText(m_hash);
return true; return true;
} }
@ -362,27 +354,6 @@ void AddNewTorrentDialog::showEvent(QShowEvent *event)
raise(); raise();
} }
void AddNewTorrentDialog::showAdvancedSettings(bool show)
{
const int minimumW = minimumWidth();
setMinimumWidth(width()); // to remain the same width
if (show) {
m_ui->toolButtonAdvanced->setText(QString::fromUtf8(C_UP));
m_ui->groupBoxSettings->setVisible(true);
m_ui->infoGroup->setVisible(true);
m_ui->contentTreeView->setVisible(m_hasMetadata);
static_cast<QVBoxLayout *>(layout())->insertWidget(layout()->indexOf(m_ui->checkBoxNeverShow) + 1, m_ui->toolButtonAdvanced);
}
else {
m_ui->toolButtonAdvanced->setText(QString::fromUtf8(C_DOWN));
m_ui->groupBoxSettings->setVisible(false);
m_ui->infoGroup->setVisible(false);
m_ui->buttonsHLayout->insertWidget(0, layout()->takeAt(layout()->indexOf(m_ui->checkBoxNeverShow) + 1)->widget());
}
adjustSize();
setMinimumWidth(minimumW);
}
void AddNewTorrentDialog::saveSavePathHistory() const void AddNewTorrentDialog::saveSavePathHistory() const
{ {
// Get current history // Get current history
@ -436,7 +407,7 @@ void AddNewTorrentDialog::updateDiskSpaceLabel()
sizeString += tr("Free space on disk: %1").arg(Utils::Misc::friendlyUnit(Utils::Fs::freeDiskSpaceOnPath( sizeString += tr("Free space on disk: %1").arg(Utils::Misc::friendlyUnit(Utils::Fs::freeDiskSpaceOnPath(
m_ui->savePath->selectedPath()))); m_ui->savePath->selectedPath())));
sizeString += ')'; sizeString += ')';
m_ui->labelSize->setText(sizeString); m_ui->labelSizeData->setText(sizeString);
} }
void AddNewTorrentDialog::onSavePathChanged(const QString &newPath) void AddNewTorrentDialog::onSavePathChanged(const QString &newPath)
@ -719,16 +690,16 @@ void AddNewTorrentDialog::setMetadataProgressIndicator(bool visibleIndicator, co
void AddNewTorrentDialog::setupTreeview() void AddNewTorrentDialog::setupTreeview()
{ {
if (!m_hasMetadata) { if (!m_hasMetadata) {
setCommentText(tr("Not Available", "This comment is unavailable")); m_ui->labelCommentData->setText(tr("Not Available", "This comment is unavailable"));
m_ui->labelDate->setText(tr("Not Available", "This date is unavailable")); m_ui->labelDateData->setText(tr("Not Available", "This date is unavailable"));
} }
else { else {
// Set dialog title // Set dialog title
setWindowTitle(m_torrentInfo.name()); setWindowTitle(m_torrentInfo.name());
// Set torrent information // Set torrent information
setCommentText(Utils::Misc::parseHtmlLinks(m_torrentInfo.comment())); m_ui->labelCommentData->setText(Utils::Misc::parseHtmlLinks(m_torrentInfo.comment()));
m_ui->labelDate->setText(!m_torrentInfo.creationDate().isNull() ? m_torrentInfo.creationDate().toString(Qt::DefaultLocaleShortDate) : tr("Not available")); m_ui->labelDateData->setText(!m_torrentInfo.creationDate().isNull() ? m_torrentInfo.creationDate().toString(Qt::DefaultLocaleShortDate) : tr("Not available"));
// Prepare content tree // Prepare content tree
m_contentModel = new TorrentContentFilterModel(this); m_contentModel = new TorrentContentFilterModel(this);
@ -755,7 +726,6 @@ void AddNewTorrentDialog::setupTreeview()
} }
updateDiskSpaceLabel(); updateDiskSpaceLabel();
showAdvancedSettings(settings()->loadValue(KEY_EXPANDED, false).toBool());
} }
void AddNewTorrentDialog::handleDownloadFinished(const Net::DownloadResult &result) void AddNewTorrentDialog::handleDownloadFinished(const Net::DownloadResult &result)
@ -797,7 +767,6 @@ void AddNewTorrentDialog::TMMChanged(int index)
m_ui->groupBoxSavePath->setEnabled(true); m_ui->groupBoxSavePath->setEnabled(true);
m_ui->savePath->blockSignals(false); m_ui->savePath->blockSignals(false);
m_ui->savePath->setCurrentIndex(m_oldIndex < m_ui->savePath->count() ? m_oldIndex : m_ui->savePath->count() - 1); m_ui->savePath->setCurrentIndex(m_oldIndex < m_ui->savePath->count() ? m_oldIndex : m_ui->savePath->count() - 1);
m_ui->toolButtonAdvanced->setEnabled(true);
} }
else { else {
m_ui->groupBoxSavePath->setEnabled(false); m_ui->groupBoxSavePath->setEnabled(false);
@ -805,23 +774,9 @@ void AddNewTorrentDialog::TMMChanged(int index)
m_ui->savePath->clear(); m_ui->savePath->clear();
QString savePath = BitTorrent::Session::instance()->categorySavePath(m_ui->categoryComboBox->currentText()); QString savePath = BitTorrent::Session::instance()->categorySavePath(m_ui->categoryComboBox->currentText());
m_ui->savePath->addItem(savePath); m_ui->savePath->addItem(savePath);
m_ui->toolButtonAdvanced->setChecked(true);
m_ui->toolButtonAdvanced->setEnabled(false);
showAdvancedSettings(true);
} }
} }
void AddNewTorrentDialog::setCommentText(const QString &str) const
{
m_ui->commentLabel->setText(str);
// workaround for the additional space introduced by QScrollArea
int lineHeight = m_ui->commentLabel->fontMetrics().lineSpacing();
int lines = 1 + str.count('\n');
int height = lineHeight * lines;
m_ui->scrollArea->setMaximumHeight(height);
}
void AddNewTorrentDialog::doNotDeleteTorrentClicked(bool checked) void AddNewTorrentDialog::doNotDeleteTorrentClicked(bool checked)
{ {
m_torrentGuard->setAutoRemove(!checked); m_torrentGuard->setAutoRemove(!checked);

7
src/gui/addnewtorrentdialog.h

@ -32,11 +32,11 @@
#include <memory> #include <memory>
#include <QDialog> #include <QDialog>
#include <QShortcut>
#include "base/bittorrent/addtorrentparams.h" #include "base/bittorrent/addtorrentparams.h"
#include "base/bittorrent/infohash.h" #include "base/bittorrent/infohash.h"
#include "base/bittorrent/torrentinfo.h" #include "base/bittorrent/torrentinfo.h"
#include "base/settingvalue.h"
namespace BitTorrent namespace BitTorrent
{ {
@ -79,7 +79,6 @@ public:
static void show(const QString &source, QWidget *parent); static void show(const QString &source, QWidget *parent);
private slots: private slots:
void showAdvancedSettings(bool show);
void displayContentTreeMenu(const QPoint &); void displayContentTreeMenu(const QPoint &);
void updateDiskSpaceLabel(); void updateDiskSpaceLabel();
void onSavePathChanged(const QString &newPath); void onSavePathChanged(const QString &newPath);
@ -105,7 +104,6 @@ private:
void saveState(); void saveState();
void setMetadataProgressIndicator(bool visibleIndicator, const QString &labelText = {}); void setMetadataProgressIndicator(bool visibleIndicator, const QString &labelText = {});
void setupTreeview(); void setupTreeview();
void setCommentText(const QString &str) const;
void setSavePath(const QString &newPath); void setSavePath(const QString &newPath);
void showEvent(QShowEvent *event) override; void showEvent(QShowEvent *event) override;
@ -120,6 +118,9 @@ private:
int m_oldIndex; int m_oldIndex;
std::unique_ptr<TorrentFileGuard> m_torrentGuard; std::unique_ptr<TorrentFileGuard> m_torrentGuard;
BitTorrent::AddTorrentParams m_torrentParams; BitTorrent::AddTorrentParams m_torrentParams;
CachedSettingValue<QSize> m_storeDialogSize;
CachedSettingValue<QByteArray> m_storeSplitterState;
}; };
#endif // ADDNEWTORRENTDIALOG_H #endif // ADDNEWTORRENTDIALOG_H

359
src/gui/addnewtorrentdialog.ui

@ -6,13 +6,35 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>414</width> <width>900</width>
<height>630</height> <height>620</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="AddNewTorrentDialogLayout"> <layout class="QVBoxLayout" name="AddNewTorrentDialogLayout">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="childrenCollapsible">
<bool>false</bool>
</property>
<widget class="QFrame" name="torrentoptionsFrame">
<layout class="QVBoxLayout" name="mainlayout_addui">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="managementLayout">
<item> <item>
<widget class="QLabel" name="labelTorrentManagementMode"> <widget class="QLabel" name="labelTorrentManagementMode">
<property name="text"> <property name="text">
@ -38,13 +60,13 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_2"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>20</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
@ -57,11 +79,11 @@
<property name="title"> <property name="title">
<string>Save at</string> <string>Save at</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="FileSystemPathComboEdit" name="savePath" native="true"/> <widget class="FileSystemPathComboEdit" name="savePath" native="true"/>
</item> </item>
<item> <item alignment="Qt::AlignRight">
<widget class="QCheckBox" name="checkBoxRememberLastSavePath"> <widget class="QCheckBox" name="checkBoxRememberLastSavePath">
<property name="text"> <property name="text">
<string>Remember last used save path</string> <string>Remember last used save path</string>
@ -71,50 +93,16 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="doNotDeleteTorrentCheckBox">
<property name="toolTip">
<string>When checked, the .torrent file will not be deleted despite the settings at the &quot;Download&quot; page of the options dialog</string>
</property>
<property name="text">
<string>Do not delete .torrent file</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxNeverShow">
<property name="text">
<string>Never show again</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButtonAdvanced">
<property name="text">
<string notr="true">▼</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item> <item>
<widget class="QGroupBox" name="groupBoxSettings"> <widget class="QGroupBox" name="groupBoxSettings">
<property name="title"> <property name="title">
<string>Torrent settings</string> <string>Torrent settings</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item row="1" column="2">
<widget class="QCheckBox" name="defaultCategoryCheckbox">
<property name="text">
<string>Set as default category</string>
</property>
</widget>
</item>
<item row="0" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_1">
<item> <item>
<widget class="QLabel" name="label_5"> <layout class="QHBoxLayout" name="categoryLayout">
<item>
<widget class="QLabel" name="labelCategory">
<property name="text"> <property name="text">
<string>Category:</string> <string>Category:</string>
</property> </property>
@ -138,17 +126,33 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="0" column="0"> <item alignment="Qt::AlignRight">
<widget class="QCheckBox" name="startTorrentCheckBox"> <widget class="QCheckBox" name="defaultCategoryCheckbox">
<property name="text"> <property name="text">
<string>Start torrent</string> <string>Set as default category</string>
</property> </property>
<property name="checked"> </widget>
<bool>true</bool> </item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="0">
<widget class="QCheckBox" name="doNotDeleteTorrentCheckBox">
<property name="toolTip">
<string>When checked, the .torrent file will not be deleted despite the settings at the &quot;Download&quot; page of the options dialog</string>
</property>
<property name="text">
<string>Do not delete .torrent file</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="1">
<widget class="QCheckBox" name="firstLastCheckBox">
<property name="text">
<string>Download first and last pieces first</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="skipCheckingCheckBox"> <widget class="QCheckBox" name="skipCheckingCheckBox">
<property name="text"> <property name="text">
<string>Skip hash check</string> <string>Skip hash check</string>
@ -156,143 +160,107 @@
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<spacer name="horizontalSpacer2"> <widget class="QCheckBox" name="sequentialCheckBox">
<property name="orientation"> <property name="text">
<enum>Qt::Horizontal</enum> <string>Download in sequential order</string>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>35</width>
<height>0</height>
</size>
</property> </property>
</spacer> </widget>
</item> </item>
<item row="2" column="0"> <item row="1" column="0">
<widget class="QCheckBox" name="createSubfolderCheckBox"> <widget class="QCheckBox" name="createSubfolderCheckBox">
<property name="text"> <property name="text">
<string>Create subfolder</string> <string>Create subfolder</string>
</property> </property>
<property name="checked">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="sequentialCheckBox"> <widget class="QCheckBox" name="startTorrentCheckBox">
<property name="text"> <property name="text">
<string>Download in sequential order</string> <string>Start torrent</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="0" column="2">
<widget class="QCheckBox" name="firstLastCheckBox"> <spacer name="horizontalSpacer_3">
<property name="text"> <property name="orientation">
<string>Download first and last pieces first</string> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="infoGroup"> <widget class="QGroupBox" name="infoGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title"> <property name="title">
<string>Torrent information</string> <string>Torrent information</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="1"> <item row="1" column="0">
<widget class="QLabel" name="lblhash"> <widget class="QLabel" name="labelDate">
<property name="text">
<string/>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text"> <property name="text">
<string>Hash:</string> <string>Date:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0" colspan="2"> <item row="0" column="1">
<widget class="TorrentContentTreeView" name="contentTreeView"> <widget class="QLabel" name="labelSizeData"/>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLabel" name="labelDate"> <widget class="QLabel" name="labelDateData"/>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Date:</string>
</property>
</widget>
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Size:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="labelSize"> <widget class="QLabel" name="labelSize">
<property name="text"> <property name="text">
<string/> <string>Size:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="2" column="1">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="labelHashData">
<property name="text"> <property name="textFormat">
<string>Comment:</string> <enum>Qt::PlainText</enum>
</property> </property>
<property name="alignment"> <property name="textInteractionFlags">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <set>Qt::TextSelectableByMouse</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QScrollArea" name="scrollArea"> <widget class="QScrollArea" name="scrollArea">
<property name="styleSheet">
<string notr="true">background-color: rgba(0, 0, 0, 0);</string>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="widgetResizable"> <property name="widgetResizable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<widget class="QWidget" name="scrollAreaWidgetContents_2"> <widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>321</width> <width>421</width>
<height>69</height> <height>68</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -306,10 +274,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="commentLabel"> <widget class="QLabel" name="labelCommentData">
<property name="text">
<string/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::RichText</enum> <enum>Qt::RichText</enum>
</property> </property>
@ -331,11 +296,73 @@
</widget> </widget>
</widget> </widget>
</item> </item>
<item row="2" column="0">
<widget class="QLabel" name="labelHash">
<property name="text">
<string>Hash:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelComment">
<property name="text">
<string>Comment:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<widget class="TorrentContentTreeView" name="contentTreeView">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="buttonsHLayout"> <layout class="QHBoxLayout" name="buttonsHLayout">
<item>
<widget class="QCheckBox" name="checkBoxNeverShow">
<property name="text">
<string>Never show again</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QProgressBar" name="progMetaLoading"> <widget class="QProgressBar" name="progMetaLoading">
<property name="sizePolicy"> <property name="sizePolicy">
@ -353,13 +380,17 @@
<property name="textVisible"> <property name="textVisible">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="format">
<string notr="true">%p%</string>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="lblMetaLoading"/> <widget class="QLabel" name="lblMetaLoading">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item> </item>
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
@ -405,18 +436,6 @@
<container>1</container> <container>1</container>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<tabstops>
<tabstop>savePath</tabstop>
<tabstop>checkBoxRememberLastSavePath</tabstop>
<tabstop>checkBoxNeverShow</tabstop>
<tabstop>toolButtonAdvanced</tabstop>
<tabstop>startTorrentCheckBox</tabstop>
<tabstop>skipCheckingCheckBox</tabstop>
<tabstop>categoryComboBox</tabstop>
<tabstop>defaultCategoryCheckbox</tabstop>
<tabstop>scrollArea</tabstop>
<tabstop>contentTreeView</tabstop>
</tabstops>
<resources/> <resources/>
<connections> <connections>
<connection> <connection>
@ -426,8 +445,8 @@
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>403</x> <x>928</x>
<y>579</y> <y>855</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>157</x> <x>157</x>
@ -442,8 +461,8 @@
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>403</x> <x>928</x>
<y>579</y> <y>855</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>286</x> <x>286</x>
@ -452,34 +471,34 @@
</hints> </hints>
</connection> </connection>
<connection> <connection>
<sender>categoryComboBox</sender> <sender>comboTTM</sender>
<signal>currentIndexChanged(int)</signal> <signal>currentIndexChanged(int)</signal>
<receiver>AddNewTorrentDialog</receiver> <receiver>AddNewTorrentDialog</receiver>
<slot>categoryChanged(int)</slot> <slot>TMMChanged(int)</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>337</x> <x>250</x>
<y>205</y> <y>53</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>403</x> <x>467</x>
<y>160</y> <y>249</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
<connection> <connection>
<sender>comboTTM</sender> <sender>categoryComboBox</sender>
<signal>currentIndexChanged(int)</signal> <signal>currentIndexChanged(int)</signal>
<receiver>AddNewTorrentDialog</receiver> <receiver>AddNewTorrentDialog</receiver>
<slot>TMMChanged(int)</slot> <slot>categoryChanged(int)</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>200</x> <x>266</x>
<y>19</y> <y>231</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>206</x> <x>467</x>
<y>294</y> <y>249</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>

Loading…
Cancel
Save