Read Transfer list's custom colors from config.json

This commit is contained in:
jagannatharjun
2020-05-06 16:37:37 +05:30
parent 2c100feb35
commit 77658be9a7
4 changed files with 49 additions and 290 deletions

View File

@@ -32,6 +32,7 @@
#include <QAbstractListModel>
#include <QColor>
#include <QHash>
#include <QList>
#include "base/bittorrent/torrenthandle.h"
@@ -101,9 +102,6 @@ public:
BitTorrent::TorrentHandle *torrentHandle(const QModelIndex &index) const;
void setStateForeground(BitTorrent::TorrentState state, const QColor& color);
QColor stateForeground(BitTorrent::TorrentState state) const;
private slots:
void addTorrent(BitTorrent::TorrentHandle *const torrent);
void handleTorrentAboutToBeRemoved(BitTorrent::TorrentHandle *const torrent);
@@ -119,7 +117,7 @@ private:
QHash<BitTorrent::TorrentHandle *, int> m_torrentMap; // maps torrent handle to row number
const QHash<BitTorrent::TorrentState, QString> m_statusStrings;
// row text colors
QHash<BitTorrent::TorrentState, QColor> m_stateForegroundColors;
const QHash<BitTorrent::TorrentState, QColor> m_stateThemeColors;
enum class HideZeroValuesMode
{