Open Bhaalspawn opened 1 year ago
You can click on the filter title and it will collapse.
You can click on the filter title and it will collapse.
it's not what i'm asking i want to see Active torrents, All torrents and maybe downloading.....i don't need many of those filters
@sledgehammer999 he wants to view SOME but not all the status filters. He would like the option to hide the status filters he doesn't want but keep the ones he does like. I think this issue should be titled "Option to Hide Individual Status Filters"
@sledgehammer999 could you assign me?
@sledgehammer999 hi, currently we have 3 action items in statusfilterwidget ( one of resume, pause, and remove torrents can be selected) . I added 4th action item as hide. Where should I add recover hidden? As 5th action?
Wouldn't it be better to have a list of the statuses as checkable items in a context menu somewhere? e.g. Right click on STATUS (which i'd prefer) or maybe a submenu on "All" or on all the statuses' context menu.
Ok, I will try to imolement "right click on status"
Wouldn't it be better to have a list of the statuses as checkable items in a context menu somewhere? e.g. Right click on STATUS (which i'd prefer) or maybe a submenu on "All" or on all the statuses' context menu.
this is what i mean context menu on single status is good to hide but it's a problem if i want that status back. context menu on "STATUS" would be great. like when we click on any point of the header to choose which columns we want to see
Is this style ok(I will replace one label with an image)? Since statusLabel's toggled signal is already taken(see below), I had to define new vertical layout and put a new button.
connect(statusLabel, &QCheckBox::toggled, statusFilters, &StatusFilterWidget::toggleFilter);
connect(statusLabel, &QCheckBox::toggled, pref, &Preferences::setStatusFilterState);
what is "One"?
Push button's label is currently one.
should I use this example?
should I use this example?
i don't know what push button is, and it seems you are on Linux the example seems to have some "separate" settings that is also a good solution
Hmm, I guess I will use the same structure of status. Let me illustrate: Top line will consist of two expandable sections: ∆ status | settings ∆ Whenever user hits one of them, it expands. ∆ status | eettings ▽ □ cancelled ▣ downloading ...(goes on)
sorry i still don't understand,i'm just and user, not developer. i don''t see any settings. settings are in the menu (tool-settings)
are you suggesting to ADD "settings" like we now have STATUS LABELS and TRACKERS? that would be the worst solution i think
maybe qbittorrent is different in linux
Yeah, I am suggesting to add hideable settings menu. No they are same in both linux and windows, since qt provides unified interface.
Ok, I will go back to thalieth's second recommendation.
@lapaz17 Could the "select/de-select filters" option be added in the View menu bar like Log
instead of the current context menu?
Does the Filters sidebar or qBittorrent itself have to be closed/re-opened for the selection/de-selection to take effect??
Status Filters->
A Queued
filter could be added here too now if they are to become optional??
i think right click on status is the best. so nothing is added here and there
submenu on all no, it will change the alignment
adding something in the view menu could be good and more complete. i mean if there is "select/de-select filters", in the future you can also add the chance to select which group to show or hide (show status, hide trackers, etc)
Since statusLabel's toggled signal is already taken(see below), I had to define new vertical layout and put a new button.
Toggled is for left click IIRC so for right click something like:
--- a/src/gui/transferlistfilterswidget.cpp
+++ b/src/gui/transferlistfilterswidget.cpp
@@ -832,6 +832,8 @@ TransferListFiltersWidget::TransferListFiltersWidget(QWidget *parent, TransferLi
statusLabel->setChecked(pref->getStatusFilterState());
statusLabel->setFont(font);
frameLayout->addWidget(statusLabel);
+ statusLabel->setContextMenuPolicy(Qt::CustomContextMenu);
+ connect(statusLabel, &QWidget::customContextMenuRequested, this, &TransferListFiltersWidget::showStatusFilterContextMenu);
auto *statusFilters = new StatusFilterWidget(this, transferList);
frameLayout->addWidget(statusFilters);
@thalieht Thanks for help, I missed that solution somehow :(
@xavier2k6 I think thalieht ended the confusion, so I am not going to try your suggestions. But thanks for your input.
hi, I just finished everything except lint. Here is the latest version, anything you want to add?
updateGeometry()
when checking/unchecking an item to avoid that empty space?
Ok
@thalieht updateGeometry does not work for hidden qlistwidgetitems, you can try it yourself on my branch I' ve tried many things (spent 7 hours)apart from your recommendation inside my new handler:
void TransferListFiltersWidget::updateStatus(int state)
{
Preferences *const pref = Preferences::instance();
QList<Qt::CheckState> individualStatusFilter = pref->getIndividualStatusFilterState();
auto checkBox = static_cast<QCheckBox*>(sender());
QList<QListWidgetItem*> items = m_statusFilters->findItems(tr(checkBox->text().toStdString().c_str()), Qt::MatchContains);
if(state == Qt::Unchecked)
items.first()->setHidden(true);
else
items.first()->setHidden(false);
individualStatusFilter[m_statusFilters->row(items.first())] = (static_cast<Qt::CheckState>(state));
pref->setIndividualStatusFilterState(individualStatusFilter);
qDebug() << 1;
}
I do not want to use take item, because it will break existing code (out of range errors...)
Sorry about that, for some reason i thought you'd remove the items instead of hide them. I don't know what else to do. If that;s all that remains maybe the devs will suggest something when you open the PR.
Maybe reimplement BaseFilterWidget::sizeHint()
for TransferListFiltersWidget
and do something with the count()
part in it. No idea if that will work.
I may as well mention this now before you open the PR because you'll be required to fix them anyway: please read https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md. I see some extra spaces and broken indentation here and there.
Tanks for suggestions. As I mentioned 3 message above, I am aware of linting issues, I will fix after handling resize.
Closure? (There is hiding of zero status filters)
Suggestion
Now that we have right click on status filters can you add "hide filter"? I don't really need all those filters.
Use case
No response
Extra info/examples/attachments
No response