Torrent Example▲
Sélectionnez
&
lt;ui version=
"4.0"
&
gt;
&
lt;author&
gt;&
lt;/
author&
gt;
&
lt;comment&
gt;&
lt;/
comment&
gt;
&
lt;exportmacro&
gt;&
lt;/
exportmacro&
gt;
&
lt;class
&
gt;AddTorrentFile&
lt;/
class
&
gt;
&
lt;widget class
=
"QDialog"
name=
"AddTorrentFile"
&
gt;
&
lt;property name=
"geometry"
&
gt;
&
lt;rect&
gt;
&
lt;x&
gt;0
&
lt;/
x&
gt;
&
lt;y&
gt;0
&
lt;/
y&
gt;
&
lt;width&
gt;464
&
lt;/
width&
gt;
&
lt;height&
gt;385
&
lt;/
height&
gt;
&
lt;/
rect&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"windowTitle"
&
gt;
&
lt;string&
gt;Add a torrent&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"sizeGripEnabled"
&
gt;
&
lt;bool
&
gt;false
&
lt;/
bool
&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"modal"
&
gt;
&
lt;bool
&
gt;true
&
lt;/
bool
&
gt;
&
lt;/
property&
gt;
&
lt;layout class
=
"QVBoxLayout"
&
gt;
&
lt;property name=
"margin"
&
gt;
&
lt;number&
gt;8
&
lt;/
number&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"spacing"
&
gt;
&
lt;number&
gt;6
&
lt;/
number&
gt;
&
lt;/
property&
gt;
&
lt;item&
gt;
&
lt;widget class
=
"QGroupBox"
name=
"groupBox"
&
gt;
&
lt;property name=
"title"
&
gt;
&
lt;string&
gt;Select a torrent source&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;layout class
=
"QGridLayout"
&
gt;
&
lt;property name=
"margin"
&
gt;
&
lt;number&
gt;8
&
lt;/
number&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"spacing"
&
gt;
&
lt;number&
gt;6
&
lt;/
number&
gt;
&
lt;/
property&
gt;
&
lt;item row=
"6"
column=
"0"
&
gt;
&
lt;widget class
=
"QLabel"
name=
"label_4"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;Destination:&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"0"
column=
"1"
colspan=
"2"
&
gt;
&
lt;widget class
=
"QLineEdit"
name=
"torrentFile"
/&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"1"
column=
"0"
&
gt;
&
lt;widget class
=
"QLabel"
name=
"label_2"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;Tracker URL:&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"0"
column=
"3"
&
gt;
&
lt;widget class
=
"QPushButton"
name=
"browseTorrents"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;Browse&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"default"
&
gt;
&
lt;bool
&
gt;true
&
lt;/
bool
&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"5"
column=
"0"
&
gt;
&
lt;widget class
=
"QLabel"
name=
"label_5"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;File(s):&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"alignment"
&
gt;
&
lt;set&
gt;Qt::
AlignLeading|
Qt::
AlignLeft|
Qt::
AlignTop&
lt;/
set&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"4"
column=
"0"
&
gt;
&
lt;widget class
=
"QLabel"
name=
"label_3"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;Size:&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"2"
column=
"0"
&
gt;
&
lt;widget class
=
"QLabel"
name=
"label_6"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;Creator:&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"5"
column=
"1"
colspan=
"3"
&
gt;
&
lt;widget class
=
"QTextEdit"
name=
"torrentContents"
&
gt;
&
lt;property name=
"focusPolicy"
&
gt;
&
lt;enum
&
gt;Qt::
NoFocus&
lt;/
enum
&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"tabChangesFocus"
&
gt;
&
lt;bool
&
gt;true
&
lt;/
bool
&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"lineWrapMode"
&
gt;
&
lt;enum
&
gt;QTextEdit::
NoWrap&
lt;/
enum
&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"readOnly"
&
gt;
&
lt;bool
&
gt;true
&
lt;/
bool
&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"6"
column=
"1"
colspan=
"2"
&
gt;
&
lt;widget class
=
"QLineEdit"
name=
"destinationFolder"
&
gt;
&
lt;property name=
"focusPolicy"
&
gt;
&
lt;enum
&
gt;Qt::
StrongFocus&
lt;/
enum
&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"1"
column=
"1"
colspan=
"3"
&
gt;
&
lt;widget class
=
"QLabel"
name=
"announceUrl"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;&
amp;lt;none&
gt;&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"0"
column=
"0"
&
gt;
&
lt;widget class
=
"QLabel"
name=
"label"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;Torrent file:&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"6"
column=
"3"
&
gt;
&
lt;widget class
=
"QPushButton"
name=
"browseDestination"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;Browse&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"3"
column=
"0"
&
gt;
&
lt;widget class
=
"QLabel"
name=
"label_7"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;Comment:&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"3"
column=
"1"
colspan=
"3"
&
gt;
&
lt;widget class
=
"QLabel"
name=
"commentLabel"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;&
amp;lt;none&
gt;&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"2"
column=
"1"
colspan=
"3"
&
gt;
&
lt;widget class
=
"QLabel"
name=
"creatorLabel"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;&
amp;lt;none&
gt;&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item row=
"4"
column=
"1"
colspan=
"3"
&
gt;
&
lt;widget class
=
"QLabel"
name=
"sizeLabel"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;0
&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;/
layout&
gt;
&
lt;widget class
=
"QWidget"
name=
"widget"
&
gt;
&
lt;property name=
"geometry"
&
gt;
&
lt;rect&
gt;
&
lt;x&
gt;10
&
lt;/
x&
gt;
&
lt;y&
gt;40
&
lt;/
y&
gt;
&
lt;width&
gt;364
&
lt;/
width&
gt;
&
lt;height&
gt;33
&
lt;/
height&
gt;
&
lt;/
rect&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item&
gt;
&
lt;layout class
=
"QHBoxLayout"
&
gt;
&
lt;property name=
"margin"
&
gt;
&
lt;number&
gt;0
&
lt;/
number&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"spacing"
&
gt;
&
lt;number&
gt;6
&
lt;/
number&
gt;
&
lt;/
property&
gt;
&
lt;item&
gt;
&
lt;spacer&
gt;
&
lt;property name=
"orientation"
&
gt;
&
lt;enum
&
gt;Qt::
Horizontal&
lt;/
enum
&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"sizeHint"
&
gt;
&
lt;size&
gt;
&
lt;width&
gt;131
&
lt;/
width&
gt;
&
lt;height&
gt;31
&
lt;/
height&
gt;
&
lt;/
size&
gt;
&
lt;/
property&
gt;
&
lt;/
spacer&
gt;
&
lt;/
item&
gt;
&
lt;item&
gt;
&
lt;widget class
=
"QPushButton"
name=
"okButton"
&
gt;
&
lt;property name=
"enabled"
&
gt;
&
lt;bool
&
gt;false
&
lt;/
bool
&
gt;
&
lt;/
property&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;&
amp;amp;OK&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;item&
gt;
&
lt;widget class
=
"QPushButton"
name=
"cancelButton"
&
gt;
&
lt;property name=
"text"
&
gt;
&
lt;string&
gt;&
amp;amp;Cancel&
lt;/
string&
gt;
&
lt;/
property&
gt;
&
lt;/
widget&
gt;
&
lt;/
item&
gt;
&
lt;/
layout&
gt;
&
lt;/
item&
gt;
&
lt;/
layout&
gt;
&
lt;/
widget&
gt;
&
lt;pixmapfunction&
gt;&
lt;/
pixmapfunction&
gt;
&
lt;tabstops&
gt;
&
lt;tabstop&
gt;torrentFile&
lt;/
tabstop&
gt;
&
lt;tabstop&
gt;browseTorrents&
lt;/
tabstop&
gt;
&
lt;tabstop&
gt;torrentContents&
lt;/
tabstop&
gt;
&
lt;tabstop&
gt;destinationFolder&
lt;/
tabstop&
gt;
&
lt;tabstop&
gt;browseDestination&
lt;/
tabstop&
gt;
&
lt;tabstop&
gt;okButton&
lt;/
tabstop&
gt;
&
lt;tabstop&
gt;cancelButton&
lt;/
tabstop&
gt;
&
lt;/
tabstops&
gt;
&
lt;resources/&
gt;
&
lt;connections&
gt;
&
lt;connection&
gt;
&
lt;sender&
gt;okButton&
lt;/
sender&
gt;
&
lt;signal&
gt;clicked()&
lt;/
signal&
gt;
&
lt;receiver&
gt;AddTorrentFile&
lt;/
receiver&
gt;
&
lt;slot&
gt;accept()&
lt;/
slot&
gt;
&
lt;hints&
gt;
&
lt;hint type=
"sourcelabel"
&
gt;
&
lt;x&
gt;278
&
lt;/
x&
gt;
&
lt;y&
gt;253
&
lt;/
y&
gt;
&
lt;/
hint&
gt;
&
lt;hint type=
"destinationlabel"
&
gt;
&
lt;x&
gt;96
&
lt;/
x&
gt;
&
lt;y&
gt;254
&
lt;/
y&
gt;
&
lt;/
hint&
gt;
&
lt;/
hints&
gt;
&
lt;/
connection&
gt;
&
lt;connection&
gt;
&
lt;sender&
gt;cancelButton&
lt;/
sender&
gt;
&
lt;signal&
gt;clicked()&
lt;/
signal&
gt;
&
lt;receiver&
gt;AddTorrentFile&
lt;/
receiver&
gt;
&
lt;slot&
gt;reject()&
lt;/
slot&
gt;
&
lt;hints&
gt;
&
lt;hint type=
"sourcelabel"
&
gt;
&
lt;x&
gt;369
&
lt;/
x&
gt;
&
lt;y&
gt;253
&
lt;/
y&
gt;
&
lt;/
hint&
gt;
&
lt;hint type=
"destinationlabel"
&
gt;
&
lt;x&
gt;179
&
lt;/
x&
gt;
&
lt;y&
gt;282
&
lt;/
y&
gt;
&
lt;/
hint&
gt;
&
lt;/
hints&
gt;
&
lt;/
connection&
gt;
&
lt;/
connections&
gt;
&
lt;/
ui&
gt;