2011-07-21 01:03:55 +02:00
|
|
|
/* This file is part of Clementine.
|
|
|
|
Copyright 2010, David Sansome <me@davidsansome.com>
|
|
|
|
|
|
|
|
Clementine 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.
|
|
|
|
|
|
|
|
Clementine 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 Clementine. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
#ifndef BEHAVIOURSETTINGSPAGE_H
|
|
|
|
#define BEHAVIOURSETTINGSPAGE_H
|
2011-07-21 01:03:55 +02:00
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
#include <QMap>
|
2011-07-21 01:03:55 +02:00
|
|
|
|
2020-09-18 16:15:19 +02:00
|
|
|
#include "settingspage.h"
|
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
class Ui_BehaviourSettingsPage;
|
|
|
|
|
|
|
|
class BehaviourSettingsPage : public SettingsPage {
|
2011-07-21 01:03:55 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
public:
|
2011-08-14 01:07:10 +02:00
|
|
|
BehaviourSettingsPage(SettingsDialog* dialog);
|
|
|
|
~BehaviourSettingsPage();
|
2011-07-21 01:03:55 +02:00
|
|
|
|
|
|
|
void Load();
|
|
|
|
void Save();
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
private slots:
|
2011-08-14 01:07:10 +02:00
|
|
|
void ShowTrayIconToggled(bool on);
|
Introduce limit for number of tag client processes.
Previously, the number of processes spawned was always
QThread::idealThreadCount() (returning the number of logical CPU
cores). On new systems with many cores, however, this can result
in 12, 16, 24, or ... processes being spawned, which is a bit
excessive.
This establishes a new config variable,
'max_numprocs_tagclients' within the Settings group, in order
to limit the maximum number of tag client processes that get
spawned. It also adds a means of setting this via the Behavior
page in Settings. It can be set to any integer in the interval
[1, QThread::idealThreadCount()]; it defaults to the maximal value
so as to emulate the old behavior.
2019-03-28 17:37:54 +01:00
|
|
|
void MaxNumProcsTagClientsChanged(int value);
|
2011-08-14 01:07:10 +02:00
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
private:
|
2011-08-14 01:07:10 +02:00
|
|
|
Ui_BehaviourSettingsPage* ui_;
|
|
|
|
|
|
|
|
QMap<QString, QString> language_map_;
|
2011-07-21 01:03:55 +02:00
|
|
|
};
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
#endif // BEHAVIOURSETTINGSPAGE_H
|