Compare commits
1 Commits
release-2.
...
release-1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b0d473a53 |
39
AUTHORS
@@ -2,39 +2,21 @@ Author:
|
|||||||
* Christophe Dumez <chris@qbittorrent.org>
|
* Christophe Dumez <chris@qbittorrent.org>
|
||||||
|
|
||||||
Contributors:
|
Contributors:
|
||||||
* Stefanos Antaris <santaris@csd.auth.gr>
|
|
||||||
* Mohammad Dib <mdib@qbittorrent.org>
|
|
||||||
* Mirco Chinelli <infinity89@fastwebmail.it>
|
|
||||||
* Ishan Arora <ishan@qbittorrent.org>
|
|
||||||
* Arnaud Demaizière <arnaud@qbittorrent.org>
|
* Arnaud Demaizière <arnaud@qbittorrent.org>
|
||||||
|
* Ishan Arora <ishan@qbittorrent.org>
|
||||||
* Grigis Gaëtan <cipher16@gmail.com>
|
* Grigis Gaëtan <cipher16@gmail.com>
|
||||||
* Christian Kandeler <zambesi@users.sourceforge.net>
|
|
||||||
* Silvan Scherrer <silvan.scherrer@aroa.ch>
|
|
||||||
|
|
||||||
Code from other projects:
|
Code from other projects:
|
||||||
* files src/qtsingleapp/* src/lineedit/*
|
|
||||||
copyright: Nokia Corporation
|
|
||||||
license: LGPL
|
|
||||||
|
|
||||||
* files src/ico.cpp src/ico.h
|
* files src/ico.cpp src/ico.h
|
||||||
copyright: Malte Starostik <malte@kde.org>
|
copyright: Malte Starostik <malte@kde.org>
|
||||||
license: LGPL
|
license: LGPL
|
||||||
|
|
||||||
* files src/search_engine/socks.py
|
|
||||||
copyright: Dan Haim <negativeiq@users.sourceforge.net>
|
|
||||||
license: BSD
|
|
||||||
|
|
||||||
Images Authors:
|
Images Authors:
|
||||||
* files: src/Icons/*.png
|
* files: src/Icons/*.png
|
||||||
copyright: Gnome Icon Theme
|
copyright: Gnome Icon Theme
|
||||||
license: GPLv2
|
license: GPLv2
|
||||||
url: http://ftp.acc.umu.se/pub/GNOME/sources/gnome-icon-theme
|
url: http://ftp.acc.umu.se/pub/GNOME/sources/gnome-icon-theme
|
||||||
|
|
||||||
* files: src/oxygen/*.png
|
|
||||||
copyright: Oxygen Icon Theme (KDE)
|
|
||||||
license: LGPL
|
|
||||||
url: http://www.oxygen-icons.org
|
|
||||||
|
|
||||||
* files: src/Icons/flags/*.png
|
* files: src/Icons/flags/*.png
|
||||||
copyright: Open Clip Art Library
|
copyright: Open Clip Art Library
|
||||||
license: Creative Commons Public Domain Dedication
|
license: Creative Commons Public Domain Dedication
|
||||||
@@ -67,13 +49,11 @@ Images Authors:
|
|||||||
Translations authors:
|
Translations authors:
|
||||||
* files: src/lang/*.ts
|
* files: src/lang/*.ts
|
||||||
copyright:
|
copyright:
|
||||||
- Arabic: SDERAWI (abz8868@msn.com) and sn51234 (nesseyan@gmail.com)
|
|
||||||
- Brazilian: Nick Marinho (nickmarinho@gmail.com)
|
- Brazilian: Nick Marinho (nickmarinho@gmail.com)
|
||||||
- Bulgarian: Tsvetan & Boyko Bankoff (emerge_life@users.sourceforge.net)
|
- Bulgarian: Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)
|
||||||
- Catalan: Francisco Luque Contreras (frannoe@ya.com)
|
- Catalan: Gekko Dam Beer (gekko04@users.sourceforge.net)
|
||||||
- Chinese (Simplified): Guo Yue (yue.guo0418@gmail.com)
|
- Chinese (Simplified): Guo Yue (yue.guo0418@gmail.com)
|
||||||
- Chinese (Traditional): Yi-Shun Wang (dnextstep@gmail.com)
|
- Chinese (Traditional): Yi-Shun Wang (dnextstep@gmail.com)
|
||||||
- Croatian: Oliver Mucafir (oliver.untwist@gmail.com)
|
|
||||||
- Czech: Jirka Vilim (web@tets.cz)
|
- 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)
|
||||||
@@ -81,20 +61,19 @@ Translations authors:
|
|||||||
- Finnish: Niklas Laxström (nikerabbit@users.sourceforge.net)
|
- Finnish: Niklas Laxström (nikerabbit@users.sourceforge.net)
|
||||||
- French: Christophe Dumez (chris@qbittorrent.org)
|
- French: Christophe Dumez (chris@qbittorrent.org)
|
||||||
- German: Niels Hoffmann (zentralmaschine@users.sourceforge.net)
|
- German: Niels Hoffmann (zentralmaschine@users.sourceforge.net)
|
||||||
- Greek: Tsvetan Bankov (emerge_life@users.sourceforge.net) and Stephanos Antaris (santaris@csd.auth.gr)
|
- Greek: Tsvetan Bankov (emerge_life@users.sourceforge.net)
|
||||||
- Hungarian: Majoros Péter (majoros.j.p@t-online.hu)
|
- Hungarian: Majoros Péter (majoros.j.p@t-online.hu)
|
||||||
- Italian: Mirko Ferrari (mirkoferrari@gmail.com) and Ferraro Luciano (luciano.ferraro@gmail.com)
|
- Italian: Mirko Ferrari (mirkoferrari@gmail.com) and Ferraro Luciano (luciano.ferraro@gmail.com)
|
||||||
- Japanese: Nardog (alphisation@gmail.com)
|
- Japanese: Nardog (nardog@e2umail.com)
|
||||||
- Korean: Jin Woo Sin (jin828sin@users.sourceforge.net)
|
- Korean: Jin Woo Sin (jin828sin@users.sourceforge.net)
|
||||||
- Norwegian: Lars-Erik Labori (hamil@users.sourceforge.net)
|
- Norwegian: Lars-Erik Labori (hamil@users.sourceforge.net)
|
||||||
- Polish: Mariusz Fik (fisiu@opensuse.org)
|
- Polish: Jarek Smieja (ajep9691@wp.pl)
|
||||||
- Portuguese: Nick Marinho (nickmarinho@gmail.com)
|
- Portuguese: Nick Marinho (nickmarinho@gmail.com)
|
||||||
- Romanian: Obada Denis (obadadenis@users.sourceforge.net)
|
- Romanian: Obada Denis (obadadenis@users.sourceforge.net)
|
||||||
- Russian: Nick Khazov (m2k3d0n at users.sourceforge.net)
|
- Russian: Nick Khazov (m2k3d0n at users.sourceforge.net)
|
||||||
- Serbian: Anaximandar Milet (anaximandar at operamail.com)
|
|
||||||
- Slovak: helix84
|
- Slovak: helix84
|
||||||
- Spanish: Francisco Luque Contreras (frannoe@ya.com)
|
- Spanish: Vicente Raul Plata Fonseca (silverxnt@users.sourceforge.net)
|
||||||
- Swedish: Daniel Nylander (po@danielnylander.se)
|
- Swedish: Daniel Nylander (po@danielnylander.se)
|
||||||
- Turkish: Hasan Yilmaz (iletisim@hedefturkce.com)
|
- Turkish: Erdem Bingöl (erdem84@gmail.com)
|
||||||
- Ukrainian: Andrey Shpachenko (masterfix@users.sourceforge.net) and Oleh Prypin (blaxpirit@gmail.com)
|
- Ukrainian: Andrey Shpachenko (masterfix@users.sourceforge.net)
|
||||||
license: GPLv2
|
license: GPLv2
|
||||||
|
|||||||
14
COPYING
@@ -1,17 +1,3 @@
|
|||||||
qBittorrent is licensed under the GNU General Public License version 2 with the
|
|
||||||
addition of the following special exception:
|
|
||||||
|
|
||||||
In addition, as a special exception, the copyright holders give permission to
|
|
||||||
link this program with the OpenSSL project's "OpenSSL" library (or with
|
|
||||||
modified versions of it that use the same license as the "OpenSSL" library),
|
|
||||||
and distribute the linked executables. You must obey the GNU General Public
|
|
||||||
License in all respects for all of the code used other than "OpenSSL". If you
|
|
||||||
modify file(s), you may extend this exception to your version of the file(s),
|
|
||||||
but you are not obligated to do so. If you do not wish to do so, delete this
|
|
||||||
exception statement from your version.
|
|
||||||
|
|
||||||
----------
|
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
|
|||||||
359
Changelog
@@ -1,362 +1,3 @@
|
|||||||
* Sun Sep 26 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.2
|
|
||||||
- BUGFIX: Fix display of torrent content in addition dialog
|
|
||||||
- BUGFIX: Really fix manual editing of save path in torrent addition dialog
|
|
||||||
|
|
||||||
* Sun Sep 26 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.1
|
|
||||||
- I18N: Updated Arabic translation
|
|
||||||
- I18N: Fixes to German translation
|
|
||||||
- BUGFIX: Save path can now be edited in torrent addition dialog
|
|
||||||
- BUGFIX: Fix save path encoding on non-utf8 systems
|
|
||||||
- BUGFIX: Fix saving to drive root on Windows
|
|
||||||
- BUGFIX: OGV can now be previewed
|
|
||||||
- BUGFIX: Maximum download limit is now 10MB/s
|
|
||||||
- BUGFIX: Fix 'download in scan dir' persistence
|
|
||||||
- BUGFIX: Add .torrent extension only when missing (torrent creator)
|
|
||||||
- BUGFIX: Fix possible issue with temporary download path persistence
|
|
||||||
- BUGFIX: Added support for | (OR) operator in RSS feed downloader
|
|
||||||
- BUGFIX: Fix Web UI for spanish users
|
|
||||||
- BUGFIX: Fix locale switching from Web UI
|
|
||||||
- BUGFIX: Use AND operator for torrentdownloads.net searches
|
|
||||||
- BUGFIX: Limit torrent addition dialog width to fit the screen
|
|
||||||
- COSMETIC: Fix progress bars style on Windows
|
|
||||||
|
|
||||||
* Tue Aug 24 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.0
|
|
||||||
- FEATURE: Added actions to "Move to top/bottom" of priority queue
|
|
||||||
- FEATURE: Auto-Shutdown on downloads completion
|
|
||||||
- FEATURE: Email notification on download completion
|
|
||||||
- FEATURE: Added button to password-lock the UI
|
|
||||||
- FEATURE: Added label-level Pause/Resume/Delete actions
|
|
||||||
- FEATURE: Torrents can now be filtered by name
|
|
||||||
- FEATURE: Run external program on torrent completion
|
|
||||||
- FEATURE: Detect executable updates in order to advise the user to restart
|
|
||||||
|
|
||||||
* Tue Jul 27 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.3.0
|
|
||||||
- FEATURE: Simplified torrent root folder renaming/truncating (< v2.3.0 is no longer forward compatible)
|
|
||||||
- FEATURE: Remember previous save paths in torrent addition dialog
|
|
||||||
- FEATURE: Max number of half-open connections can now be edited
|
|
||||||
- FEATURE: Added support for strict super seeding
|
|
||||||
- FEATURE: The user can force listening on a particular network interface
|
|
||||||
- FEATURE: Added cookie support for RSS feeds
|
|
||||||
- FEATURE: User can force tracker reannounce
|
|
||||||
- FEATURE: Added "No action" setting for double-click action
|
|
||||||
- FEATURE: Several torrents can be moved at once
|
|
||||||
- FEATURE: Added error state for torrents (error is displayed in a tooltip)
|
|
||||||
- FEATURE: Added filter for paused/error torrents
|
|
||||||
- FEATURE: Add Check/Uncheck all feature in Web UI
|
|
||||||
- FEATURE: Search engine can now be disabled
|
|
||||||
- FEATURE: Torrents can be automatically paused once they reach a given ratio
|
|
||||||
- FEATURE: Several files can now be disabled at once
|
|
||||||
- FEATURE: Added "Select All/None" buttons to files list
|
|
||||||
- FEATURE: Added support for BitComet links (bc://bt/...)
|
|
||||||
- BUGFIX: Hide seeding torrents files priorities in Web UI
|
|
||||||
- BUGFIX: The user can disable permanently recursive torrent download
|
|
||||||
- BUGFIX: Peer Exchange status is now correctly reported
|
|
||||||
- BUGFIX: Use an INI file instead of the registry on Windows (More reliable)
|
|
||||||
- BUGFIX: Removed client spoofing feature to avoid tracker blacklisting
|
|
||||||
- COSMETIC: Display peers country name in tooltip
|
|
||||||
- COSMETIC: Display number of torrents in transfers tab label
|
|
||||||
- COSMETIC: Simplified program preferences
|
|
||||||
- COSMETIC: Fix naming of actions opening new dialogs (use Name...)
|
|
||||||
|
|
||||||
* Sun Mar 14 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.2.0
|
|
||||||
- FEATURE: User can set alternative speed limits for fast toggling
|
|
||||||
- FEATURE: Bandwidth scheduler (automatically use alternative speed limits for a given period)
|
|
||||||
- FEATURE: Added "Added/Completed On" columns to transfer list
|
|
||||||
- FEATURE: Added "Upload/Download limit" columns to transfer list
|
|
||||||
- FEATURE: Torrent files can be exported to a given directory
|
|
||||||
- FEATURE: Outgoing ports range can be customized (for QoS)
|
|
||||||
- FEATURE: User can choose to apply transfer limits on LAN too
|
|
||||||
- FEATURE: User can choose to include the protocol overhead in transfer limits
|
|
||||||
- FEATURE: Torrents can be automatically rechecked on completion
|
|
||||||
- FEATURE: If 2 torrents have the same hash, add new trackers/URL seeds to the existing torrent
|
|
||||||
- FEATURE: Trackers can be added from Web UI
|
|
||||||
- FEATURE: Global transfer information are displayed in the new Web UI status bar
|
|
||||||
- FEATURE: Allow to change the priority of several files at once
|
|
||||||
- FEATURE: Support for multiple scan folders (Patch by Christian Kandeler)
|
|
||||||
- BUGFIX: Only one log window can be opened at a time
|
|
||||||
- BUGFIX: Optimized RSS module memory usage
|
|
||||||
- BUGFIX: Consider HTTP downloads >1MB as invalid .torrent files and abort
|
|
||||||
- BUGFIX: Fix Web UI authentication with some browsers
|
|
||||||
- BUGFIX: Set Web UI ban period to 1 hour
|
|
||||||
- COSMETIC: Improved style management
|
|
||||||
|
|
||||||
* Mon Jan 18 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.1.0
|
|
||||||
- FEATURE: Graphical User Interface can be disabled at compilation time (headless running)
|
|
||||||
- FEATURE: Torrents can be labeled/categorized
|
|
||||||
- FEATURE: Labeled torrent can be downloaded corresponding subfolders
|
|
||||||
- FEATURE: Disk cache size can be set from preferences
|
|
||||||
- FEATURE: Peer Exchange (PeX) can be disabled from preferences
|
|
||||||
- FEATURE: Append !.qB extension to incomplete files option (libtorrent >= v0.15 only)
|
|
||||||
- FEATURE: Torrent files/folders can be renamed (torrent addition dialog or files properties)
|
|
||||||
- FEATURE: uTorrent compatible tracker list support (use torrentz.com url as a default)
|
|
||||||
- FEATURE: Better proxy support and preferences remodeling
|
|
||||||
- FEATURE: qBittorrent can identify itself as uTorrent, Vuze or KTorrent (Any stable version)
|
|
||||||
- FEATURE: Torrents can be renamed in transfer list
|
|
||||||
- FEATURE: Display torrent addition dialog for magnet links too
|
|
||||||
- FEATURE: Files contained in a torrent are opened on double click (files panel)
|
|
||||||
- FEATURE: Added support for magnet links in search engine
|
|
||||||
- FEATURE: Added vertor.com and torrentdownloads.net search plugins
|
|
||||||
- FEATURE: Search engine can now use a SOCKS5 proxy
|
|
||||||
- FEATURE: HTTP proxy support for peer communication
|
|
||||||
- BUGFIX: Search engine loads new proxy settings without program restart
|
|
||||||
- BUGFIX: Use XDG folders (.cache, .local) instead of .qbittorrent
|
|
||||||
- BUGFIX: Added legal notice on startup that the user must accept
|
|
||||||
- BUGFIX: Protect Web UI authentication against brute forcing
|
|
||||||
- BUGFIX: Use HTTP digest mode for Web UI authentication (instead of Basic)
|
|
||||||
- BUGFIX: Properly display torrents with one file in subfolder(s)
|
|
||||||
- BUGFIX: Display Web UI favicon
|
|
||||||
- BUGFIX: File priority can be set for finished torrents that have filtered files
|
|
||||||
- COSMETIC: Use checkboxes to filter torrent content instead of comboboxes
|
|
||||||
- COSMETIC: Use alternating row colors in transfer list (set in program preferences)
|
|
||||||
- COSMETIC: Added a spin box to speed limiting dialog for manual input
|
|
||||||
|
|
||||||
* Mon Jan 11 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.0.7
|
|
||||||
- BUGFIX: Fix 'Add in pause' setting in torrent addition dialog
|
|
||||||
- BUGFIX: Update RSS feed as soon as feed downloader is enabled
|
|
||||||
- BUGFIX: RSS Feed downloader ignores articles above maximum number of articles
|
|
||||||
- BUGFIX: Fix possible bug when deleting a RSS folder
|
|
||||||
- BUGFIX: Remove persistant data when a RSS feed is deleted
|
|
||||||
- BUGFIX: RSS filters are now alphabetically sorted
|
|
||||||
- BUGFIX: Fix crash when renaming currently displayed RSS filter
|
|
||||||
- BUGFIX: Remove overwriting confirmation when exporting RSS filters since Qt takes care of it
|
|
||||||
|
|
||||||
* Tue Jan 5 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.0.6
|
|
||||||
- BUGFIX: Fix detection of invalid torrent files
|
|
||||||
- BUGFIX: Stop catching signals once one has been caught to avoid possible infinite loop
|
|
||||||
- BUGFIX: Force data recheck whenever a torrent is moved
|
|
||||||
- BUGFIX: Detect existing torrent data even if incomplete torrents are saved to a different folder
|
|
||||||
- COSMETIC: Improve torrent deletion confirmation dialog so that the text that not get truncated
|
|
||||||
|
|
||||||
* Thu Dec 31 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.5
|
|
||||||
- BUGFIX: Fix crash with downloaded/availability bars when the torrent has too many pieces
|
|
||||||
|
|
||||||
* Wed Dec 30 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.4
|
|
||||||
- BUGFIX: Fix PeerGuardian .p2b binary filter support
|
|
||||||
- BUGFIX: Fix possible crash when closing a search engine tab
|
|
||||||
- BUGFIX: Make sure service port does not change
|
|
||||||
- BUGFIX: Fix possible DHT port saving issue
|
|
||||||
- BUGFIX: Fix communication between qBittorrent and Web UI (Qt 4.6)
|
|
||||||
- BUGFIX: Use Wildcard matching instead of full regex in RSS feed downloader
|
|
||||||
- BUGFIX: Fix code for listening on a random port whenever it failed to listen on the one defined
|
|
||||||
- BUGFIX: Use global maximum transfer rates as maximum values in per-torrent speed limiting dialogs
|
|
||||||
- BUGFIX: Fix global download rate limiting from Web UI
|
|
||||||
- COSMETIC: Display a disconnected icon in status bar whenever qBittorrent failed to listen on the port defined
|
|
||||||
|
|
||||||
* Wed Dec 23 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.3
|
|
||||||
- BUGFIX: Minor cosmetic fix to program preferences
|
|
||||||
- BUGFIX: Fix "Temp path" button in program preferences
|
|
||||||
- BUGFIX: Handle paths with [~, ., ..] properly
|
|
||||||
- BUGFIX: Trackers are now displayed for torrents without metadata
|
|
||||||
- BUGFIX: Fix issue with speed limiting (unlimited was not handled properly)
|
|
||||||
- BUGFIX: Use the save path set in program preferences as a default in torrent addition dialog
|
|
||||||
|
|
||||||
* Fri Dec 18 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.2
|
|
||||||
- BUGFIX: Fix .qbittorrent folder not being created (critical bug introduced in v2.0.1 that makes qBittorrent unusuable for new users)
|
|
||||||
- BUGFIX: Fix RSS Feed downloader for some feeds
|
|
||||||
- BUGFIX: Do not use home folder as a fallback when the save path is not accessible
|
|
||||||
- BUGFIX: Fix Mininova, ThePirateBay search engine plugins
|
|
||||||
- BUGFIX: Read RSS articles are remembered on restart for feeds with no torrents attached
|
|
||||||
|
|
||||||
* Sun Dec 13 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.1
|
|
||||||
- BUGFIX: µTorrent user-agent is now spoofed correctly
|
|
||||||
- BUGFIX: Fix column hiding behavior when queueing system is disabled
|
|
||||||
- BUGFIX: Fix link to plugins.qbittorrent.org in plugins dialog
|
|
||||||
- BUGFIX: ~/qBT_dir is created only when it is actually used
|
|
||||||
- BUGFIX: Fix possible missing slot message (toggleSelectedTorrentsSuperSeeding)
|
|
||||||
- BUGFIX: Fix possible crash in torrent properties (files)
|
|
||||||
- BUGFIX: Added Hex Magnet Links support (Thanks Haypo)
|
|
||||||
|
|
||||||
* Thu Dec 10 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.0
|
|
||||||
- FEATURE: Added program option to disable splash screen
|
|
||||||
- FEATURE: Dropped dependency on libcurl and libzzip
|
|
||||||
- FEATURE: Display more information regarding the torrent in its properties
|
|
||||||
- FEATURE: Various optimizations to save CPU and memory
|
|
||||||
- FEATURE: Folder scanning now works with CIFS and NFS mounted folders
|
|
||||||
- FEATURE: Speed up qBittorrent startup and shutdown
|
|
||||||
- FEATURE: Display per-torrent peer list
|
|
||||||
- FEATURE: Make sure torrent files are always sorted by name
|
|
||||||
- FEATURE: Seeds and Peers columns are now sortable
|
|
||||||
- FEATURE: Torrents can be rechecked from Web UI (Stephanos Antaris)
|
|
||||||
- FEATURE: New peers can manually be added to the torrents
|
|
||||||
- FEATURE: Support per-peer rate limiting
|
|
||||||
- FEATURE: Support peer manual ban
|
|
||||||
- FEATURE: Display total amounts transferred in status bar
|
|
||||||
- FEATURE: Display trackers status as well as error/warning messages
|
|
||||||
- FEATURE: Display the number of peers returned by each tracker & DHT/PeX/LSD
|
|
||||||
- FEATURE: Global upload/download speeds can be capped from status bar (µTorrent behavior)
|
|
||||||
- FEATURE: Added option to download first and last piece of a torrent main file first (for preview)
|
|
||||||
- FEATURE: Graphically display piece availability in torrent properties
|
|
||||||
- FEATURE: Dropped Qt 4.3 support (Qt >= 4.4 is now required)
|
|
||||||
- FEATURE: Display close tab button into the tabs in search engine (Qt >= 4.5 only)
|
|
||||||
- FEATURE: Show official documentation when pressing F1 key
|
|
||||||
- FEATURE: Search engine plugins now handle HTTP protocol gzip compression
|
|
||||||
- FEATURE: Enabled lazy bitfield as a counter-measure for ISP speed throttling
|
|
||||||
- FEATURE: Fall back to a random port if qBittorrent could not listen on the chosen port
|
|
||||||
- FEATURE: Announce to all trackers specified for a torrent (µTorrent behavior) (libtorrent >= v0.15 only)
|
|
||||||
- FEATURE: Added per-torrent super seeding mode (libtorrent >= v0.15 only)
|
|
||||||
- FEATURE: Support for storing symbolic links in .torrent files (libtorrent >= v0.15 only)
|
|
||||||
- FEATURE: Support for uTorrent interpretation of multi-tracker torrents (libtorrent >= v0.15 only)
|
|
||||||
- FEATURE: Handle torrents with duplicate filenames (libtorrent >= v0.15 only)
|
|
||||||
- FEATURE: Support for merkle hash tree torrents (.merkle.torrent) (libtorrent >= v0.15 only)
|
|
||||||
- FEATURE: Metadata download from swarm is now compatible with µtorrent (libtorrent >= v0.15 only)
|
|
||||||
- FEATURE: Support tracker exchange between peers (libtorrent >= v0.15 only)
|
|
||||||
- FEATURE: Better http seed support (libtorrent >= v0.15 only)
|
|
||||||
- FEATURE: Tracker connections are now also subject to IP filtering (libtorrent >= v0.15 only)
|
|
||||||
- FEATURE: Include DHT traffic in the rate limiter (libtorrent >= v0.15 only)
|
|
||||||
- FEATURE: Support for bitcomet padding files (libtorrent >= v0.15 only)
|
|
||||||
- FEATURE: Option to skip file checking and start seeding immediately in torrent addition dialog (Stephanos Antaris) (libtorrent >= v0.15 only)
|
|
||||||
- BUGFIX: Made sure qBittorrent does not scrape the tracker too frequently (libtorrent >= 0.15 only)
|
|
||||||
- BUGFIX: Fix Paste action in search engine field
|
|
||||||
- BUGFIX: Fix possible double free in search engine destructor
|
|
||||||
- BUGFIX: Properly handle trackers error messages
|
|
||||||
- WEB UI: Remodeled Web UI to match new qBittorrent UI (Properties and preferences available)
|
|
||||||
- WEB UI: Added internationalization support
|
|
||||||
- WEB UI: Reduced computation in Javascript (do this one server side instead)
|
|
||||||
- WEB UI: Fixed Transfer list flickering
|
|
||||||
- WEB UI: Password is now stored as md5
|
|
||||||
- I18N: Added Serbian translation (By Anaximandar Milet)
|
|
||||||
- COSMETIC: Merged download / upload lists
|
|
||||||
- COSMETIC: Torrents can be filtered based on their status
|
|
||||||
- COSMETIC: Torrent properties are now displayed in main window
|
|
||||||
- COSMETIC: Made program preferences scrollable for usability on small screens (e.g. netbooks)
|
|
||||||
- COSMETIC: Added a "torrent status" column to transfer list
|
|
||||||
- COSMETIC: Display Seeds and Peers in two separate columns
|
|
||||||
- COSMETIC: New deletion confirmation dialog (Merged delete/delete permanently actions)
|
|
||||||
- COSMETIC: Improved status bar layout spacing
|
|
||||||
- COSMETIC: Display speeds with more user friendly units instead of always using KiB/s
|
|
||||||
- COSMETIC: New torrent status icons by Mateusz Tolola
|
|
||||||
- COSMETIC: Make use of libnotify if available for system notifications (Ubuntu, ...)
|
|
||||||
|
|
||||||
* Tue Nov 17 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.6
|
|
||||||
- BUGFIX: RSS feed articles can now be displayed using keyboard arrows
|
|
||||||
- BUGFIX: RSS feed downloader can only process unread articles now
|
|
||||||
- BUGFIX: Fixed memory leak in RSS parser
|
|
||||||
- BUGFIX: Fixed possible crash in search autocompletion
|
|
||||||
- BUGFIX: Improved ETA calculation for big torrents
|
|
||||||
- BUGFIX: Fixed per-torrent speed limiting
|
|
||||||
|
|
||||||
* Wed Nov 4 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.5
|
|
||||||
- BUGFIX: Fixed man page
|
|
||||||
- BUGFIX: Fix crash on torrent addition (if libtorrent-rasterbar has debug enabled)
|
|
||||||
- BUGFIX: Fix trackers addition to torrents (bug introduced in v1.5.4)
|
|
||||||
- BUGFIX: Suppress compilation warning regarding sortNewsList() not being used
|
|
||||||
- BUGFIX: Make sure scan folder is different than qBittorrent backup directory to avoid torrents deletion
|
|
||||||
- BUGFIX: Added safety mecanism which adds the torrents back to the list in case qbittorrent-resume.conf gets deleted or corrupted.
|
|
||||||
|
|
||||||
* Sun Oct 25 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.4
|
|
||||||
- BUGFIX: Updated man page
|
|
||||||
- BUGFIX: Fixed possible crash with torrents containing unicode characters
|
|
||||||
- BUGFIX: Fixed problem when disabling systray integration and starting minimized
|
|
||||||
- BUGFIX: Fixed PirateBay search plugin
|
|
||||||
- BUGFIX: Using Download button in search results list now downloads the right torrents
|
|
||||||
- BUGFIX: The search results list is no longer sorted automatically when a row color is updated
|
|
||||||
|
|
||||||
* Wed Sep 30 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.3
|
|
||||||
- BUGFIX: Fix a possible crash when pausing then deleting a torrent quickly
|
|
||||||
- BUGFIX: Fix a race condition in folder scanning and torrent downloader
|
|
||||||
- BUGFIX: Hide download url column in search results
|
|
||||||
- BUGFIX: Fix a crash when scanned directory does not exist
|
|
||||||
- BUGFIX: Fix compilation on Mac OS
|
|
||||||
- BUGFIX: Added a command line parameter to disable splash screen
|
|
||||||
- BUGFIX: Ignore permanent deletion button when no torrent is selected
|
|
||||||
- BUGFIX: When a selected torrent is deleted, select next suitable torrent
|
|
||||||
|
|
||||||
* Sun Sep 20 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.2
|
|
||||||
- BUGFIX: Some torrents were pausing for no reason
|
|
||||||
- I18N: Updated Korean translation
|
|
||||||
|
|
||||||
* Thu Sep 7 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.1
|
|
||||||
- BUGFIX: Fix crash in torrent addition dialog when save path does not exist (closes #425227)
|
|
||||||
- BUGFIX: Fix downloading from URL (broken in v1.5.0)
|
|
||||||
- BUGFIX: Pause torrents in error state
|
|
||||||
|
|
||||||
* Thu Sep 3 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.0
|
|
||||||
- FEATURE: Added Magnet URI support
|
|
||||||
- FEATURE: Search engine supports category-based requests
|
|
||||||
- FEATURE: Make use of torrent enclosure in RSS feeds for direct download
|
|
||||||
- FEATURE: Implemented a RSS feed downloader with filter support
|
|
||||||
- FEATURE: Save old RSS item to hard disk to remember them on start up
|
|
||||||
- FEATURE: Display free disk space in torrent addition dialog
|
|
||||||
- FEATURE: In torrent addition from URL, paste clipboard content if it contains an URL
|
|
||||||
- FEATURE: RSS feeds URLs can now be copied to clipboard
|
|
||||||
- FEATURE: RSS feeds can now be grouped into folders
|
|
||||||
- FEATURE: Added "Unread" item to RSS feed list to display all unread news
|
|
||||||
- FEATURE: If a torrent contains a torrent file, process downloaded torrent file too
|
|
||||||
- FEATURE: A random listening port can be chosen automatically
|
|
||||||
- BUGFIX: torrent resume code rewrited
|
|
||||||
- BUGFIX: Fixed uTorrent spoofing code
|
|
||||||
- BUGFIX: Greatly improved column sorting code
|
|
||||||
- BUGFIX: Possibility to create trackerless torrents
|
|
||||||
- BUGFIX: Better item coloring in torrent content filtering dialog
|
|
||||||
- COSMETIC: Redesigned search tab to improve usability
|
|
||||||
- COSMETIC: Redesigned RSS tab to improve usability
|
|
||||||
- COSMETIC: Improved tracker errors readability
|
|
||||||
|
|
||||||
* Sun Aug 21 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.4.1
|
|
||||||
- BUGFIX: Fix problems when changing save path (if using temporary download folder)
|
|
||||||
- BUGFIX: Display real save path instead of the temporary one in torrent properties
|
|
||||||
- BUGFIX: Catching invalid_handle exception to avoid rare crashes
|
|
||||||
- BUGFIX: Fixed popup menu position in RSS feeds list
|
|
||||||
- BUGFIX: Don't save RSS feed state if it could not be updated
|
|
||||||
|
|
||||||
* Thu Aug 13 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.4.0
|
|
||||||
- FEATURE: Display swarm information in lists
|
|
||||||
- FEATURE: Allow to define temporary download folder
|
|
||||||
- FEATURE: Display total amount of uploaded data in finished list
|
|
||||||
- FEATURE: Resizing a column in a search results tab affects all tabs
|
|
||||||
- FEATURE: Search results tab columns are now remembered upon startup
|
|
||||||
- FEATURE: Added right click menu in search engine to clear completion history
|
|
||||||
- FEATURE: Allow to set a different port for DHT (UDP) than the one used for Bittorrent
|
|
||||||
- FEATURE: Updated spoofing code to avoid trackers ban
|
|
||||||
- BUGFIX: Provide more helpful explanation when an I/O error occured
|
|
||||||
- BUGFIX: Stop enforcing UTF-8 and use system locale instead
|
|
||||||
- COSMETIC: Redesigned program preferences
|
|
||||||
- COSMETIC: Updated icons set
|
|
||||||
|
|
||||||
* Fri Jul 24 2009 - Christophe DUMEZ <chris@qbittorrent.org> - 1.3.5
|
|
||||||
- BUGFIX: Made IP filter parser more robust
|
|
||||||
- BUGFIX: Fixed torrent creation tool
|
|
||||||
- BUGFIX: Fixed possible overflow in progress calculation in arborescence.h
|
|
||||||
- BUGFIX: Save properties window size, position, columns width and restore them
|
|
||||||
- BUGFIX: Set a minimum default width for NAME column in properties
|
|
||||||
- BUGFIX: Remember visual indexes of columns in transfer lists
|
|
||||||
|
|
||||||
* Sun Jul 12 2009 - Christophe DUMEZ <chris@qbittorrent.org> - v1.3.4
|
|
||||||
- BUGFIX: Fixed IP filter file parsing on 64bits
|
|
||||||
- BUGFIX: Suppressed QLayout: Attempting to add QLayout "" to properties "properties" warning message when opening a properties dialog
|
|
||||||
- BUGFIX: Fixed a little bug in search engine plugins helper file
|
|
||||||
- BUGFIX: Fixed compilation problems with Qt 4.3
|
|
||||||
- BUGFIX: Percentages no longer disapear with default cleanlooks style
|
|
||||||
- BUGFIX: Cleanly fixed popup menus position in lists (no more workarounds)
|
|
||||||
- BUGFIX: Fixed memory leak in search engine
|
|
||||||
- BUGFIX: Torrents with an infinite ratio are no longer affected by ratio_limit set in program preferences
|
|
||||||
- BUGFIX: Display a ratio of 0.0 if total_upload and total_download are both 0
|
|
||||||
- BUGFIX: Remove last separator in top tool bar
|
|
||||||
- BUGFIX: Tuned lists properties to make sure display is correct
|
|
||||||
- COSMETIC: Display date as well as time in log window
|
|
||||||
|
|
||||||
* Sun Apr 5 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.3.3
|
|
||||||
- BUGFIX: Fixed Web UI torrent upload form
|
|
||||||
- BUGFIX: Fixed unicode support in search engine
|
|
||||||
- BUGFIX: Fixed search engine bug that prevented a torrent from appearing more than once among all tabs
|
|
||||||
- LICENSE: Added an exception to the license regarding OpenSSL.
|
|
||||||
- I18N: Updated Finnish translation
|
|
||||||
|
|
||||||
* Sat Mar 7 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.3.2
|
|
||||||
- BUGFIX: Fix top toolbar disabling
|
|
||||||
- BUGFIX: Fix building with Qt 4.5
|
|
||||||
- BUGFIX: RSS items read status is now remembered upon restart
|
|
||||||
|
|
||||||
* Mon Jan 26 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.3.1
|
|
||||||
- BUGFIX: Torrents paused due to an I/O error were displayed as queued
|
|
||||||
- BUGFIX: qBittorrent now prints backtrace in terminal when segfaulting
|
|
||||||
- BUGFIX: Fixed files progress display in torrent properties
|
|
||||||
- BUGFIX: Improved torrent ratio calculation
|
|
||||||
- BUGFIX: Fixed possible crash when parsing filter file
|
|
||||||
- BUGFIX: Made some code optimization
|
|
||||||
- BUGFIX: Fixed download/upload speed decrease problems
|
|
||||||
- I18N: Updated Finnish, Bulgarian and Greek translations
|
|
||||||
|
|
||||||
* Fri Jan 9 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.3.0
|
* Fri Jan 9 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.3.0
|
||||||
- FEATURE: Based on libtorrent-rasterbar v0.14.2
|
- FEATURE: Based on libtorrent-rasterbar v0.14.2
|
||||||
- FEATURE: Improved ratio calculation system
|
- FEATURE: Improved ratio calculation system
|
||||||
|
|||||||
67
INSTALL
@@ -1,57 +1,42 @@
|
|||||||
qBittorrent - A BitTorrent client in C++ / Qt4
|
qBittorrent - A BitTorrent client in C++ / Qt4
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
||||||
1) Compile and install qBittorrent with Qt4 Graphical Interface
|
*** Necessary if qt3 is default on your system ***
|
||||||
|
export QTDIR=/usr/include/qt4
|
||||||
|
export PATH=$QTDIR/bin:$PATH
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QTDIR/lib
|
||||||
|
*** End ***
|
||||||
|
|
||||||
$ ./configure
|
./configure
|
||||||
$ make && make install
|
make && make install
|
||||||
$ qbittorrent
|
qbittorrent
|
||||||
|
|
||||||
will install and execute qBittorrent hopefully without any problems.
|
will install and execute qBittorrent hopefully without any problems.
|
||||||
|
|
||||||
Dependencies:
|
Dependencies:
|
||||||
- Qt >= 4.4.0 (libqt-devel, libqtgui, libqtcore, libqtnetwork, libqtxml)
|
- Qt >= 4.3.0 (libqt-devel, libqtgui, libqtcore, libqtnetwork, libqtxml)
|
||||||
|
Qt >= 4.4.0 is advised
|
||||||
|
|
||||||
- pkg-config executable
|
- libtorrent-rasterbar by Arvid Norberg (>= v0.14.0 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.
|
||||||
|
|
||||||
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.4 REQUIRED, compatible with v0.15.x)
|
- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization
|
||||||
-> http://www.libtorrent.net
|
|
||||||
Be careful: another library (the one used by rTorrent) uses a similar name.
|
|
||||||
|
|
||||||
- libboost 1.34.x (libboost-filesystem, libboost-thread, libboost-date-time) + libasio
|
- libcurl
|
||||||
or
|
|
||||||
- libboost >= 1.35.x (libboost-system, libboost-filesystem, libboost-thread, libboost-date-time)
|
|
||||||
|
|
||||||
- python >= 2.3 (needed by search engine)
|
- python >= 2.3 (needed by search engine)
|
||||||
* Run time only dependency
|
|
||||||
|
|
||||||
- libnotify >= 0.4.2, glib-2.0 (optional)
|
- libmagick++ (advised, not required)
|
||||||
* Can be used for system notifications to replace standard Qt notifications
|
* Needed for favicons support (RSS / Search plugins)
|
||||||
so that it integrates better into the Desktop
|
|
||||||
|
|
||||||
- geoip-database (optional)
|
- libzzip (advised, not required)
|
||||||
* If qBittorrent cannot find this database, it will try to resolve countries using the Internet but it will be a lot slower.
|
* Needed for zip support (Search plugins)
|
||||||
* Run time only dependency
|
|
||||||
|
|
||||||
2) Compile and install qBittorrent without Qt4 Graphical interface
|
|
||||||
|
|
||||||
$ ./configure --disable-gui
|
|
||||||
$ make && make install
|
|
||||||
$ qbittorrent
|
|
||||||
|
|
||||||
will install and execute qBittorrent hopefully without any problems.
|
|
||||||
|
|
||||||
Dependencies:
|
|
||||||
- Qt >= 4.4.0 (libqt-devel, libqtcore, libqtnetwork)
|
|
||||||
|
|
||||||
- pkg-config executable
|
|
||||||
|
|
||||||
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.4 REQUIRED, >= v0.15.0 ADVISED)
|
|
||||||
-> http://www.libtorrent.net
|
|
||||||
Be careful: another library (the one used by rTorrent) uses a similar name.
|
|
||||||
|
|
||||||
- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization
|
|
||||||
|
|
||||||
|
NOTE FOR NON-KDE USERS:
|
||||||
|
- qt4-qtconfig package is advised when using other systems than KDE.
|
||||||
|
You can also change qBittorrent style to Cleanlooks (GNOME like)
|
||||||
|
|
||||||
DOCUMENTATION:
|
DOCUMENTATION:
|
||||||
Please note that there is a documentation with a "compiling howto" at http://wiki.qbittorrent.org.
|
Please note that there is a documentation with a "compiling howto" at http://wiki.qbittorrent.org.
|
||||||
|
|||||||
6
README
@@ -10,9 +10,6 @@ It aims to be a good alternative to all other bittorrent clients
|
|||||||
out there. qBittorrent is fast, stable and provides unicode
|
out there. qBittorrent is fast, stable and provides unicode
|
||||||
support as well as many features.
|
support as well as many features.
|
||||||
|
|
||||||
This product includes GeoLite data created by MaxMind, available from
|
|
||||||
http://maxmind.com/
|
|
||||||
|
|
||||||
Installation:
|
Installation:
|
||||||
********************************
|
********************************
|
||||||
For installation, follow the instructions from INSTALL file, but simple:
|
For installation, follow the instructions from INSTALL file, but simple:
|
||||||
@@ -26,9 +23,6 @@ will install and execute qBittorrent hopefully without any problem.
|
|||||||
For more information please visit:
|
For more information please visit:
|
||||||
http://www.qbittorrent.org
|
http://www.qbittorrent.org
|
||||||
|
|
||||||
or our wiki here:
|
|
||||||
http://wiki.qbittorrent.org
|
|
||||||
|
|
||||||
Please report any bug (or feature request) to:
|
Please report any bug (or feature request) to:
|
||||||
http://bugs.qbittorrent.org
|
http://bugs.qbittorrent.org
|
||||||
|
|
||||||
|
|||||||
62
README.os2
@@ -1,62 +0,0 @@
|
|||||||
qBittorrent - A BitTorrent client in Qt4
|
|
||||||
------------------------------------------
|
|
||||||
|
|
||||||
This is the eComStation (OS/2) qBittorrent part of the readme. See also README for more general information.
|
|
||||||
|
|
||||||
|
|
||||||
Building qBittorrent
|
|
||||||
********************
|
|
||||||
|
|
||||||
|
|
||||||
Requirements
|
|
||||||
============
|
|
||||||
|
|
||||||
- gcc based build env (recommended gcc v4.4.2 or greater)
|
|
||||||
|
|
||||||
- Qt4 for eCS (OS/2) dev package (see http://svn.netlabs.org/qt4 for more information)
|
|
||||||
|
|
||||||
- libtorrent-rasterbar for eCS (OS/2) port (see http://svn.netlabs.org/ports for more information)
|
|
||||||
|
|
||||||
- boost for eCS (OS/2) port (see http://svn.netlabs.org/ports for more information)
|
|
||||||
|
|
||||||
|
|
||||||
How to build
|
|
||||||
============
|
|
||||||
|
|
||||||
First you need to create the conf.pri file in the same dir as this readme.os2 is.
|
|
||||||
the conf.pri file has the following content:
|
|
||||||
|
|
||||||
##### conf.pri content beginn #####
|
|
||||||
PREFIX = .
|
|
||||||
BINDIR = ./bin
|
|
||||||
INCDIR = ./include
|
|
||||||
LIBDIR = ./lib
|
|
||||||
DATADIR = ./share
|
|
||||||
|
|
||||||
CONFIG += staticlib
|
|
||||||
INCLUDEPATH += x:/trees/libtorrent/trunk/include
|
|
||||||
LIBS += -Lx:/trees/libtorrent/trunk/src/.libs \
|
|
||||||
-Lx:/trees/boost/trunk/stage/lib \
|
|
||||||
-Lx:/trees/openssl \
|
|
||||||
-Lx:/extras/lib
|
|
||||||
##### conf.pri content end #####
|
|
||||||
|
|
||||||
Of course all the above path references have to be adjusted to your build env.
|
|
||||||
|
|
||||||
It should now be easy to build qBittorrent:
|
|
||||||
|
|
||||||
Simply type:
|
|
||||||
$ qmake
|
|
||||||
|
|
||||||
Followed by:
|
|
||||||
$ make
|
|
||||||
|
|
||||||
If all works fine you should get a working qbittorrent executable.
|
|
||||||
|
|
||||||
If you have any question regarding the eCS (OS/2) port of qBittorrent you can meet me (_diver) on IRC:
|
|
||||||
#netlabs on irc.freenode.net
|
|
||||||
|
|
||||||
------------------------------------------
|
|
||||||
Silvan Scherrer <silvan.scherrer@aroa.ch>
|
|
||||||
|
|
||||||
|
|
||||||
16
TODO
@@ -1,2 +1,18 @@
|
|||||||
See https://blueprints.launchpad.net/qbittorrent/
|
See https://blueprints.launchpad.net/qbittorrent/
|
||||||
|
|
||||||
|
// translations done in v1.3.0
|
||||||
|
- Romanian
|
||||||
|
- Russian
|
||||||
|
- Hungarian
|
||||||
|
- German
|
||||||
|
- Chinese (traditional)
|
||||||
|
- Chinese (simplified)
|
||||||
|
- Italian
|
||||||
|
- Swedish
|
||||||
|
- Turkish
|
||||||
|
- French
|
||||||
|
- Slovak
|
||||||
|
- Czech
|
||||||
|
- Korean
|
||||||
|
- Portuguese
|
||||||
|
- Brazilian
|
||||||
|
|||||||
482
configure
vendored
@@ -18,24 +18,17 @@ Main options:
|
|||||||
--help This help text.
|
--help This help text.
|
||||||
|
|
||||||
Dependency options:
|
Dependency options:
|
||||||
--disable-gui Disable qBittorrent
|
--with-libtorrent-inc=[path] Path to libtorrent-rasterbar include
|
||||||
Graphical user interface for
|
files
|
||||||
headless running
|
--with-libtorrent-lib=[path] Path to libtorrent-rasterbar library
|
||||||
--with-libboost-inc=[path] Path to libboost include
|
files
|
||||||
files
|
--with-libtorrent-static-lib=[path] Path to libtorrent-rasterbar .a file
|
||||||
--with-libboost-lib=[path] Path to libboost library
|
--with-libboost-inc=[path] Path to libboost include files
|
||||||
files
|
--with-libcurl-inc=[path] Path to libcurl include files
|
||||||
--disable-libnotify Disable use of libnotify
|
--with-libcurl-lib=[path] Path to libcurl library files
|
||||||
--disable-geoip-database Disable use of geoip-database
|
--disable-libzzip Disable use of libzzip
|
||||||
--with-geoip-database-embedded Geoip Database will be
|
--with-libzzip-inc=[path] Path to libzzip++ include files
|
||||||
embedded in qBittorrent
|
--with-libzzip-lib=[path] Path to libzzip++ library files
|
||||||
executable (please follow
|
|
||||||
instructions in
|
|
||||||
src/geoip/README)
|
|
||||||
--disable-qtsingleapplication Disable use of libboost
|
|
||||||
--with-qtsingleapplication=[system|shipped] Use the shipped
|
|
||||||
qtsingleapplication library
|
|
||||||
or the system one
|
|
||||||
|
|
||||||
EOT
|
EOT
|
||||||
}
|
}
|
||||||
@@ -152,8 +145,18 @@ while [ $# -gt 0 ]; do
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--disable-gui)
|
--with-libtorrent-inc=*)
|
||||||
QC_DISABLE_GUI="Y"
|
QC_WITH_LIBTORRENT_INC=$optarg
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
|
--with-libtorrent-lib=*)
|
||||||
|
QC_WITH_LIBTORRENT_LIB=$optarg
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
|
--with-libtorrent-static-lib=*)
|
||||||
|
QC_WITH_LIBTORRENT_STATIC_LIB=$optarg
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -162,33 +165,28 @@ while [ $# -gt 0 ]; do
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--with-libboost-lib=*)
|
--with-libcurl-inc=*)
|
||||||
QC_WITH_LIBBOOST_LIB=$optarg
|
QC_WITH_LIBCURL_INC=$optarg
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--disable-libnotify)
|
--with-libcurl-lib=*)
|
||||||
QC_DISABLE_libnotify="Y"
|
QC_WITH_LIBCURL_LIB=$optarg
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--disable-geoip-database)
|
--disable-libzzip)
|
||||||
QC_DISABLE_geoip_database="Y"
|
QC_DISABLE_libzzip="Y"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--with-geoip-database-embedded)
|
--with-libzzip-inc=*)
|
||||||
QC_WITH_GEOIP_DATABASE_EMBEDDED="Y"
|
QC_WITH_LIBZZIP_INC=$optarg
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--disable-qtsingleapplication)
|
--with-libzzip-lib=*)
|
||||||
QC_DISABLE_qtsingleapplication="Y"
|
QC_WITH_LIBZZIP_LIB=$optarg
|
||||||
shift
|
|
||||||
;;
|
|
||||||
|
|
||||||
--with-qtsingleapplication=*)
|
|
||||||
QC_WITH_QTSINGLEAPPLICATION=$optarg
|
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -213,14 +211,15 @@ echo PREFIX=$PREFIX
|
|||||||
echo BINDIR=$BINDIR
|
echo BINDIR=$BINDIR
|
||||||
echo DATADIR=$DATADIR
|
echo DATADIR=$DATADIR
|
||||||
echo EX_QTDIR=$EX_QTDIR
|
echo EX_QTDIR=$EX_QTDIR
|
||||||
echo QC_DISABLE_GUI=$QC_DISABLE_GUI
|
echo QC_WITH_LIBTORRENT_INC=$QC_WITH_LIBTORRENT_INC
|
||||||
|
echo QC_WITH_LIBTORRENT_LIB=$QC_WITH_LIBTORRENT_LIB
|
||||||
|
echo QC_WITH_LIBTORRENT_STATIC_LIB=$QC_WITH_LIBTORRENT_STATIC_LIB
|
||||||
echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC
|
echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC
|
||||||
echo QC_WITH_LIBBOOST_LIB=$QC_WITH_LIBBOOST_LIB
|
echo QC_WITH_LIBCURL_INC=$QC_WITH_LIBCURL_INC
|
||||||
echo QC_DISABLE_libnotify=$QC_DISABLE_libnotify
|
echo QC_WITH_LIBCURL_LIB=$QC_WITH_LIBCURL_LIB
|
||||||
echo QC_DISABLE_geoip_database=$QC_DISABLE_geoip_database
|
echo QC_DISABLE_libzzip=$QC_DISABLE_libzzip
|
||||||
echo QC_WITH_GEOIP_DATABASE_EMBEDDED=$QC_WITH_GEOIP_DATABASE_EMBEDDED
|
echo QC_WITH_LIBZZIP_INC=$QC_WITH_LIBZZIP_INC
|
||||||
echo QC_DISABLE_qtsingleapplication=$QC_DISABLE_qtsingleapplication
|
echo QC_WITH_LIBZZIP_LIB=$QC_WITH_LIBZZIP_LIB
|
||||||
echo QC_WITH_QTSINGLEAPPLICATION=$QC_WITH_QTSINGLEAPPLICATION
|
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -325,66 +324,92 @@ cat >$1/modules.cpp <<EOT
|
|||||||
#line 1 "qt4.qcm"
|
#line 1 "qt4.qcm"
|
||||||
/*
|
/*
|
||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: Qt >= 4.4
|
name: Qt >= 4.3
|
||||||
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
|
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
class qc_qt4 : public ConfObj
|
class qc_qt4 : public ConfObj
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
qc_qt4(Conf *c) : ConfObj(c) {}
|
qc_qt4(Conf *c) : ConfObj(c) {}
|
||||||
QString name() const { return "Qt >= 4.4"; }
|
QString name() const { return "Qt >= 4.3"; }
|
||||||
QString shortname() const { return "Qt 4.4"; }
|
QString shortname() const { return "Qt 4.3"; }
|
||||||
bool exec()
|
bool exec()
|
||||||
{
|
{
|
||||||
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
if(QT_VERSION >= 0x040400) {
|
||||||
conf->addDefine("DISABLE_GUI");
|
conf->addDefine("QT_4_4");
|
||||||
}
|
}
|
||||||
return(QT_VERSION >= 0x040400);
|
return(QT_VERSION >= 0x040300);
|
||||||
}
|
|
||||||
};
|
|
||||||
#line 1 "pkg-config.qcm"
|
|
||||||
/*
|
|
||||||
-----BEGIN QCMOD-----
|
|
||||||
name: pkg-config
|
|
||||||
-----END QCMOD-----
|
|
||||||
*/
|
|
||||||
#include <QProcess>
|
|
||||||
class qc_pkg_config : public ConfObj
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
qc_pkg_config(Conf *c) : ConfObj(c) {}
|
|
||||||
QString name() const { return "pkg-config executable"; }
|
|
||||||
QString shortname() const { return "pkg-config"; }
|
|
||||||
bool exec(){
|
|
||||||
return !conf->findProgram("pkg-config").isEmpty();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#line 1 "libtorrent-rasterbar.qcm"
|
#line 1 "libtorrent-rasterbar.qcm"
|
||||||
/*
|
/*
|
||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: libtorrent-rasterbar
|
name: libtorrent-rasterbar
|
||||||
|
arg: with-libtorrent-inc=[path], Path to libtorrent-rasterbar include files
|
||||||
|
arg: with-libtorrent-lib=[path], Path to libtorrent-rasterbar library files
|
||||||
|
arg: with-libtorrent-static-lib=[path], Path to libtorrent-rasterbar .a file
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
// see Conf::findPkgConfig
|
|
||||||
class qc_libtorrent_rasterbar : public ConfObj
|
class qc_libtorrent_rasterbar : public ConfObj
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
|
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
|
||||||
QString name() const { return "libtorrent-rasterbar >= 0.14.4"; }
|
QString name() const { return "libtorrent-rasterbar >= 0.14"; }
|
||||||
QString shortname() const { return "libtorrent-rasterbar"; }
|
QString shortname() const { return "libtorrent-rasterbar"; }
|
||||||
bool exec(){
|
bool exec(){
|
||||||
QStringList incs;
|
QString s;
|
||||||
QString req_ver = "0.14.4";
|
s = conf->getenv("QC_WITH_LIBTORRENT_INC");
|
||||||
QString version, libs, other;
|
if(!s.isEmpty()) {
|
||||||
VersionMode mode = VersionMin;
|
if(!conf->checkHeader(s, "libtorrent/magnet_uri.hpp")) {
|
||||||
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))
|
return false;
|
||||||
return false;
|
}
|
||||||
for(int n = 0; n < incs.count(); ++n)
|
}else{
|
||||||
conf->addIncludePath(incs[n]);
|
QStringList sl;
|
||||||
if(conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
sl << "/usr/include";
|
||||||
conf->addLib("-lcrypto");
|
sl << "/usr/local/include";
|
||||||
}
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(conf->checkHeader(s, "libtorrent/magnet_uri.hpp")){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
conf->addIncludePath(s);
|
||||||
|
conf->addIncludePath(s+QDir::separator()+"libtorrent");
|
||||||
|
|
||||||
|
s = conf->getenv("QC_WITH_LIBTORRENT_STATIC_LIB");
|
||||||
|
if(!s.isEmpty() && QFile::exists(s) && s.endsWith(".a")){
|
||||||
|
conf->addLib(s);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
s = conf->getenv("QC_WITH_LIBTORRENT_LIB");
|
||||||
|
if(!s.isEmpty()) {
|
||||||
|
if(!conf->checkLibrary(s, "torrent-rasterbar")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
conf->addLib(QString("-L") + s);
|
||||||
|
}else{
|
||||||
|
QStringList sl;
|
||||||
|
sl << "/usr/lib/";
|
||||||
|
sl << "/usr/lib64/";
|
||||||
|
sl << "/usr/local/lib/";
|
||||||
|
sl << "/usr/local/lib64/";
|
||||||
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(conf->checkLibrary(s, "torrent-rasterbar")){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found) return false;
|
||||||
|
conf->addLib(QString("-L") + s);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -393,39 +418,14 @@ public:
|
|||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: libboost
|
name: libboost
|
||||||
arg: with-libboost-inc=[path], Path to libboost include files
|
arg: with-libboost-inc=[path], Path to libboost include files
|
||||||
arg: with-libboost-lib=[path], Path to libboost library files
|
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
#include <boost/version.hpp>
|
|
||||||
class qc_libboost : public ConfObj
|
class qc_libboost : public ConfObj
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
qc_libboost(Conf *c) : ConfObj(c) {}
|
qc_libboost(Conf *c) : ConfObj(c) {}
|
||||||
QString name() const { return "libboost"; }
|
QString name() const { return "libboost"; }
|
||||||
QString shortname() const { return "libboost"; }
|
QString shortname() const { return "libboost"; }
|
||||||
QString findBoostLib(QString path, QString lib) const {
|
|
||||||
QString name;
|
|
||||||
QDir libDir(path);
|
|
||||||
QStringList filters;
|
|
||||||
filters << "libboost_"+lib+"*-mt*.so";
|
|
||||||
QStringList result = libDir.entryList(filters, QDir::Files);
|
|
||||||
if(!result.empty()) {
|
|
||||||
name = result.first().mid(3);
|
|
||||||
// Remove .so
|
|
||||||
name.chop(3);
|
|
||||||
} else {
|
|
||||||
// Fall back to non -mt boost lib
|
|
||||||
filters.clear();
|
|
||||||
filters << "libboost_"+lib+"*.so";
|
|
||||||
result = libDir.entryList(filters, QDir::Files);
|
|
||||||
if(!result.empty()) {
|
|
||||||
name = result.first().mid(3);
|
|
||||||
// Remove .so
|
|
||||||
name.chop(3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
bool exec(){
|
bool exec(){
|
||||||
QString s;
|
QString s;
|
||||||
s = conf->getenv("QC_WITH_LIBBOOST_INC");
|
s = conf->getenv("QC_WITH_LIBBOOST_INC");
|
||||||
@@ -467,169 +467,140 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
conf->addIncludePath(s);
|
conf->addIncludePath(s);
|
||||||
// Find library
|
|
||||||
s = conf->getenv("QC_WITH_LIBBOOST_LIB");
|
|
||||||
QStringList required_libs;
|
|
||||||
#if BOOST_VERSION >= 103500
|
|
||||||
required_libs << "system";
|
|
||||||
#endif
|
|
||||||
if(conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
|
||||||
// Not required by nox
|
|
||||||
required_libs << "filesystem" << "thread";
|
|
||||||
}
|
|
||||||
QStringList libDirs;
|
|
||||||
libDirs << "/usr/lib/" << "/usr/lib64/" << "/usr/local/lib/" << "/usr/local/lib64/";
|
|
||||||
foreach(const QString& lib, required_libs) {
|
|
||||||
if(!s.isEmpty()) {
|
|
||||||
QString detected_name = findBoostLib(s, lib);
|
|
||||||
if(detected_name.isEmpty()) {
|
|
||||||
printf("Could not find boost %s library!\n", qPrintable(lib));
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
conf->addLib("-l"+detected_name);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
bool found = false;
|
|
||||||
foreach(const QString& libDir, libDirs) {
|
|
||||||
QString detected_name = findBoostLib(libDir, lib);
|
|
||||||
if(!detected_name.isEmpty()) {
|
|
||||||
conf->addLib("-l"+detected_name);
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!found) {
|
|
||||||
printf("Could not find boost %s library!\n", qPrintable(lib));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#line 1 "libnotify.qcm"
|
#line 1 "libcurl.qcm"
|
||||||
/*
|
/*
|
||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: libnotify
|
name: libcommoncpp2
|
||||||
|
arg: with-libcurl-inc=[path], Path to libcurl include files
|
||||||
|
arg: with-libcurl-lib=[path], Path to libcurl library files
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
// see Conf::findPkgConfig
|
class qc_libcurl : public ConfObj
|
||||||
class qc_libnotify : public ConfObj
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
qc_libnotify(Conf *c) : ConfObj(c) {}
|
qc_libcurl(Conf *c) : ConfObj(c) {}
|
||||||
QString name() const { return "libnotify >= 0.4.2 (optional)"; }
|
QString name() const { return "libcurl"; }
|
||||||
QString shortname() const { return "libnotify"; }
|
QString shortname() const { return "libcurl"; }
|
||||||
QString checkString() const {
|
|
||||||
if(!conf->getenv("QC_DISABLE_libnotify").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
|
|
||||||
return "";
|
|
||||||
return ConfObj::checkString();
|
|
||||||
}
|
|
||||||
bool exec(){
|
bool exec(){
|
||||||
if(!conf->getenv("QC_DISABLE_libnotify").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
QString s;
|
||||||
return false;
|
s = conf->getenv("QC_WITH_LIBCURL_INC");
|
||||||
}
|
if(!s.isEmpty()) {
|
||||||
QStringList incs;
|
if(!conf->checkHeader(s, "curl/curl.h")) {
|
||||||
QString req_ver = "0.4.2";
|
|
||||||
QString version, libs, other;
|
|
||||||
VersionMode mode = VersionMin;
|
|
||||||
if(conf->findPkgConfig("libnotify", mode, req_ver, &version, &incs, &libs, &other)) {
|
|
||||||
conf->addDefine("WITH_LIBNOTIFY");
|
|
||||||
for(int n = 0; n < incs.count(); ++n)
|
|
||||||
conf->addIncludePath(incs[n]);
|
|
||||||
if(!libs.isEmpty())
|
|
||||||
conf->addLib(libs);
|
|
||||||
QStringList incs2;
|
|
||||||
QString req_ver2 = "2.0";
|
|
||||||
QString version2, libs2, other2;
|
|
||||||
if(conf->findPkgConfig("glib-2.0", mode, req_ver2, &version2, &incs2, &libs2, &other2)) {
|
|
||||||
for(int n = 0; n < incs2.count(); ++n)
|
|
||||||
conf->addIncludePath(incs2[n]);
|
|
||||||
if(!libs2.isEmpty())
|
|
||||||
conf->addLib(libs2);
|
|
||||||
} else {
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
QStringList sl;
|
||||||
|
sl << "/usr/include";
|
||||||
|
sl << "/usr/local/include";
|
||||||
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(conf->checkHeader(s, "curl/curl.h")){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
QStringList incs3;
|
if(!found) {
|
||||||
QString req_ver3 = "2.0";
|
return false;
|
||||||
QString version3, libs3, other3;
|
}
|
||||||
if(conf->findPkgConfig("gtk+-2.0", mode, req_ver3, &version3, &incs3, &libs3, &other3)) {
|
|
||||||
for(int n = 0; n < incs3.count(); ++n)
|
|
||||||
conf->addIncludePath(incs3[n]);
|
|
||||||
if(!libs3.isEmpty())
|
|
||||||
conf->addLib(libs3);
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
conf->addIncludePath(s);
|
||||||
|
|
||||||
|
s = conf->getenv("QC_WITH_LIBCURL_LIB");
|
||||||
|
if(!s.isEmpty()) {
|
||||||
|
if(!QFile::exists(s+QString("/libcurl.so")))
|
||||||
|
return false;
|
||||||
|
conf->addLib(QString("-L") + s);
|
||||||
|
}else{
|
||||||
|
QStringList sl;
|
||||||
|
sl << "/usr/lib/";
|
||||||
|
sl << "/usr/lib64/";
|
||||||
|
sl << "/usr/local/lib/";
|
||||||
|
sl << "/usr/local/lib64/";
|
||||||
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(QFile::exists(s+QString("libcurl.so"))){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found) return false;
|
||||||
|
conf->addLib(QString("-L") + s);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#line 1 "geoip-database.qcm"
|
#line 1 "libzzip.qcm"
|
||||||
/*
|
/*
|
||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: geoip-database
|
name: libzzip
|
||||||
arg: with-geoip-database-embedded, Geoip Database will be embedded in qBittorrent executable (please follow instructions in src/geoip/README)
|
arg: with-libzzip-inc=[path], Path to libzzip++ include files
|
||||||
|
arg: with-libzzip-lib=[path], Path to libzzip++ library files
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
// see Conf::findPkgConfig
|
#include <QProcess>
|
||||||
class qc_geoip_database : public ConfObj
|
class qc_libzzip : public ConfObj
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
qc_geoip_database(Conf *c) : ConfObj(c) {}
|
qc_libzzip(Conf *c) : ConfObj(c) {}
|
||||||
QString name() const { return "GeoIP Database (optional)"; }
|
QString name() const { return "Zzip library (libzzip)"; }
|
||||||
QString shortname() const { return "GeoIP Database"; }
|
QString shortname() const { return "libzzip"; }
|
||||||
QString checkString() const {
|
QString checkString() const {
|
||||||
if(!conf->getenv("QC_DISABLE_geoip_database").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
|
if(!conf->getenv("QC_DISABLE_LIBZZIP").isEmpty())
|
||||||
return "";
|
return "";
|
||||||
return ConfObj::checkString();
|
return ConfObj::checkString();
|
||||||
}
|
|
||||||
bool exec() {
|
|
||||||
if(!conf->getenv("QC_DISABLE_geoip_database").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
#ifdef Q_WS_X11
|
|
||||||
if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) {
|
|
||||||
#endif
|
|
||||||
conf->addDefine("WITH_GEOIP_EMBEDDED");
|
|
||||||
printf(" embedded and");
|
|
||||||
return true;
|
|
||||||
#ifdef Q_WS_X11
|
|
||||||
}
|
|
||||||
if(QFile::exists("/usr/share/GeoIP/GeoIP.dat") || QFile::exists("/usr/local/share/GeoIP/GeoIP.dat") || QFile::exists("/var/lib/GeoIP/GeoIP.dat"))
|
|
||||||
return true;
|
|
||||||
printf("\nWarning: GeoIP database was not found at /usr/share/GeoIP/GeoIP.dat or /var/lib/GeoIP/GeoIP.dat\nCountry resolution will be slow.");
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
};
|
|
||||||
#line 1 "qtsingleapplication.qcm"
|
|
||||||
/*
|
|
||||||
-----BEGIN QCMOD-----
|
|
||||||
name: libboost
|
|
||||||
arg: with-qtsingleapplication=[system|shipped], Use the shipped qtsingleapplication library or the system one
|
|
||||||
-----END QCMOD-----
|
|
||||||
*/
|
|
||||||
class qc_qtsingleapplication : public ConfObj
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
qc_qtsingleapplication(Conf *c) : ConfObj(c) {}
|
|
||||||
QString name() const { return "qtsingleapplication library"; }
|
|
||||||
QString shortname() const { return "qtsingleapplication"; }
|
|
||||||
|
|
||||||
bool exec(){
|
bool exec(){
|
||||||
QString s;
|
if(!conf->getenv("QC_DISABLE_LIBZZIP").isEmpty())
|
||||||
s = conf->getenv("QC_WITH_QTSINGLEAPPLICATION");
|
return false;
|
||||||
if(s.compare("system", Qt::CaseInsensitive) == 0) {
|
QString s;
|
||||||
// System
|
s = conf->getenv("QC_WITH_LIBZZIP_INC");
|
||||||
conf->addDefine("USE_SYSTEM_QTSINGLEAPPLICATION");
|
if(!s.isEmpty()) {
|
||||||
printf(" [system] ");
|
if(!conf->checkHeader(s, "zzip/zzip.h")) {
|
||||||
} else {
|
return false;
|
||||||
printf(" [shipped] ");
|
}
|
||||||
|
}else{
|
||||||
|
QStringList sl;
|
||||||
|
sl << "/usr/include";
|
||||||
|
sl << "/usr/local/include";
|
||||||
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(conf->checkHeader(s, "zzip/zzip.h")){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found)
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
conf->addIncludePath(s);
|
||||||
|
|
||||||
|
s = conf->getenv("QC_WITH_LIBZZIP_LIB");
|
||||||
|
if(!s.isEmpty()) {
|
||||||
|
if(!QFile::exists(s+QString("/libzzip.so"))){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
QStringList sl;
|
||||||
|
sl << "/usr/lib/";
|
||||||
|
sl << "/usr/lib64/";
|
||||||
|
sl << "/usr/local/lib/";
|
||||||
|
sl << "/usr/local/lib64/";
|
||||||
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(QFile::exists(s+QString("libzzip.so"))){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
conf->addLib(QString("-L") + s);
|
||||||
|
conf->addLib("-lzzip");
|
||||||
|
conf->addDefine("HAVE_ZZIP");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -639,22 +610,16 @@ cat >$1/modules_new.cpp <<EOT
|
|||||||
o = new qc_qt4(conf);
|
o = new qc_qt4(conf);
|
||||||
o->required = true;
|
o->required = true;
|
||||||
o->disabled = false;
|
o->disabled = false;
|
||||||
o = new qc_pkg_config(conf);
|
|
||||||
o->required = true;
|
|
||||||
o->disabled = false;
|
|
||||||
o = new qc_libtorrent_rasterbar(conf);
|
o = new qc_libtorrent_rasterbar(conf);
|
||||||
o->required = true;
|
o->required = true;
|
||||||
o->disabled = false;
|
o->disabled = false;
|
||||||
o = new qc_libboost(conf);
|
o = new qc_libboost(conf);
|
||||||
o->required = true;
|
o->required = true;
|
||||||
o->disabled = false;
|
o->disabled = false;
|
||||||
o = new qc_libnotify(conf);
|
o = new qc_libcurl(conf);
|
||||||
o->required = false;
|
o->required = true;
|
||||||
o->disabled = false;
|
o->disabled = false;
|
||||||
o = new qc_geoip_database(conf);
|
o = new qc_libzzip(conf);
|
||||||
o->required = false;
|
|
||||||
o->disabled = false;
|
|
||||||
o = new qc_qtsingleapplication(conf);
|
|
||||||
o->required = false;
|
o->required = false;
|
||||||
o->disabled = false;
|
o->disabled = false;
|
||||||
|
|
||||||
@@ -1602,14 +1567,15 @@ export PREFIX
|
|||||||
export BINDIR
|
export BINDIR
|
||||||
export DATADIR
|
export DATADIR
|
||||||
export EX_QTDIR
|
export EX_QTDIR
|
||||||
export QC_DISABLE_GUI
|
export QC_WITH_LIBTORRENT_INC
|
||||||
|
export QC_WITH_LIBTORRENT_LIB
|
||||||
|
export QC_WITH_LIBTORRENT_STATIC_LIB
|
||||||
export QC_WITH_LIBBOOST_INC
|
export QC_WITH_LIBBOOST_INC
|
||||||
export QC_WITH_LIBBOOST_LIB
|
export QC_WITH_LIBCURL_INC
|
||||||
export QC_DISABLE_libnotify
|
export QC_WITH_LIBCURL_LIB
|
||||||
export QC_DISABLE_geoip_database
|
export QC_DISABLE_libzzip
|
||||||
export QC_WITH_GEOIP_DATABASE_EMBEDDED
|
export QC_WITH_LIBZZIP_INC
|
||||||
export QC_DISABLE_qtsingleapplication
|
export QC_WITH_LIBZZIP_LIB
|
||||||
export QC_WITH_QTSINGLEAPPLICATION
|
|
||||||
export QC_VERBOSE
|
export QC_VERBOSE
|
||||||
rm -rf .qconftemp
|
rm -rf .qconftemp
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
.\" This manpage has been automatically generated by docbook2man
|
|
||||||
.\" from a DocBook document. This tool can be found at:
|
|
||||||
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>.
|
|
||||||
.TH "QBITTORRENT\-NOX" "1" "January 16th 2010" "Command line Bittorrent client written in C++ / Qt4" ""
|
|
||||||
|
|
||||||
.SH "NAME"
|
|
||||||
qBittorrent\-nox \- a command line Bittorrent client written in C++ / Qt4
|
|
||||||
|
|
||||||
.SH "SYNOPSIS"
|
|
||||||
|
|
||||||
\fBqbittorrent\-nox\fR [\-\-webui-port=x] [TORRENT_FILE | URL]...
|
|
||||||
|
|
||||||
\fBqbittorrent\-nox\fR \-\-help
|
|
||||||
|
|
||||||
\fBqbittorrent\-nox\fR \-\-version
|
|
||||||
|
|
||||||
.PP
|
|
||||||
.SH "DESCRIPTION"
|
|
||||||
|
|
||||||
\fBqBittorrent-nox\fR is an advanced command-line Bittorrent client written in C++ / Qt4,
|
|
||||||
using the \fBlibtorrent-rasterbar\fR library by Arvid Norberg. qBittorrent\-nox aims
|
|
||||||
to be a good alternative to other command line bittorrent clients and provides features similar to popular graphical clients.
|
|
||||||
|
|
||||||
qBittorrent\-nox is fast, stable, light and it supports unicode.
|
|
||||||
It also comes with UPnP port forwarding / NAT-PMP, encryption (Vuze compatible),
|
|
||||||
FAST extension (mainline) and PeX support (utorrent compatible).
|
|
||||||
|
|
||||||
qBittorrent\-nox is meant to be controlled via its feature-rich Web UI which is accessible as a default on http://localhost:8080. The Web UI access is secured and the default account user name is "admin" with "adminadmin" as a password.
|
|
||||||
|
|
||||||
.SH "OPTIONS"
|
|
||||||
|
|
||||||
\fB--help\fR Prints the command line options.
|
|
||||||
|
|
||||||
\fB--version\fR Prints qbittorrent program version number.
|
|
||||||
|
|
||||||
\fB--webui-port=x\fR Changes Web UI port to x (default: 8080).
|
|
||||||
|
|
||||||
.SH "BUGS"
|
|
||||||
|
|
||||||
If you find a bug, please report it at http://bugs.qbittorrent.org
|
|
||||||
|
|
||||||
.SH "AUTHOR"
|
|
||||||
|
|
||||||
Christophe Dumez <chris@qbittorrent.org>
|
|
||||||
@@ -1,42 +1,28 @@
|
|||||||
.\" This manpage has been automatically generated by docbook2man
|
.\" This manpage has been automatically generated by docbook2man
|
||||||
.\" from a DocBook document. This tool can be found at:
|
.\" from a DocBook document. This tool can be found at:
|
||||||
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>.
|
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>.
|
||||||
.TH "QBITTORRENT" "1" "January 16th 2010" "Bittorrent client written in C++ / Qt4" ""
|
.TH "QBITTORRENT" "1" "September 1st 2007" "Bittorrent client written in C++ / Qt4" ""
|
||||||
|
|
||||||
.SH "NAME"
|
.SH NAME
|
||||||
qBittorrent \- a Bittorrent client written in C++ / Qt4
|
qBittorrent \- a Bittorrent client written in C++ / Qt4
|
||||||
|
.SH SYNOPSIS
|
||||||
|
|
||||||
.SH "SYNOPSIS"
|
\fBqbittorrent\fR [FILE | URL] [FILE | URL...]
|
||||||
|
|
||||||
\fBqbittorrent\fR [\-\-no-splash] [\-\-webui-port=x] [TORRENT_FILE | URL]...
|
|
||||||
|
|
||||||
\fBqbittorrent\fR \-\-help
|
\fBqbittorrent\fR \-\-help
|
||||||
|
|
||||||
\fBqbittorrent\fR \-\-version
|
\fBqbittorrent\fR \-\-version
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
|
|
||||||
\fBqBittorrent\fR is an advanced Bittorrent client written in C++ / Qt4,
|
\fBqBittorrent\fR is an advanced Bittorrent client written in C++ / Qt4,
|
||||||
using the \fBlibtorrent-rasterbar\fR library by Arvid Norberg. qBittorrent is similar to uTorrent. qBittorrent
|
using the \fBrblibtorrent\fR library by Arvid Norberg. qBittorrent aims
|
||||||
|
to be a good alternative to all other bittorrent clients out there. qBittorrent
|
||||||
is fast, stable, light, it supports unicode and it provides a good integrated search engine.
|
is fast, stable, light, it supports unicode and it provides a good integrated search engine.
|
||||||
It also comes with UPnP port forwarding / NAT-PMP, encryption (Vuze compatible),
|
It also comes with UPnP port forwarding / NAT-PMP, encryption (Azureus compatible), FAST extension (mainline) and PeX support (utorrent compatible).
|
||||||
FAST extension (mainline) and PeX support (utorrent compatible).
|
|
||||||
|
|
||||||
.SH "OPTIONS"
|
|
||||||
|
|
||||||
\fB--help\fR Prints the command line options.
|
|
||||||
|
|
||||||
\fB--version\fR Prints qbittorrent program version number.
|
|
||||||
|
|
||||||
\fB--no-splash\fR Disables splash screen on startup.
|
|
||||||
|
|
||||||
\fB--webui-port=x\fR Changes Web UI port to x (default: 8080).
|
|
||||||
|
|
||||||
.SH "BUGS"
|
|
||||||
|
|
||||||
If you find a bug, please report it at http://bugs.qbittorrent.org
|
|
||||||
|
|
||||||
|
Please report any problem to http://bugs.qbittorrent.org
|
||||||
|
.PP
|
||||||
.SH "AUTHOR"
|
.SH "AUTHOR"
|
||||||
|
|
||||||
Christophe Dumez <chris@qbittorrent.org>
|
Christophe Dumez <chris@qbittorrent.org>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
|
|
||||||
|
include(conf.pri)
|
||||||
|
|
||||||
SUBDIRS += src
|
SUBDIRS += src
|
||||||
|
|
||||||
|
|||||||
@@ -6,19 +6,14 @@
|
|||||||
<dep type='qt4'>
|
<dep type='qt4'>
|
||||||
<required/>
|
<required/>
|
||||||
</dep>
|
</dep>
|
||||||
<dep type='pkg-config'>
|
|
||||||
<required/>
|
|
||||||
</dep>
|
|
||||||
<dep type='libtorrent-rasterbar'>
|
<dep type='libtorrent-rasterbar'>
|
||||||
<required/>
|
<required/>
|
||||||
</dep>
|
</dep>
|
||||||
<dep type='libboost'>
|
<dep type='libboost'>
|
||||||
<required/>
|
<required/>
|
||||||
</dep>
|
</dep>
|
||||||
<dep type='libnotify'>
|
<dep type='libcurl'>
|
||||||
</dep>
|
<required/>
|
||||||
<dep type='geoip-database'>
|
|
||||||
</dep>
|
|
||||||
<dep type='qtsingleapplication'>
|
|
||||||
</dep>
|
</dep>
|
||||||
|
<dep type='libzzip'/>
|
||||||
</qconf>
|
</qconf>
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
-----BEGIN QCMOD-----
|
|
||||||
name: geoip-database
|
|
||||||
arg: with-geoip-database-embedded, Geoip Database will be embedded in qBittorrent executable (please follow instructions in src/geoip/README)
|
|
||||||
-----END QCMOD-----
|
|
||||||
*/
|
|
||||||
// see Conf::findPkgConfig
|
|
||||||
class qc_geoip_database : public ConfObj
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
qc_geoip_database(Conf *c) : ConfObj(c) {}
|
|
||||||
QString name() const { return "GeoIP Database (optional)"; }
|
|
||||||
QString shortname() const { return "GeoIP Database"; }
|
|
||||||
QString checkString() const {
|
|
||||||
if(!conf->getenv("QC_DISABLE_geoip_database").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
|
|
||||||
return "";
|
|
||||||
return ConfObj::checkString();
|
|
||||||
}
|
|
||||||
bool exec() {
|
|
||||||
if(!conf->getenv("QC_DISABLE_geoip_database").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#ifdef Q_WS_X11
|
|
||||||
if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) {
|
|
||||||
#endif
|
|
||||||
conf->addDefine("WITH_GEOIP_EMBEDDED");
|
|
||||||
printf(" embedded and");
|
|
||||||
return true;
|
|
||||||
#ifdef Q_WS_X11
|
|
||||||
}
|
|
||||||
if(QFile::exists("/usr/share/GeoIP/GeoIP.dat") || QFile::exists("/usr/local/share/GeoIP/GeoIP.dat") || QFile::exists("/var/lib/GeoIP/GeoIP.dat"))
|
|
||||||
return true;
|
|
||||||
printf("\nWarning: GeoIP database was not found at /usr/share/GeoIP/GeoIP.dat or /var/lib/GeoIP/GeoIP.dat\nCountry resolution will be slow.");
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -2,39 +2,14 @@
|
|||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: libboost
|
name: libboost
|
||||||
arg: with-libboost-inc=[path], Path to libboost include files
|
arg: with-libboost-inc=[path], Path to libboost include files
|
||||||
arg: with-libboost-lib=[path], Path to libboost library files
|
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
#include <boost/version.hpp>
|
|
||||||
class qc_libboost : public ConfObj
|
class qc_libboost : public ConfObj
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
qc_libboost(Conf *c) : ConfObj(c) {}
|
qc_libboost(Conf *c) : ConfObj(c) {}
|
||||||
QString name() const { return "libboost"; }
|
QString name() const { return "libboost"; }
|
||||||
QString shortname() const { return "libboost"; }
|
QString shortname() const { return "libboost"; }
|
||||||
QString findBoostLib(QString path, QString lib) const {
|
|
||||||
QString name;
|
|
||||||
QDir libDir(path);
|
|
||||||
QStringList filters;
|
|
||||||
filters << "libboost_"+lib+"*-mt*.so";
|
|
||||||
QStringList result = libDir.entryList(filters, QDir::Files);
|
|
||||||
if(!result.empty()) {
|
|
||||||
name = result.first().mid(3);
|
|
||||||
// Remove .so
|
|
||||||
name.chop(3);
|
|
||||||
} else {
|
|
||||||
// Fall back to non -mt boost lib
|
|
||||||
filters.clear();
|
|
||||||
filters << "libboost_"+lib+"*.so";
|
|
||||||
result = libDir.entryList(filters, QDir::Files);
|
|
||||||
if(!result.empty()) {
|
|
||||||
name = result.first().mid(3);
|
|
||||||
// Remove .so
|
|
||||||
name.chop(3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
bool exec(){
|
bool exec(){
|
||||||
QString s;
|
QString s;
|
||||||
s = conf->getenv("QC_WITH_LIBBOOST_INC");
|
s = conf->getenv("QC_WITH_LIBBOOST_INC");
|
||||||
@@ -76,43 +51,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
conf->addIncludePath(s);
|
conf->addIncludePath(s);
|
||||||
// Find library
|
|
||||||
s = conf->getenv("QC_WITH_LIBBOOST_LIB");
|
|
||||||
QStringList required_libs;
|
|
||||||
#if BOOST_VERSION >= 103500
|
|
||||||
required_libs << "system";
|
|
||||||
#endif
|
|
||||||
if(conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
|
||||||
// Not required by nox
|
|
||||||
required_libs << "filesystem" << "thread";
|
|
||||||
}
|
|
||||||
QStringList libDirs;
|
|
||||||
libDirs << "/usr/lib/" << "/usr/lib64/" << "/usr/local/lib/" << "/usr/local/lib64/";
|
|
||||||
foreach(const QString& lib, required_libs) {
|
|
||||||
if(!s.isEmpty()) {
|
|
||||||
QString detected_name = findBoostLib(s, lib);
|
|
||||||
if(detected_name.isEmpty()) {
|
|
||||||
printf("Could not find boost %s library!\n", qPrintable(lib));
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
conf->addLib("-l"+detected_name);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
bool found = false;
|
|
||||||
foreach(const QString& libDir, libDirs) {
|
|
||||||
QString detected_name = findBoostLib(libDir, lib);
|
|
||||||
if(!detected_name.isEmpty()) {
|
|
||||||
conf->addLib("-l"+detected_name);
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!found) {
|
|
||||||
printf("Could not find boost %s library!\n", qPrintable(lib));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
65
qcm/libcommoncpp2.qcm
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
-----BEGIN QCMOD-----
|
||||||
|
name: libcommoncpp2
|
||||||
|
arg: with-libcommoncpp2-inc=[path], Path to libcommoncpp2 include files
|
||||||
|
arg: with-libcommoncpp2-lib=[path], Path to libcommoncpp2 library files
|
||||||
|
-----END QCMOD-----
|
||||||
|
*/
|
||||||
|
class qc_libcommoncpp2 : public ConfObj
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
qc_libcommoncpp2(Conf *c) : ConfObj(c) {}
|
||||||
|
QString name() const { return "GNU Common C++ library (libcommoncpp2)"; }
|
||||||
|
QString shortname() const { return "libcommoncpp2"; }
|
||||||
|
bool exec(){
|
||||||
|
QString s;
|
||||||
|
s = conf->getenv("QC_WITH_LIBCOMMONCPP2_INC");
|
||||||
|
if(!s.isEmpty()) {
|
||||||
|
if(!conf->checkHeader(s, "cc++/url.h")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
QStringList sl;
|
||||||
|
sl << "/usr/include";
|
||||||
|
sl << "/usr/local/include";
|
||||||
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(conf->checkHeader(s, "cc++/url.h")){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
conf->addIncludePath(s);
|
||||||
|
|
||||||
|
s = conf->getenv("QC_WITH_LIBCOMMONCPP2_LIB");
|
||||||
|
if(!s.isEmpty()) {
|
||||||
|
if(!QFile::exists(s+QString("/libccext2.so")))
|
||||||
|
return false;
|
||||||
|
if(!QFile::exists(s+QString("/libccgnu2.so")))
|
||||||
|
return false;
|
||||||
|
conf->addLib(QString("-L") + s);
|
||||||
|
}else{
|
||||||
|
QStringList sl;
|
||||||
|
sl << "/usr/lib/";
|
||||||
|
sl << "/usr/lib64/";
|
||||||
|
sl << "/usr/local/lib/";
|
||||||
|
sl << "/usr/local/lib64/";
|
||||||
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(QFile::exists(s+QString("libccext2.so"))){
|
||||||
|
if(QFile::exists(s+QString("libccgnu2.so"))){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found) return false;
|
||||||
|
conf->addLib(QString("-L") + s);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
61
qcm/libcurl.qcm
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
-----BEGIN QCMOD-----
|
||||||
|
name: libcommoncpp2
|
||||||
|
arg: with-libcurl-inc=[path], Path to libcurl include files
|
||||||
|
arg: with-libcurl-lib=[path], Path to libcurl library files
|
||||||
|
-----END QCMOD-----
|
||||||
|
*/
|
||||||
|
class qc_libcurl : public ConfObj
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
qc_libcurl(Conf *c) : ConfObj(c) {}
|
||||||
|
QString name() const { return "libcurl"; }
|
||||||
|
QString shortname() const { return "libcurl"; }
|
||||||
|
bool exec(){
|
||||||
|
QString s;
|
||||||
|
s = conf->getenv("QC_WITH_LIBCURL_INC");
|
||||||
|
if(!s.isEmpty()) {
|
||||||
|
if(!conf->checkHeader(s, "curl/curl.h")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
QStringList sl;
|
||||||
|
sl << "/usr/include";
|
||||||
|
sl << "/usr/local/include";
|
||||||
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(conf->checkHeader(s, "curl/curl.h")){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
conf->addIncludePath(s);
|
||||||
|
|
||||||
|
s = conf->getenv("QC_WITH_LIBCURL_LIB");
|
||||||
|
if(!s.isEmpty()) {
|
||||||
|
if(!QFile::exists(s+QString("/libcurl.so")))
|
||||||
|
return false;
|
||||||
|
conf->addLib(QString("-L") + s);
|
||||||
|
}else{
|
||||||
|
QStringList sl;
|
||||||
|
sl << "/usr/lib/";
|
||||||
|
sl << "/usr/lib64/";
|
||||||
|
sl << "/usr/local/lib/";
|
||||||
|
sl << "/usr/local/lib64/";
|
||||||
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(QFile::exists(s+QString("libcurl.so"))){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found) return false;
|
||||||
|
conf->addLib(QString("-L") + s);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -64,11 +64,14 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
conf->addLib(QString("-L") + s);
|
conf->addLib(QString("-L") + s);
|
||||||
QString out = "";
|
QProcess magickConfig;
|
||||||
QStringList params;
|
QStringList params;
|
||||||
params << "--libs";
|
params << "--libs";
|
||||||
qconf->doCommand("Magick++-config", params, &out);
|
magickConfig.start("Magick++-config", params, QIODevice::ReadOnly);
|
||||||
out = out.replace("\n", "");
|
magickConfig.waitForStarted();
|
||||||
|
magickConfig.waitForFinished();
|
||||||
|
QByteArray result = magickConfig.readAll();
|
||||||
|
result = result.replace("\n", "");
|
||||||
conf->addLib(result.data());
|
conf->addLib(result.data());
|
||||||
conf->addDefine("HAVE_MAGICK");
|
conf->addDefine("HAVE_MAGICK");
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
-----BEGIN QCMOD-----
|
|
||||||
name: libnotify
|
|
||||||
-----END QCMOD-----
|
|
||||||
*/
|
|
||||||
// see Conf::findPkgConfig
|
|
||||||
class qc_libnotify : public ConfObj
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
qc_libnotify(Conf *c) : ConfObj(c) {}
|
|
||||||
QString name() const { return "libnotify >= 0.4.2 (optional)"; }
|
|
||||||
QString shortname() const { return "libnotify"; }
|
|
||||||
QString checkString() const {
|
|
||||||
if(!conf->getenv("QC_DISABLE_libnotify").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
|
|
||||||
return "";
|
|
||||||
return ConfObj::checkString();
|
|
||||||
}
|
|
||||||
bool exec(){
|
|
||||||
if(!conf->getenv("QC_DISABLE_libnotify").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
QStringList incs;
|
|
||||||
QString req_ver = "0.4.2";
|
|
||||||
QString version, libs, other;
|
|
||||||
VersionMode mode = VersionMin;
|
|
||||||
if(conf->findPkgConfig("libnotify", mode, req_ver, &version, &incs, &libs, &other)) {
|
|
||||||
conf->addDefine("WITH_LIBNOTIFY");
|
|
||||||
for(int n = 0; n < incs.count(); ++n)
|
|
||||||
conf->addIncludePath(incs[n]);
|
|
||||||
if(!libs.isEmpty())
|
|
||||||
conf->addLib(libs);
|
|
||||||
QStringList incs2;
|
|
||||||
QString req_ver2 = "2.0";
|
|
||||||
QString version2, libs2, other2;
|
|
||||||
if(conf->findPkgConfig("glib-2.0", mode, req_ver2, &version2, &incs2, &libs2, &other2)) {
|
|
||||||
for(int n = 0; n < incs2.count(); ++n)
|
|
||||||
conf->addIncludePath(incs2[n]);
|
|
||||||
if(!libs2.isEmpty())
|
|
||||||
conf->addLib(libs2);
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
QStringList incs3;
|
|
||||||
QString req_ver3 = "2.0";
|
|
||||||
QString version3, libs3, other3;
|
|
||||||
if(conf->findPkgConfig("gtk+-2.0", mode, req_ver3, &version3, &incs3, &libs3, &other3)) {
|
|
||||||
for(int n = 0; n < incs3.count(); ++n)
|
|
||||||
conf->addIncludePath(incs3[n]);
|
|
||||||
if(!libs3.isEmpty())
|
|
||||||
conf->addLib(libs3);
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,27 +1,70 @@
|
|||||||
/*
|
/*
|
||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: libtorrent-rasterbar
|
name: libtorrent-rasterbar
|
||||||
|
arg: with-libtorrent-inc=[path], Path to libtorrent-rasterbar include files
|
||||||
|
arg: with-libtorrent-lib=[path], Path to libtorrent-rasterbar library files
|
||||||
|
arg: with-libtorrent-static-lib=[path], Path to libtorrent-rasterbar .a file
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
// see Conf::findPkgConfig
|
|
||||||
class qc_libtorrent_rasterbar : public ConfObj
|
class qc_libtorrent_rasterbar : public ConfObj
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
|
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
|
||||||
QString name() const { return "libtorrent-rasterbar >= 0.14.4"; }
|
QString name() const { return "libtorrent-rasterbar >= 0.14"; }
|
||||||
QString shortname() const { return "libtorrent-rasterbar"; }
|
QString shortname() const { return "libtorrent-rasterbar"; }
|
||||||
bool exec(){
|
bool exec(){
|
||||||
QStringList incs;
|
QString s;
|
||||||
QString req_ver = "0.14.4";
|
s = conf->getenv("QC_WITH_LIBTORRENT_INC");
|
||||||
QString version, libs, other;
|
if(!s.isEmpty()) {
|
||||||
VersionMode mode = VersionMin;
|
if(!conf->checkHeader(s, "libtorrent/magnet_uri.hpp")) {
|
||||||
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))
|
return false;
|
||||||
return false;
|
}
|
||||||
for(int n = 0; n < incs.count(); ++n)
|
}else{
|
||||||
conf->addIncludePath(incs[n]);
|
QStringList sl;
|
||||||
if(conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
sl << "/usr/include";
|
||||||
conf->addLib("-lcrypto");
|
sl << "/usr/local/include";
|
||||||
}
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(conf->checkHeader(s, "libtorrent/magnet_uri.hpp")){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
conf->addIncludePath(s);
|
||||||
|
conf->addIncludePath(s+QDir::separator()+"libtorrent");
|
||||||
|
|
||||||
|
s = conf->getenv("QC_WITH_LIBTORRENT_STATIC_LIB");
|
||||||
|
if(!s.isEmpty() && QFile::exists(s) && s.endsWith(".a")){
|
||||||
|
conf->addLib(s);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
s = conf->getenv("QC_WITH_LIBTORRENT_LIB");
|
||||||
|
if(!s.isEmpty()) {
|
||||||
|
if(!conf->checkLibrary(s, "torrent-rasterbar")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
conf->addLib(QString("-L") + s);
|
||||||
|
}else{
|
||||||
|
QStringList sl;
|
||||||
|
sl << "/usr/lib/";
|
||||||
|
sl << "/usr/lib64/";
|
||||||
|
sl << "/usr/local/lib/";
|
||||||
|
sl << "/usr/local/lib64/";
|
||||||
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(conf->checkLibrary(s, "torrent-rasterbar")){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found) return false;
|
||||||
|
conf->addLib(QString("-L") + s);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
71
qcm/libzzip.qcm
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
-----BEGIN QCMOD-----
|
||||||
|
name: libzzip
|
||||||
|
arg: with-libzzip-inc=[path], Path to libzzip++ include files
|
||||||
|
arg: with-libzzip-lib=[path], Path to libzzip++ library files
|
||||||
|
-----END QCMOD-----
|
||||||
|
*/
|
||||||
|
#include <QProcess>
|
||||||
|
class qc_libzzip : public ConfObj
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
qc_libzzip(Conf *c) : ConfObj(c) {}
|
||||||
|
QString name() const { return "Zzip library (libzzip)"; }
|
||||||
|
QString shortname() const { return "libzzip"; }
|
||||||
|
QString checkString() const {
|
||||||
|
if(!conf->getenv("QC_DISABLE_LIBZZIP").isEmpty())
|
||||||
|
return "";
|
||||||
|
return ConfObj::checkString();
|
||||||
|
}
|
||||||
|
bool exec(){
|
||||||
|
if(!conf->getenv("QC_DISABLE_LIBZZIP").isEmpty())
|
||||||
|
return false;
|
||||||
|
QString s;
|
||||||
|
s = conf->getenv("QC_WITH_LIBZZIP_INC");
|
||||||
|
if(!s.isEmpty()) {
|
||||||
|
if(!conf->checkHeader(s, "zzip/zzip.h")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
QStringList sl;
|
||||||
|
sl << "/usr/include";
|
||||||
|
sl << "/usr/local/include";
|
||||||
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(conf->checkHeader(s, "zzip/zzip.h")){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
conf->addIncludePath(s);
|
||||||
|
|
||||||
|
s = conf->getenv("QC_WITH_LIBZZIP_LIB");
|
||||||
|
if(!s.isEmpty()) {
|
||||||
|
if(!QFile::exists(s+QString("/libzzip.so"))){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
QStringList sl;
|
||||||
|
sl << "/usr/lib/";
|
||||||
|
sl << "/usr/lib64/";
|
||||||
|
sl << "/usr/local/lib/";
|
||||||
|
sl << "/usr/local/lib64/";
|
||||||
|
bool found = false;
|
||||||
|
foreach(s, sl){
|
||||||
|
if(QFile::exists(s+QString("libzzip.so"))){
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
conf->addLib(QString("-L") + s);
|
||||||
|
conf->addLib("-lzzip");
|
||||||
|
conf->addDefine("HAVE_ZZIP");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
/*
|
|
||||||
-----BEGIN QCMOD-----
|
|
||||||
name: pkg-config
|
|
||||||
-----END QCMOD-----
|
|
||||||
*/
|
|
||||||
#include <QProcess>
|
|
||||||
class qc_pkg_config : public ConfObj
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
qc_pkg_config(Conf *c) : ConfObj(c) {}
|
|
||||||
QString name() const { return "pkg-config executable"; }
|
|
||||||
QString shortname() const { return "pkg-config"; }
|
|
||||||
bool exec(){
|
|
||||||
return !conf->findProgram("pkg-config").isEmpty();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
16
qcm/qt4.qcm
@@ -1,20 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: Qt >= 4.4
|
name: Qt >= 4.3
|
||||||
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
|
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
class qc_qt4 : public ConfObj
|
class qc_qt4 : public ConfObj
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
qc_qt4(Conf *c) : ConfObj(c) {}
|
qc_qt4(Conf *c) : ConfObj(c) {}
|
||||||
QString name() const { return "Qt >= 4.4"; }
|
QString name() const { return "Qt >= 4.3"; }
|
||||||
QString shortname() const { return "Qt 4.4"; }
|
QString shortname() const { return "Qt 4.3"; }
|
||||||
bool exec()
|
bool exec()
|
||||||
{
|
{
|
||||||
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
if(QT_VERSION >= 0x040400) {
|
||||||
conf->addDefine("DISABLE_GUI");
|
conf->addDefine("QT_4_4");
|
||||||
}
|
}
|
||||||
return(QT_VERSION >= 0x040400);
|
return(QT_VERSION >= 0x040300);
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
104
src/DLListDelegate.h
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
/*
|
||||||
|
* 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 DLLISTDELEGATE_H
|
||||||
|
#define DLLISTDELEGATE_H
|
||||||
|
|
||||||
|
#include <QItemDelegate>
|
||||||
|
#include <QModelIndex>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QStyleOptionProgressBarV2>
|
||||||
|
#include <QStyleOptionViewItemV2>
|
||||||
|
#include <QProgressBar>
|
||||||
|
#include <QApplication>
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
// Defines for download list list columns
|
||||||
|
#define NAME 0
|
||||||
|
#define SIZE 1
|
||||||
|
#define PROGRESS 2
|
||||||
|
#define DLSPEED 3
|
||||||
|
#define UPSPEED 4
|
||||||
|
#define SEEDSLEECH 5
|
||||||
|
#define RATIO 6
|
||||||
|
#define ETA 7
|
||||||
|
#define PRIORITY 8
|
||||||
|
#define HASH 9
|
||||||
|
|
||||||
|
class DLListDelegate: public QItemDelegate {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
DLListDelegate(QObject *parent) : QItemDelegate(parent){}
|
||||||
|
|
||||||
|
~DLListDelegate(){}
|
||||||
|
|
||||||
|
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const{
|
||||||
|
QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option);
|
||||||
|
switch(index.column()){
|
||||||
|
case SIZE:
|
||||||
|
QItemDelegate::drawBackground(painter, opt, index);
|
||||||
|
QItemDelegate::drawDisplay(painter, opt, option.rect, misc::friendlyUnit(index.data().toLongLong()));
|
||||||
|
break;
|
||||||
|
case ETA:
|
||||||
|
QItemDelegate::drawBackground(painter, opt, index);
|
||||||
|
QItemDelegate::drawDisplay(painter, opt, option.rect, misc::userFriendlyDuration(index.data().toLongLong()));
|
||||||
|
break;
|
||||||
|
case UPSPEED:
|
||||||
|
case DLSPEED:{
|
||||||
|
QItemDelegate::drawBackground(painter, opt, index);
|
||||||
|
double speed = index.data().toDouble();
|
||||||
|
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString(QByteArray::number(speed/1024., 'f', 1))+QString::fromUtf8(" ")+tr("KiB/s"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case RATIO:{
|
||||||
|
QItemDelegate::drawBackground(painter, opt, index);
|
||||||
|
double ratio = index.data().toDouble();
|
||||||
|
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString(QByteArray::number(ratio, 'f', 1)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case PROGRESS:{
|
||||||
|
QStyleOptionProgressBarV2 newopt;
|
||||||
|
double progress = index.data().toDouble()*100.;
|
||||||
|
newopt.rect = opt.rect;
|
||||||
|
newopt.text = QString(QByteArray::number(progress, 'f', 1))+QString::fromUtf8("%");
|
||||||
|
newopt.progress = (int)progress;
|
||||||
|
newopt.maximum = 100;
|
||||||
|
newopt.minimum = 0;
|
||||||
|
newopt.state |= QStyle::State_Enabled;
|
||||||
|
newopt.textVisible = true;
|
||||||
|
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt,
|
||||||
|
painter);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
QItemDelegate::paint(painter, option, index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget* createEditor(QWidget*, const QStyleOptionViewItem &, const QModelIndex &) const {
|
||||||
|
// No editor here
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
81
src/FinishedListDelegate.h
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* 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 FINISHEDLISTDELEGATE_H
|
||||||
|
#define FINISHEDLISTDELEGATE_H
|
||||||
|
|
||||||
|
#include <QItemDelegate>
|
||||||
|
#include <QModelIndex>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QStyleOptionProgressBarV2>
|
||||||
|
#include <QStyleOptionViewItemV2>
|
||||||
|
#include <QProgressBar>
|
||||||
|
#include <QApplication>
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
// Defines for download list list columns
|
||||||
|
#define F_NAME 0
|
||||||
|
#define F_SIZE 1
|
||||||
|
#define F_UPSPEED 2
|
||||||
|
#define F_LEECH 3
|
||||||
|
#define F_RATIO 4
|
||||||
|
#define F_HASH 5
|
||||||
|
|
||||||
|
class FinishedListDelegate: public QItemDelegate {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
FinishedListDelegate(QObject *parent) : QItemDelegate(parent){}
|
||||||
|
|
||||||
|
~FinishedListDelegate(){}
|
||||||
|
|
||||||
|
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const{
|
||||||
|
QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option);
|
||||||
|
switch(index.column()){
|
||||||
|
case F_SIZE:
|
||||||
|
QItemDelegate::drawBackground(painter, opt, index);
|
||||||
|
QItemDelegate::drawDisplay(painter, opt, option.rect, misc::friendlyUnit(index.data().toLongLong()));
|
||||||
|
break;
|
||||||
|
case F_UPSPEED:{
|
||||||
|
QItemDelegate::drawBackground(painter, opt, index);
|
||||||
|
double speed = index.data().toDouble();
|
||||||
|
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString(QByteArray::number(speed/1024., 'f', 1))+QString::fromUtf8(" ")+tr("KiB/s"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case F_RATIO:{
|
||||||
|
QItemDelegate::drawBackground(painter, opt, index);
|
||||||
|
double ratio = index.data().toDouble();
|
||||||
|
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString(QByteArray::number(ratio, 'f', 1)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
QItemDelegate::paint(painter, option, index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget* createEditor(QWidget*, const QStyleOptionViewItem &, const QModelIndex &) const {
|
||||||
|
// No editor here
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
625
src/FinishedTorrents.cpp
Normal file
@@ -0,0 +1,625 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
#include "FinishedTorrents.h"
|
||||||
|
#include "misc.h"
|
||||||
|
#include "properties_imp.h"
|
||||||
|
#include "bittorrent.h"
|
||||||
|
#include "allocationDlg.h"
|
||||||
|
#include "FinishedListDelegate.h"
|
||||||
|
#include "GUI.h"
|
||||||
|
|
||||||
|
#include <QFile>
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QStandardItemModel>
|
||||||
|
#include <QHeaderView>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : parent(parent), BTSession(BTSession), nbFinished(0){
|
||||||
|
setupUi(this);
|
||||||
|
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
|
||||||
|
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
|
||||||
|
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"));
|
||||||
|
finishedList->setModel(finishedListModel);
|
||||||
|
loadHiddenColumns();
|
||||||
|
// Hide hash column
|
||||||
|
finishedList->hideColumn(F_HASH);
|
||||||
|
// Load last columns width for download list
|
||||||
|
if(!loadColWidthFinishedList()){
|
||||||
|
finishedList->header()->resizeSection(0, 200);
|
||||||
|
}
|
||||||
|
// Make download list header clickable for sorting
|
||||||
|
finishedList->header()->setClickable(true);
|
||||||
|
finishedList->header()->setSortIndicatorShown(true);
|
||||||
|
connect(finishedList->header(), SIGNAL(sectionPressed(int)), this, SLOT(toggleFinishedListSortOrder(int)));
|
||||||
|
finishedListDelegate = new FinishedListDelegate(finishedList);
|
||||||
|
finishedList->setItemDelegate(finishedListDelegate);
|
||||||
|
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&)));
|
||||||
|
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")));
|
||||||
|
actionTorrent_Properties->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/properties.png")));
|
||||||
|
actionSet_upload_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/seeding.png")));
|
||||||
|
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(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(actionForce_recheck, SIGNAL(triggered()), this, SLOT(forceRecheck()));
|
||||||
|
|
||||||
|
connect(actionHOSColName, SIGNAL(triggered()), this, SLOT(hideOrShowColumnName()));
|
||||||
|
connect(actionHOSColSize, SIGNAL(triggered()), this, SLOT(hideOrShowColumnSize()));
|
||||||
|
connect(actionHOSColUpSpeed, SIGNAL(triggered()), this, SLOT(hideOrShowColumnUpSpeed()));
|
||||||
|
connect(actionHOSColLeechers, SIGNAL(triggered()), this, SLOT(hideOrShowColumnLeechers()));
|
||||||
|
connect(actionHOSColRatio, SIGNAL(triggered()), this, SLOT(hideOrShowColumnRatio()));
|
||||||
|
}
|
||||||
|
|
||||||
|
FinishedTorrents::~FinishedTorrents(){
|
||||||
|
saveColWidthFinishedList();
|
||||||
|
saveHiddenColumns();
|
||||||
|
delete finishedListDelegate;
|
||||||
|
delete finishedListModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::notifyTorrentDoubleClicked(const QModelIndex& index) {
|
||||||
|
unsigned int row = index.row();
|
||||||
|
QString hash = getHashFromRow(row);
|
||||||
|
emit torrentDoubleClicked(hash, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::addTorrent(QString hash){
|
||||||
|
int row = getRowFromHash(hash);
|
||||||
|
if(row != -1) return;
|
||||||
|
row = finishedListModel->rowCount();
|
||||||
|
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||||
|
// Adding torrent to download list
|
||||||
|
finishedListModel->insertRow(row);
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(h.name()));
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_SIZE), QVariant((qlonglong)h.actual_size()));
|
||||||
|
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())));
|
||||||
|
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);
|
||||||
|
setRowColor(row, "red");
|
||||||
|
}else{
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(":/Icons/skin/seeding.png")), Qt::DecorationRole);
|
||||||
|
setRowColor(row, "orange");
|
||||||
|
}
|
||||||
|
// Update the number of finished torrents
|
||||||
|
++nbFinished;
|
||||||
|
emit finishedTorrentsNumberChanged(nbFinished);
|
||||||
|
// Sort List
|
||||||
|
sortFinishedList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the color of a row in data model
|
||||||
|
void FinishedTorrents::setRowColor(int row, QString color){
|
||||||
|
unsigned int nbColumns = finishedListModel->columnCount()-1;
|
||||||
|
for(unsigned int i=0; i<nbColumns; ++i){
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, i), QVariant(QColor(color)), Qt::ForegroundRole);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList FinishedTorrents::getSelectedTorrents(bool only_one) const{
|
||||||
|
QStringList res;
|
||||||
|
QModelIndex index;
|
||||||
|
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
|
||||||
|
foreach(index, selectedIndexes) {
|
||||||
|
if(index.column() == F_NAME) {
|
||||||
|
// Get the file hash
|
||||||
|
QString hash = finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString();
|
||||||
|
res << hash;
|
||||||
|
if(only_one) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int FinishedTorrents::getNbTorrentsInList() const {
|
||||||
|
return nbFinished;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load columns width in a file that were saved previously
|
||||||
|
// (finished list)
|
||||||
|
bool FinishedTorrents::loadColWidthFinishedList(){
|
||||||
|
qDebug("Loading columns width for finished list");
|
||||||
|
QSettings settings("qBittorrent", "qBittorrent");
|
||||||
|
QString line = settings.value("FinishedListColsWidth", QString()).toString();
|
||||||
|
if(line.isEmpty())
|
||||||
|
return false;
|
||||||
|
QStringList width_list = line.split(' ');
|
||||||
|
if(width_list.size() < finishedListModel->columnCount()-1)
|
||||||
|
return false;
|
||||||
|
unsigned int listSize = width_list.size();
|
||||||
|
for(unsigned int i=0; i<listSize; ++i){
|
||||||
|
finishedList->header()->resizeSection(i, width_list.at(i).toInt());
|
||||||
|
}
|
||||||
|
loadLastSortedColumn();
|
||||||
|
qDebug("Finished list columns width loaded");
|
||||||
|
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
|
||||||
|
// (finished list)
|
||||||
|
void FinishedTorrents::saveColWidthFinishedList() const{
|
||||||
|
qDebug("Saving columns width in finished list");
|
||||||
|
QSettings settings("qBittorrent", "qBittorrent");
|
||||||
|
QStringList width_list;
|
||||||
|
QStringList new_width_list;
|
||||||
|
short nbColumns = finishedListModel->columnCount()-1;
|
||||||
|
|
||||||
|
QString line = settings.value("FinishedListColsWidth", QString()).toString();
|
||||||
|
if(!line.isEmpty()) {
|
||||||
|
width_list = line.split(' ');
|
||||||
|
}
|
||||||
|
for(short i=0; i<nbColumns; ++i){
|
||||||
|
if(finishedList->columnWidth(i)<1 && width_list.size() == finishedListModel->columnCount()-1 && width_list.at(i).toInt()>=1) {
|
||||||
|
// load the former width
|
||||||
|
new_width_list << width_list.at(i);
|
||||||
|
} else if(finishedList->columnWidth(i)>=1) {
|
||||||
|
// usual case, save the current width
|
||||||
|
new_width_list << QString::fromUtf8(misc::toString(finishedList->columnWidth(i)).c_str());
|
||||||
|
} else {
|
||||||
|
// default width
|
||||||
|
finishedList->resizeColumnToContents(i);
|
||||||
|
new_width_list << QString::fromUtf8(misc::toString(finishedList->columnWidth(i)).c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
settings.setValue("FinishedListColsWidth", new_width_list.join(" "));
|
||||||
|
qDebug("Finished list columns width saved");
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::on_actionSet_upload_limit_triggered(){
|
||||||
|
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
|
||||||
|
QModelIndex index;
|
||||||
|
QStringList hashes;
|
||||||
|
foreach(index, selectedIndexes){
|
||||||
|
if(index.column() == F_NAME){
|
||||||
|
// Get the file hash
|
||||||
|
hashes << finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
new BandwidthAllocationDialog(this, true, BTSession, hashes);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::updateTorrent(QTorrentHandle h) {
|
||||||
|
QString hash = h.hash();
|
||||||
|
int row = getRowFromHash(hash);
|
||||||
|
if(row == -1){
|
||||||
|
qDebug("Cannot find torrent in finished list, adding it");
|
||||||
|
addTorrent(hash);
|
||||||
|
row = getRowFromHash(hash);
|
||||||
|
}
|
||||||
|
Q_ASSERT(row != -1);
|
||||||
|
if(h.is_paused()) return;
|
||||||
|
// Update queued torrent
|
||||||
|
if(BTSession->isQueueingEnabled() && h.is_queued()) {
|
||||||
|
if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking){
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
|
||||||
|
} else {
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/queued.png"))), Qt::DecorationRole);
|
||||||
|
}
|
||||||
|
// Reset upload speed and seeds/leech
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), 0.);
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_LEECH), "0");
|
||||||
|
setRowColor(row, QString::fromUtf8("grey"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking){
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
|
||||||
|
setRowColor(row, QString::fromUtf8("grey"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setRowColor(row, QString::fromUtf8("orange"));
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/seeding.png"))), Qt::DecorationRole);
|
||||||
|
if(!finishedList->isColumnHidden(F_UPSPEED)) {
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)h.upload_payload_rate()));
|
||||||
|
}
|
||||||
|
if(!finishedList->isColumnHidden(F_LEECH)) {
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_LEECH), misc::toQString(h.num_peers() - h.num_seeds(), true));
|
||||||
|
}
|
||||||
|
if(!finishedList->isColumnHidden(F_RATIO)) {
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_RATIO), QVariant(misc::toQString(BTSession->getRealRatio(hash))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int FinishedTorrents::getRowFromHash(QString hash) const{
|
||||||
|
unsigned int nbRows = finishedListModel->rowCount();
|
||||||
|
for(unsigned int i=0; i<nbRows; ++i){
|
||||||
|
if(finishedListModel->data(finishedListModel->index(i, F_HASH)) == hash){
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: does not actually pause the torrent in BT Session
|
||||||
|
void FinishedTorrents::pauseTorrent(QString hash) {
|
||||||
|
int row = getRowFromHash(hash);
|
||||||
|
if(row == -1)
|
||||||
|
return;
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)0.0));
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_NAME), QIcon(QString::fromUtf8(":/Icons/skin/paused.png")), Qt::DecorationRole);
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_LEECH), QVariant(QString::fromUtf8("0")));
|
||||||
|
setRowColor(row, QString::fromUtf8("red"));
|
||||||
|
}
|
||||||
|
|
||||||
|
QString FinishedTorrents::getHashFromRow(unsigned int row) const {
|
||||||
|
Q_ASSERT(row < (unsigned int)finishedListModel->rowCount());
|
||||||
|
return finishedListModel->data(finishedListModel->index(row, F_HASH)).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Will move it to download tab
|
||||||
|
void FinishedTorrents::deleteTorrent(QString hash){
|
||||||
|
int row = getRowFromHash(hash);
|
||||||
|
if(row == -1){
|
||||||
|
qDebug("Torrent is not in finished list, nothing to delete");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
finishedListModel->removeRow(row);
|
||||||
|
--nbFinished;
|
||||||
|
emit finishedTorrentsNumberChanged(nbFinished);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show torrent properties dialog
|
||||||
|
void FinishedTorrents::showProperties(const QModelIndex &index){
|
||||||
|
showPropertiesFromHash(finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::showPropertiesFromHash(QString hash){
|
||||||
|
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||||
|
properties *prop = new properties(this, BTSession, h);
|
||||||
|
connect(prop, SIGNAL(filteredFilesChanged(QString)), this, SLOT(updateFileSize(QString)));
|
||||||
|
connect(prop, SIGNAL(trackersChanged(QString)), BTSession, SLOT(saveTrackerFile(QString)));
|
||||||
|
prop->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::updateFileSize(QString hash){
|
||||||
|
int row = getRowFromHash(hash);
|
||||||
|
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_SIZE), QVariant((qlonglong)h.actual_size()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// display properties of selected items
|
||||||
|
void FinishedTorrents::propertiesSelection(){
|
||||||
|
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
|
||||||
|
QModelIndex index;
|
||||||
|
foreach(index, selectedIndexes){
|
||||||
|
if(index.column() == F_NAME){
|
||||||
|
showProperties(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::forceRecheck(){
|
||||||
|
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
|
||||||
|
QModelIndex index;
|
||||||
|
foreach(index, selectedIndexes){
|
||||||
|
if(index.column() == F_NAME){
|
||||||
|
QString hash = finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString();
|
||||||
|
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||||
|
h.force_recheck();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
|
||||||
|
QMenu myFinishedListMenu(this);
|
||||||
|
QModelIndex index;
|
||||||
|
// Enable/disable pause/start action given the DL state
|
||||||
|
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
|
||||||
|
bool has_pause = false, has_start = false, has_preview = false;
|
||||||
|
foreach(index, selectedIndexes) {
|
||||||
|
if(index.column() == F_NAME) {
|
||||||
|
// Get the file name
|
||||||
|
QString hash = finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString();
|
||||||
|
// Get handle and pause the torrent
|
||||||
|
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||||
|
if(!h.is_valid()) continue;
|
||||||
|
if(h.is_paused()) {
|
||||||
|
if(!has_start) {
|
||||||
|
myFinishedListMenu.addAction(actionStart);
|
||||||
|
has_start = true;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(!has_pause) {
|
||||||
|
myFinishedListMenu.addAction(actionPause);
|
||||||
|
has_pause = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(BTSession->isFilePreviewPossible(hash) && !has_preview) {
|
||||||
|
myFinishedListMenu.addAction(actionPreview_file);
|
||||||
|
has_preview = true;
|
||||||
|
}
|
||||||
|
if(has_pause && has_start && has_preview) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
myFinishedListMenu.addSeparator();
|
||||||
|
myFinishedListMenu.addAction(actionDelete);
|
||||||
|
myFinishedListMenu.addAction(actionDelete_Permanently);
|
||||||
|
myFinishedListMenu.addSeparator();
|
||||||
|
myFinishedListMenu.addAction(actionSet_upload_limit);
|
||||||
|
myFinishedListMenu.addSeparator();
|
||||||
|
myFinishedListMenu.addAction(actionForce_recheck);
|
||||||
|
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?
|
||||||
|
myFinishedListMenu.exec(mapToGlobal(pos)+QPoint(10,58));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hiding Columns functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
// hide/show columns menu
|
||||||
|
void FinishedTorrents::displayFinishedHoSMenu(const QPoint& pos){
|
||||||
|
QMenu hideshowColumn(this);
|
||||||
|
hideshowColumn.setTitle(tr("Hide or Show Column"));
|
||||||
|
int lastCol = F_RATIO;
|
||||||
|
for(int i=0; i<=lastCol; i++) {
|
||||||
|
hideshowColumn.addAction(getActionHoSCol(i));
|
||||||
|
}
|
||||||
|
// Call menu
|
||||||
|
hideshowColumn.exec(mapToGlobal(pos)+QPoint(10,34));
|
||||||
|
}
|
||||||
|
|
||||||
|
// toggle hide/show a column
|
||||||
|
void FinishedTorrents::hideOrShowColumn(int index) {
|
||||||
|
unsigned int nbVisibleColumns = 0;
|
||||||
|
unsigned int nbCols = finishedListModel->columnCount();
|
||||||
|
// Count visible columns
|
||||||
|
for(unsigned int i=0; i<nbCols; ++i) {
|
||||||
|
if(!finishedList->isColumnHidden(i))
|
||||||
|
++nbVisibleColumns;
|
||||||
|
}
|
||||||
|
if(!finishedList->isColumnHidden(index)) {
|
||||||
|
// User wants to hide the column
|
||||||
|
// Is there at least one other visible column?
|
||||||
|
if(nbVisibleColumns <= 1) return;
|
||||||
|
// User can hide the column, do it.
|
||||||
|
finishedList->setColumnHidden(index, true);
|
||||||
|
getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
|
||||||
|
--nbVisibleColumns;
|
||||||
|
} else {
|
||||||
|
// User want to display the column
|
||||||
|
finishedList->setColumnHidden(index, false);
|
||||||
|
getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
|
||||||
|
++nbVisibleColumns;
|
||||||
|
}
|
||||||
|
//resize all others non-hidden columns
|
||||||
|
for(unsigned int i=0; i<nbCols; ++i) {
|
||||||
|
if(!finishedList->isColumnHidden(i)) {
|
||||||
|
finishedList->setColumnWidth(i, (int)ceil(finishedList->columnWidth(i)+(finishedList->columnWidth(index)/nbVisibleColumns)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::hideOrShowColumnName() {
|
||||||
|
hideOrShowColumn(F_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::hideOrShowColumnSize() {
|
||||||
|
hideOrShowColumn(F_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::hideOrShowColumnUpSpeed() {
|
||||||
|
hideOrShowColumn(F_UPSPEED);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::hideOrShowColumnLeechers() {
|
||||||
|
hideOrShowColumn(F_LEECH);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::hideOrShowColumnRatio() {
|
||||||
|
hideOrShowColumn(F_RATIO);
|
||||||
|
}
|
||||||
|
|
||||||
|
// load the previous settings, and hide the columns
|
||||||
|
bool FinishedTorrents::loadHiddenColumns() {
|
||||||
|
bool loaded = false;
|
||||||
|
QSettings settings("qBittorrent", "qBittorrent");
|
||||||
|
QString line = settings.value("FinishedListColsHoS", QString()).toString();
|
||||||
|
QStringList ishidden_list;
|
||||||
|
if(!line.isEmpty()) {
|
||||||
|
ishidden_list = line.split(' ');
|
||||||
|
if(ishidden_list.size() == finishedListModel->columnCount()-1) {
|
||||||
|
unsigned int listSize = ishidden_list.size();
|
||||||
|
for(unsigned int i=0; i<listSize; ++i){
|
||||||
|
finishedList->header()->resizeSection(i, ishidden_list.at(i).toInt());
|
||||||
|
}
|
||||||
|
loaded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(int i=0; i<finishedListModel->columnCount()-1; i++) {
|
||||||
|
if(loaded && ishidden_list.at(i) == "0") {
|
||||||
|
finishedList->setColumnHidden(i, true);
|
||||||
|
getActionHoSCol(i)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
|
||||||
|
} else {
|
||||||
|
getActionHoSCol(i)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return loaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
// save the hidden columns in settings
|
||||||
|
void FinishedTorrents::saveHiddenColumns() {
|
||||||
|
QSettings settings("qBittorrent", "qBittorrent");
|
||||||
|
QStringList ishidden_list;
|
||||||
|
short nbColumns = finishedListModel->columnCount()-1;
|
||||||
|
|
||||||
|
for(short i=0; i<nbColumns; ++i){
|
||||||
|
if(finishedList->isColumnHidden(i)) {
|
||||||
|
ishidden_list << QString::fromUtf8(misc::toString(0).c_str());
|
||||||
|
} else {
|
||||||
|
ishidden_list << QString::fromUtf8(misc::toString(1).c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
settings.setValue("FinishedListColsHoS", ishidden_list.join(" "));
|
||||||
|
}
|
||||||
|
|
||||||
|
// getter, return the action hide or show whose id is index
|
||||||
|
QAction* FinishedTorrents::getActionHoSCol(int index) {
|
||||||
|
switch(index) {
|
||||||
|
case F_NAME :
|
||||||
|
return actionHOSColName;
|
||||||
|
break;
|
||||||
|
case F_SIZE :
|
||||||
|
return actionHOSColSize;
|
||||||
|
break;
|
||||||
|
case F_UPSPEED :
|
||||||
|
return actionHOSColUpSpeed;
|
||||||
|
break;
|
||||||
|
case F_LEECH :
|
||||||
|
return actionHOSColLeechers;
|
||||||
|
break;
|
||||||
|
case F_RATIO :
|
||||||
|
return actionHOSColRatio;
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sorting functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
void FinishedTorrents::toggleFinishedListSortOrder(int index) {
|
||||||
|
Qt::SortOrder sortOrder = Qt::AscendingOrder;
|
||||||
|
if(finishedList->header()->sortIndicatorSection() == index){
|
||||||
|
sortOrder = (Qt::SortOrder)!(bool)finishedList->header()->sortIndicatorOrder();
|
||||||
|
}
|
||||||
|
switch(index) {
|
||||||
|
case F_SIZE:
|
||||||
|
case F_UPSPEED:
|
||||||
|
case F_RATIO:
|
||||||
|
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:
|
||||||
|
sortFinishedListFloat(index, sortOrder);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sortFinishedListString(index, sortOrder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::sortFinishedListFloat(int index, Qt::SortOrder sortOrder){
|
||||||
|
QList<QPair<int, double> > lines;
|
||||||
|
// insertion sorting
|
||||||
|
unsigned int nbRows = finishedListModel->rowCount();
|
||||||
|
for(unsigned int i=0; i<nbRows; ++i){
|
||||||
|
misc::insertSort(lines, QPair<int,double>(i, finishedListModel->data(finishedListModel->index(i, index)).toDouble()), sortOrder);
|
||||||
|
}
|
||||||
|
// Insert items in new model, in correct order
|
||||||
|
unsigned int nbRows_old = lines.size();
|
||||||
|
for(unsigned int row=0; row<nbRows_old; ++row){
|
||||||
|
finishedListModel->insertRow(finishedListModel->rowCount());
|
||||||
|
unsigned int sourceRow = lines[row].first;
|
||||||
|
unsigned int nbColumns = finishedListModel->columnCount();
|
||||||
|
for(unsigned int col=0; col<nbColumns; ++col){
|
||||||
|
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col)));
|
||||||
|
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col), Qt::DecorationRole), Qt::DecorationRole);
|
||||||
|
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col), Qt::ForegroundRole), Qt::ForegroundRole);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Remove old rows
|
||||||
|
finishedListModel->removeRows(0, nbRows_old);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinishedTorrents::sortFinishedListString(int index, Qt::SortOrder sortOrder){
|
||||||
|
QList<QPair<int, QString> > lines;
|
||||||
|
// Insertion sorting
|
||||||
|
unsigned int nbRows = finishedListModel->rowCount();
|
||||||
|
for(unsigned int i=0; i<nbRows; ++i){
|
||||||
|
misc::insertSortString(lines, QPair<int, QString>(i, finishedListModel->data(finishedListModel->index(i, index)).toString()), sortOrder);
|
||||||
|
}
|
||||||
|
// Insert items in new model, in correct order
|
||||||
|
unsigned int nbRows_old = lines.size();
|
||||||
|
for(unsigned int row=0; row<nbRows_old; ++row){
|
||||||
|
finishedListModel->insertRow(finishedListModel->rowCount());
|
||||||
|
unsigned int sourceRow = lines[row].first;
|
||||||
|
unsigned int nbColumns = finishedListModel->columnCount();
|
||||||
|
for(unsigned int col=0; col<nbColumns; ++col){
|
||||||
|
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col)));
|
||||||
|
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col), Qt::DecorationRole), Qt::DecorationRole);
|
||||||
|
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col), Qt::ForegroundRole), Qt::ForegroundRole);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Remove old rows
|
||||||
|
finishedListModel->removeRows(0, nbRows_old);
|
||||||
|
}
|
||||||
93
src/FinishedTorrents.h
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
/*
|
||||||
|
* 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 SEEDING_H
|
||||||
|
#define SEEDING_H
|
||||||
|
|
||||||
|
#include "ui_seeding.h"
|
||||||
|
#include "qtorrenthandle.h"
|
||||||
|
|
||||||
|
class QStandardItemModel;
|
||||||
|
class bittorrent;
|
||||||
|
class FinishedListDelegate;
|
||||||
|
|
||||||
|
using namespace libtorrent;
|
||||||
|
|
||||||
|
class FinishedTorrents : public QWidget, public Ui::seeding {
|
||||||
|
Q_OBJECT
|
||||||
|
private:
|
||||||
|
QObject *parent;
|
||||||
|
bittorrent *BTSession;
|
||||||
|
FinishedListDelegate *finishedListDelegate;
|
||||||
|
QStandardItemModel *finishedListModel;
|
||||||
|
unsigned int nbFinished;
|
||||||
|
void hideOrShowColumn(int index);
|
||||||
|
bool loadHiddenColumns();
|
||||||
|
void saveHiddenColumns();
|
||||||
|
QAction* getActionHoSCol(int index);
|
||||||
|
|
||||||
|
public:
|
||||||
|
FinishedTorrents(QObject *parent, bittorrent *BTSession);
|
||||||
|
~FinishedTorrents();
|
||||||
|
// Methods
|
||||||
|
bool loadColWidthFinishedList();
|
||||||
|
int getRowFromHash(QString hash) const;
|
||||||
|
QStringList getSelectedTorrents(bool only_one=false) const;
|
||||||
|
unsigned int getNbTorrentsInList() const;
|
||||||
|
QString getHashFromRow(unsigned int row) const;
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
void showProperties(const QModelIndex &index);
|
||||||
|
void displayFinishedListMenu(const QPoint&);
|
||||||
|
void displayFinishedHoSMenu(const QPoint&);
|
||||||
|
void setRowColor(int row, QString color);
|
||||||
|
void saveColWidthFinishedList() const;
|
||||||
|
void toggleFinishedListSortOrder(int index);
|
||||||
|
void sortFinishedList(int index=-1, Qt::SortOrder sortOrder=Qt::AscendingOrder);
|
||||||
|
void sortFinishedListFloat(int index, Qt::SortOrder sortOrder);
|
||||||
|
void sortFinishedListString(int index, Qt::SortOrder sortOrder);
|
||||||
|
void updateFileSize(QString hash);
|
||||||
|
void on_actionSet_upload_limit_triggered();
|
||||||
|
void notifyTorrentDoubleClicked(const QModelIndex& index);
|
||||||
|
void hideOrShowColumnName();
|
||||||
|
void hideOrShowColumnSize();
|
||||||
|
void hideOrShowColumnUpSpeed();
|
||||||
|
void hideOrShowColumnLeechers();
|
||||||
|
void hideOrShowColumnRatio();
|
||||||
|
void forceRecheck();
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void addTorrent(QString hash);
|
||||||
|
void updateTorrent(QTorrentHandle h);
|
||||||
|
void pauseTorrent(QString hash);
|
||||||
|
void propertiesSelection();
|
||||||
|
void deleteTorrent(QString hash);
|
||||||
|
void showPropertiesFromHash(QString hash);
|
||||||
|
void loadLastSortedColumn();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void torrentMovedFromFinishedList(QString);
|
||||||
|
void torrentDoubleClicked(QString hash, bool finished);
|
||||||
|
void finishedTorrentsNumberChanged(unsigned int);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
1888
src/GUI.cpp
286
src/GUI.h
@@ -16,15 +16,6 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*
|
*
|
||||||
* In addition, as a special exception, the copyright holders give permission to
|
|
||||||
* link this program with the OpenSSL project's "OpenSSL" library (or with
|
|
||||||
* modified versions of it that use the same license as the "OpenSSL" library),
|
|
||||||
* and distribute the linked executables. You must obey the GNU General Public
|
|
||||||
* License in all respects for all of the code used other than "OpenSSL". If you
|
|
||||||
* modify file(s), you may extend this exception to your version of the file(s),
|
|
||||||
* but you are not obligated to do so. If you do not wish to do so, delete this
|
|
||||||
* exception statement from your version.
|
|
||||||
*
|
|
||||||
* Contact : chris@qbittorrent.org
|
* Contact : chris@qbittorrent.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -34,153 +25,176 @@
|
|||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QSystemTrayIcon>
|
#include <QSystemTrayIcon>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_MainWindow.h"
|
||||||
#include "qtorrenthandle.h"
|
#include "qtorrenthandle.h"
|
||||||
|
|
||||||
class Bittorrent;
|
class bittorrent;
|
||||||
|
class createtorrent;
|
||||||
class QTimer;
|
class QTimer;
|
||||||
|
class DownloadingTorrents;
|
||||||
|
class FinishedTorrents;
|
||||||
class downloadFromURL;
|
class downloadFromURL;
|
||||||
class SearchEngine;
|
class SearchEngine;
|
||||||
|
#ifdef QT_4_4
|
||||||
|
class QLocalServer;
|
||||||
|
class QLocalSocket;
|
||||||
|
#else
|
||||||
|
class QTcpServer;
|
||||||
|
class QTcpSocket;
|
||||||
|
#endif
|
||||||
class QCloseEvent;
|
class QCloseEvent;
|
||||||
class RSSImp;
|
class RSSImp;
|
||||||
class QShortcut;
|
class QShortcut;
|
||||||
class about;
|
class about;
|
||||||
|
class previewSelect;
|
||||||
class options_imp;
|
class options_imp;
|
||||||
class QTabWidget;
|
class QTabWidget;
|
||||||
class TransferListWidget;
|
class QLabel;
|
||||||
class TransferListFiltersWidget;
|
class QModelIndex;
|
||||||
class QSplitter;
|
class HttpServer;
|
||||||
class PropertiesWidget;
|
class QFrame;
|
||||||
class StatusBar;
|
|
||||||
class consoleDlg;
|
|
||||||
class about;
|
|
||||||
class createtorrent;
|
|
||||||
class downloadFromURL;
|
|
||||||
class HidableTabWidget;
|
|
||||||
class LineEdit;
|
|
||||||
class QFileSystemWatcher;
|
|
||||||
|
|
||||||
class GUI : public QMainWindow, private Ui::MainWindow{
|
class GUI : public QMainWindow, private Ui::MainWindow{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
private:
|
||||||
// Construct / Destruct
|
// Bittorrent
|
||||||
GUI(QWidget *parent=0, QStringList torrentCmdLine=QStringList());
|
bittorrent *BTSession;
|
||||||
~GUI();
|
QTimer *checkConnect;
|
||||||
// Methods
|
QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers;
|
||||||
QWidget* getCurrentTabWidget() const;
|
// GUI related
|
||||||
TransferListWidget* getTransferList() const { return transferList; }
|
QTabWidget *tabs;
|
||||||
QMenu* getTrayIconMenu();
|
QPointer<options_imp> options;
|
||||||
PropertiesWidget *getProperties() const { return properties; }
|
QSystemTrayIcon *myTrayIcon;
|
||||||
|
QPointer<QTimer> systrayCreator;
|
||||||
|
QMenu *myTrayIconMenu;
|
||||||
|
DownloadingTorrents *downloadingTorrentTab;
|
||||||
|
FinishedTorrents *finishedTorrentTab;
|
||||||
|
QLabel *connecStatusLblIcon;
|
||||||
|
bool systrayIntegration;
|
||||||
|
bool displaySpeedInTitle;
|
||||||
|
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
|
||||||
|
RSSImp *rssWidget;
|
||||||
|
// Web UI
|
||||||
|
QPointer<HttpServer> httpServer;
|
||||||
|
// Misc
|
||||||
|
#ifdef QT_4_4
|
||||||
|
QLocalServer *localServer;
|
||||||
|
QLocalSocket *clientConnection;
|
||||||
|
#else
|
||||||
|
QTcpServer *localServer;
|
||||||
|
QTcpSocket *clientConnection;
|
||||||
|
#endif
|
||||||
|
|
||||||
public slots:
|
protected slots:
|
||||||
void trackerAuthenticationRequired(QTorrentHandle& h);
|
// GUI related slots
|
||||||
void setTabText(int index, QString text) const;
|
void dropEvent(QDropEvent *event);
|
||||||
void showNotificationBaloon(QString title, QString msg) const;
|
void dragEnterEvent(QDragEnterEvent *event);
|
||||||
void downloadFromURLList(const QStringList& urls);
|
void toggleVisibility(QSystemTrayIcon::ActivationReason e);
|
||||||
void updateAltSpeedsBtn(bool alternative);
|
void on_actionAbout_triggered();
|
||||||
void updateNbTorrents(unsigned int nb_downloading, unsigned int nb_seeding, unsigned int nb_active, unsigned int nb_inactive, unsigned int nb_paused);
|
void on_actionCreate_torrent_triggered();
|
||||||
|
void on_actionWebsite_triggered() const;
|
||||||
|
void on_actionBugReport_triggered() const;
|
||||||
|
void on_actionShow_console_triggered();
|
||||||
|
void readParamsOnSocket();
|
||||||
|
void acceptConnection();
|
||||||
|
void togglePausedState(QString hash);
|
||||||
|
void torrentDoubleClicked(QString hash, bool finished);
|
||||||
|
void on_actionPreview_file_triggered();
|
||||||
|
void previewFile(QString filePath);
|
||||||
|
void balloonClicked();
|
||||||
|
void writeSettings();
|
||||||
|
void readSettings();
|
||||||
|
void on_actionExit_triggered();
|
||||||
|
void createTrayIcon();
|
||||||
|
void updateUnfinishedTorrentNumber(unsigned int nb);
|
||||||
|
void updateFinishedTorrentNumber(unsigned int nb);
|
||||||
|
void fullDiskError(QTorrentHandle& h) const;
|
||||||
|
void handleDownloadFromUrlFailure(QString, QString) const;
|
||||||
|
void createSystrayDelayed();
|
||||||
|
// Keyboard shortcuts
|
||||||
|
void createKeyboardShortcuts();
|
||||||
|
void displayDownTab() const;
|
||||||
|
void displayUpTab() const;
|
||||||
|
void displaySearchTab() const;
|
||||||
|
void displayRSSTab() const;
|
||||||
|
// Torrent actions
|
||||||
|
void on_actionTorrent_Properties_triggered();
|
||||||
|
void on_actionPause_triggered();
|
||||||
|
void on_actionPause_All_triggered();
|
||||||
|
void on_actionStart_triggered();
|
||||||
|
void on_actionStart_All_triggered();
|
||||||
|
void on_actionOpen_triggered();
|
||||||
|
void on_actionDelete_Permanently_triggered();
|
||||||
|
void on_actionDelete_triggered();
|
||||||
|
void on_actionSet_global_upload_limit_triggered();
|
||||||
|
void on_actionSet_global_download_limit_triggered();
|
||||||
|
void on_actionDocumentation_triggered() const;
|
||||||
|
void checkConnectionStatus();
|
||||||
|
void configureSession(bool deleteOptions);
|
||||||
|
void processParams(const QStringList& params);
|
||||||
|
void addTorrent(QString path);
|
||||||
|
void addUnauthenticatedTracker(QPair<QTorrentHandle,QString> tracker);
|
||||||
|
void processDownloadedFiles(QString path, QString url);
|
||||||
|
void downloadFromURLList(const QStringList& urls);
|
||||||
|
void deleteTorrent(QString hash);
|
||||||
|
void finishedTorrent(QTorrentHandle& h) const;
|
||||||
|
void addedTorrent(QTorrentHandle& h) const;
|
||||||
|
void checkedTorrent(QTorrentHandle& h) const;
|
||||||
|
void pausedTorrent(QTorrentHandle& h) const;
|
||||||
|
void resumedTorrent(QTorrentHandle& h) const;
|
||||||
|
void updateLists(bool force=false);
|
||||||
|
bool initWebUi(QString username, QString password, int port);
|
||||||
|
void on_actionIncreasePriority_triggered();
|
||||||
|
void on_actionDecreasePriority_triggered();
|
||||||
|
// Options slots
|
||||||
|
void on_actionOptions_triggered();
|
||||||
|
void OptionsSaved(bool deleteOptions);
|
||||||
|
// HTTP slots
|
||||||
|
void on_actionDownload_from_URL_triggered();
|
||||||
|
|
||||||
protected slots:
|
|
||||||
// GUI related slots
|
|
||||||
void dropEvent(QDropEvent *event);
|
|
||||||
void dragEnterEvent(QDragEnterEvent *event);
|
|
||||||
void toggleVisibility(QSystemTrayIcon::ActivationReason e);
|
|
||||||
void on_actionAbout_triggered();
|
|
||||||
void on_actionCreate_torrent_triggered();
|
|
||||||
void on_actionWebsite_triggered() const;
|
|
||||||
void on_actionBugReport_triggered() const;
|
|
||||||
void on_actionShow_console_triggered();
|
|
||||||
void balloonClicked();
|
|
||||||
void writeSettings();
|
|
||||||
void readSettings();
|
|
||||||
void on_actionExit_triggered();
|
|
||||||
void createTrayIcon();
|
|
||||||
void fullDiskError(QTorrentHandle& h, QString msg) const;
|
|
||||||
void handleDownloadFromUrlFailure(QString, QString) const;
|
|
||||||
void createSystrayDelayed();
|
|
||||||
void tab_changed(int);
|
|
||||||
void on_actionLock_qBittorrent_triggered();
|
|
||||||
void defineUILockPassword();
|
|
||||||
bool unlockUI();
|
|
||||||
void notifyOfUpdate(QString);
|
|
||||||
// Keyboard shortcuts
|
|
||||||
void createKeyboardShortcuts();
|
|
||||||
void displayTransferTab() const;
|
|
||||||
void displaySearchTab() const;
|
|
||||||
void displayRSSTab() const;
|
|
||||||
// Torrent actions
|
|
||||||
void on_actionSet_global_upload_limit_triggered();
|
|
||||||
void on_actionSet_global_download_limit_triggered();
|
|
||||||
void on_actionDocumentation_triggered() const;
|
|
||||||
void on_actionOpen_triggered();
|
|
||||||
void updateGUI();
|
|
||||||
void loadPreferences(bool configure_session=true);
|
|
||||||
void processParams(const QString& params);
|
|
||||||
void processParams(const QStringList& params);
|
|
||||||
void addTorrent(QString path);
|
|
||||||
void addUnauthenticatedTracker(const QPair<QTorrentHandle,QString> &tracker);
|
|
||||||
void processDownloadedFiles(QString path, QString url);
|
|
||||||
void finishedTorrent(QTorrentHandle& h) const;
|
|
||||||
void askRecursiveTorrentDownloadConfirmation(QTorrentHandle &h);
|
|
||||||
// Options slots
|
|
||||||
void on_actionOptions_triggered();
|
|
||||||
void optionsSaved();
|
|
||||||
// HTTP slots
|
|
||||||
void on_actionDownload_from_URL_triggered();
|
|
||||||
|
|
||||||
protected:
|
public slots:
|
||||||
void closeEvent(QCloseEvent *);
|
void trackerAuthenticationRequired(QTorrentHandle& h);
|
||||||
void showEvent(QShowEvent *);
|
void setTabText(int index, QString text) const;
|
||||||
bool event(QEvent * event);
|
void openDestinationFolder() const;
|
||||||
void displayRSSTab(bool enable);
|
void goBuyPage() const;
|
||||||
void displaySearchTab(bool enable);
|
void updateRatio();
|
||||||
|
|
||||||
private:
|
protected:
|
||||||
QFileSystemWatcher *executable_watcher;
|
void closeEvent(QCloseEvent *);
|
||||||
// Bittorrent
|
void showEvent(QShowEvent *);
|
||||||
Bittorrent *BTSession;
|
bool event(QEvent * event);
|
||||||
QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers; // Still needed?
|
void displayRSSTab(bool enable);
|
||||||
// GUI related
|
|
||||||
QTimer *guiUpdater;
|
|
||||||
HidableTabWidget *tabs;
|
|
||||||
StatusBar *status_bar;
|
|
||||||
QPointer<options_imp> options;
|
|
||||||
QPointer<consoleDlg> console;
|
|
||||||
QPointer<about> aboutDlg;
|
|
||||||
QPointer<createtorrent> createTorrentDlg;
|
|
||||||
QPointer<downloadFromURL> downloadFromURLDialog;
|
|
||||||
QPointer<QSystemTrayIcon> systrayIcon;
|
|
||||||
QPointer<QTimer> systrayCreator;
|
|
||||||
QPointer<QMenu> myTrayIconMenu;
|
|
||||||
TransferListWidget *transferList;
|
|
||||||
TransferListFiltersWidget *transferListFilters;
|
|
||||||
PropertiesWidget *properties;
|
|
||||||
bool displaySpeedInTitle;
|
|
||||||
bool force_exit;
|
|
||||||
bool ui_locked;
|
|
||||||
LineEdit *search_filter;
|
|
||||||
// Keyboard shortcuts
|
|
||||||
QShortcut *switchSearchShortcut;
|
|
||||||
QShortcut *switchSearchShortcut2;
|
|
||||||
QShortcut *switchTransferShortcut;
|
|
||||||
QShortcut *switchRSSShortcut;
|
|
||||||
// Widgets
|
|
||||||
QAction *prioSeparator;
|
|
||||||
QAction *prioSeparator2;
|
|
||||||
QSplitter *hSplitter;
|
|
||||||
QSplitter *vSplitter;
|
|
||||||
// Search
|
|
||||||
QPointer<SearchEngine> searchEngine;
|
|
||||||
// RSS
|
|
||||||
QPointer<RSSImp> rssWidget;
|
|
||||||
|
|
||||||
private slots:
|
public:
|
||||||
void on_actionSearch_engine_triggered();
|
// Construct / Destruct
|
||||||
void on_actionRSS_Reader_triggered();
|
GUI(QWidget *parent=0, QStringList torrentCmdLine=QStringList());
|
||||||
void on_actionSpeed_in_title_bar_triggered();
|
~GUI();
|
||||||
void on_actionTop_tool_bar_triggered();
|
// Methods
|
||||||
void on_actionShutdown_when_downloads_complete_triggered();
|
int getCurrentTabIndex() const;
|
||||||
|
QPoint screenCenter() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 322 B |
BIN
src/Icons/L.gif
|
Before Width: | Height: | Size: 66 B |
BIN
src/Icons/add_file.png
Normal file
|
After Width: | Height: | Size: 1005 B |
BIN
src/Icons/add_folder.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/Icons/bt_settings.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/Icons/button_cancel.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/Icons/button_ok.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/Icons/configure.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/Icons/connection.png
Normal file
|
After Width: | Height: | Size: 820 B |
BIN
src/Icons/description.png
Normal file
|
After Width: | Height: | Size: 821 B |
BIN
src/Icons/download.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 575 B |
|
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 750 B |
|
Before Width: | Height: | Size: 704 B After Width: | Height: | Size: 704 B |
BIN
src/Icons/filter.png
Normal file
|
After Width: | Height: | Size: 998 B |
|
Before Width: | Height: | Size: 473 B |
|
Before Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 285 B |
|
Before Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 173 B |
|
Before Width: | Height: | Size: 583 B |
|
Before Width: | Height: | Size: 686 B |
|
Before Width: | Height: | Size: 203 B |
|
Before Width: | Height: | Size: 479 B |
|
Before Width: | Height: | Size: 314 B |
|
Before Width: | Height: | Size: 680 B |
|
Before Width: | Height: | Size: 439 B |
|
Before Width: | Height: | Size: 400 B |
|
Before Width: | Height: | Size: 290 B |
|
Before Width: | Height: | Size: 190 B |
|
Before Width: | Height: | Size: 476 B |
|
Before Width: | Height: | Size: 185 B |
|
Before Width: | Height: | Size: 643 B |
|
Before Width: | Height: | Size: 402 B |
|
Before Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 679 B |
|
Before Width: | Height: | Size: 833 B |
|
Before Width: | Height: | Size: 680 B |
|
Before Width: | Height: | Size: 546 B |
|
Before Width: | Height: | Size: 459 B |
|
Before Width: | Height: | Size: 372 B |
|
Before Width: | Height: | Size: 361 B |
|
Before Width: | Height: | Size: 773 B |
|
Before Width: | Height: | Size: 293 B |
|
Before Width: | Height: | Size: 198 B |
|
Before Width: | Height: | Size: 248 B |
|
Before Width: | Height: | Size: 657 B |
|
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 449 B |
BIN
src/Icons/gear.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/Icons/gnome-shutdown.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/Icons/home.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/Icons/locale.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/Icons/log.png
Normal file
|
After Width: | Height: | Size: 846 B |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
BIN
src/Icons/money.png
Normal file
|
After Width: | Height: | Size: 813 B |
BIN
src/Icons/newmsg.png
Normal file
|
After Width: | Height: | Size: 532 B |
|
Before Width: | Height: | Size: 796 B |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 733 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 873 B |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 860 B |
|
Before Width: | Height: | Size: 892 B |