mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 22:14:32 +00:00
Cleanup downloadfromurldlg, statsdialog
This commit is contained in:
parent
933f9f1451
commit
73047e3c84
@ -47,7 +47,7 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{
|
|||||||
setupUi(this);
|
setupUi(this);
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
setModal(true);
|
setModal(true);
|
||||||
show();
|
|
||||||
// Paste clipboard if there is an URL in it
|
// Paste clipboard if there is an URL in it
|
||||||
QString clip_txt = qApp->clipboard()->text();
|
QString clip_txt = qApp->clipboard()->text();
|
||||||
QStringList clip_txt_list = clip_txt.split(QString::fromUtf8("\n"));
|
QStringList clip_txt_list = clip_txt.split(QString::fromUtf8("\n"));
|
||||||
@ -71,6 +71,8 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{
|
|||||||
}
|
}
|
||||||
if (clip_txt_list_cleaned.size() > 0)
|
if (clip_txt_list_cleaned.size() > 0)
|
||||||
textUrls->setText(clip_txt_list_cleaned.join("\n"));
|
textUrls->setText(clip_txt_list_cleaned.join("\n"));
|
||||||
|
|
||||||
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
~downloadFromURL() {}
|
~downloadFromURL() {}
|
||||||
@ -93,7 +95,7 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!url_list_cleaned.size()) {
|
if (!url_list_cleaned.size()) {
|
||||||
QMessageBox::warning(0, tr("No URL entered"), tr("Please type at least one URL."));
|
QMessageBox::warning(this, tr("No URL entered"), tr("Please type at least one URL."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit urlsReadyToBeDownloaded(url_list_cleaned);
|
emit urlsReadyToBeDownloaded(url_list_cleaned);
|
||||||
|
@ -11,11 +11,9 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Download from urls</string>
|
<string>Download from URLs</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout">
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="downloadURL_lbl">
|
<widget class="QLabel" name="downloadURL_lbl">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@ -29,33 +27,25 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="textUrls">
|
<widget class="QTextEdit" name="textUrls">
|
||||||
<property name="acceptRichText">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="tabChangesFocus">
|
<property name="tabChangesFocus">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="acceptRichText">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_infos">
|
<widget class="QLabel" name="label_infos">
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>17</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<italic>true</italic>
|
<italic>true</italic>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>One per line (HTTP links, Magnet links and info-hashes are supported)</string>
|
<string>One link per line (HTTP links, Magnet links and info-hashes are supported)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -52,7 +52,6 @@ class TransferListFiltersWidget;
|
|||||||
class PropertiesWidget;
|
class PropertiesWidget;
|
||||||
class StatusBar;
|
class StatusBar;
|
||||||
class TorrentCreatorDlg;
|
class TorrentCreatorDlg;
|
||||||
class downloadFromURL;
|
|
||||||
class LineEdit;
|
class LineEdit;
|
||||||
class ExecutionLog;
|
class ExecutionLog;
|
||||||
class PowerManagement;
|
class PowerManagement;
|
||||||
|
@ -44,12 +44,13 @@ StatsDialog::StatsDialog(QWidget *parent)
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
connect(ui->buttonOK, SIGNAL(clicked()), SLOT(close()));
|
connect(ui->buttonBox, SIGNAL(accepted()), SLOT(close()));
|
||||||
updateUI();
|
updateUI();
|
||||||
t = new QTimer(this);
|
t = new QTimer(this);
|
||||||
t->setInterval(1500);
|
t->setInterval(1500);
|
||||||
connect(t, SIGNAL(timeout()), SLOT(updateUI()));
|
connect(t, SIGNAL(timeout()), SLOT(updateUI()));
|
||||||
t->start();
|
t->start();
|
||||||
|
|
||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class StatsDialog : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StatsDialog(QWidget *parent = 0);
|
explicit StatsDialog(QWidget *parent);
|
||||||
~StatsDialog();
|
~StatsDialog();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>273</width>
|
<width>286</width>
|
||||||
<height>395</height>
|
<height>401</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -223,30 +223,13 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<item>
|
<property name="standardButtons">
|
||||||
<spacer name="horizontalSpacer">
|
<set>QDialogButtonBox::Ok</set>
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="buttonOK">
|
|
||||||
<property name="text">
|
|
||||||
<string>OK</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user