2015-11-15 13:37:13 +08:00
|
|
|
/*
|
|
|
|
* Bittorrent Client using Qt and libtorrent.
|
|
|
|
* Copyright (C) 2015
|
|
|
|
*
|
|
|
|
* This program 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 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* In addition, as a special exception, the copyright holders give permission to
|
|
|
|
* link this program with the OpenSSL project's "OpenSSL" library (or with
|
|
|
|
* modified versions of it that use the same license as the "OpenSSL" library),
|
|
|
|
* and distribute the linked executables. You must obey the GNU General Public
|
|
|
|
* License in all respects for all of the code used other than "OpenSSL". If you
|
|
|
|
* modify file(s), you may extend this exception to your version of the file(s),
|
|
|
|
* but you are not obligated to do so. If you do not wish to do so, delete this
|
|
|
|
* exception statement from your version.
|
|
|
|
*/
|
|
|
|
|
2010-01-31 15:11:15 +00:00
|
|
|
#ifndef ADVANCEDSETTINGS_H
|
|
|
|
#define ADVANCEDSETTINGS_H
|
|
|
|
|
2017-08-11 15:50:56 +08:00
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QComboBox>
|
2015-11-15 15:03:43 +08:00
|
|
|
#include <QLabel>
|
2011-02-05 15:44:48 +00:00
|
|
|
#include <QLineEdit>
|
2017-08-11 15:50:56 +08:00
|
|
|
#include <QSpinBox>
|
2015-11-15 13:48:10 +08:00
|
|
|
#include <QTableWidget>
|
2010-01-31 15:11:15 +00:00
|
|
|
|
2018-06-06 16:48:17 +03:00
|
|
|
class AdvancedSettings : public QTableWidget
|
2015-08-05 12:09:02 +08:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2010-01-31 15:11:15 +00:00
|
|
|
|
|
|
|
public:
|
2015-11-15 14:08:22 +08:00
|
|
|
AdvancedSettings(QWidget *parent);
|
2010-01-31 15:11:15 +00:00
|
|
|
|
2010-01-31 16:14:56 +00:00
|
|
|
public slots:
|
2015-11-15 13:48:10 +08:00
|
|
|
void saveAdvancedSettings();
|
2010-01-31 15:11:15 +00:00
|
|
|
|
2011-04-11 19:48:06 +00:00
|
|
|
signals:
|
2015-08-05 12:09:02 +08:00
|
|
|
void settingsChanged();
|
2011-04-11 19:48:06 +00:00
|
|
|
|
2015-11-15 13:48:10 +08:00
|
|
|
private slots:
|
|
|
|
void updateCacheSpinSuffix(int value);
|
2018-07-04 14:02:05 +08:00
|
|
|
void updateSaveResumeDataIntervalSuffix(int value);
|
2016-05-27 01:35:58 +03:00
|
|
|
void updateInterfaceAddressCombo();
|
|
|
|
|
2015-11-15 13:48:10 +08:00
|
|
|
private:
|
|
|
|
void loadAdvancedSettings();
|
2019-03-07 15:31:50 +08:00
|
|
|
template <typename T> void addRow(int row, const QString &text, T *widget);
|
2011-04-11 19:48:06 +00:00
|
|
|
|
2015-11-15 15:03:43 +08:00
|
|
|
QLabel labelQbtLink, labelLibtorrentLink;
|
2019-03-11 21:47:49 +02:00
|
|
|
QSpinBox spinBoxAsyncIOThreads, spinBoxCheckingMemUsage, spinBoxCache, spinBoxSaveResumeDataInterval, spinBoxOutgoingPortsMin, spinBoxOutgoingPortsMax, spinBoxListRefresh,
|
2018-06-14 12:38:18 +03:00
|
|
|
spinBoxTrackerPort, spinBoxCacheTTL, spinBoxSendBufferWatermark, spinBoxSendBufferLowWatermark,
|
2019-07-02 12:03:44 +08:00
|
|
|
spinBoxSendBufferWatermarkFactor, spinBoxSocketBacklogSize, spinBoxSavePathHistoryLength;
|
2018-06-14 12:38:18 +03:00
|
|
|
QCheckBox checkBoxOsCache, checkBoxRecheckCompleted, checkBoxResolveCountries, checkBoxResolveHosts, checkBoxSuperSeeding,
|
|
|
|
checkBoxProgramNotifications, checkBoxTorrentAddedNotifications, checkBoxTrackerFavicon, checkBoxTrackerStatus,
|
|
|
|
checkBoxConfirmTorrentRecheck, checkBoxConfirmRemoveAllTags, checkBoxListenIPv6, checkBoxAnnounceAllTrackers, checkBoxAnnounceAllTiers,
|
2018-09-23 13:20:05 +07:00
|
|
|
checkBoxGuidedReadCache, checkBoxMultiConnectionsPerIp, checkBoxSuggestMode, checkBoxCoalesceRW, checkBoxSpeedWidgetEnabled;
|
2018-06-14 12:38:18 +03:00
|
|
|
QComboBox comboBoxInterface, comboBoxInterfaceAddress, comboBoxUtpMixedMode, comboBoxChokingAlgorithm, comboBoxSeedChokingAlgorithm;
|
|
|
|
QLineEdit lineEditAnnounceIP;
|
2012-10-07 19:14:53 +03:00
|
|
|
|
2015-11-15 13:48:10 +08:00
|
|
|
// OS dependent settings
|
2013-09-21 11:59:58 +04:00
|
|
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
2018-06-14 12:38:18 +03:00
|
|
|
QCheckBox checkBoxUpdateCheck;
|
2011-01-01 13:05:28 +00:00
|
|
|
#endif
|
2015-11-15 13:48:10 +08:00
|
|
|
|
2013-09-21 11:59:58 +04:00
|
|
|
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
2018-06-14 12:38:18 +03:00
|
|
|
QCheckBox checkBoxUseIconTheme;
|
2010-12-21 17:41:11 +00:00
|
|
|
#endif
|
2010-01-31 15:11:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ADVANCEDSETTINGS_H
|