1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-14 11:52:15 +02:00

Compare commits

..

39 Commits

Author SHA1 Message Date
Christophe Dumez
f043cd3cc5 - Tagged v1.1.3 release 2008-08-26 07:21:15 +00:00
Christophe Dumez
28626f51ad - Fixed a comment
- Added chinese traditional translation to stable branch
- bump to v1.1.3 in stable branch (updated splash screen)
- Updated changelogs
2008-08-26 07:14:38 +00:00
Christophe Dumez
25233295ba - Fixed ratio saving for seeding torrents 2008-08-26 06:45:24 +00:00
Christophe Dumez
bd6684405b - Added czech translation 2008-08-18 23:58:30 +00:00
Christophe Dumez
a8235dc413 - Progress calculation fix 2008-08-17 03:53:49 +00:00
Christophe Dumez
c2838d9b0c - Forgot to update this 2008-08-01 16:21:14 +00:00
Christophe Dumez
d6d7797064 - v1.1.1 2008-08-01 16:20:27 +00:00
Christophe Dumez
685216505c - Fixed resource file 2008-08-01 16:17:31 +00:00
Christophe Dumez
c28c55280d - Added release date 2008-08-01 14:37:03 +00:00
Christophe Dumez
f1032c4619 - Updated INSTALL file 2008-08-01 14:30:18 +00:00
Christophe Dumez
d34bfd13b3 - Updated resources files 2008-08-01 14:28:28 +00:00
Christophe Dumez
cfd6a9d734 - Removed rc 2008-08-01 14:23:39 +00:00
Christophe Dumez
c2f22d292a - Updated bulgarian and greek translations 2008-07-31 12:45:35 +00:00
Christophe Dumez
9778112b3b - Allow to download torrents from local files in WEB UI 2008-07-31 12:11:01 +00:00
Christophe Dumez
1708361bd5 - Added peerkoel to dutch translators 2008-07-29 09:58:50 +00:00
Christophe Dumez
cc04f7eec2 - Updated dutch translation 2008-07-29 09:56:32 +00:00
Christophe Dumez
395805f9e8 - Added new Russian translator's name 2008-07-29 07:48:26 +00:00
Christophe Dumez
ba5daee92f - Patch from Alexey Morsov for desktop file to satisfy freedesktop
standard
2008-07-29 07:42:45 +00:00
Christophe Dumez
bfef2b5cc0 - updated russian translation 2008-07-29 07:40:03 +00:00
Christophe Dumez
af2431afbd - Added new spanish translator's name 2008-07-28 13:24:14 +00:00
Christophe Dumez
7a1b92e467 - Updated spanish translation 2008-07-28 13:17:55 +00:00
Christophe Dumez
dc399e9ed9 - optimized downloadthreads
- fixed resizing in torrent addition dialog
2008-07-27 18:11:45 +00:00
Christophe Dumez
dad79d2cc8 - Bump to rc2 2008-07-27 16:02:58 +00:00
Christophe Dumez
b5d30d5154 - Fixed vertical alignements of menus 2008-07-27 15:58:33 +00:00
Christophe Dumez
72df85749b - Updated TODO file 2008-07-27 15:42:57 +00:00
Christophe Dumez
6c84288b09 - Updated German translation 2008-07-23 07:00:16 +00:00
Christophe Dumez
78239d6956 - Fixed building on ARM (patch from Cristian Greco) 2008-07-22 19:49:22 +00:00
Christophe Dumez
41be514dcf - Commented ASSERT due to a little string encoding bug in libtorrent 2008-07-22 14:40:01 +00:00
Christophe Dumez
855b539843 - Add missing line at the end 2008-07-19 20:04:01 +00:00
Christophe Dumez
2e72ab4973 - Fixed extented selection in search results list (Bug introduced by Tab support in search engine) 2008-07-19 19:28:57 +00:00
Christophe Dumez
ae2ad8e747 - Fixed a bug in torrent progress display 2008-07-16 21:53:34 +00:00
Christophe Dumez
42fa5ef8f3 - Updated hungarian translation 2008-07-13 21:12:16 +00:00
Christophe Dumez
9395f7316d - Updated hungarian translator's mail 2008-07-13 21:10:18 +00:00
Christophe Dumez
fa1c4050ed - Updated Korean translation 2008-07-12 21:23:27 +00:00
Christophe Dumez
565b98a94a - Updated turkish translation 2008-07-11 21:35:39 +00:00
Christophe Dumez
f58efdfefc - Bump to rc1
- Disable debug
2008-07-11 17:37:13 +00:00
Christophe Dumez
a806c27f70 - Updated Italian translation 2008-07-11 16:30:52 +00:00
Christophe Dumez
a8f82d9e12 - Updated Finnish translation 2008-07-10 18:50:34 +00:00
Christophe Dumez
fe6054307e - Moved v1.1.x to its own branch. Trunk will now be dedicated to v1.2.x 2008-07-10 18:11:26 +00:00
94 changed files with 6953 additions and 10468 deletions

View File

@@ -1,15 +1,3 @@
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.2.0
- FEATURE: Torrent queueing system (with priorities)
- FEATURE: DHT is always ON (no longer used as fallback)
- FEATURE: The number of DHT nodes is displayed
- FEATURE: RSS can now be disabled from program preferences
- BUGFIX: Disable ETA calculation when ETA column is hidden
- BUGFIX: Removed "disconnected" connection state, detection was far from perfect
- 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: Top toolbar is now hidden as a default
* 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

View File

@@ -18,7 +18,6 @@ Dependencies:
Qt >= 4.4.0 is advised
- libtorrent-rasterbar by Arvid Norberg (>= v0.13.1 REQUIRED)
-> http://www.qbittorrent.org/download.php (advised)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.

22
TODO
View File

@@ -1,4 +1,22 @@
See https://blueprints.launchpad.net/qbittorrent/
// in v1.2.0
- Split download and uploads in Web UI (Ishan Ahora)
Translations updated in v1.1.0:
- French
- Chinese
- Polish
- Portuguese
- Brazilian
- Slovak
- Swedish
- Romanian
- Finnish
- Italian
- Turkish
- Korean
- Hungarian
- German
- Spanish
- Russian
- Dutch
- Bulgarian
- Greek

View File

@@ -40,8 +40,7 @@
#define SEEDSLEECH 5
#define RATIO 6
#define ETA 7
#define PRIORITY 8
#define HASH 9
#define HASH 8
class DLListDelegate: public QItemDelegate {
Q_OBJECT

View File

@@ -37,8 +37,7 @@
#define F_UPSPEED 2
#define F_LEECH 3
#define F_RATIO 4
#define F_PRIORITY 5
#define F_HASH 6
#define F_HASH 5
class FinishedListDelegate: public QItemDelegate {
Q_OBJECT

View File

@@ -38,17 +38,14 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
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_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_LEECH, Qt::Horizontal, tr("Leechers", "i.e: full/partial sources"));
finishedListModel->setHeaderData(F_RATIO, Qt::Horizontal, tr("Ratio"));
finishedListModel->setHeaderData(F_PRIORITY, Qt::Horizontal, tr("Priority"));
finishedList->setModel(finishedListModel);
loadHiddenColumns();
// Hide priority column
finishedList->hideColumn(F_PRIORITY);
// Hide hash column
finishedList->hideColumn(F_HASH);
// Load last columns width for download list
@@ -64,8 +61,8 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
connect(finishedList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedListMenu(const QPoint&)));
finishedList->header()->setContextMenuPolicy(Qt::CustomContextMenu);
connect(finishedList->header(), SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedHoSMenu(const QPoint&)));
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")));
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.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(actionStart, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionStart_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(actionDelete_Permanently, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_Permanently_triggered()));
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(actionHOSColLeechers, SIGNAL(triggered()), this, SLOT(hideOrShowColumnLeechers()));
connect(actionHOSColRatio, SIGNAL(triggered()), this, SLOT(hideOrShowColumnRatio()));
connect(actionHOSColPriority, SIGNAL(triggered()), this, SLOT(hideOrShowColumnPriority()));
}
FinishedTorrents::~FinishedTorrents(){
@@ -103,14 +97,6 @@ void FinishedTorrents::notifyTorrentDoubleClicked(const QModelIndex& index) {
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){
if(!BTSession->isFinished(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_LEECH), QVariant("0"));
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));
if(h.is_paused()) {
finishedListModel->setData(finishedListModel->index(row, F_NAME), QIcon(":/Icons/skin/paused.png"), Qt::DecorationRole);
@@ -253,14 +237,6 @@ void FinishedTorrents::updateFinishedList(){
row = getRowFromHash(hash);
}
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(BTSession->getTorrentsToPauseAfterChecking().indexOf(hash) != -1) {
continue;
@@ -413,17 +389,12 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
myFinishedListMenu.addSeparator();
myFinishedListMenu.addAction(actionOpen_destination_folder);
myFinishedListMenu.addAction(actionTorrent_Properties);
if(BTSession->isQueueingEnabled()) {
myFinishedListMenu.addSeparator();
myFinishedListMenu.addAction(actionIncreasePriority);
myFinishedListMenu.addAction(actionDecreasePriority);
}
myFinishedListMenu.addSeparator();
myFinishedListMenu.addAction(actionBuy_it);
// Call menu
// XXX: why mapToGlobal() is not enough?
myFinishedListMenu.exec(mapToGlobal(pos)+QPoint(10,58));
myFinishedListMenu.exec(mapToGlobal(pos)+QPoint(10,59));
}
@@ -435,17 +406,11 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
void FinishedTorrents::displayFinishedHoSMenu(const QPoint& pos){
QMenu hideshowColumn(this);
hideshowColumn.setTitle(tr("Hide or Show Column"));
int lastCol;
if(BTSession->isQueueingEnabled()) {
lastCol = F_PRIORITY;
} else {
lastCol = F_RATIO;
}
for(int i=0; i<=lastCol; i++) {
for(int i=0; i<=F_RATIO; i++) {
hideshowColumn.addAction(getActionHoSCol(i));
}
// Call menu
hideshowColumn.exec(mapToGlobal(pos)+QPoint(10,34));
hideshowColumn.exec(mapToGlobal(pos)+QPoint(10,32));
}
// toggle hide/show a column
@@ -499,10 +464,6 @@ void FinishedTorrents::hideOrShowColumnRatio() {
hideOrShowColumn(F_RATIO);
}
void FinishedTorrents::hideOrShowColumnPriority() {
hideOrShowColumn(F_PRIORITY);
}
// load the previous settings, and hide the columns
bool FinishedTorrents::loadHiddenColumns() {
bool loaded = false;
@@ -564,9 +525,6 @@ QAction* FinishedTorrents::getActionHoSCol(int index) {
case F_RATIO :
return actionHOSColRatio;
break;
case F_PRIORITY :
return actionHOSColPriority;
break;
default :
return NULL;
}
@@ -590,7 +548,6 @@ void FinishedTorrents::sortFinishedList(int index){
switch(index){
case F_SIZE:
case F_UPSPEED:
case F_PRIORITY:
sortFinishedListFloat(index, sortOrder);
break;
default:

View File

@@ -72,7 +72,6 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
void hideOrShowColumnUpSpeed();
void hideOrShowColumnLeechers();
void hideOrShowColumnRatio();
void hideOrShowColumnPriority();
public slots:
void addTorrent(QString hash);
@@ -82,7 +81,6 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
void propertiesSelection();
void deleteTorrent(QString hash);
void showPropertiesFromHash(QString hash);
void hidePriorityColumn(bool hide);
signals:
void torrentMovedFromFinishedList(QString);

File diff suppressed because it is too large Load Diff

View File

@@ -52,7 +52,6 @@ class QTabWidget;
class QLabel;
class QModelIndex;
class HttpServer;
class QFrame;
class GUI : public QMainWindow, private Ui::MainWindow{
Q_OBJECT
@@ -76,22 +75,12 @@ class GUI : public QMainWindow, private Ui::MainWindow{
bool force_exit;
unsigned int refreshInterval;
QTimer *refresher;
QLabel *dlSpeedLbl;
QLabel *upSpeedLbl;
QLabel *ratioLbl;
QLabel *DHTLbl;
QFrame *statusSep1;
QFrame *statusSep2;
QFrame *statusSep3;
QFrame *statusSep4;
// Keyboard shortcuts
QShortcut *switchSearchShortcut;
QShortcut *switchSearchShortcut2;
QShortcut *switchDownShortcut;
QShortcut *switchUpShortcut;
QShortcut *switchRSSShortcut;
QAction *prioSeparator;
QAction *prioSeparator2;
// Search
SearchEngine *searchEngine;
// RSS
@@ -127,8 +116,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{
void readSettings();
void on_actionExit_triggered();
void createTrayIcon();
void updateUnfinishedTorrentNumberCalc();
void updateFinishedTorrentNumberCalc();
void updateUnfinishedTorrentNumber(unsigned int nb);
void updateFinishedTorrentNumber(unsigned int nb);
void fullDiskError(QTorrentHandle& h) const;
@@ -167,8 +154,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{
void updateLists();
bool initWebUi(QString username, QString password, int port);
void pauseTorrent(QString hash);
void on_actionIncreasePriority_triggered();
void on_actionDecreasePriority_triggered();
// Options slots
void on_actionOptions_triggered();
void OptionsSaved(QString info, bool deleteOptions);
@@ -185,8 +170,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
protected:
void closeEvent(QCloseEvent *);
bool event(QEvent * event);
void displayRSSTab(bool enable);
void hideEvent(QHideEvent *);
public:
// Construct / Destruct

View File

@@ -1,6 +1,6 @@
[Desktop Entry]
Categories=Qt;Network;P2P
Comment=V1.2.0
Comment=V1.1.1
Exec=qbittorrent %f
GenericName=Bittorrent client
GenericName[bg]=Торент клиент

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 493 B

BIN
src/Icons/smile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

BIN
src/Icons/stare.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/Icons/unhappy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -187,3 +187,4 @@ bool SearchTab::loadColWidthSearchList(){
qDebug("Search list columns width loaded");
return true;
}

View File

@@ -56,7 +56,7 @@ class about : public QDialog, private Ui::AboutDlg{
"<i>- <u>Brazilian:</u> Nick Marinho (nickmarinho@gmail.com)<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>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>\

File diff suppressed because it is too large Load Diff

View File

@@ -70,15 +70,6 @@ class bittorrent : public QObject{
FilterParserThread *filterParser;
QString filterPath;
int folderScanInterval; // in seconds
bool queueingEnabled;
int maxActiveDownloads;
int maxActiveTorrents;
int currentActiveDownloads;
QStringList *downloadQueue;
QStringList *queuedDownloads;
QStringList *uploadQueue;
QStringList *queuedUploads;
bool calculateETA;
protected:
QString getSavePath(QString hash);
@@ -106,14 +97,6 @@ class bittorrent : public QObject{
bool has_filtered_files(QString hash) const;
unsigned int getFinishedPausedTorrentsNb() 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);
public slots:
void addTorrent(QString path, bool fromScanDir = false, QString from_url = QString(), bool resumed = false);
@@ -133,7 +116,6 @@ class bittorrent : public QObject{
void enablePeerExchange();
void enableIPFilter(QString filter);
void disableIPFilter();
void setQueueingEnabled(bool enable);
void resumeUnfinishedTorrents();
void saveTorrentSpeedLimits(QString hash);
void loadTorrentSpeedLimits(QString hash);
@@ -141,13 +123,6 @@ class bittorrent : public QObject{
void loadDownloadUploadForTorrent(QString hash);
void handleDownloadFailure(QString url, QString reason);
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);
// Session configuration - Setters
void setListeningPortsRange(std::pair<unsigned short, unsigned short> ports);
void setMaxConnections(int maxConnec);
@@ -174,9 +149,6 @@ class bittorrent : public QObject{
bool enableDHT(bool b);
void reloadTorrent(const QTorrentHandle &h, bool full_alloc);
void setTimerScanInterval(int secs);
void setMaxActiveDownloads(int val);
void setMaxActiveTorrents(int val);
void setETACalculation(bool enable);
protected slots:
void scanDirectory();
@@ -210,10 +182,6 @@ class bittorrent : public QObject{
void torrent_ratio_deleted(QString fileName);
void UPnPError(QString msg);
void UPnPSuccess(QString msg);
void updateFinishedTorrentNumber();
void updateUnfinishedTorrentNumber();
void forceUnfinishedListUpdate();
void forceFinishedListUpdate();
};
#endif

View File

@@ -18,16 +18,7 @@
<property name="spacing" >
<number>6</number>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<property name="margin" >
<number>0</number>
</property>
<item>
@@ -72,6 +63,14 @@
<number>0</number>
</property>
<widget class="QWidget" name="log_tab" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>765</width>
<height>138</height>
</rect>
</property>
<attribute name="title" >
<string>Log</string>
</attribute>
@@ -79,16 +78,7 @@
<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" >
<property name="margin" >
<number>9</number>
</property>
<item>
@@ -113,6 +103,14 @@
</layout>
</widget>
<widget class="QWidget" name="filter_tab" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>765</width>
<height>138</height>
</rect>
</property>
<attribute name="title" >
<string>IP filter</string>
</attribute>
@@ -120,16 +118,7 @@
<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" >
<property name="margin" >
<number>9</number>
</property>
<item>
@@ -194,7 +183,8 @@
</action>
<action name="actionOpen_destination_folder" >
<property name="icon" >
<iconset resource="icons.qrc" >:/Icons/folder.png</iconset>
<iconset resource="icons.qrc" >
<normaloff>:/Icons/folder.png</normaloff>:/Icons/folder.png</iconset>
</property>
<property name="text" >
<string>Open destination folder</string>
@@ -242,33 +232,15 @@
</action>
<action name="actionBuy_it" >
<property name="icon" >
<iconset resource="icons.qrc" >:/Icons/money.png</iconset>
<iconset resource="icons.qrc" >
<normaloff>:/Icons/money.png</normaloff>:/Icons/money.png</iconset>
</property>
<property name="text" >
<string>Buy it</string>
</property>
</action>
<action name="actionHOSColPriority" >
<property name="text" >
<string>Priority</string>
</property>
</action>
<action name="actionIncreasePriority" >
<property name="icon" >
<iconset resource="icons.qrc" >:/Icons/skin/increase.png</iconset>
</property>
<property name="text" >
<string>Increase priority</string>
</property>
</action>
<action name="actionDecreasePriority" >
<property name="icon" >
<iconset resource="icons.qrc" >:/Icons/skin/decrease.png</iconset>
</property>
<property name="text" >
<string>Decrease priority</string>
</property>
</action>
<zorder>tabBottom</zorder>
<zorder></zorder>
</widget>
<resources>
<include location="icons.qrc" />

View File

@@ -49,7 +49,7 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession)
// tabBottom->setTabIcon(1, QIcon(QString::fromUtf8(":/Icons/filter.png")));
// Set Download list model
DLListModel = new QStandardItemModel(0,10);
DLListModel = new QStandardItemModel(0,9);
DLListModel->setHeaderData(NAME, Qt::Horizontal, tr("Name", "i.e: file name"));
DLListModel->setHeaderData(SIZE, Qt::Horizontal, tr("Size", "i.e: file size"));
DLListModel->setHeaderData(PROGRESS, Qt::Horizontal, tr("Progress", "i.e: % downloaded"));
@@ -58,12 +58,9 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession)
DLListModel->setHeaderData(SEEDSLEECH, Qt::Horizontal, tr("Seeds/Leechs", "i.e: full/partial sources"));
DLListModel->setHeaderData(RATIO, Qt::Horizontal, tr("Ratio"));
DLListModel->setHeaderData(ETA, Qt::Horizontal, tr("ETA", "i.e: Estimated Time of Arrival / Time left"));
DLListModel->setHeaderData(PRIORITY, Qt::Horizontal, tr("Priority"));
downloadList->setModel(DLListModel);
DLDelegate = new DLListDelegate(downloadList);
downloadList->setItemDelegate(DLDelegate);
// Hide priority column
downloadList->hideColumn(PRIORITY);
// Hide hash column
downloadList->hideColumn(HASH);
loadHiddenColumns();
@@ -78,7 +75,6 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession)
connect(BTSession, SIGNAL(urlSeedProblem(QString, QString)), this, SLOT(addUrlSeedError(QString, QString)));
connect(BTSession, SIGNAL(UPnPError(QString)), this, SLOT(displayUPnPError(QString)));
connect(BTSession, SIGNAL(UPnPSuccess(QString)), this, SLOT(displayUPnPSuccess(QString)));
connect(BTSession, SIGNAL(forceUnfinishedListUpdate()), this, SLOT(updateDlList()));
// Load last columns width for download list
if(!loadColWidthDLList()) {
@@ -98,8 +94,6 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession)
connect(actionPause, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionPause_triggered()));
connect(actionStart, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionStart_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(actionDelete_Permanently, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_Permanently_triggered()));
connect(actionOpen_destination_folder, SIGNAL(triggered()), (GUI*)parent, SLOT(openDestinationFolder()));
@@ -114,7 +108,6 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession)
connect(actionHOSColSeedersLeechers, SIGNAL(triggered()), this, SLOT(hideOrShowColumnSeedersLeechers()));
connect(actionHOSColRatio, SIGNAL(triggered()), this, SLOT(hideOrShowColumnRatio()));
connect(actionHOSColEta, SIGNAL(triggered()), this, SLOT(hideOrShowColumnEta()));
connect(actionHOSColPriority, SIGNAL(triggered()), this, SLOT(hideOrShowColumnPriority()));
// Set info Bar infos
setInfoBar(tr("qBittorrent %1 started.", "e.g: qBittorrent v0.x started.").arg(QString::fromUtf8(""VERSION)));
@@ -128,13 +121,6 @@ DownloadingTorrents::~DownloadingTorrents() {
delete DLListModel;
}
void DownloadingTorrents::enablePriorityColumn(bool enable) {
if(enable) {
downloadList->showColumn(PRIORITY);
} else {
downloadList->hideColumn(PRIORITY);
}
}
void DownloadingTorrents::notifyTorrentDoubleClicked(const QModelIndex& index) {
unsigned int row = index.row();
@@ -321,11 +307,6 @@ void DownloadingTorrents::displayDLListMenu(const QPoint& pos) {
myDLLlistMenu.addSeparator();
myDLLlistMenu.addAction(actionOpen_destination_folder);
myDLLlistMenu.addAction(actionTorrent_Properties);
if(BTSession->isQueueingEnabled()) {
myDLLlistMenu.addSeparator();
myDLLlistMenu.addAction(actionIncreasePriority);
myDLLlistMenu.addAction(actionDecreasePriority);
}
myDLLlistMenu.addSeparator();
myDLLlistMenu.addAction(actionBuy_it);
// Call menu
@@ -342,13 +323,7 @@ void DownloadingTorrents::displayDLListMenu(const QPoint& pos) {
void DownloadingTorrents::displayDLHoSMenu(const QPoint& pos){
QMenu hideshowColumn(this);
hideshowColumn.setTitle(tr("Hide or Show Column"));
int lastCol;
if(BTSession->isQueueingEnabled()) {
lastCol = PRIORITY;
} else {
lastCol = ETA;
}
for(int i=0; i <= lastCol; ++i) {
for(int i=0; i<=ETA; i++) {
hideshowColumn.addAction(getActionHoSCol(i));
}
// Call menu
@@ -372,19 +347,11 @@ void DownloadingTorrents::hideOrShowColumn(int index) {
downloadList->setColumnHidden(index, true);
getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
--nbVisibleColumns;
if(index == ETA) {
BTSession->setETACalculation(false);
qDebug("Disable ETA calculation");
}
} else {
// User want to display the column
downloadList->setColumnHidden(index, false);
getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
++nbVisibleColumns;
if(index == ETA) {
BTSession->setETACalculation(true);
qDebug("Enable ETA calculation");
}
}
//resize all others non-hidden columns
for(unsigned int i=0; i<nbCols; ++i) {
@@ -394,14 +361,6 @@ void DownloadingTorrents::hideOrShowColumn(int index) {
}
}
void DownloadingTorrents::hidePriorityColumn(bool hide) {
downloadList->setColumnHidden(PRIORITY, hide);
if(hide)
getActionHoSCol(PRIORITY)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
else
getActionHoSCol(PRIORITY)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
}
// save the hidden columns in settings
void DownloadingTorrents::saveHiddenColumns() {
QSettings settings("qBittorrent", "qBittorrent");
@@ -477,9 +436,6 @@ void DownloadingTorrents::hideOrShowColumnEta() {
hideOrShowColumn(ETA);
}
void DownloadingTorrents::hideOrShowColumnPriority() {
hideOrShowColumn(PRIORITY);
}
void DownloadingTorrents::on_actionClearLog_triggered() {
infoBar->clear();
@@ -512,9 +468,6 @@ QAction* DownloadingTorrents::getActionHoSCol(int index) {
case ETA :
return actionHOSColEta;
break;
case PRIORITY :
return actionHOSColPriority;
break;
default :
return NULL;
}
@@ -571,17 +524,6 @@ void DownloadingTorrents::updateDlList() {
row = getRowFromHash(hash);
}
Q_ASSERT(row != -1);
// Update Priority
if(BTSession->isQueueingEnabled()) {
DLListModel->setData(DLListModel->index(row, PRIORITY), QVariant((int)BTSession->getDlTorrentPriority(hash)));
if(h.is_paused() && BTSession->isDownloadQueued(hash)) {
DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/queued.png"))), Qt::DecorationRole);
if(!downloadList->isColumnHidden(ETA)) {
DLListModel->setData(DLListModel->index(row, ETA), QVariant((qlonglong)-1));
}
setRowColor(row, QString::fromUtf8("grey"));
}
}
// No need to update a paused torrent
if(h.is_paused()) continue;
if(BTSession->getTorrentsToPauseAfterChecking().indexOf(hash) != -1) {
@@ -681,7 +623,6 @@ void DownloadingTorrents::addTorrent(QString hash) {
}
QTorrentHandle h = BTSession->getTorrentHandle(hash);
int row = getRowFromHash(hash);
qDebug("DL: addTorrent(): %s, row: %d", (const char*)hash.toUtf8(), row);
if(row != -1) return;
row = DLListModel->rowCount();
// Adding torrent to download list
@@ -692,8 +633,6 @@ void DownloadingTorrents::addTorrent(QString hash) {
DLListModel->setData(DLListModel->index(row, UPSPEED), QVariant((double)0.));
DLListModel->setData(DLListModel->index(row, SEEDSLEECH), QVariant(QString::fromUtf8("0/0")));
DLListModel->setData(DLListModel->index(row, ETA), QVariant((qlonglong)-1));
if(BTSession->isQueueingEnabled())
DLListModel->setData(DLListModel->index(row, PRIORITY), QVariant((int)BTSession->getDlTorrentPriority(hash)));
DLListModel->setData(DLListModel->index(row, HASH), QVariant(hash));
// Pause torrent if it was paused last time
if(BTSession->isPaused(hash)) {
@@ -782,7 +721,6 @@ void DownloadingTorrents::sortDownloadList(int index, Qt::SortOrder startSortOrd
case ETA:
case UPSPEED:
case DLSPEED:
case PRIORITY:
sortDownloadListFloat(index, sortOrder);
break;
case PROGRESS:
@@ -870,7 +808,6 @@ void DownloadingTorrents::torrentAdded(QString path, QTorrentHandle& h, bool fas
if(BTSession->isFinished(hash)) {
return;
}
if(getRowFromHash(hash) != -1) return;
int row = DLListModel->rowCount();
// Adding torrent to download list
DLListModel->insertRow(row);

View File

@@ -55,7 +55,6 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{
QString getHashFromRow(unsigned int row) const;
QStringList getSelectedTorrents(bool only_one=false) const;
unsigned int getNbTorrentsInList() const;
void enablePriorityColumn(bool enable);
signals:
void unfinishedTorrentsNumberChanged(unsigned int);
@@ -93,7 +92,6 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{
void hideOrShowColumnSeedersLeechers();
void hideOrShowColumnRatio();
void hideOrShowColumnEta();
void hideOrShowColumnPriority();
void displayUPnPError(QString msg);
void displayUPnPSuccess(QString msg);
@@ -108,7 +106,6 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{
void sortProgressColumnDelayed();
void updateFileSizeAndProgress(QString hash);
void showPropertiesFromHash(QString hash);
void hidePriorityColumn(bool hide);
};

View File

@@ -20,12 +20,11 @@
#include "eventmanager.h"
#include "bittorrent.h"
#include "json.h"
#include <QDebug>
EventManager::EventManager(QObject *parent, bittorrent *BTSession)
: QObject(parent), BTSession(BTSession)
EventManager::EventManager(QObject *parent)
: QObject(parent)
{
revision = 0;
}
@@ -100,12 +99,10 @@ void EventManager::modifiedTorrent(QTorrentHandle h)
QVariantMap event;
QVariant v;
if(h.is_paused()) {
if(BTSession->isDownloadQueued(hash) || BTSession->isUploadQueued(hash))
v = QVariant("queued");
else
v = QVariant("paused");
} else {
if(h.is_paused())
v = QVariant("paused");
else
{
switch(h.state())
{
case torrent_status::finished:

View File

@@ -27,8 +27,6 @@
#include <QPair>
#include <QVariant>
struct bittorrent;
class EventManager : public QObject
{
Q_OBJECT
@@ -36,13 +34,12 @@ class EventManager : public QObject
ulong revision;
QLinkedList<QPair <ulong, QVariantMap> > events;
bool modify(QString hash, QString key, QVariant value);
bittorrent* BTSession;
protected:
void update(QVariantMap event);
public:
EventManager(QObject *parent, bittorrent* BTSession);
EventManager(QObject *parent = 0);
QVariant querySince(ulong r) const;
bool isUpdated(ulong r) const;

View File

@@ -30,7 +30,7 @@ HttpServer::HttpServer(bittorrent *BTSession, int msec, QObject* parent) : QTcpS
base64 = QByteArray(":").toBase64();
connect(this, SIGNAL(newConnection()), this, SLOT(newHttpConnection()));
HttpServer::BTSession = BTSession;
manager = new EventManager(this, BTSession);
manager = new EventManager(this);
//add torrents
QStringList list = BTSession->getUnfinishedTorrents() + BTSession->getFinishedTorrents();
QString hash;

View File

@@ -32,16 +32,19 @@
<file>Icons/refresh.png</file>
<file>Icons/rss16.png</file>
<file>Icons/rss32.png</file>
<file>Icons/smile.png</file>
<file>Icons/sphere.png</file>
<file>Icons/sphere2.png</file>
<file>Icons/splash.png</file>
<file>Icons/star.png</file>
<file>Icons/stare.png</file>
<file>Icons/style.png</file>
<file>Icons/subscribe.png</file>
<file>Icons/subscribe16.png</file>
<file>Icons/systemtray.png</file>
<file>Icons/time.png</file>
<file>Icons/unavailable.png</file>
<file>Icons/unhappy.png</file>
<file>Icons/unsubscribe.png</file>
<file>Icons/unsubscribe16.png</file>
<file>Icons/uparrow.png</file>
@@ -77,14 +80,13 @@
<file>Icons/skin/add.png</file>
<file>Icons/skin/connected.png</file>
<file>Icons/skin/connecting.png</file>
<file>Icons/skin/decrease.png</file>
<file>Icons/skin/delete.png</file>
<file>Icons/skin/delete_all.png</file>
<file>Icons/skin/delete_perm.png</file>
<file>Icons/skin/disconnected.png</file>
<file>Icons/skin/downloading.png</file>
<file>Icons/skin/exit.png</file>
<file>Icons/skin/firewalled.png</file>
<file>Icons/skin/increase.png</file>
<file>Icons/skin/info.png</file>
<file>Icons/skin/new.png</file>
<file>Icons/skin/open.png</file>
@@ -96,7 +98,6 @@
<file>Icons/skin/preview.png</file>
<file>Icons/skin/properties.png</file>
<file>Icons/skin/qb_question.png</file>
<file>Icons/skin/queued.png</file>
<file>Icons/skin/remove.png</file>
<file>Icons/skin/search.png</file>
<file>Icons/skin/seeding.png</file>

Some files were not shown because too many files have changed in this diff Show More