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