2015-11-15 08:37:13 +03: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 18:11:15 +03:00
|
|
|
#ifndef ADVANCEDSETTINGS_H
|
|
|
|
#define ADVANCEDSETTINGS_H
|
|
|
|
|
2015-11-15 10:03:43 +03:00
|
|
|
#include <QLabel>
|
2010-01-31 18:11:15 +03:00
|
|
|
#include <QSpinBox>
|
2010-01-31 18:42:24 +03:00
|
|
|
#include <QCheckBox>
|
2011-02-05 18:44:48 +03:00
|
|
|
#include <QLineEdit>
|
2010-05-11 19:53:14 +04:00
|
|
|
#include <QComboBox>
|
2015-11-15 08:48:10 +03:00
|
|
|
#include <QTableWidget>
|
2010-01-31 18:11:15 +03:00
|
|
|
|
|
|
|
|
2015-08-05 07:09:02 +03:00
|
|
|
class AdvancedSettings: public QTableWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2010-01-31 18:11:15 +03:00
|
|
|
|
|
|
|
public:
|
2015-11-15 09:08:22 +03:00
|
|
|
AdvancedSettings(QWidget *parent);
|
2010-01-31 18:11:15 +03:00
|
|
|
|
2010-01-31 19:14:56 +03:00
|
|
|
public slots:
|
2015-11-15 08:48:10 +03:00
|
|
|
void saveAdvancedSettings();
|
2010-01-31 18:11:15 +03:00
|
|
|
|
2011-04-11 23:48:06 +04:00
|
|
|
signals:
|
2015-08-05 07:09:02 +03:00
|
|
|
void settingsChanged();
|
2011-04-11 23:48:06 +04:00
|
|
|
|
2015-11-15 08:48:10 +03:00
|
|
|
private slots:
|
|
|
|
void updateCacheSpinSuffix(int value);
|
2011-04-11 23:48:06 +04:00
|
|
|
|
2015-11-15 08:48:10 +03:00
|
|
|
private:
|
|
|
|
void loadAdvancedSettings();
|
2015-11-15 09:56:39 +03:00
|
|
|
template <typename T> void addRow(int row, const QString &rowText, T* widget);
|
2011-04-11 23:48:06 +04:00
|
|
|
|
2015-11-15 10:03:43 +03:00
|
|
|
QLabel labelQbtLink, labelLibtorrentLink;
|
2015-11-15 08:48:10 +03:00
|
|
|
QSpinBox spin_cache, spin_save_resume_data_interval, outgoing_ports_min, outgoing_ports_max, spin_list_refresh, spin_maxhalfopen, spin_tracker_port, spin_cache_ttl;
|
|
|
|
QCheckBox cb_os_cache, cb_recheck_completed, cb_resolve_countries, cb_resolve_hosts,
|
|
|
|
cb_super_seeding, cb_program_notifications, cb_tracker_status,
|
|
|
|
cb_confirm_torrent_recheck, cb_enable_tracker_ext, cb_listen_ipv6, cb_announce_all_trackers;
|
|
|
|
QComboBox combo_iface;
|
|
|
|
QLineEdit txt_network_address;
|
2012-10-07 20:14:53 +04:00
|
|
|
|
2015-11-15 08:48:10 +03:00
|
|
|
// OS dependent settings
|
2013-09-21 11:59:58 +04:00
|
|
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
2015-11-15 08:48:10 +03:00
|
|
|
QCheckBox cb_update_check;
|
2011-01-01 16:05:28 +03:00
|
|
|
#endif
|
2015-11-15 08:48:10 +03:00
|
|
|
|
2013-09-21 11:59:58 +04:00
|
|
|
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
2015-11-15 08:48:10 +03:00
|
|
|
QCheckBox cb_use_icon_theme;
|
2010-12-21 20:41:11 +03:00
|
|
|
#endif
|
2010-01-31 18:11:15 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ADVANCEDSETTINGS_H
|