Compare commits
12 Commits
release-1.
...
release-1.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f9b3ebd259 | ||
![]() |
855b539843 | ||
![]() |
2e72ab4973 | ||
![]() |
ae2ad8e747 | ||
![]() |
42fa5ef8f3 | ||
![]() |
9395f7316d | ||
![]() |
fa1c4050ed | ||
![]() |
565b98a94a | ||
![]() |
f58efdfefc | ||
![]() |
a806c27f70 | ||
![]() |
a8f82d9e12 | ||
![]() |
fe6054307e |
13
AUTHORS
@@ -17,14 +17,13 @@ Images Authors:
|
|||||||
license: Creative Commons Public Domain Dedication
|
license: Creative Commons Public Domain Dedication
|
||||||
url: http://www.openclipart.org
|
url: http://www.openclipart.org
|
||||||
|
|
||||||
* files: src/Icons/skin/*.png
|
* files: src/Icons/skins/*.png
|
||||||
files: src/menuicons/YYxYY/*.png
|
|
||||||
copyright: Mateusz Tobola <tobejodok@qbittorrent.org>
|
copyright: Mateusz Tobola <tobejodok@qbittorrent.org>
|
||||||
license: GPLv2
|
license: GPLv2
|
||||||
|
|
||||||
* file: src/Icons/skin/tabs.gif
|
* files: src/menuicons/YYxYY/*.png
|
||||||
copyright: Greg Houston <gregory.houston@gmail.com>
|
copyright: Mateusz Tobola <tobejodok@qbittorrent.org>
|
||||||
license: MIT
|
license: GPLv2
|
||||||
|
|
||||||
* file: src/search_engine/engines/btjunkie.png
|
* file: src/search_engine/engines/btjunkie.png
|
||||||
copyright: Downloaded from btjunkie.org
|
copyright: Downloaded from btjunkie.org
|
||||||
@@ -47,9 +46,7 @@ Translations authors:
|
|||||||
- Brazilian: Nick Marinho (nickmarinho@gmail.com)
|
- Brazilian: Nick Marinho (nickmarinho@gmail.com)
|
||||||
- Bulgarian: Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)
|
- Bulgarian: Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)
|
||||||
- Catalan: Gekko Dam Beer (gekko04@users.sourceforge.net)
|
- Catalan: Gekko Dam Beer (gekko04@users.sourceforge.net)
|
||||||
- Chinese (Simplified): Guo Yue (yue.guo0418@gmail.com)
|
- Chinese (Simplified): Guo Yue (guoyue0418@hotmail.com)
|
||||||
- Chinese (Traditional): Yi-Shun Wang (dnextstep@gmail.com)
|
|
||||||
- Czech: Jirka Vilim (web@tets.cz)
|
|
||||||
- Danish: Mathias Nielsen (comoneo@gmail.com)
|
- Danish: Mathias Nielsen (comoneo@gmail.com)
|
||||||
- Dutch: Joost Schipper (heavyjoost@users.sourceforge.net)
|
- Dutch: Joost Schipper (heavyjoost@users.sourceforge.net)
|
||||||
- English: Christophe Dumez (chris@qbittorrent.org)
|
- English: Christophe Dumez (chris@qbittorrent.org)
|
||||||
|
48
Changelog
@@ -1,50 +1,4 @@
|
|||||||
* Sun Nov 9 2008 - Christophe Dumez <chris@qbittorrent.org> - v1.2.1
|
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.1.0
|
||||||
- BUGFIX: Fixed possible crash when deleting a torrent permanently
|
|
||||||
- BUGFIX: Queued_for_checking torrents were not displayed as checking in seeding list
|
|
||||||
- BUGFIX: Speed up startup time when having a lot of torrents
|
|
||||||
|
|
||||||
* Wed Oct 29 2008 - Christophe Dumez <chris@qbittorrent.org> - v1.2.0
|
|
||||||
- FEATURE: Torrent queueing system (with priorities)
|
|
||||||
- FEATURE: The number of DHT nodes is displayed
|
|
||||||
- FEATURE: RSS can now be disabled from program preferences
|
|
||||||
- FEATURE: Added collapse/expand all buttons in addition and properties dialogs
|
|
||||||
- FEATURE: Can have different proxies for Bittorrent and search engine
|
|
||||||
- FEATURE: Allow multiple item selection in Web UI transfer list
|
|
||||||
- FEATURE: Moved uploads to a separate list in Web UI
|
|
||||||
- BUGFIX: Totally rewritten Web UI list refresh system (fixed memory leak)
|
|
||||||
- BUGFIX: Disable ETA calculation when ETA column is hidden
|
|
||||||
- BUGFIX: Removed "disconnected" connection state, detection was far from perfect
|
|
||||||
- BUGFIX: Torrents are no longer starting from scratch when changing default save path (when torrent addition dialog is disabled)
|
|
||||||
- BUGFIX: Single instance code is now more reliable on Qt >= 4.4
|
|
||||||
- COSMETIC: Transfer speed, ratio, connection status and DHT nodes are displayed in status bar
|
|
||||||
- COSMETIC: RSS Tab is now hidden as a default
|
|
||||||
- COSMETIC: Allow to hide or display top toolbar
|
|
||||||
- COSMETIC: Log is now in a separate dialog
|
|
||||||
|
|
||||||
* Sun Sept 14 2008 - Christophe Dumez <chris@qbittorrent.org> - v1.1.4
|
|
||||||
- FEATURE: DHT is no longer used as fallback only
|
|
||||||
- FEATURE: Ported WebUI to Mootools v1.2
|
|
||||||
- BUGFIX: Fixed 'start seeding after torrent creation' feature
|
|
||||||
- BUGFIX: Fixed compilation with boost v1.36
|
|
||||||
- BUGFIX: Some code optimization
|
|
||||||
- BUGFIX: Fixed memory leak in Web UI
|
|
||||||
- BUGFIX: Fixed problems with column sorting
|
|
||||||
- BUGFIX: Improved code for pausing torrents on startup
|
|
||||||
- BUGFIX: Torrent addition dialog is now disabled for downloads from WebUI
|
|
||||||
- BUGFIX: Give focus to input field in WebUI download dialog
|
|
||||||
|
|
||||||
* Tue Aug 26 2008 - Christophe Dumez <chris@qbittorrent.org> - v1.1.3
|
|
||||||
- BUGFIX: Fixed ratio saving for seeding torrents
|
|
||||||
- I18N: Added czech and traditional chinese translations
|
|
||||||
|
|
||||||
* Sun Aug 17 2008 - Christophe Dumez <chris@qbittorrent.org> - v1.1.2
|
|
||||||
- BUGFIX: Fixed progress calculation
|
|
||||||
- BUGFIX: Fixed finished torrent detection
|
|
||||||
|
|
||||||
* Fri Aug 01 2008 - Christophe Dumez <chris@qbittorrent.org> - v1.1.1
|
|
||||||
- BUGFIX: Fixed bad resource file for icons
|
|
||||||
|
|
||||||
* Fri Aug 01 2008 - Christophe Dumez <chris@qbittorrent.org> - v1.1.0
|
|
||||||
- FEATURE: Web interface to control qbittorrent (Ishan Arora)
|
- FEATURE: Web interface to control qbittorrent (Ishan Arora)
|
||||||
- FEATURE: Can spoof Azureus peer id to avoid ban
|
- FEATURE: Can spoof Azureus peer id to avoid ban
|
||||||
- FEATURE: Allow to hide/show some columns in download and seeding lists
|
- FEATURE: Allow to hide/show some columns in download and seeding lists
|
||||||
|
63
TODO
@@ -1,18 +1,51 @@
|
|||||||
See https://blueprints.launchpad.net/qbittorrent/
|
// Easy
|
||||||
|
- Translations into as many languages as possible
|
||||||
|
- Use Launchpad/Rosetta for translations once it supports TS files
|
||||||
|
|
||||||
// translations done
|
// Intermediate
|
||||||
- french
|
- Port on MacOS, Windows (and create an installer for Windows) - Slow progress
|
||||||
- chinese traditional
|
- Add some transparency (menus,...), improve look / usabilty
|
||||||
- chinese simplified
|
- Skins support? (contact Mateusz)
|
||||||
- finish
|
|
||||||
- swedish
|
// Harder
|
||||||
- slovak
|
- Torrent scheduler ala µtorrent/Bitcomet
|
||||||
- German
|
|
||||||
- Hungarian
|
// Waiting for libtorrent
|
||||||
- Italian
|
- Allow to prioritize torrents (may code this in qBittorrent?)
|
||||||
- Dutch
|
|
||||||
|
// Unsure
|
||||||
|
- Display the peers we are connected to for each torrent with infos (like flag, dl/up speeds, ...)
|
||||||
|
- Azureus spoofing to prevent ban from trackers?
|
||||||
|
- Option to shutdown computer when downloads are finished
|
||||||
|
- NAT checker/Tester
|
||||||
|
- Display hard drive space left?
|
||||||
|
- Make use of dbus on Linux for the single instance instead of socket communication?
|
||||||
|
(http://techbase.kde.org/Development/Tutorials/D-Bus/Accessing_Interfaces)
|
||||||
|
- When favicon can't be downloaded, try to parse the webpage for:
|
||||||
|
<link rel="icon" href="http://example.com/favicon.ico" type="image/vnd.microsoft.icon">
|
||||||
|
* Be careful, the link can be relative
|
||||||
|
- Improve search plugin install (choose in a list taken from plugins.qbittorrent.org)
|
||||||
|
- support zipped torrents? (useful?)
|
||||||
|
- Allow to limit the number of downloading torrents simultaneously (other are paused until a download finishes)
|
||||||
|
|
||||||
|
// in v1.2.0
|
||||||
|
- Allow user to organize the downloads into categories/folders?
|
||||||
|
|
||||||
|
// in v1.1.0
|
||||||
|
- Stop calculating ETAs when ETA column is hidden
|
||||||
|
-> See https://blueprints.launchpad.net/qbittorrent
|
||||||
|
|
||||||
|
Translations updated:
|
||||||
|
- French
|
||||||
|
- Chinese
|
||||||
|
- Polish
|
||||||
|
- Portuguese
|
||||||
|
- Brazilian
|
||||||
|
- Slovak
|
||||||
|
- Swedish
|
||||||
- Romanian
|
- Romanian
|
||||||
|
- Finnish
|
||||||
|
- Italian
|
||||||
|
- Turkish
|
||||||
- Korean
|
- Korean
|
||||||
- Russian
|
- Hungarian
|
||||||
- Bulgarian
|
|
||||||
- Greek
|
|
||||||
|
@@ -40,8 +40,7 @@
|
|||||||
#define SEEDSLEECH 5
|
#define SEEDSLEECH 5
|
||||||
#define RATIO 6
|
#define RATIO 6
|
||||||
#define ETA 7
|
#define ETA 7
|
||||||
#define PRIORITY 8
|
#define HASH 8
|
||||||
#define HASH 9
|
|
||||||
|
|
||||||
class DLListDelegate: public QItemDelegate {
|
class DLListDelegate: public QItemDelegate {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@@ -37,8 +37,7 @@
|
|||||||
#define F_UPSPEED 2
|
#define F_UPSPEED 2
|
||||||
#define F_LEECH 3
|
#define F_LEECH 3
|
||||||
#define F_RATIO 4
|
#define F_RATIO 4
|
||||||
#define F_PRIORITY 5
|
#define F_HASH 5
|
||||||
#define F_HASH 6
|
|
||||||
|
|
||||||
class FinishedListDelegate: public QItemDelegate {
|
class FinishedListDelegate: public QItemDelegate {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@@ -37,18 +37,15 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
|
|||||||
setupUi(this);
|
setupUi(this);
|
||||||
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
|
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
|
||||||
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
|
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
|
||||||
connect(BTSession, SIGNAL(addedTorrent(QTorrentHandle&)), this, SLOT(torrentAdded(QTorrentHandle&)));
|
connect(BTSession, SIGNAL(addedTorrent(QString, QTorrentHandle&, bool)), this, SLOT(torrentAdded(QString, QTorrentHandle&, bool)));
|
||||||
finishedListModel = new QStandardItemModel(0,7);
|
finishedListModel = new QStandardItemModel(0,6);
|
||||||
finishedListModel->setHeaderData(F_NAME, Qt::Horizontal, tr("Name", "i.e: file name"));
|
finishedListModel->setHeaderData(F_NAME, Qt::Horizontal, tr("Name", "i.e: file name"));
|
||||||
finishedListModel->setHeaderData(F_SIZE, Qt::Horizontal, tr("Size", "i.e: file size"));
|
finishedListModel->setHeaderData(F_SIZE, Qt::Horizontal, tr("Size", "i.e: file size"));
|
||||||
finishedListModel->setHeaderData(F_UPSPEED, Qt::Horizontal, tr("UP Speed", "i.e: Upload speed"));
|
finishedListModel->setHeaderData(F_UPSPEED, Qt::Horizontal, tr("UP Speed", "i.e: Upload speed"));
|
||||||
finishedListModel->setHeaderData(F_LEECH, Qt::Horizontal, tr("Leechers", "i.e: full/partial sources"));
|
finishedListModel->setHeaderData(F_LEECH, Qt::Horizontal, tr("Leechers", "i.e: full/partial sources"));
|
||||||
finishedListModel->setHeaderData(F_RATIO, Qt::Horizontal, tr("Ratio"));
|
finishedListModel->setHeaderData(F_RATIO, Qt::Horizontal, tr("Ratio"));
|
||||||
finishedListModel->setHeaderData(F_PRIORITY, Qt::Horizontal, tr("Priority"));
|
|
||||||
finishedList->setModel(finishedListModel);
|
finishedList->setModel(finishedListModel);
|
||||||
loadHiddenColumns();
|
loadHiddenColumns();
|
||||||
// Hide priority column
|
|
||||||
finishedList->hideColumn(F_PRIORITY);
|
|
||||||
// Hide hash column
|
// Hide hash column
|
||||||
finishedList->hideColumn(F_HASH);
|
finishedList->hideColumn(F_HASH);
|
||||||
// Load last columns width for download list
|
// Load last columns width for download list
|
||||||
@@ -58,14 +55,14 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
|
|||||||
// Make download list header clickable for sorting
|
// Make download list header clickable for sorting
|
||||||
finishedList->header()->setClickable(true);
|
finishedList->header()->setClickable(true);
|
||||||
finishedList->header()->setSortIndicatorShown(true);
|
finishedList->header()->setSortIndicatorShown(true);
|
||||||
connect(finishedList->header(), SIGNAL(sectionPressed(int)), this, SLOT(toggleFinishedListSortOrder(int)));
|
connect(finishedList->header(), SIGNAL(sectionPressed(int)), this, SLOT(sortFinishedList(int)));
|
||||||
finishedListDelegate = new FinishedListDelegate(finishedList);
|
finishedListDelegate = new FinishedListDelegate(finishedList);
|
||||||
finishedList->setItemDelegate(finishedListDelegate);
|
finishedList->setItemDelegate(finishedListDelegate);
|
||||||
connect(finishedList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedListMenu(const QPoint&)));
|
connect(finishedList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedListMenu(const QPoint&)));
|
||||||
finishedList->header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
finishedList->header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
connect(finishedList->header(), SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedHoSMenu(const QPoint&)));
|
connect(finishedList->header(), SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedHoSMenu(const QPoint&)));
|
||||||
|
|
||||||
connect(finishedList, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(notifyTorrentDoubleClicked(const QModelIndex&)));
|
connect(finishedList, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(notifyTorrentDoubleClicked(const QModelIndex&)));
|
||||||
connect(BTSession, SIGNAL(forceFinishedListUpdate()), this, SLOT(updateFinishedList()));
|
|
||||||
actionDelete->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png")));
|
actionDelete->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png")));
|
||||||
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png")));
|
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png")));
|
||||||
actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png")));
|
actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png")));
|
||||||
@@ -74,8 +71,6 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
|
|||||||
connect(actionPause, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionPause_triggered()));
|
connect(actionPause, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionPause_triggered()));
|
||||||
connect(actionStart, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionStart_triggered()));
|
connect(actionStart, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionStart_triggered()));
|
||||||
connect(actionDelete, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_triggered()));
|
connect(actionDelete, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_triggered()));
|
||||||
connect(actionIncreasePriority, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionIncreasePriority_triggered()));
|
|
||||||
connect(actionDecreasePriority, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDecreasePriority_triggered()));
|
|
||||||
connect(actionPreview_file, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionPreview_file_triggered()));
|
connect(actionPreview_file, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionPreview_file_triggered()));
|
||||||
connect(actionDelete_Permanently, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_Permanently_triggered()));
|
connect(actionDelete_Permanently, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_Permanently_triggered()));
|
||||||
connect(actionOpen_destination_folder, SIGNAL(triggered()), (GUI*)parent, SLOT(openDestinationFolder()));
|
connect(actionOpen_destination_folder, SIGNAL(triggered()), (GUI*)parent, SLOT(openDestinationFolder()));
|
||||||
@@ -87,7 +82,6 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
|
|||||||
connect(actionHOSColUpSpeed, SIGNAL(triggered()), this, SLOT(hideOrShowColumnUpSpeed()));
|
connect(actionHOSColUpSpeed, SIGNAL(triggered()), this, SLOT(hideOrShowColumnUpSpeed()));
|
||||||
connect(actionHOSColLeechers, SIGNAL(triggered()), this, SLOT(hideOrShowColumnLeechers()));
|
connect(actionHOSColLeechers, SIGNAL(triggered()), this, SLOT(hideOrShowColumnLeechers()));
|
||||||
connect(actionHOSColRatio, SIGNAL(triggered()), this, SLOT(hideOrShowColumnRatio()));
|
connect(actionHOSColRatio, SIGNAL(triggered()), this, SLOT(hideOrShowColumnRatio()));
|
||||||
connect(actionHOSColPriority, SIGNAL(triggered()), this, SLOT(hideOrShowColumnPriority()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FinishedTorrents::~FinishedTorrents(){
|
FinishedTorrents::~FinishedTorrents(){
|
||||||
@@ -103,14 +97,6 @@ void FinishedTorrents::notifyTorrentDoubleClicked(const QModelIndex& index) {
|
|||||||
emit torrentDoubleClicked(hash, true);
|
emit torrentDoubleClicked(hash, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FinishedTorrents::hidePriorityColumn(bool hide) {
|
|
||||||
finishedList->setColumnHidden(F_PRIORITY, hide);
|
|
||||||
if(hide)
|
|
||||||
getActionHoSCol(F_PRIORITY)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
|
|
||||||
else
|
|
||||||
getActionHoSCol(F_PRIORITY)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
|
|
||||||
}
|
|
||||||
|
|
||||||
void FinishedTorrents::addTorrent(QString hash){
|
void FinishedTorrents::addTorrent(QString hash){
|
||||||
if(!BTSession->isFinished(hash)){
|
if(!BTSession->isFinished(hash)){
|
||||||
BTSession->setFinishedTorrent(hash);
|
BTSession->setFinishedTorrent(hash);
|
||||||
@@ -126,8 +112,6 @@ void FinishedTorrents::addTorrent(QString hash){
|
|||||||
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)0.));
|
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)0.));
|
||||||
finishedListModel->setData(finishedListModel->index(row, F_LEECH), QVariant("0"));
|
finishedListModel->setData(finishedListModel->index(row, F_LEECH), QVariant("0"));
|
||||||
finishedListModel->setData(finishedListModel->index(row, F_RATIO), QVariant(QString::fromUtf8(misc::toString(BTSession->getRealRatio(hash)).c_str())));
|
finishedListModel->setData(finishedListModel->index(row, F_RATIO), QVariant(QString::fromUtf8(misc::toString(BTSession->getRealRatio(hash)).c_str())));
|
||||||
if(BTSession->isQueueingEnabled())
|
|
||||||
finishedListModel->setData(finishedListModel->index(row, F_PRIORITY), QVariant((int)BTSession->getUpTorrentPriority(hash)));
|
|
||||||
finishedListModel->setData(finishedListModel->index(row, F_HASH), QVariant(hash));
|
finishedListModel->setData(finishedListModel->index(row, F_HASH), QVariant(hash));
|
||||||
if(h.is_paused()) {
|
if(h.is_paused()) {
|
||||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QIcon(":/Icons/skin/paused.png"), Qt::DecorationRole);
|
finishedListModel->setData(finishedListModel->index(row, F_NAME), QIcon(":/Icons/skin/paused.png"), Qt::DecorationRole);
|
||||||
@@ -141,7 +125,7 @@ void FinishedTorrents::addTorrent(QString hash){
|
|||||||
emit finishedTorrentsNumberChanged(nbFinished);
|
emit finishedTorrentsNumberChanged(nbFinished);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FinishedTorrents::torrentAdded(QTorrentHandle& h) {
|
void FinishedTorrents::torrentAdded(QString, QTorrentHandle& h, bool) {
|
||||||
QString hash = h.hash();
|
QString hash = h.hash();
|
||||||
if(BTSession->isFinished(hash)) {
|
if(BTSession->isFinished(hash)) {
|
||||||
addTorrent(hash);
|
addTorrent(hash);
|
||||||
@@ -190,27 +174,10 @@ bool FinishedTorrents::loadColWidthFinishedList(){
|
|||||||
for(unsigned int i=0; i<listSize; ++i){
|
for(unsigned int i=0; i<listSize; ++i){
|
||||||
finishedList->header()->resizeSection(i, width_list.at(i).toInt());
|
finishedList->header()->resizeSection(i, width_list.at(i).toInt());
|
||||||
}
|
}
|
||||||
loadLastSortedColumn();
|
|
||||||
qDebug("Finished list columns width loaded");
|
qDebug("Finished list columns width loaded");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FinishedTorrents::loadLastSortedColumn() {
|
|
||||||
// Loading last sorted column
|
|
||||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
|
||||||
QString sortedCol = settings.value(QString::fromUtf8("FinishedListSortedCol"), QString()).toString();
|
|
||||||
if(!sortedCol.isEmpty()) {
|
|
||||||
Qt::SortOrder sortOrder;
|
|
||||||
if(sortedCol.endsWith(QString::fromUtf8("d")))
|
|
||||||
sortOrder = Qt::DescendingOrder;
|
|
||||||
else
|
|
||||||
sortOrder = Qt::AscendingOrder;
|
|
||||||
sortedCol = sortedCol.left(sortedCol.size()-1);
|
|
||||||
int index = sortedCol.toInt();
|
|
||||||
sortFinishedList(index, sortOrder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Save columns width in a file to remember them
|
// Save columns width in a file to remember them
|
||||||
// (finished list)
|
// (finished list)
|
||||||
void FinishedTorrents::saveColWidthFinishedList() const{
|
void FinishedTorrents::saveColWidthFinishedList() const{
|
||||||
@@ -270,31 +237,26 @@ void FinishedTorrents::updateFinishedList(){
|
|||||||
row = getRowFromHash(hash);
|
row = getRowFromHash(hash);
|
||||||
}
|
}
|
||||||
Q_ASSERT(row != -1);
|
Q_ASSERT(row != -1);
|
||||||
// Update priority
|
|
||||||
if(BTSession->isQueueingEnabled()) {
|
|
||||||
finishedListModel->setData(finishedListModel->index(row, F_PRIORITY), QVariant((int)BTSession->getUpTorrentPriority(hash)));
|
|
||||||
if(h.is_paused() && BTSession->isUploadQueued(hash)) {
|
|
||||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/queued.png"))), Qt::DecorationRole);
|
|
||||||
setRowColor(row, QString::fromUtf8("grey"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(h.is_paused()) continue;
|
if(h.is_paused()) continue;
|
||||||
|
if(BTSession->getTorrentsToPauseAfterChecking().indexOf(hash) != -1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(h.state() == torrent_status::downloading || (h.state() != torrent_status::checking_files && h.state() != torrent_status::queued_for_checking && h.progress() < 1.)) {
|
if(h.state() == torrent_status::downloading || (h.state() != torrent_status::checking_files && h.state() != torrent_status::queued_for_checking && h.progress() < 1.)) {
|
||||||
// What are you doing here? go back to download tab!
|
// What are you doing here? go back to download tab!
|
||||||
int reponse = QMessageBox::question(this, tr("Incomplete torrent in seeding list"), tr("It appears that the state of '%1' torrent changed from 'seeding' to 'downloading'. Would you like to move it back to download list? (otherwise the torrent will simply be deleted)").arg(h.name()), QMessageBox::Yes | QMessageBox::No);
|
int reponse = QMessageBox::question(this, tr("Incomplete torrent in seeding list"), tr("It appears that the state of '%1' torrent changed from 'seeding' to 'downloading'. Would you like to move it back to download list? (otherwise the torrent will simply be deleted)").arg(h.name()), QMessageBox::Yes | QMessageBox::No);
|
||||||
if (reponse == QMessageBox::Yes) {
|
if (reponse == QMessageBox::Yes) {
|
||||||
qDebug("Info: a torrent was moved from finished to download tab");
|
qDebug("Info: a torrent was moved from finished to download tab");
|
||||||
deleteTorrent(hash);
|
deleteTorrent(hash);
|
||||||
BTSession->setUnfinishedTorrent(hash);
|
BTSession->setFinishedTorrent(hash);
|
||||||
emit torrentMovedFromFinishedList(hash);
|
emit torrentMovedFromFinishedList(hash);
|
||||||
}
|
}
|
||||||
else if (reponse == QMessageBox::No) {
|
else if (reponse == QMessageBox::No) {
|
||||||
qDebug("Deleted from the finished");
|
qDebug("Deleted from the finished");
|
||||||
BTSession->deleteTorrent(hash, false);
|
BTSession->deleteTorrent(hash, true);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking){
|
if(h.state() == torrent_status::checking_files){
|
||||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
|
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
|
||||||
setRowColor(row, QString::fromUtf8("grey"));
|
setRowColor(row, QString::fromUtf8("grey"));
|
||||||
continue;
|
continue;
|
||||||
@@ -427,17 +389,12 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
|
|||||||
myFinishedListMenu.addSeparator();
|
myFinishedListMenu.addSeparator();
|
||||||
myFinishedListMenu.addAction(actionOpen_destination_folder);
|
myFinishedListMenu.addAction(actionOpen_destination_folder);
|
||||||
myFinishedListMenu.addAction(actionTorrent_Properties);
|
myFinishedListMenu.addAction(actionTorrent_Properties);
|
||||||
if(BTSession->isQueueingEnabled()) {
|
|
||||||
myFinishedListMenu.addSeparator();
|
|
||||||
myFinishedListMenu.addAction(actionIncreasePriority);
|
|
||||||
myFinishedListMenu.addAction(actionDecreasePriority);
|
|
||||||
}
|
|
||||||
myFinishedListMenu.addSeparator();
|
myFinishedListMenu.addSeparator();
|
||||||
myFinishedListMenu.addAction(actionBuy_it);
|
myFinishedListMenu.addAction(actionBuy_it);
|
||||||
|
|
||||||
// Call menu
|
// Call menu
|
||||||
// XXX: why mapToGlobal() is not enough?
|
// XXX: why mapToGlobal() is not enough?
|
||||||
myFinishedListMenu.exec(mapToGlobal(pos)+QPoint(10,58));
|
myFinishedListMenu.exec(mapToGlobal(pos)+QPoint(10,55));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -449,17 +406,11 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
|
|||||||
void FinishedTorrents::displayFinishedHoSMenu(const QPoint& pos){
|
void FinishedTorrents::displayFinishedHoSMenu(const QPoint& pos){
|
||||||
QMenu hideshowColumn(this);
|
QMenu hideshowColumn(this);
|
||||||
hideshowColumn.setTitle(tr("Hide or Show Column"));
|
hideshowColumn.setTitle(tr("Hide or Show Column"));
|
||||||
int lastCol;
|
for(int i=0; i<=F_RATIO; i++) {
|
||||||
if(BTSession->isQueueingEnabled()) {
|
|
||||||
lastCol = F_PRIORITY;
|
|
||||||
} else {
|
|
||||||
lastCol = F_RATIO;
|
|
||||||
}
|
|
||||||
for(int i=0; i<=lastCol; i++) {
|
|
||||||
hideshowColumn.addAction(getActionHoSCol(i));
|
hideshowColumn.addAction(getActionHoSCol(i));
|
||||||
}
|
}
|
||||||
// Call menu
|
// Call menu
|
||||||
hideshowColumn.exec(mapToGlobal(pos)+QPoint(10,34));
|
hideshowColumn.exec(mapToGlobal(pos)+QPoint(10,55));
|
||||||
}
|
}
|
||||||
|
|
||||||
// toggle hide/show a column
|
// toggle hide/show a column
|
||||||
@@ -513,10 +464,6 @@ void FinishedTorrents::hideOrShowColumnRatio() {
|
|||||||
hideOrShowColumn(F_RATIO);
|
hideOrShowColumn(F_RATIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FinishedTorrents::hideOrShowColumnPriority() {
|
|
||||||
hideOrShowColumn(F_PRIORITY);
|
|
||||||
}
|
|
||||||
|
|
||||||
// load the previous settings, and hide the columns
|
// load the previous settings, and hide the columns
|
||||||
bool FinishedTorrents::loadHiddenColumns() {
|
bool FinishedTorrents::loadHiddenColumns() {
|
||||||
bool loaded = false;
|
bool loaded = false;
|
||||||
@@ -578,9 +525,6 @@ QAction* FinishedTorrents::getActionHoSCol(int index) {
|
|||||||
case F_RATIO :
|
case F_RATIO :
|
||||||
return actionHOSColRatio;
|
return actionHOSColRatio;
|
||||||
break;
|
break;
|
||||||
case F_PRIORITY :
|
|
||||||
return actionHOSColPriority;
|
|
||||||
break;
|
|
||||||
default :
|
default :
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -591,40 +535,19 @@ QAction* FinishedTorrents::getActionHoSCol(int index) {
|
|||||||
* Sorting functions
|
* Sorting functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void FinishedTorrents::toggleFinishedListSortOrder(int index) {
|
void FinishedTorrents::sortFinishedList(int index){
|
||||||
Qt::SortOrder sortOrder = Qt::AscendingOrder;
|
static Qt::SortOrder sortOrder = Qt::AscendingOrder;
|
||||||
if(finishedList->header()->sortIndicatorSection() == index){
|
if(finishedList->header()->sortIndicatorSection() == index){
|
||||||
sortOrder = (Qt::SortOrder)!(bool)finishedList->header()->sortIndicatorOrder();
|
if(sortOrder == Qt::AscendingOrder){
|
||||||
|
sortOrder = Qt::DescendingOrder;
|
||||||
|
}else{
|
||||||
|
sortOrder = Qt::AscendingOrder;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
switch(index) {
|
finishedList->header()->setSortIndicator(index, sortOrder);
|
||||||
|
switch(index){
|
||||||
case F_SIZE:
|
case F_SIZE:
|
||||||
case F_UPSPEED:
|
case F_UPSPEED:
|
||||||
case F_PRIORITY:
|
|
||||||
sortFinishedListFloat(index, sortOrder);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
sortFinishedListString(index, sortOrder);
|
|
||||||
}
|
|
||||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
|
||||||
QString sortOrderLetter;
|
|
||||||
if(sortOrder == Qt::AscendingOrder)
|
|
||||||
sortOrderLetter = QString::fromUtf8("a");
|
|
||||||
else
|
|
||||||
sortOrderLetter = QString::fromUtf8("d");
|
|
||||||
settings.setValue(QString::fromUtf8("FinishedListSortedCol"), misc::toQString(index)+sortOrderLetter);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FinishedTorrents::sortFinishedList(int index, Qt::SortOrder sortOrder){
|
|
||||||
if(index == -1) {
|
|
||||||
index = finishedList->header()->sortIndicatorSection();
|
|
||||||
sortOrder = finishedList->header()->sortIndicatorOrder();
|
|
||||||
} else {
|
|
||||||
finishedList->header()->setSortIndicator(index, sortOrder);
|
|
||||||
}
|
|
||||||
switch(index) {
|
|
||||||
case F_SIZE:
|
|
||||||
case F_UPSPEED:
|
|
||||||
case F_PRIORITY:
|
|
||||||
sortFinishedListFloat(index, sortOrder);
|
sortFinishedListFloat(index, sortOrder);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@@ -60,12 +60,11 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
|
|||||||
void displayFinishedHoSMenu(const QPoint&);
|
void displayFinishedHoSMenu(const QPoint&);
|
||||||
void setRowColor(int row, QString color);
|
void setRowColor(int row, QString color);
|
||||||
void saveColWidthFinishedList() const;
|
void saveColWidthFinishedList() const;
|
||||||
void toggleFinishedListSortOrder(int index);
|
void sortFinishedList(int index);
|
||||||
void sortFinishedList(int index=-1, Qt::SortOrder sortOrder=Qt::AscendingOrder);
|
|
||||||
void sortFinishedListFloat(int index, Qt::SortOrder sortOrder);
|
void sortFinishedListFloat(int index, Qt::SortOrder sortOrder);
|
||||||
void sortFinishedListString(int index, Qt::SortOrder sortOrder);
|
void sortFinishedListString(int index, Qt::SortOrder sortOrder);
|
||||||
void updateFileSize(QString hash);
|
void updateFileSize(QString hash);
|
||||||
void torrentAdded(QTorrentHandle& h);
|
void torrentAdded(QString path, QTorrentHandle& h, bool fastResume);
|
||||||
void on_actionSet_upload_limit_triggered();
|
void on_actionSet_upload_limit_triggered();
|
||||||
void notifyTorrentDoubleClicked(const QModelIndex& index);
|
void notifyTorrentDoubleClicked(const QModelIndex& index);
|
||||||
void hideOrShowColumnName();
|
void hideOrShowColumnName();
|
||||||
@@ -73,7 +72,6 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
|
|||||||
void hideOrShowColumnUpSpeed();
|
void hideOrShowColumnUpSpeed();
|
||||||
void hideOrShowColumnLeechers();
|
void hideOrShowColumnLeechers();
|
||||||
void hideOrShowColumnRatio();
|
void hideOrShowColumnRatio();
|
||||||
void hideOrShowColumnPriority();
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void addTorrent(QString hash);
|
void addTorrent(QString hash);
|
||||||
@@ -83,8 +81,6 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
|
|||||||
void propertiesSelection();
|
void propertiesSelection();
|
||||||
void deleteTorrent(QString hash);
|
void deleteTorrent(QString hash);
|
||||||
void showPropertiesFromHash(QString hash);
|
void showPropertiesFromHash(QString hash);
|
||||||
void hidePriorityColumn(bool hide);
|
|
||||||
void loadLastSortedColumn();
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void torrentMovedFromFinishedList(QString);
|
void torrentMovedFromFinishedList(QString);
|
||||||
|
384
src/GUI.cpp
29
src/GUI.h
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QSystemTrayIcon>
|
#include <QSystemTrayIcon>
|
||||||
#include <QPointer>
|
|
||||||
#include "ui_MainWindow.h"
|
#include "ui_MainWindow.h"
|
||||||
#include "qtorrenthandle.h"
|
#include "qtorrenthandle.h"
|
||||||
|
|
||||||
@@ -52,7 +52,6 @@ class QTabWidget;
|
|||||||
class QLabel;
|
class QLabel;
|
||||||
class QModelIndex;
|
class QModelIndex;
|
||||||
class HttpServer;
|
class HttpServer;
|
||||||
class QFrame;
|
|
||||||
|
|
||||||
class GUI : public QMainWindow, private Ui::MainWindow{
|
class GUI : public QMainWindow, private Ui::MainWindow{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -66,7 +65,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
|||||||
QTabWidget *tabs;
|
QTabWidget *tabs;
|
||||||
options_imp *options;
|
options_imp *options;
|
||||||
QSystemTrayIcon *myTrayIcon;
|
QSystemTrayIcon *myTrayIcon;
|
||||||
QPointer<QTimer> systrayCreator;
|
QTimer *systrayCreator;
|
||||||
QMenu *myTrayIconMenu;
|
QMenu *myTrayIconMenu;
|
||||||
DownloadingTorrents *downloadingTorrentTab;
|
DownloadingTorrents *downloadingTorrentTab;
|
||||||
FinishedTorrents *finishedTorrentTab;
|
FinishedTorrents *finishedTorrentTab;
|
||||||
@@ -76,28 +75,18 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
|||||||
bool force_exit;
|
bool force_exit;
|
||||||
unsigned int refreshInterval;
|
unsigned int refreshInterval;
|
||||||
QTimer *refresher;
|
QTimer *refresher;
|
||||||
QLabel *dlSpeedLbl;
|
|
||||||
QLabel *upSpeedLbl;
|
|
||||||
QLabel *ratioLbl;
|
|
||||||
QLabel *DHTLbl;
|
|
||||||
QFrame *statusSep1;
|
|
||||||
QFrame *statusSep2;
|
|
||||||
QFrame *statusSep3;
|
|
||||||
QFrame *statusSep4;
|
|
||||||
// Keyboard shortcuts
|
// Keyboard shortcuts
|
||||||
QShortcut *switchSearchShortcut;
|
QShortcut *switchSearchShortcut;
|
||||||
QShortcut *switchSearchShortcut2;
|
QShortcut *switchSearchShortcut2;
|
||||||
QShortcut *switchDownShortcut;
|
QShortcut *switchDownShortcut;
|
||||||
QShortcut *switchUpShortcut;
|
QShortcut *switchUpShortcut;
|
||||||
QShortcut *switchRSSShortcut;
|
QShortcut *switchRSSShortcut;
|
||||||
QAction *prioSeparator;
|
|
||||||
QAction *prioSeparator2;
|
|
||||||
// Search
|
// Search
|
||||||
SearchEngine *searchEngine;
|
SearchEngine *searchEngine;
|
||||||
// RSS
|
// RSS
|
||||||
RSSImp *rssWidget;
|
RSSImp *rssWidget;
|
||||||
// Web UI
|
// Web UI
|
||||||
QPointer<HttpServer> httpServer;
|
HttpServer *httpServer;
|
||||||
// Misc
|
// Misc
|
||||||
#ifdef QT_4_4
|
#ifdef QT_4_4
|
||||||
QLocalServer *localServer;
|
QLocalServer *localServer;
|
||||||
@@ -116,7 +105,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
|||||||
void on_actionCreate_torrent_triggered();
|
void on_actionCreate_torrent_triggered();
|
||||||
void on_actionWebsite_triggered() const;
|
void on_actionWebsite_triggered() const;
|
||||||
void on_actionBugReport_triggered() const;
|
void on_actionBugReport_triggered() const;
|
||||||
void on_actionShow_console_triggered();
|
|
||||||
void readParamsOnSocket();
|
void readParamsOnSocket();
|
||||||
void acceptConnection();
|
void acceptConnection();
|
||||||
void togglePausedState(QString hash);
|
void togglePausedState(QString hash);
|
||||||
@@ -128,8 +116,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
|||||||
void readSettings();
|
void readSettings();
|
||||||
void on_actionExit_triggered();
|
void on_actionExit_triggered();
|
||||||
void createTrayIcon();
|
void createTrayIcon();
|
||||||
void updateUnfinishedTorrentNumberCalc();
|
|
||||||
void updateFinishedTorrentNumberCalc();
|
|
||||||
void updateUnfinishedTorrentNumber(unsigned int nb);
|
void updateUnfinishedTorrentNumber(unsigned int nb);
|
||||||
void updateFinishedTorrentNumber(unsigned int nb);
|
void updateFinishedTorrentNumber(unsigned int nb);
|
||||||
void fullDiskError(QTorrentHandle& h) const;
|
void fullDiskError(QTorrentHandle& h) const;
|
||||||
@@ -162,15 +148,15 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
|||||||
void processDownloadedFiles(QString path, QString url);
|
void processDownloadedFiles(QString path, QString url);
|
||||||
void downloadFromURLList(const QStringList& urls);
|
void downloadFromURLList(const QStringList& urls);
|
||||||
void deleteTorrent(QString hash);
|
void deleteTorrent(QString hash);
|
||||||
|
void deleteRatioTorrent(QString fileName);
|
||||||
void finishedTorrent(QTorrentHandle& h) const;
|
void finishedTorrent(QTorrentHandle& h) const;
|
||||||
|
void torrentChecked(QString hash) const;
|
||||||
void updateLists();
|
void updateLists();
|
||||||
bool initWebUi(QString username, QString password, int port);
|
bool initWebUi(QString username, QString password, int port);
|
||||||
void pauseTorrent(QString hash);
|
void pauseTorrent(QString hash);
|
||||||
void on_actionIncreasePriority_triggered();
|
|
||||||
void on_actionDecreasePriority_triggered();
|
|
||||||
// Options slots
|
// Options slots
|
||||||
void on_actionOptions_triggered();
|
void on_actionOptions_triggered();
|
||||||
void OptionsSaved(bool deleteOptions);
|
void OptionsSaved(QString info, bool deleteOptions);
|
||||||
// HTTP slots
|
// HTTP slots
|
||||||
void on_actionDownload_from_URL_triggered();
|
void on_actionDownload_from_URL_triggered();
|
||||||
|
|
||||||
@@ -184,8 +170,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent *);
|
void closeEvent(QCloseEvent *);
|
||||||
bool event(QEvent * event);
|
void hideEvent(QHideEvent *);
|
||||||
void displayRSSTab(bool enable);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Construct / Destruct
|
// Construct / Destruct
|
||||||
|
Before Width: | Height: | Size: 455 B |
Before Width: | Height: | Size: 333 B |
@@ -1,7 +1,7 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Categories=Qt;Network;P2P
|
Categories=Qt;Application;Network;P2P
|
||||||
Comment=V1.2.1
|
Comment=V1.1.0
|
||||||
Exec=qbittorrent %f
|
Exec=qbittorrent
|
||||||
GenericName=Bittorrent client
|
GenericName=Bittorrent client
|
||||||
GenericName[bg]=Торент клиент
|
GenericName[bg]=Торент клиент
|
||||||
GenericName[de]=Bittorren Client
|
GenericName[de]=Bittorren Client
|
||||||
@@ -19,7 +19,7 @@ GenericName[tr]=Bittorrent istemcisi
|
|||||||
GenericName[uk]=Bittorrent-клієнт
|
GenericName[uk]=Bittorrent-клієнт
|
||||||
GenericName[zh]=Bittorrent之用户
|
GenericName[zh]=Bittorrent之用户
|
||||||
Icon=qbittorrent
|
Icon=qbittorrent
|
||||||
MimeType=application/x-bittorrent;
|
MimeType=application/x-bittorrent
|
||||||
Name=qBittorrent
|
Name=qBittorrent
|
||||||
Name[ko]=큐비토런트
|
Name[ko]=큐비토런트
|
||||||
Terminal=false
|
Terminal=false
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 5.1 KiB |
BIN
src/Icons/skin/disconnected.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 493 B |
Before Width: | Height: | Size: 2.0 KiB |
BIN
src/Icons/smile.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
BIN
src/Icons/stare.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/Icons/unhappy.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
@@ -187,3 +187,4 @@ bool SearchTab::loadColWidthSearchList(){
|
|||||||
qDebug("Search list columns width loaded");
|
qDebug("Search list columns width loaded");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -56,11 +56,9 @@ class about : public QDialog, private Ui::AboutDlg{
|
|||||||
"<i>- <u>Brazilian:</u> Nick Marinho (nickmarinho@gmail.com)<br>\
|
"<i>- <u>Brazilian:</u> Nick Marinho (nickmarinho@gmail.com)<br>\
|
||||||
- <u>Bulgarian:</u> Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)<br>\
|
- <u>Bulgarian:</u> Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)<br>\
|
||||||
- <u>Catalan:</u> Gekko Dam Beer (gekko04@users.sourceforge.net)<br>\
|
- <u>Catalan:</u> Gekko Dam Beer (gekko04@users.sourceforge.net)<br>\
|
||||||
- <u>Chinese (Simplified):</u> Guo Yue (yue.guo0418@gmail.com)<br>\
|
- <u>Chinese (Simplified):</u> Guo Yue (guoyue0418@hotmail.com)<br>\
|
||||||
- <u>Chinese (Traditional):</u> Yi-Shun Wang (dnextstep@gmail.com)<br>\
|
|
||||||
- <u>Czech:</u> Jirka Vilim (web@tets.cz)<br>\
|
|
||||||
- <u>Danish:</u> Mathias Nielsen (comoneo@gmail.com)<br>\
|
- <u>Danish:</u> Mathias Nielsen (comoneo@gmail.com)<br>\
|
||||||
- <u>Dutch:</u> Joost Schipper (heavyjoost@users.sourceforge.net) and Peter Koeleman (peter@peerweb.nl)<br>\
|
- <u>Dutch:</u> Joost Schipper (heavyjoost@users.sourceforge.net)<br>\
|
||||||
- <u>Finnish:</u> Niklas Laxström (nikerabbit@users.sourceforge.net)<br>\
|
- <u>Finnish:</u> Niklas Laxström (nikerabbit@users.sourceforge.net)<br>\
|
||||||
- <u>German:</u> Niels Hoffmann (zentralmaschine@users.sourceforge.net)<br>\
|
- <u>German:</u> Niels Hoffmann (zentralmaschine@users.sourceforge.net)<br>\
|
||||||
- <u>Greek:</u> Tsvetan Bankov (emerge_life@users.sourceforge.net)<br>\
|
- <u>Greek:</u> Tsvetan Bankov (emerge_life@users.sourceforge.net)<br>\
|
||||||
@@ -72,9 +70,9 @@ class about : public QDialog, private Ui::AboutDlg{
|
|||||||
- <u>Polish:</u> Jarek Smieja (ajep9691@wp.pl)<br>\
|
- <u>Polish:</u> Jarek Smieja (ajep9691@wp.pl)<br>\
|
||||||
- <u>Portuguese:</u> Nick Marinho (nickmarinho@gmail.com)<br>\
|
- <u>Portuguese:</u> Nick Marinho (nickmarinho@gmail.com)<br>\
|
||||||
- <u>Romanian:</u> Obada Denis (obadadenis@users.sourceforge.net)<br>\
|
- <u>Romanian:</u> Obada Denis (obadadenis@users.sourceforge.net)<br>\
|
||||||
- <u>Russian:</u> Nick Khazov (m2k3d0n@users.sourceforge.net) and Alexey Morsov (samurai@ricom.ru)<br>\
|
- <u>Russian:</u> Nick Khazov (m2k3d0n at users.sourceforge.net)<br>\
|
||||||
- <u>Slovak:</u> helix84<br>\
|
- <u>Slovak:</u> helix84<br>\
|
||||||
- <u>Spanish:</u> Vicente Raul Plata Fonseca (silverxnt@users.sourceforge.net) and Gabriel de Oliveira (deadloop@hotmail.com)<br>\
|
- <u>Spanish:</u> Vicente Raul Plata Fonseca (silverxnt@users.sourceforge.net)<br>\
|
||||||
- <u>Swedish:</u> Daniel Nylander (po@danielnylander.se)<br>\
|
- <u>Swedish:</u> Daniel Nylander (po@danielnylander.se)<br>\
|
||||||
- <u>Turkish:</u> Erdem Bingöl (erdem84@gmail.com)<br>\
|
- <u>Turkish:</u> Erdem Bingöl (erdem84@gmail.com)<br>\
|
||||||
- <u>Ukrainian:</u> Andrey Shpachenko (masterfix@users.sourceforge.net)<br><br>"));
|
- <u>Ukrainian:</u> Andrey Shpachenko (masterfix@users.sourceforge.net)<br><br>"));
|
||||||
|
@@ -13,6 +13,21 @@
|
|||||||
<string>Torrent addition dialog</string>
|
<string>Torrent addition dialog</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
|
<property name="spacing" >
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin" >
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin" >
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin" >
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin" >
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="fileNameLbl" >
|
<widget class="QLabel" name="fileNameLbl" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
@@ -95,50 +110,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<item>
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="collapseAllButton" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Collapse all</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="expandAllButton" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Expand all</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkIncrementalDL" >
|
<widget class="QCheckBox" name="checkIncrementalDL" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
|
@@ -26,9 +26,6 @@
|
|||||||
#include <QPair>
|
#include <QPair>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QApplication>
|
|
||||||
#include <QPalette>
|
|
||||||
#include <QPointer>
|
|
||||||
|
|
||||||
#include <libtorrent/session.hpp>
|
#include <libtorrent/session.hpp>
|
||||||
#include <libtorrent/ip_filter.hpp>
|
#include <libtorrent/ip_filter.hpp>
|
||||||
@@ -41,25 +38,24 @@ class deleteThread;
|
|||||||
class QTimer;
|
class QTimer;
|
||||||
class FilterParserThread;
|
class FilterParserThread;
|
||||||
|
|
||||||
class bittorrent : public QObject {
|
class bittorrent : public QObject{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
private:
|
private:
|
||||||
session *s;
|
session *s;
|
||||||
QString scan_dir;
|
QString scan_dir;
|
||||||
QPointer<QTimer> timerScan;
|
QTimer *timerScan;
|
||||||
QTimer *timerAlerts;
|
QTimer *timerAlerts;
|
||||||
QTimer *fastResumeSaver;
|
QTimer *fastResumeSaver;
|
||||||
QPointer<QTimer> BigRatioTimer;
|
QTimer *BigRatioTimer;
|
||||||
bool DHTEnabled;
|
bool DHTEnabled;
|
||||||
downloadThread *downloader;
|
downloadThread *downloader;
|
||||||
QString defaultSavePath;
|
QString defaultSavePath;
|
||||||
|
QStringList torrentsToPauseAfterChecking;
|
||||||
QHash<QString, QDateTime> TorrentsStartTime;
|
QHash<QString, QDateTime> TorrentsStartTime;
|
||||||
QHash<QString, size_type> TorrentsStartData;
|
QHash<QString, size_type> TorrentsStartData;
|
||||||
QHash<QString, QPair<size_type,size_type> > ratioData;
|
QHash<QString, QPair<size_type,size_type> > ratioData;
|
||||||
QHash<QString, QHash<QString, QString> > trackersErrors;
|
QHash<QString, QHash<QString, QString> > trackersErrors;
|
||||||
QStringList consoleMessages;
|
|
||||||
QStringList peerBanMessages;
|
|
||||||
deleteThread *deleter;
|
deleteThread *deleter;
|
||||||
QStringList finishedTorrents;
|
QStringList finishedTorrents;
|
||||||
QStringList unfinishedTorrents;
|
QStringList unfinishedTorrents;
|
||||||
@@ -71,19 +67,9 @@ class bittorrent : public QObject {
|
|||||||
bool UPnPEnabled;
|
bool UPnPEnabled;
|
||||||
bool NATPMPEnabled;
|
bool NATPMPEnabled;
|
||||||
bool LSDEnabled;
|
bool LSDEnabled;
|
||||||
QPointer<FilterParserThread> filterParser;
|
FilterParserThread *filterParser;
|
||||||
QString filterPath;
|
QString filterPath;
|
||||||
int folderScanInterval; // in seconds
|
int folderScanInterval; // in seconds
|
||||||
bool queueingEnabled;
|
|
||||||
int maxActiveDownloads;
|
|
||||||
int maxActiveTorrents;
|
|
||||||
int currentActiveDownloads;
|
|
||||||
QStringList *downloadQueue;
|
|
||||||
QStringList *queuedDownloads;
|
|
||||||
QStringList *uploadQueue;
|
|
||||||
QStringList *queuedUploads;
|
|
||||||
bool calculateETA;
|
|
||||||
QStringList url_skippingDlg;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QString getSavePath(QString hash);
|
QString getSavePath(QString hash);
|
||||||
@@ -100,6 +86,7 @@ class bittorrent : public QObject {
|
|||||||
float getPayloadUploadRate() const;
|
float getPayloadUploadRate() const;
|
||||||
session_status getSessionStatus() const;
|
session_status getSessionStatus() const;
|
||||||
int getListenPort() const;
|
int getListenPort() const;
|
||||||
|
QStringList getTorrentsToPauseAfterChecking() const;
|
||||||
qlonglong getETA(QString hash) const;
|
qlonglong getETA(QString hash) const;
|
||||||
float getRealRatio(QString hash) const;
|
float getRealRatio(QString hash) const;
|
||||||
session* getSession() const;
|
session* getSession() const;
|
||||||
@@ -110,17 +97,6 @@ class bittorrent : public QObject {
|
|||||||
bool has_filtered_files(QString hash) const;
|
bool has_filtered_files(QString hash) const;
|
||||||
unsigned int getFinishedPausedTorrentsNb() const;
|
unsigned int getFinishedPausedTorrentsNb() const;
|
||||||
unsigned int getUnfinishedPausedTorrentsNb() const;
|
unsigned int getUnfinishedPausedTorrentsNb() const;
|
||||||
bool isQueueingEnabled() const;
|
|
||||||
int getDlTorrentPriority(QString hash) const;
|
|
||||||
int getUpTorrentPriority(QString hash) const;
|
|
||||||
int getMaximumActiveDownloads() const;
|
|
||||||
int getMaximumActiveTorrents() const;
|
|
||||||
bool isDownloadQueued(QString hash) const;
|
|
||||||
bool isUploadQueued(QString hash) const;
|
|
||||||
int loadTorrentPriority(QString hash);
|
|
||||||
QStringList getConsoleMessages() const;
|
|
||||||
QStringList getPeerBanMessages() const;
|
|
||||||
float getUncheckedTorrentProgress(QString hash) const;
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void addTorrent(QString path, bool fromScanDir = false, QString from_url = QString(), bool resumed = false);
|
void addTorrent(QString path, bool fromScanDir = false, QString from_url = QString(), bool resumed = false);
|
||||||
@@ -140,7 +116,6 @@ class bittorrent : public QObject {
|
|||||||
void enablePeerExchange();
|
void enablePeerExchange();
|
||||||
void enableIPFilter(QString filter);
|
void enableIPFilter(QString filter);
|
||||||
void disableIPFilter();
|
void disableIPFilter();
|
||||||
void setQueueingEnabled(bool enable);
|
|
||||||
void resumeUnfinishedTorrents();
|
void resumeUnfinishedTorrents();
|
||||||
void saveTorrentSpeedLimits(QString hash);
|
void saveTorrentSpeedLimits(QString hash);
|
||||||
void loadTorrentSpeedLimits(QString hash);
|
void loadTorrentSpeedLimits(QString hash);
|
||||||
@@ -148,14 +123,6 @@ class bittorrent : public QObject {
|
|||||||
void loadDownloadUploadForTorrent(QString hash);
|
void loadDownloadUploadForTorrent(QString hash);
|
||||||
void handleDownloadFailure(QString url, QString reason);
|
void handleDownloadFailure(QString url, QString reason);
|
||||||
void loadWebSeeds(QString fileHash);
|
void loadWebSeeds(QString fileHash);
|
||||||
void updateDownloadQueue();
|
|
||||||
void updateUploadQueue();
|
|
||||||
void increaseDlTorrentPriority(QString hash);
|
|
||||||
void decreaseDlTorrentPriority(QString hash);
|
|
||||||
void increaseUpTorrentPriority(QString hash);
|
|
||||||
void decreaseUpTorrentPriority(QString hash);
|
|
||||||
void saveTorrentPriority(QString hash, int prio);
|
|
||||||
void downloadUrlAndSkipDialog(QString);
|
|
||||||
// Session configuration - Setters
|
// Session configuration - Setters
|
||||||
void setListeningPortsRange(std::pair<unsigned short, unsigned short> ports);
|
void setListeningPortsRange(std::pair<unsigned short, unsigned short> ports);
|
||||||
void setMaxConnections(int maxConnec);
|
void setMaxConnections(int maxConnec);
|
||||||
@@ -182,12 +149,6 @@ class bittorrent : public QObject {
|
|||||||
bool enableDHT(bool b);
|
bool enableDHT(bool b);
|
||||||
void reloadTorrent(const QTorrentHandle &h, bool full_alloc);
|
void reloadTorrent(const QTorrentHandle &h, bool full_alloc);
|
||||||
void setTimerScanInterval(int secs);
|
void setTimerScanInterval(int secs);
|
||||||
void setMaxActiveDownloads(int val);
|
|
||||||
void setMaxActiveTorrents(int val);
|
|
||||||
void setETACalculation(bool enable);
|
|
||||||
void addConsoleMessage(QString msg, QColor color=QApplication::palette().color(QPalette::WindowText));
|
|
||||||
void addPeerBanMessage(QString msg, bool from_ipfilter);
|
|
||||||
void fixTorrentPriorities();
|
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void scanDirectory();
|
void scanDirectory();
|
||||||
@@ -198,35 +159,29 @@ class bittorrent : public QObject {
|
|||||||
void deleteBigRatios();
|
void deleteBigRatios();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
//void invalidTorrent(QString path);
|
void invalidTorrent(QString path);
|
||||||
//void duplicateTorrent(QString path);
|
void duplicateTorrent(QString path);
|
||||||
void addedTorrent(QTorrentHandle& h);
|
void addedTorrent(QString path, QTorrentHandle& h, bool fastResume);
|
||||||
void deletedTorrent(QString hash);
|
void deletedTorrent(QString hash);
|
||||||
void pausedTorrent(QString hash);
|
void pausedTorrent(QString hash);
|
||||||
void resumedTorrent(QString hash);
|
void resumedTorrent(QString hash);
|
||||||
void finishedTorrent(QTorrentHandle& h);
|
void finishedTorrent(QTorrentHandle& h);
|
||||||
void fullDiskError(QTorrentHandle& h);
|
void fullDiskError(QTorrentHandle& h);
|
||||||
void trackerError(QString hash, QString time, QString msg);
|
void trackerError(QString hash, QString time, QString msg);
|
||||||
//void portListeningFailure();
|
void portListeningFailure();
|
||||||
void trackerAuthenticationRequired(QTorrentHandle& h);
|
void trackerAuthenticationRequired(QTorrentHandle& h);
|
||||||
void scanDirFoundTorrents(const QStringList& pathList);
|
void scanDirFoundTorrents(const QStringList& pathList);
|
||||||
void newDownloadedTorrent(QString path, QString url);
|
void newDownloadedTorrent(QString path, QString url);
|
||||||
//void aboutToDownloadFromUrl(QString url);
|
void aboutToDownloadFromUrl(QString url);
|
||||||
void updateFileSize(QString hash);
|
void updateFileSize(QString hash);
|
||||||
//void peerBlocked(QString);
|
void peerBlocked(QString);
|
||||||
void downloadFromUrlFailure(QString url, QString reason);
|
void downloadFromUrlFailure(QString url, QString reason);
|
||||||
//void fastResumeDataRejected(QString name);
|
void fastResumeDataRejected(QString name);
|
||||||
//void urlSeedProblem(QString url, QString msg);
|
void urlSeedProblem(QString url, QString msg);
|
||||||
void torrentFinishedChecking(QString hash);
|
void torrentFinishedChecking(QString hash);
|
||||||
//void torrent_ratio_deleted(QString fileName);
|
void torrent_ratio_deleted(QString fileName);
|
||||||
//void UPnPError(QString msg);
|
void UPnPError(QString msg);
|
||||||
//void UPnPSuccess(QString msg);
|
void UPnPSuccess(QString msg);
|
||||||
void updateFinishedTorrentNumber();
|
|
||||||
void updateUnfinishedTorrentNumber();
|
|
||||||
void forceUnfinishedListUpdate();
|
|
||||||
void forceFinishedListUpdate();
|
|
||||||
/*void torrentSwitchedtoFinished(QString hash);
|
|
||||||
void torrentSwitchedtoUnfinished(QString hash);*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,58 +0,0 @@
|
|||||||
<ui version="4.0" >
|
|
||||||
<class>ConsoleDlg</class>
|
|
||||||
<widget class="QDialog" name="ConsoleDlg" >
|
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>512</width>
|
|
||||||
<height>497</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle" >
|
|
||||||
<string>qBittorrent console</string>
|
|
||||||
</property>
|
|
||||||
<property name="windowIcon" >
|
|
||||||
<iconset resource="icons.qrc" >:/Icons/log.png</iconset>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" >
|
|
||||||
<item>
|
|
||||||
<widget class="QTabWidget" name="tabConsole" >
|
|
||||||
<property name="currentIndex" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="tab" >
|
|
||||||
<attribute name="title" >
|
|
||||||
<string>General</string>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="icon" >
|
|
||||||
<iconset resource="icons.qrc" >:/Icons/log.png</iconset>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" >
|
|
||||||
<item>
|
|
||||||
<widget class="QTextBrowser" name="textConsole" />
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tab_2" >
|
|
||||||
<attribute name="title" >
|
|
||||||
<string>Blocked IPs</string>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="icon" >
|
|
||||||
<iconset resource="icons.qrc" >:/Icons/filter.png</iconset>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" >
|
|
||||||
<item>
|
|
||||||
<widget class="QTextBrowser" name="textBannedPeers" />
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
|
||||||
<include location="icons.qrc" />
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@@ -1,50 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 CONSOLE_H
|
|
||||||
#define CONSOLE_H
|
|
||||||
|
|
||||||
#include "bittorrent.h"
|
|
||||||
#include "ui_console.h"
|
|
||||||
|
|
||||||
using namespace libtorrent;
|
|
||||||
|
|
||||||
class consoleDlg : public QDialog, private Ui_ConsoleDlg{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
private:
|
|
||||||
bittorrent *BTSession;
|
|
||||||
|
|
||||||
public:
|
|
||||||
consoleDlg(QWidget *parent, bittorrent* _BTSession) : QDialog(parent) {
|
|
||||||
setupUi(this);
|
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
|
||||||
BTSession = _BTSession;
|
|
||||||
textConsole->setHtml(BTSession->getConsoleMessages().join("<br>"));
|
|
||||||
textBannedPeers->setHtml(BTSession->getPeerBanMessages().join("<br>"));
|
|
||||||
show();
|
|
||||||
}
|
|
||||||
|
|
||||||
~consoleDlg() {}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@@ -45,7 +45,7 @@ createtorrent::createtorrent(QWidget *parent): QDialog(parent){
|
|||||||
setupUi(this);
|
setupUi(this);
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
creatorThread = new torrentCreatorThread();
|
creatorThread = new torrentCreatorThread();
|
||||||
connect(creatorThread, SIGNAL(creationSuccess(QString, const char*, QString)), this, SLOT(handleCreationSuccess(QString, const char*, QString)));
|
connect(creatorThread, SIGNAL(creationSuccess(QString)), this, SLOT(handleCreationSucess(QString)));
|
||||||
connect(creatorThread, SIGNAL(creationFailure(QString)), this, SLOT(handleCreationFailure(QString)));
|
connect(creatorThread, SIGNAL(creationFailure(QString)), this, SLOT(handleCreationFailure(QString)));
|
||||||
connect(creatorThread, SIGNAL(updateProgress(int)), this, SLOT(updateProgressBar(int)));
|
connect(creatorThread, SIGNAL(updateProgress(int)), this, SLOT(updateProgressBar(int)));
|
||||||
show();
|
show();
|
||||||
@@ -129,23 +129,12 @@ void createtorrent::on_addURLSeed_button_clicked(){
|
|||||||
// Subfunction to add files to a torrent_info structure
|
// Subfunction to add files to a torrent_info structure
|
||||||
// Written by Arvid Norberg (libtorrent Author)
|
// Written by Arvid Norberg (libtorrent Author)
|
||||||
void add_files(torrent_info& t, path const& p, path const& l){
|
void add_files(torrent_info& t, path const& p, path const& l){
|
||||||
using boost::filesystem::path;
|
qDebug("p: %s, l: %s, l.leaf(): %s", p.string().c_str(), l.string().c_str(), l.leaf().c_str());
|
||||||
using boost::filesystem::directory_iterator;
|
|
||||||
#if BOOST_VERSION < 103600
|
|
||||||
std::string const& leaf = l.leaf();
|
|
||||||
#else
|
|
||||||
std::string const& leaf = l.filename();
|
|
||||||
#endif
|
|
||||||
if (leaf == ".." || leaf == ".") return;
|
|
||||||
path f(p / l);
|
path f(p / l);
|
||||||
if (is_directory(f)) {
|
if (is_directory(f)){
|
||||||
for (directory_iterator i(f), end; i != end; ++i)
|
for (directory_iterator i(f), end; i != end; ++i)
|
||||||
#if BOOST_VERSION < 103600
|
|
||||||
add_files(t, p, l / i->leaf());
|
add_files(t, p, l / i->leaf());
|
||||||
#else
|
}else{
|
||||||
add_files(t, p, l / i->filename());
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
qDebug("Adding %s", l.string().c_str());
|
qDebug("Adding %s", l.string().c_str());
|
||||||
t.add_file(l, file_size(f));
|
t.add_file(l, file_size(f));
|
||||||
}
|
}
|
||||||
@@ -232,11 +221,7 @@ void torrentCreatorThread::run() {
|
|||||||
ofstream out(complete(path((const char*)save_path.toUtf8())), std::ios_base::binary);
|
ofstream out(complete(path((const char*)save_path.toUtf8())), std::ios_base::binary);
|
||||||
// Adding files to the torrent
|
// Adding files to the torrent
|
||||||
path full_path = complete(path(input_path.toUtf8().data()));
|
path full_path = complete(path(input_path.toUtf8().data()));
|
||||||
#if BOOST_VERSION < 103600
|
|
||||||
add_files(*t, full_path.branch_path(), full_path.leaf());
|
add_files(*t, full_path.branch_path(), full_path.leaf());
|
||||||
#else
|
|
||||||
add_files(*t, full_path.branch_path(), full_path.filename());
|
|
||||||
#endif
|
|
||||||
if(abort) return;
|
if(abort) return;
|
||||||
// Set piece size
|
// Set piece size
|
||||||
t->set_piece_size(piece_size);
|
t->set_piece_size(piece_size);
|
||||||
|