2022-11-18 13:09:12 +01:00
|
|
|
/*
|
|
|
|
|
* This file is part of the Flowee project
|
2024-01-04 20:37:46 +01:00
|
|
|
* Copyright (C) 2022-2024 Tom Zander <tom@flowee.org>
|
2022-11-18 13:09:12 +01:00
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
#ifndef WALLETENUMS_H
|
|
|
|
|
#define WALLETENUMS_H
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
|
|
class WalletEnums : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
WalletEnums(QObject *parent = nullptr);
|
|
|
|
|
|
|
|
|
|
enum StringType {
|
|
|
|
|
Unknown = 0,
|
|
|
|
|
PrivateKey,
|
|
|
|
|
CashPKH,
|
|
|
|
|
CashSH,
|
|
|
|
|
LegacyPKH,
|
|
|
|
|
LegacySH,
|
|
|
|
|
PartialMnemonic,
|
|
|
|
|
PartialMnemonicWithTypo,
|
|
|
|
|
CorrectMnemonic,
|
2023-10-18 21:02:41 +03:00
|
|
|
MissingLexicon,
|
|
|
|
|
ElectrumMnemonic,
|
2022-11-18 13:09:12 +01:00
|
|
|
};
|
2022-11-18 18:15:33 +01:00
|
|
|
Q_ENUM(StringType)
|
2022-11-18 13:09:12 +01:00
|
|
|
|
2022-11-18 13:41:12 +01:00
|
|
|
enum Include {
|
|
|
|
|
IncludeNothing = 0,
|
|
|
|
|
IncludeRejected = 1,
|
|
|
|
|
IncludeUnconfirmed = 2,
|
|
|
|
|
IncludeConfirmed = 4,
|
|
|
|
|
|
|
|
|
|
IncludeAll = IncludeRejected | IncludeUnconfirmed | IncludeConfirmed
|
|
|
|
|
};
|
|
|
|
|
Q_DECLARE_FLAGS(Includes, Include)
|
|
|
|
|
Q_FLAG(Includes)
|
2022-11-18 18:15:33 +01:00
|
|
|
|
|
|
|
|
/// used by the WalletHistoryModel to group items visually
|
2022-11-24 12:15:27 +01:00
|
|
|
enum PlacementInGroup {
|
2022-11-18 18:15:33 +01:00
|
|
|
GroupStart,
|
|
|
|
|
GroupMiddle,
|
|
|
|
|
GroupEnd,
|
|
|
|
|
Ungrouped
|
|
|
|
|
};
|
2022-11-24 12:15:27 +01:00
|
|
|
Q_ENUM(PlacementInGroup)
|
2022-11-18 18:15:33 +01:00
|
|
|
// Grouping period
|
|
|
|
|
enum GroupingPeriod {
|
|
|
|
|
Today,
|
|
|
|
|
Yesterday,
|
|
|
|
|
EarlierThisWeek, // this week, but we grouped some in the previous category(s)
|
|
|
|
|
Week,
|
|
|
|
|
EarlierThisMonth, // this month, but we grouped some in the previous category(s)
|
|
|
|
|
Month
|
|
|
|
|
};
|
|
|
|
|
Q_ENUM(GroupingPeriod)
|
2024-01-04 20:37:46 +01:00
|
|
|
|
|
|
|
|
enum PeerValidity {
|
|
|
|
|
UnknownValidity,
|
|
|
|
|
KnownGood,
|
|
|
|
|
Checking,
|
|
|
|
|
CheckedOk
|
|
|
|
|
// there is no rejected as those just get kicked.
|
|
|
|
|
};
|
|
|
|
|
Q_ENUM(PeerValidity)
|
2022-11-18 13:09:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|