mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 21:51:25 -07:00
Add speedwidget based on QGraphicsView
This commit is contained in:
parent
b26724d12b
commit
7b736b6ae3
16 changed files with 756 additions and 3 deletions
|
@ -2501,6 +2501,25 @@ void Preferences::setHostNameCookies(const QString &host_name, const QList<QByte
|
|||
setValue("Rss/hosts_cookies", hosts_table);
|
||||
}
|
||||
|
||||
int Preferences::getSpeedWidgetPeriod() const {
|
||||
return value("SpeedWidget/period", 1).toInt();
|
||||
}
|
||||
|
||||
void Preferences::setSpeedWidgetPeriod(const int period) {
|
||||
setValue("SpeedWidget/period", period);
|
||||
}
|
||||
|
||||
bool Preferences::getSpeedWidgetGraphEnable(int id) const
|
||||
{
|
||||
// UP and DOWN graphs enabled by default
|
||||
return value("SpeedWidget/graph_enable_" + QString::number(id), (id == 0 || id == 1)).toBool();
|
||||
}
|
||||
|
||||
void Preferences::setSpeedWidgetGraphEnable(int id, const bool enable)
|
||||
{
|
||||
setValue("SpeedWidget/graph_enable_" + QString::number(id), enable);
|
||||
}
|
||||
|
||||
void Preferences::apply()
|
||||
{
|
||||
if (save())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue