Browse Source
FEATURE: The optimal piece size is now automatically computed in the torrent creation tool COSMETIC: Improved the torrent creation tool appearanceadaptive-webui-19844
Christophe Dumez
14 years ago
11 changed files with 671 additions and 765 deletions
@ -0,0 +1,330 @@
@@ -0,0 +1,330 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<ui version="4.0"> |
||||
<class>createTorrentDialog</class> |
||||
<widget class="QDialog" name="createTorrentDialog"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>592</width> |
||||
<height>658</height> |
||||
</rect> |
||||
</property> |
||||
<property name="windowTitle"> |
||||
<string>Torrent Creation Tool</string> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout"> |
||||
<item> |
||||
<widget class="QLabel" name="createTorrent_title"> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>0</width> |
||||
<height>27</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>16777215</width> |
||||
<height>27</height> |
||||
</size> |
||||
</property> |
||||
<property name="font"> |
||||
<font> |
||||
<family>Sans Serif</family> |
||||
<pointsize>14</pointsize> |
||||
<weight>75</weight> |
||||
<italic>false</italic> |
||||
<bold>true</bold> |
||||
<underline>false</underline> |
||||
<strikeout>false</strikeout> |
||||
</font> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Torrent file creation</string> |
||||
</property> |
||||
<property name="alignment"> |
||||
<set>Qt::AlignCenter</set> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QLabel" name="lbl_input"> |
||||
<property name="text"> |
||||
<string>File or folder to add to the torrent:</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QLineEdit" name="textInputPath"/> |
||||
</item> |
||||
<item> |
||||
<layout class="QHBoxLayout"> |
||||
<item> |
||||
<widget class="QPushButton" name="addFile_button"> |
||||
<property name="text"> |
||||
<string>Add file</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../icons.qrc"> |
||||
<normaloff>:/Icons/oxygen/document-new.png</normaloff>:/Icons/oxygen/document-new.png</iconset> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="addFolder_button"> |
||||
<property name="text"> |
||||
<string>Add folder</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../icons.qrc"> |
||||
<normaloff>:/Icons/oxygen/folder-new.png</normaloff>:/Icons/oxygen/folder-new.png</iconset> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<layout class="QGridLayout" name="gridLayout"> |
||||
<item row="0" column="0"> |
||||
<widget class="QLabel" name="lbl_announce_url"> |
||||
<property name="text"> |
||||
<string>Tracker URLs:</string> |
||||
</property> |
||||
<property name="alignment"> |
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
||||
</property> |
||||
<property name="buddy"> |
||||
<cstring></cstring> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item row="1" column="0"> |
||||
<widget class="QLabel" name="urlSeeds_lbl"> |
||||
<property name="text"> |
||||
<string>Web seeds urls:</string> |
||||
</property> |
||||
<property name="alignment"> |
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item row="2" column="0"> |
||||
<widget class="QLabel" name="lbl_comment"> |
||||
<property name="text"> |
||||
<string>Comment:</string> |
||||
</property> |
||||
<property name="alignment"> |
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
||||
</property> |
||||
<property name="buddy"> |
||||
<cstring>txt_comment</cstring> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item row="2" column="1"> |
||||
<widget class="QTextEdit" name="txt_comment"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="acceptRichText"> |
||||
<bool>false</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item row="0" column="1"> |
||||
<widget class="QTextEdit" name="trackers_list"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="acceptRichText"> |
||||
<bool>false</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item row="1" column="1"> |
||||
<widget class="QTextEdit" name="URLSeeds_list"> |
||||
<property name="acceptRichText"> |
||||
<bool>false</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<layout class="QHBoxLayout"> |
||||
<item> |
||||
<widget class="QLabel" name="txtPieceSize"> |
||||
<property name="text"> |
||||
<string>Piece size:</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QComboBox" name="comboPieceSize"> |
||||
<property name="enabled"> |
||||
<bool>false</bool> |
||||
</property> |
||||
<property name="editable"> |
||||
<bool>false</bool> |
||||
</property> |
||||
<property name="currentIndex"> |
||||
<number>3</number> |
||||
</property> |
||||
<item> |
||||
<property name="text"> |
||||
<string>32 KiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>64 KiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>128 KiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>256 KiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>512 KiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>1 MiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>2 MiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>4 MiB</string> |
||||
</property> |
||||
</item> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QCheckBox" name="checkAutoPieceSize"> |
||||
<property name="text"> |
||||
<string>Auto</string> |
||||
</property> |
||||
<property name="checked"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<spacer> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>40</width> |
||||
<height>20</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<widget class="QCheckBox" name="check_private"> |
||||
<property name="text"> |
||||
<string>Private (won't be distributed on DHT network if enabled)</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QCheckBox" name="checkStartSeeding"> |
||||
<property name="text"> |
||||
<string>Start seeding after creation</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QLabel" name="progressLbl"> |
||||
<property name="text"> |
||||
<string>Progress:</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QProgressBar" name="progressBar"> |
||||
<property name="value"> |
||||
<number>0</number> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<layout class="QHBoxLayout"> |
||||
<property name="spacing"> |
||||
<number>6</number> |
||||
</property> |
||||
<property name="margin"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<spacer> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>131</width> |
||||
<height>31</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="createButton"> |
||||
<property name="text"> |
||||
<string>Create and save...</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="cancelButton"> |
||||
<property name="text"> |
||||
<string>Cancel</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<spacer> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>40</width> |
||||
<height>20</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<resources> |
||||
<include location="../icons.qrc"/> |
||||
</resources> |
||||
<connections/> |
||||
</ui> |
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
INCLUDEPATH += $$PWD |
||||
|
||||
FORMS += $$PWD/createtorrent.ui |
||||
|
||||
HEADERS += $$PWD/torrentcreatordlg.h \ |
||||
$$PWD/torrentcreatorthread.h |
||||
|
||||
SOURCES += $$PWD/torrentcreatordlg.cpp \ |
||||
$$PWD/torrentcreatorthread.cpp |
||||
|
@ -0,0 +1,123 @@
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt4 and libtorrent. |
||||
* Copyright (C) 2010 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. |
||||
* |
||||
* 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 |
||||
*/ |
||||
|
||||
#include <boost/filesystem/operations.hpp> |
||||
#include <boost/filesystem/path.hpp> |
||||
#include <boost/filesystem/fstream.hpp> |
||||
#include <boost/bind.hpp> |
||||
|
||||
#include <libtorrent/version.hpp> |
||||
#include <libtorrent/entry.hpp> |
||||
#include <libtorrent/bencode.hpp> |
||||
#include <libtorrent/torrent_info.hpp> |
||||
#include <libtorrent/file.hpp> |
||||
#include <libtorrent/storage.hpp> |
||||
#include <libtorrent/hasher.hpp> |
||||
#include <libtorrent/file_pool.hpp> |
||||
#include <libtorrent/create_torrent.hpp> |
||||
#include <QFile> |
||||
|
||||
#include "torrentcreatorthread.h" |
||||
#include "misc.h" |
||||
|
||||
using namespace libtorrent; |
||||
using namespace boost::filesystem; |
||||
|
||||
// do not include files and folders whose
|
||||
// name starts with a .
|
||||
bool file_filter(boost::filesystem::path const& filename) |
||||
{ |
||||
if (filename.leaf()[0] == '.') return false; |
||||
std::cerr << filename << std::endl; |
||||
return true; |
||||
} |
||||
|
||||
void TorrentCreatorThread::create(QString _input_path, QString _save_path, QStringList _trackers, QStringList _url_seeds, QString _comment, bool _is_private, int _piece_size) |
||||
{ |
||||
input_path = _input_path; |
||||
save_path = _save_path; |
||||
if(QFile(save_path).exists()) |
||||
misc::safeRemove(save_path); |
||||
trackers = _trackers; |
||||
url_seeds = _url_seeds; |
||||
comment = _comment; |
||||
is_private = _is_private; |
||||
piece_size = _piece_size; |
||||
path::default_name_check(no_check); |
||||
abort = false; |
||||
start(); |
||||
} |
||||
|
||||
void sendProgressUpdateSignal(int i, int num, TorrentCreatorThread *parent){ |
||||
parent->sendProgressSignal((int)(i*100./(float)num)); |
||||
} |
||||
|
||||
void TorrentCreatorThread::sendProgressSignal(int progress) { |
||||
emit updateProgress(progress); |
||||
} |
||||
|
||||
void TorrentCreatorThread::run() { |
||||
emit updateProgress(0); |
||||
char const* creator_str = "qBittorrent "VERSION; |
||||
try { |
||||
file_storage fs; |
||||
path full_path = complete(path(input_path.toUtf8().constData())); |
||||
// Adding files to the torrent
|
||||
add_files(fs, full_path, file_filter); |
||||
if(abort) return; |
||||
create_torrent t(fs, piece_size); |
||||
|
||||
// Add url seeds
|
||||
foreach(const QString &seed, url_seeds){ |
||||
t.add_url_seed(seed.trimmed().toLocal8Bit().data()); |
||||
} |
||||
foreach(const QString &tracker, trackers) { |
||||
t.add_tracker(tracker.trimmed().toLocal8Bit().data()); |
||||
} |
||||
if(abort) return; |
||||
// calculate the hash for all pieces
|
||||
set_piece_hashes(t, full_path.branch_path(), boost::bind<void>(&sendProgressUpdateSignal, _1, t.num_pieces(), this)); |
||||
// Set qBittorrent as creator and add user comment to
|
||||
// torrent_info structure
|
||||
t.set_creator(creator_str); |
||||
t.set_comment((const char*)comment.toUtf8()); |
||||
// Is private ?
|
||||
t.set_priv(is_private); |
||||
if(abort) return; |
||||
// create the torrent and print it to out
|
||||
ofstream out(complete(path((const char*)save_path.toUtf8())), std::ios_base::binary); |
||||
bencode(std::ostream_iterator<char>(out), t.generate()); |
||||
emit updateProgress(100); |
||||
emit creationSuccess(save_path, QString::fromUtf8(full_path.branch_path().string().c_str())); |
||||
} |
||||
catch (std::exception& e){ |
||||
emit creationFailure(QString::fromUtf8(e.what())); |
||||
} |
||||
} |
@ -0,0 +1,73 @@
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt4 and libtorrent. |
||||
* Copyright (C) 2010 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. |
||||
* |
||||
* 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 |
||||
*/ |
||||
|
||||
#ifndef TORRENTCREATORTHREAD_H |
||||
#define TORRENTCREATORTHREAD_H |
||||
|
||||
#include <QThread> |
||||
#include <QStringList> |
||||
#include <QDialog> |
||||
|
||||
class TorrentCreatorThread : public QThread { |
||||
Q_OBJECT |
||||
|
||||
public: |
||||
TorrentCreatorThread(QDialog *_parent) { |
||||
parent = _parent; |
||||
} |
||||
~TorrentCreatorThread() { |
||||
abort = true; |
||||
wait(); |
||||
} |
||||
void create(QString _input_path, QString _save_path, QStringList _trackers, QStringList _url_seeds, QString _comment, bool _is_private, int _piece_size); |
||||
void sendProgressSignal(int progress); |
||||
void abortCreation() { abort = true; } |
||||
|
||||
protected: |
||||
void run(); |
||||
|
||||
signals: |
||||
void creationFailure(QString msg); |
||||
void creationSuccess(QString path, QString branch_path); |
||||
void updateProgress(int progress); |
||||
|
||||
private: |
||||
QString input_path; |
||||
QString save_path; |
||||
QStringList trackers; |
||||
QStringList url_seeds; |
||||
QString comment; |
||||
bool is_private; |
||||
int piece_size; |
||||
bool abort; |
||||
QDialog *parent; |
||||
}; |
||||
|
||||
#endif // TORRENTCREATORTHREAD_H
|
@ -1,545 +0,0 @@
@@ -1,545 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<ui version="4.0"> |
||||
<class>createTorrentDialog</class> |
||||
<widget class="QDialog" name="createTorrentDialog"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>592</width> |
||||
<height>658</height> |
||||
</rect> |
||||
</property> |
||||
<property name="windowTitle"> |
||||
<string>Torrent Creation Tool</string> |
||||
</property> |
||||
<layout class="QVBoxLayout"> |
||||
<item> |
||||
<widget class="QLabel" name="createTorrent_title"> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>0</width> |
||||
<height>27</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>16777215</width> |
||||
<height>27</height> |
||||
</size> |
||||
</property> |
||||
<property name="font"> |
||||
<font> |
||||
<family>Sans Serif</family> |
||||
<pointsize>14</pointsize> |
||||
<weight>75</weight> |
||||
<italic>false</italic> |
||||
<bold>true</bold> |
||||
<underline>false</underline> |
||||
<strikeout>false</strikeout> |
||||
</font> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Torrent file creation</string> |
||||
</property> |
||||
<property name="alignment"> |
||||
<set>Qt::AlignCenter</set> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QLabel" name="lbl_input"> |
||||
<property name="text"> |
||||
<string>File or folder to add to the torrent:</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QLineEdit" name="textInputPath"/> |
||||
</item> |
||||
<item> |
||||
<layout class="QHBoxLayout"> |
||||
<item> |
||||
<widget class="QPushButton" name="addFile_button"> |
||||
<property name="text"> |
||||
<string>Add file</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../icons.qrc"> |
||||
<normaloff>:/Icons/oxygen/document-new.png</normaloff>:/Icons/oxygen/document-new.png</iconset> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="addFolder_button"> |
||||
<property name="text"> |
||||
<string>Add folder</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../icons.qrc"> |
||||
<normaloff>:/Icons/oxygen/folder-new.png</normaloff>:/Icons/oxygen/folder-new.png</iconset> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<layout class="QHBoxLayout"> |
||||
<item> |
||||
<layout class="QVBoxLayout"> |
||||
<item> |
||||
<widget class="QLabel" name="lbl_announce_url"> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>0</width> |
||||
<height>102</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>16777215</width> |
||||
<height>70</height> |
||||
</size> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Announce urls (trackers):</string> |
||||
</property> |
||||
<property name="buddy"> |
||||
<cstring></cstring> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QLabel" name="urlSeeds_lbl"> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>0</width> |
||||
<height>101</height> |
||||
</size> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Web seeds urls (optional):</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QLabel" name="lbl_comment"> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>0</width> |
||||
<height>102</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>16777215</width> |
||||
<height>102</height> |
||||
</size> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Comment (optional):</string> |
||||
</property> |
||||
<property name="buddy"> |
||||
<cstring>txt_comment</cstring> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<layout class="QVBoxLayout"> |
||||
<item> |
||||
<layout class="QHBoxLayout"> |
||||
<property name="spacing"> |
||||
<number>6</number> |
||||
</property> |
||||
<property name="margin"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<widget class="QListWidget" name="trackers_list"> |
||||
<property name="selectionMode"> |
||||
<enum>QAbstractItemView::MultiSelection</enum> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<layout class="QVBoxLayout"> |
||||
<property name="spacing"> |
||||
<number>6</number> |
||||
</property> |
||||
<property name="margin"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<spacer> |
||||
<property name="orientation"> |
||||
<enum>Qt::Vertical</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>20</width> |
||||
<height>16</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="addTracker_button"> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>22</width> |
||||
<height>22</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>22</width> |
||||
<height>22</height> |
||||
</size> |
||||
</property> |
||||
<property name="text"> |
||||
<string/> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../icons.qrc"> |
||||
<normaloff>:/Icons/oxygen/list-add.png</normaloff>:/Icons/oxygen/list-add.png</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>18</width> |
||||
<height>18</height> |
||||
</size> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="removeTracker_button"> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>22</width> |
||||
<height>22</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>22</width> |
||||
<height>22</height> |
||||
</size> |
||||
</property> |
||||
<property name="text"> |
||||
<string/> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../icons.qrc"> |
||||
<normaloff>:/Icons/oxygen/list-remove.png</normaloff>:/Icons/oxygen/list-remove.png</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>18</width> |
||||
<height>18</height> |
||||
</size> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<spacer> |
||||
<property name="orientation"> |
||||
<enum>Qt::Vertical</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>20</width> |
||||
<height>16</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<layout class="QHBoxLayout"> |
||||
<property name="spacing"> |
||||
<number>6</number> |
||||
</property> |
||||
<property name="margin"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<widget class="QListWidget" name="URLSeeds_list"> |
||||
<property name="selectionMode"> |
||||
<enum>QAbstractItemView::MultiSelection</enum> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<layout class="QVBoxLayout"> |
||||
<property name="spacing"> |
||||
<number>6</number> |
||||
</property> |
||||
<property name="margin"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<spacer> |
||||
<property name="orientation"> |
||||
<enum>Qt::Vertical</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>20</width> |
||||
<height>16</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="addURLSeed_button"> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>22</width> |
||||
<height>22</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>22</width> |
||||
<height>22</height> |
||||
</size> |
||||
</property> |
||||
<property name="text"> |
||||
<string/> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../icons.qrc"> |
||||
<normaloff>:/Icons/oxygen/list-add.png</normaloff>:/Icons/oxygen/list-add.png</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>18</width> |
||||
<height>18</height> |
||||
</size> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="removeURLSeed_button"> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>22</width> |
||||
<height>22</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>22</width> |
||||
<height>22</height> |
||||
</size> |
||||
</property> |
||||
<property name="text"> |
||||
<string/> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../icons.qrc"> |
||||
<normaloff>:/Icons/oxygen/list-remove.png</normaloff>:/Icons/oxygen/list-remove.png</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>18</width> |
||||
<height>18</height> |
||||
</size> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<spacer> |
||||
<property name="orientation"> |
||||
<enum>Qt::Vertical</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>20</width> |
||||
<height>16</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<widget class="QTextEdit" name="txt_comment"> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>421</width> |
||||
<height>102</height> |
||||
</size> |
||||
</property> |
||||
<property name="acceptRichText"> |
||||
<bool>false</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<layout class="QHBoxLayout"> |
||||
<item> |
||||
<widget class="QLabel" name="txtPieceSize"> |
||||
<property name="text"> |
||||
<string>Piece size:</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QComboBox" name="comboPieceSize"> |
||||
<property name="currentIndex"> |
||||
<number>3</number> |
||||
</property> |
||||
<item> |
||||
<property name="text"> |
||||
<string>32 KiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>64 KiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>128 KiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>256 KiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>512 KiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>1 MiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>2 MiB</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>4 MiB</string> |
||||
</property> |
||||
</item> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<spacer> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>40</width> |
||||
<height>20</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<widget class="QCheckBox" name="check_private"> |
||||
<property name="text"> |
||||
<string>Private (won't be distributed on DHT network if enabled)</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QCheckBox" name="checkStartSeeding"> |
||||
<property name="text"> |
||||
<string>Start seeding after creation</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QLabel" name="progressLbl"> |
||||
<property name="text"> |
||||
<string>Progress:</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QProgressBar" name="progressBar"> |
||||
<property name="value"> |
||||
<number>0</number> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<layout class="QHBoxLayout"> |
||||
<property name="spacing"> |
||||
<number>6</number> |
||||
</property> |
||||
<property name="margin"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<spacer> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>131</width> |
||||
<height>31</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="createButton"> |
||||
<property name="text"> |
||||
<string>Create and save...</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="cancelButton"> |
||||
<property name="text"> |
||||
<string>Cancel</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<spacer> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>40</width> |
||||
<height>20</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<resources> |
||||
<include location="../icons.qrc"/> |
||||
</resources> |
||||
<connections/> |
||||
</ui> |
Loading…
Reference in new issue