mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 14:04:23 +00:00
Greatly improved the RSS downloader dialog layout
This commit is contained in:
parent
287cdc43c1
commit
bb19cfce1f
@ -50,9 +50,13 @@ AutomatedRssDownloader::AutomatedRssDownloader(QWidget *parent) :
|
|||||||
m_editedRule(0)
|
m_editedRule(0)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
// Ui Settings
|
||||||
ui->listRules->setSortingEnabled(true);
|
ui->listRules->setSortingEnabled(true);
|
||||||
ui->listRules->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
ui->listRules->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||||
ui->treeMatchingArticles->setSortingEnabled(true);
|
ui->treeMatchingArticles->setSortingEnabled(true);
|
||||||
|
ui->hsplitter->setCollapsible(0, false);
|
||||||
|
ui->hsplitter->setCollapsible(1, false);
|
||||||
|
ui->hsplitter->setCollapsible(2, true); // Only the preview list is collapsible
|
||||||
|
|
||||||
connect(ui->listRules, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayRulesListMenu(const QPoint&)));
|
connect(ui->listRules, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayRulesListMenu(const QPoint&)));
|
||||||
m_ruleList = RssDownloadRuleList::instance();
|
m_ruleList = RssDownloadRuleList::instance();
|
||||||
@ -84,6 +88,7 @@ void AutomatedRssDownloader::loadSettings()
|
|||||||
QIniSettings settings("qBittorrent", "qBittorrent");
|
QIniSettings settings("qBittorrent", "qBittorrent");
|
||||||
restoreGeometry(settings.value("RssFeedDownloader/geometry").toByteArray());
|
restoreGeometry(settings.value("RssFeedDownloader/geometry").toByteArray());
|
||||||
ui->checkEnableDownloader->setChecked(RssSettings().isRssDownloadingEnabled());
|
ui->checkEnableDownloader->setChecked(RssSettings().isRssDownloadingEnabled());
|
||||||
|
ui->hsplitter->restoreState(settings.value("RssFeedDownloader/hsplitterSizes").toByteArray());
|
||||||
// Display download rules
|
// Display download rules
|
||||||
loadRulesList();
|
loadRulesList();
|
||||||
}
|
}
|
||||||
@ -94,6 +99,7 @@ void AutomatedRssDownloader::saveSettings()
|
|||||||
// Save dialog geometry
|
// Save dialog geometry
|
||||||
QIniSettings settings("qBittorrent", "qBittorrent");
|
QIniSettings settings("qBittorrent", "qBittorrent");
|
||||||
settings.setValue("RssFeedDownloader/geometry", saveGeometry());
|
settings.setValue("RssFeedDownloader/geometry", saveGeometry());
|
||||||
|
settings.setValue("RssFeedDownloader/hsplitterSizes", ui->hsplitter->saveState());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutomatedRssDownloader::loadRulesList()
|
void AutomatedRssDownloader::loadRulesList()
|
||||||
@ -455,6 +461,7 @@ void AutomatedRssDownloader::addFeedArticlesToTree(const RssFeed *feed, const QS
|
|||||||
// If there is none, create it
|
// If there is none, create it
|
||||||
if(!treeFeedItem) {
|
if(!treeFeedItem) {
|
||||||
treeFeedItem = new QTreeWidgetItem(QStringList() << feed->getName());
|
treeFeedItem = new QTreeWidgetItem(QStringList() << feed->getName());
|
||||||
|
treeFeedItem->setToolTip(0, feed->getName());
|
||||||
QFont f = treeFeedItem->font(0);
|
QFont f = treeFeedItem->font(0);
|
||||||
f.setBold(true);
|
f.setBold(true);
|
||||||
treeFeedItem->setFont(0, f);
|
treeFeedItem->setFont(0, f);
|
||||||
@ -465,6 +472,7 @@ void AutomatedRssDownloader::addFeedArticlesToTree(const RssFeed *feed, const QS
|
|||||||
// Insert the articles
|
// Insert the articles
|
||||||
foreach(const QString &art, articles) {
|
foreach(const QString &art, articles) {
|
||||||
QTreeWidgetItem *item = new QTreeWidgetItem(QStringList() << art);
|
QTreeWidgetItem *item = new QTreeWidgetItem(QStringList() << art);
|
||||||
|
item->setToolTip(0, art);
|
||||||
treeFeedItem->addChild(item);
|
treeFeedItem->addChild(item);
|
||||||
}
|
}
|
||||||
ui->treeMatchingArticles->expandItem(treeFeedItem);
|
ui->treeMatchingArticles->expandItem(treeFeedItem);
|
||||||
|
@ -28,8 +28,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<widget class="QSplitter" name="hsplitter">
|
||||||
<item>
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
@ -119,8 +122,8 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</widget>
|
||||||
<item>
|
<widget class="QWidget" name="">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="ruleDefBox">
|
<widget class="QGroupBox" name="ruleDefBox">
|
||||||
@ -242,15 +245,8 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</widget>
|
||||||
<item>
|
<widget class="QWidget" name="">
|
||||||
<widget class="Line" name="line_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
@ -278,14 +274,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</widget>
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="Line" name="line">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user