mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 04:24:23 +00:00
- FEATURE: Allow to buy downloads using ShareMonkey
This commit is contained in:
parent
a84c686090
commit
b2950afd5c
@ -4,6 +4,7 @@
|
|||||||
- FEATURE: Allow to define double-click actions in torrents lists
|
- FEATURE: Allow to define double-click actions in torrents lists
|
||||||
- FEATURE: Allow to open torrent destination folder
|
- FEATURE: Allow to open torrent destination folder
|
||||||
- FEATURE: Real progress bar in torrent properties that displays downloaded pieces
|
- FEATURE: Real progress bar in torrent properties that displays downloaded pieces
|
||||||
|
- FEATURE: Allow to buy downloads using ShareMonkey
|
||||||
- BUGFIX: Do not display seeds number in seeding list (always 0)
|
- BUGFIX: Do not display seeds number in seeding list (always 0)
|
||||||
- COSMETIC: Do not display progress bar in seeding list (always 100%)
|
- COSMETIC: Do not display progress bar in seeding list (always 100%)
|
||||||
|
|
||||||
|
@ -73,6 +73,7 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
|
|||||||
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()));
|
||||||
|
connect(actionBuy_it, SIGNAL(triggered()), (GUI*)parent, SLOT(goBuyPage()));
|
||||||
connect(actionTorrent_Properties, SIGNAL(triggered()), this, SLOT(propertiesSelection()));
|
connect(actionTorrent_Properties, SIGNAL(triggered()), this, SLOT(propertiesSelection()));
|
||||||
|
|
||||||
connect(actionHOSColName, SIGNAL(triggered()), this, SLOT(hideOrShowColumnName()));
|
connect(actionHOSColName, SIGNAL(triggered()), this, SLOT(hideOrShowColumnName()));
|
||||||
@ -379,6 +380,8 @@ 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);
|
||||||
|
myFinishedListMenu.addSeparator();
|
||||||
|
myFinishedListMenu.addAction(actionBuy_it);
|
||||||
|
|
||||||
// Call menu
|
// Call menu
|
||||||
// XXX: why mapToGlobal() is not enough?
|
// XXX: why mapToGlobal() is not enough?
|
||||||
|
20
src/GUI.cpp
20
src/GUI.cpp
@ -411,6 +411,26 @@ void GUI::openDestinationFolder() const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GUI::goBuyPage() const {
|
||||||
|
QStringList hashes;
|
||||||
|
switch(tabs->currentIndex()){
|
||||||
|
case 0:
|
||||||
|
hashes = downloadingTorrentTab->getSelectedTorrents(true);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
hashes = finishedTorrentTab->getSelectedTorrents(true);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QString hash;
|
||||||
|
QStringList pathsList;
|
||||||
|
foreach(hash, hashes) {
|
||||||
|
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||||
|
QDesktopServices::openUrl("http://match.sharemonkey.com/?info_hash="+hash+"&fileName="+h.name());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Necessary if we want to close the window
|
// Necessary if we want to close the window
|
||||||
// in one time if "close to systray" is enabled
|
// in one time if "close to systray" is enabled
|
||||||
void GUI::on_actionExit_triggered() {
|
void GUI::on_actionExit_triggered() {
|
||||||
|
@ -147,6 +147,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
|||||||
void trackerAuthenticationRequired(QTorrentHandle& h);
|
void trackerAuthenticationRequired(QTorrentHandle& h);
|
||||||
void setTabText(int index, QString text) const;
|
void setTabText(int index, QString text) const;
|
||||||
void openDestinationFolder() const;
|
void openDestinationFolder() const;
|
||||||
|
void goBuyPage() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent *);
|
void closeEvent(QCloseEvent *);
|
||||||
|
@ -428,6 +428,11 @@
|
|||||||
<string>ETA</string>
|
<string>ETA</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionBuy_it" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Buy it</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="icons.qrc" />
|
<include location="icons.qrc" />
|
||||||
|
@ -98,6 +98,7 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession)
|
|||||||
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()));
|
||||||
connect(actionTorrent_Properties, SIGNAL(triggered()), this, SLOT(propertiesSelection()));
|
connect(actionTorrent_Properties, SIGNAL(triggered()), this, SLOT(propertiesSelection()));
|
||||||
|
connect(actionBuy_it, SIGNAL(triggered()), (GUI*)parent, SLOT(goBuyPage()));
|
||||||
|
|
||||||
connect(actionHOSColName, SIGNAL(triggered()), this, SLOT(hideOrShowColumnName()));
|
connect(actionHOSColName, SIGNAL(triggered()), this, SLOT(hideOrShowColumnName()));
|
||||||
connect(actionHOSColSize, SIGNAL(triggered()), this, SLOT(hideOrShowColumnSize()));
|
connect(actionHOSColSize, SIGNAL(triggered()), this, SLOT(hideOrShowColumnSize()));
|
||||||
@ -298,6 +299,8 @@ void DownloadingTorrents::displayDLListMenu(const QPoint& pos) {
|
|||||||
myDLLlistMenu.addSeparator();
|
myDLLlistMenu.addSeparator();
|
||||||
myDLLlistMenu.addAction(actionOpen_destination_folder);
|
myDLLlistMenu.addAction(actionOpen_destination_folder);
|
||||||
myDLLlistMenu.addAction(actionTorrent_Properties);
|
myDLLlistMenu.addAction(actionTorrent_Properties);
|
||||||
|
myDLLlistMenu.addSeparator();
|
||||||
|
myDLLlistMenu.addAction(actionBuy_it);
|
||||||
// Call menu
|
// Call menu
|
||||||
// XXX: why mapToGlobal() is not enough?
|
// XXX: why mapToGlobal() is not enough?
|
||||||
myDLLlistMenu.exec(mapToGlobal(pos)+QPoint(10,60));
|
myDLLlistMenu.exec(mapToGlobal(pos)+QPoint(10,60));
|
||||||
|
@ -126,6 +126,11 @@
|
|||||||
<string>Ratio</string>
|
<string>Ratio</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionBuy_it" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Buy it</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="icons.qrc" />
|
<include location="icons.qrc" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user