diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2022-05-17 11:47:01 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2023-07-09 17:20:40 +0200 |
| commit | d13f6bb870cdda71257f665367be8ef9fca86255 (patch) | |
| tree | 52e214718478f1e52856572f5aa1a2ac58537f9f /src/pluginlistsortproxy.h | |
| parent | 86bb01ba9eac879d3685c439ac9da0028bc4bc80 (diff) | |
Apply clang-format.
Diffstat (limited to 'src/pluginlistsortproxy.h')
| -rw-r--r-- | src/pluginlistsortproxy.h | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/src/pluginlistsortproxy.h b/src/pluginlistsortproxy.h index 85e0d135..6a65c21d 100644 --- a/src/pluginlistsortproxy.h +++ b/src/pluginlistsortproxy.h @@ -20,49 +20,44 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #ifndef PLUGINLISTSORTPROXY_H #define PLUGINLISTSORTPROXY_H - -#include <bitset> -#include <QSortFilterProxyModel> #include "pluginlist.h" - +#include <QSortFilterProxyModel> +#include <bitset> class PluginListSortProxy : public QSortFilterProxyModel { Q_OBJECT public: - - enum ESorting { + enum ESorting + { SORT_ASCENDING, SORT_DESCENDING }; public: - - explicit PluginListSortProxy(QObject *parent = 0); + explicit PluginListSortProxy(QObject* parent = 0); void setEnabledColumns(unsigned int columns); - virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent); + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, + int column, const QModelIndex& parent); - bool filterMatchesPlugin(const QString &plugin) const; + bool filterMatchesPlugin(const QString& plugin) const; public slots: - void updateFilter(const QString &filter); + void updateFilter(const QString& filter); protected: - - virtual bool filterAcceptsRow(int row, const QModelIndex &parent) const; - virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const; + virtual bool filterAcceptsRow(int row, const QModelIndex& parent) const; + virtual bool lessThan(const QModelIndex& left, const QModelIndex& right) const; private: - int m_SortIndex; Qt::SortOrder m_SortOrder; std::bitset<PluginList::COL_LASTCOLUMN + 1> m_EnabledColumns; QString m_CurrentFilter; - }; -#endif // PLUGINLISTSORTPROXY_H +#endif // PLUGINLISTSORTPROXY_H |
