mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
- Moved everything to trunk to create a stable branch
This commit is contained in:
commit
969a02b93e
200 changed files with 46382 additions and 0 deletions
106
src/options_imp.h
Normal file
106
src/options_imp.h
Normal file
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* Bittorrent Client using Qt4 and libtorrent.
|
||||
* Copyright (C) 2006 Christophe Dumez
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#ifndef OPTIONS_IMP_H
|
||||
#define OPTIONS_IMP_H
|
||||
|
||||
#include <QTranslator>
|
||||
#include "ui_options.h"
|
||||
#include "libtorrent/session.hpp"
|
||||
using namespace libtorrent;
|
||||
|
||||
class options_imp : public QDialog, private Ui::Dialog{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
QButtonGroup choiceLanguage;
|
||||
ip_filter filter;
|
||||
QStringList locales;
|
||||
|
||||
public:
|
||||
// Contructor
|
||||
options_imp(QWidget *parent=0);
|
||||
|
||||
// Methods
|
||||
bool saveOptions();
|
||||
bool loadOptions();
|
||||
// Main options
|
||||
std::pair<unsigned short, unsigned short> getPorts() const;
|
||||
QString getSavePath() const;
|
||||
QPair<int,int> getLimits() const;
|
||||
float getRatio() const;
|
||||
int getMaxConnec() const;
|
||||
QString getScanDir() const;
|
||||
bool isDHTEnabled() const;
|
||||
// Filter Settings
|
||||
bool isFilteringEnabled() const;
|
||||
ip_filter getFilter() const;
|
||||
// Proxy settings
|
||||
bool isProxyEnabled() const;
|
||||
bool isProxyAuthEnabled() const;
|
||||
QString getProxyIp() const;
|
||||
unsigned short getProxyPort() const;
|
||||
QString getProxyUsername() const;
|
||||
QString getProxyPassword() const;
|
||||
// Language Settings
|
||||
QString getLocale() const;
|
||||
QTranslator translator;
|
||||
// Misc Settings
|
||||
bool getClearFinishedOnExit() const;
|
||||
bool getGoToSysTrayOnMinimizingWindow() const;
|
||||
bool getConfirmOnExit() const;
|
||||
QString getPreviewProgram() const;
|
||||
bool getUseOSDAlways() const;
|
||||
bool getUseOSDWhenHiddenOnly() const;
|
||||
// Other
|
||||
void showLoad();
|
||||
|
||||
|
||||
protected slots:
|
||||
void on_okButton_clicked();
|
||||
void on_cancelButton_clicked();
|
||||
void on_applyButton_clicked();
|
||||
void on_addFilterRange_clicked();
|
||||
void on_delFilterRange_clicked();
|
||||
void on_browse_button_scan_clicked();
|
||||
void on_browsePreview_clicked();
|
||||
void on_filterBrowse_clicked();
|
||||
void disableDownload(int checkBoxValue);
|
||||
void disableMaxConnecLimit(int);
|
||||
void enableFilter(int checkBoxValue);
|
||||
void disableUpload(int checkBoxValue);
|
||||
void disableShareRatio(int checkBoxValue);
|
||||
void enableProxy(int checkBoxValue);
|
||||
void enableProxyAuth(int checkBoxValue);
|
||||
void enableDirScan(int checkBoxValue);
|
||||
void on_browse_button_clicked();
|
||||
void processFilterFile(const QString& filePath=QString());
|
||||
void enableApplyButton();
|
||||
void checkPortsLogic();
|
||||
|
||||
public slots:
|
||||
void setLocale(QString locale);
|
||||
|
||||
signals:
|
||||
void status_changed(const QString&) const;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue