]>
cloud.milkyroute.net Git - dolphin.git/blob - src/search/selectors/minimumratingselector.h
2 SPDX-FileCopyrightText: 2025 Felix Ernst <felixernst@kde.org>
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 #ifndef MINIMUMRATINGSELECTOR_H
8 #define MINIMUMRATINGSELECTOR_H
10 #include "../updatablestateinterface.h"
18 * @brief Select the minimum rating search results should have.
19 * Values <= 0 mean no restriction. 1 is half a star, 2 one full star, etc. 10 is typically the maximum in KDE software.
20 * Since this box only allows selecting full star ratings, the possible values are 0, 2, 4, 6, 8, 10.
22 class MinimumRatingSelector
: public QComboBox
, public UpdatableStateInterface
27 explicit MinimumRatingSelector(std::shared_ptr
<const DolphinQuery
> dolphinQuery
, QWidget
*parent
= nullptr);
29 /** Causes configurationChanged() to be emitted with a DolphinQuery object that does not contain any restriction settable by this class. */
30 void removeRestriction();
33 /** Is emitted whenever settings have changed and a new search might be necessary. */
34 void configurationChanged(const Search::DolphinQuery
&dolphinQuery
);
37 void updateState(const std::shared_ptr
<const DolphinQuery
> &dolphinQuery
) override
;
42 #endif // MINIMUMRATINGSELECTOR_H