mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-27 07:00:04 +08: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 open torrent destination folder
|
||||
- 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)
|
||||
- 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(actionDelete_Permanently, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_Permanently_triggered()));
|
||||
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(actionHOSColName, SIGNAL(triggered()), this, SLOT(hideOrShowColumnName()));
|
||||
@ -379,6 +380,8 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
|
||||
myFinishedListMenu.addSeparator();
|
||||
myFinishedListMenu.addAction(actionOpen_destination_folder);
|
||||
myFinishedListMenu.addAction(actionTorrent_Properties);
|
||||
myFinishedListMenu.addSeparator();
|
||||
myFinishedListMenu.addAction(actionBuy_it);
|
||||
|
||||
// Call menu
|
||||
// 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
|
||||
// in one time if "close to systray" is enabled
|
||||
void GUI::on_actionExit_triggered() {
|
||||
|
@ -147,6 +147,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
void trackerAuthenticationRequired(QTorrentHandle& h);
|
||||
void setTabText(int index, QString text) const;
|
||||
void openDestinationFolder() const;
|
||||
void goBuyPage() const;
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *);
|
||||
|
@ -428,6 +428,11 @@
|
||||
<string>ETA</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionBuy_it" >
|
||||
<property name="text" >
|
||||
<string>Buy it</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<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(actionOpen_destination_folder, SIGNAL(triggered()), (GUI*)parent, SLOT(openDestinationFolder()));
|
||||
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(actionHOSColSize, SIGNAL(triggered()), this, SLOT(hideOrShowColumnSize()));
|
||||
@ -298,6 +299,8 @@ void DownloadingTorrents::displayDLListMenu(const QPoint& pos) {
|
||||
myDLLlistMenu.addSeparator();
|
||||
myDLLlistMenu.addAction(actionOpen_destination_folder);
|
||||
myDLLlistMenu.addAction(actionTorrent_Properties);
|
||||
myDLLlistMenu.addSeparator();
|
||||
myDLLlistMenu.addAction(actionBuy_it);
|
||||
// Call menu
|
||||
// XXX: why mapToGlobal() is not enough?
|
||||
myDLLlistMenu.exec(mapToGlobal(pos)+QPoint(10,60));
|
||||
|
@ -126,6 +126,11 @@
|
||||
<string>Ratio</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionBuy_it" >
|
||||
<property name="text" >
|
||||
<string>Buy it</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="icons.qrc" />
|
||||
|
Loading…
Reference in New Issue
Block a user