Skip to content

Commit

Permalink
合并输出mp4文件名设置
Browse files Browse the repository at this point in the history
  • Loading branch information
orestonce committed Sep 19, 2024
1 parent 1076b8f commit 675a989
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
9 changes: 9 additions & 0 deletions m3u8d-qt/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,3 +378,12 @@ void MainWindow::on_pushButton_TsTempDir_clicked()
QString dir = QFileDialog::getExistingDirectory(this, "", saveDir);
ui->lineEdit_TsTempDir->setText(dir);
}

void MainWindow::on_pushButton_SetOutputMp4Name_clicked()
{
QString mp4Name = QFileDialog::getSaveFileName(this, "", ui->lineEdit_mergeDir->text(), "(*.mp4)");
if(mp4Name.isEmpty()) {
return;
}
ui->lineEdit_mergeFileName->setText(mp4Name);
}
2 changes: 2 additions & 0 deletions m3u8d-qt/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ private slots:

void on_pushButton_TsTempDir_clicked();

void on_pushButton_SetOutputMp4Name_clicked();

private:
void updateDownloadUi(bool runing);
void updateMergeUi(bool runing);
Expand Down
36 changes: 27 additions & 9 deletions m3u8d-qt/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -345,17 +345,23 @@
<item row="0" column="2">
<widget class="QToolButton" name="toolButton_selectMergeDir">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
Expand Down Expand Up @@ -388,17 +394,29 @@
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<widget class="QPushButton" name="pushButton_SetOutputMp4Name">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<property name="minimumSize">
<size>
<width>40</width>
<height>20</height>
<width>60</width>
<height>0</height>
</size>
</property>
</spacer>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
Expand Down

0 comments on commit 675a989

Please sign in to comment.