Files
transmission/qt/UserMetaType.h
Charles Kerr 90402fd97b refactor: move StatsMode to tr::app (#8330)
* refactor: add StatsMode to libtransmission-app

* test: add display-mode unit tests

* feat: add apicompat for StatsMode

* refactor: use StatsMode in Qt client

* refactor: add template method for gtr_set_pref()

* refactor: use StatsMode in GTK client

* ci: use the all-tests alias instead of hardcoding tests

* ci: copy runtime DLLS into test output directory for Windows test binaries
2026-02-03 09:52:49 -06:00

41 lines
1.1 KiB
C++

// This file Copyright © Mnemosyne LLC.
// It may be used under GPLv2 (SPDX: GPL-2.0-only), GPLv3 (SPDX: GPL-3.0-only),
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#pragma once
#include <libtransmission/transmission.h>
#include <libtransmission-app/display-modes.h>
#include <QMetaType>
class UserMetaType
{
public:
enum
{
ShowModeType = QMetaType::User,
SortModeType,
StatsModeType,
EncryptionModeType,
};
};
Q_DECLARE_METATYPE(tr_encryption_mode)
using ShowMode = tr::app::ShowMode;
Q_DECLARE_METATYPE(ShowMode)
inline auto constexpr DefaultShowMode = tr::app::DefaultShowMode;
inline auto constexpr ShowModeCount = tr::app::ShowModeCount;
using SortMode = tr::app::SortMode;
Q_DECLARE_METATYPE(SortMode)
inline auto constexpr DefaultSortMode = tr::app::DefaultSortMode;
using StatsMode = tr::app::StatsMode;
Q_DECLARE_METATYPE(StatsMode)
inline auto constexpr DefaultStatsMode = tr::app::DefaultStatsMode;
inline auto constexpr StatsModeCount = tr::app::StatsModeCount;