feat(MangeTokensController): add method returning order of given token
This commit is contained in:
parent
3aa48b0549
commit
45863ad4c1
|
@ -272,6 +272,12 @@ bool ManageTokensController::hasSettings() const
|
|||
return !m_settingsData.isEmpty();
|
||||
}
|
||||
|
||||
int ManageTokensController::order(const QString& symbol) const
|
||||
{
|
||||
const auto entry = m_settingsData.value(symbol, TokenOrder());
|
||||
return entry.visible ? entry.sortOrder : undefinedTokenOrder;
|
||||
}
|
||||
|
||||
int ManageTokensController::compareTokens(const QString& lhsSymbol, const QString& rhsSymbol) const
|
||||
{
|
||||
const auto left = m_settingsData.value(lhsSymbol, TokenOrder());
|
||||
|
|
|
@ -64,6 +64,7 @@ public:
|
|||
|
||||
Q_INVOKABLE QString serializeSettingsAsJson();
|
||||
|
||||
Q_INVOKABLE int order(const QString& symbol) const;
|
||||
Q_INVOKABLE int compareTokens(const QString& lhsSymbol, const QString& rhsSymbol) const;
|
||||
Q_INVOKABLE bool filterAcceptsSymbol(const QString& symbol) const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue