mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +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);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
setModal(true);
|
||||
show();
|
||||
|
||||
// Paste clipboard if there is an URL in it
|
||||
QString clip_txt = qApp->clipboard()->text();
|
||||
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)
|
||||
textUrls->setText(clip_txt_list_cleaned.join("\n"));
|
||||
|
||||
show();
|
||||
}
|
||||
|
||||
~downloadFromURL() {}
|
||||
@ -93,7 +95,7 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
emit urlsReadyToBeDownloaded(url_list_cleaned);
|
||||
|
@ -11,11 +11,9 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Download from urls</string>
|
||||
<string>Download from URLs</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="downloadURL_lbl">
|
||||
<property name="font">
|
||||
@ -29,33 +27,25 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textUrls">
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="tabChangesFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_infos">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>17</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<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>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -52,7 +52,6 @@ class TransferListFiltersWidget;
|
||||
class PropertiesWidget;
|
||||
class StatusBar;
|
||||
class TorrentCreatorDlg;
|
||||
class downloadFromURL;
|
||||
class LineEdit;
|
||||
class ExecutionLog;
|
||||
class PowerManagement;
|
||||
|
@ -44,12 +44,13 @@ StatsDialog::StatsDialog(QWidget *parent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
connect(ui->buttonOK, SIGNAL(clicked()), SLOT(close()));
|
||||
connect(ui->buttonBox, SIGNAL(accepted()), SLOT(close()));
|
||||
updateUI();
|
||||
t = new QTimer(this);
|
||||
t->setInterval(1500);
|
||||
connect(t, SIGNAL(timeout()), SLOT(updateUI()));
|
||||
t->start();
|
||||
|
||||
show();
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class StatsDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit StatsDialog(QWidget *parent = 0);
|
||||
explicit StatsDialog(QWidget *parent);
|
||||
~StatsDialog();
|
||||
|
||||
private slots:
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>273</width>
|
||||
<height>395</height>
|
||||
<width>286</width>
|
||||
<height>401</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -223,30 +223,13 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<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>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
Loading…
Reference in New Issue
Block a user