Allow transfer list text color changes through QSS

This commit is contained in:
Prince Gupta 2019-12-16 22:15:08 +05:30
parent d09c5e529c
commit d3aa45526a
6 changed files with 299 additions and 1 deletions

View file

@ -239,6 +239,197 @@ TransferListModel *TransferListWidget::getSourceModel() const
return m_listModel;
}
QColor TransferListWidget::unknownStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::Unknown);
}
QColor TransferListWidget::forcedDownloadingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::ForcedDownloading);
}
QColor TransferListWidget::downloadingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::Downloading);
}
QColor TransferListWidget::downloadingMetadataStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::DownloadingMetadata);
}
QColor TransferListWidget::allocatingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::Allocating);
}
QColor TransferListWidget::stalledDownloadingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::StalledDownloading);
}
QColor TransferListWidget::forcedUploadingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::ForcedUploading);
}
QColor TransferListWidget::uploadingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::Uploading);
}
QColor TransferListWidget::stalledUploadingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::StalledUploading);
}
QColor TransferListWidget::checkingResumeDataStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::CheckingResumeData);
}
QColor TransferListWidget::queuedDownloadingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::QueuedDownloading);
}
QColor TransferListWidget::queuedUploadingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::QueuedUploading);
}
QColor TransferListWidget::checkingUploadingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::CheckingUploading);
}
QColor TransferListWidget::checkingDownloadingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::CheckingDownloading);
}
QColor TransferListWidget::pausedDownloadingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::PausedDownloading);
}
QColor TransferListWidget::pausedUploadingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::PausedUploading);
}
QColor TransferListWidget::movingStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::Moving);
}
QColor TransferListWidget::missingFilesStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::MissingFiles);
}
QColor TransferListWidget::errorStateForeground() const
{
return m_listModel->stateForeground(BitTorrent::TorrentState::Error);
}
void TransferListWidget::setUnknownStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::Unknown, color);
}
void TransferListWidget::setForcedDownloadingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::ForcedDownloading, color);
}
void TransferListWidget::setDownloadingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::Downloading, color);
}
void TransferListWidget::setDownloadingMetadataStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::DownloadingMetadata, color);
}
void TransferListWidget::setAllocatingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::Allocating, color);
}
void TransferListWidget::setStalledDownloadingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::StalledDownloading, color);
}
void TransferListWidget::setForcedUploadingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::ForcedUploading, color);
}
void TransferListWidget::setUploadingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::Uploading, color);
}
void TransferListWidget::setStalledUploadingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::StalledUploading, color);
}
void TransferListWidget::setCheckingResumeDataStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::CheckingResumeData, color);
}
void TransferListWidget::setQueuedDownloadingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::QueuedDownloading, color);
}
void TransferListWidget::setQueuedUploadingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::QueuedUploading, color);
}
void TransferListWidget::setCheckingUploadingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::CheckingUploading, color);
}
void TransferListWidget::setCheckingDownloadingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::CheckingDownloading, color);
}
void TransferListWidget::setPausedDownloadingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::PausedDownloading, color);
}
void TransferListWidget::setPausedUploadingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::PausedUploading, color);
}
void TransferListWidget::setMovingStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::Moving, color);
}
void TransferListWidget::setMissingFilesStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::MissingFiles, color);
}
void TransferListWidget::setErrorStateForeground(const QColor &color)
{
m_listModel->setStateForeground(BitTorrent::TorrentState::Error, color);
}
void TransferListWidget::previewFile(const QString &filePath)
{
Utils::Gui::openPath(filePath);