diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2017-02-23 18:04:22 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2017-02-23 18:04:22 +0000 |
| commit | 982ba7c68908ac12fec3c50b77a7e3394cf4a11c (patch) | |
| tree | 92b56a2067b30750e35f61148d48c94b6c8f5989 /src/plugins/Effect | |
| parent | 8c9e5b47082b7ce93f8946a3af15820d225c7973 (diff) | |
| download | qmmp-982ba7c68908ac12fec3c50b77a7e3394cf4a11c.tar.gz qmmp-982ba7c68908ac12fec3c50b77a7e3394cf4a11c.tar.bz2 qmmp-982ba7c68908ac12fec3c50b77a7e3394cf4a11c.zip | |
added file writer plugin
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7044 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Effect')
| -rw-r--r-- | src/plugins/Effect/Effect.pro | 1 | ||||
| -rw-r--r-- | src/plugins/Effect/filewriter/effectfilewriterfactory.cpp | 66 | ||||
| -rw-r--r-- | src/plugins/Effect/filewriter/effectfilewriterfactory.h | 44 | ||||
| -rw-r--r-- | src/plugins/Effect/filewriter/filewriter.pro | 34 | ||||
| -rw-r--r-- | src/plugins/Effect/filewriter/filewriterplugin.cpp | 209 | ||||
| -rw-r--r-- | src/plugins/Effect/filewriter/filewriterplugin.h | 56 | ||||
| -rw-r--r-- | src/plugins/Effect/filewriter/settingsdialog.cpp | 88 | ||||
| -rw-r--r-- | src/plugins/Effect/filewriter/settingsdialog.h | 49 | ||||
| -rw-r--r-- | src/plugins/Effect/filewriter/settingsdialog.ui | 143 |
9 files changed, 690 insertions, 0 deletions
diff --git a/src/plugins/Effect/Effect.pro b/src/plugins/Effect/Effect.pro index 417c06baa..5a1cc69f7 100644 --- a/src/plugins/Effect/Effect.pro +++ b/src/plugins/Effect/Effect.pro @@ -5,6 +5,7 @@ SUBDIRS += crossfade stereo contains(CONFIG, BS2B_PLUGIN):SUBDIRS += bs2b contains(CONFIG, SOXR_PLUGIN):SUBDIRS += soxr +contains(CONFIG, FILEWRITER_PLUGIN):SUBDIRS += filewriter unix { contains(CONFIG, LADSPA_PLUGIN):SUBDIRS += ladspa diff --git a/src/plugins/Effect/filewriter/effectfilewriterfactory.cpp b/src/plugins/Effect/filewriter/effectfilewriterfactory.cpp new file mode 100644 index 000000000..6a1592a9d --- /dev/null +++ b/src/plugins/Effect/filewriter/effectfilewriterfactory.cpp @@ -0,0 +1,66 @@ +/*************************************************************************** + * Copyright (C) 2017 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * 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. * + ***************************************************************************/ + +#include <QMessageBox> +#include <QTranslator> +#include <QtPlugin> +#include <qmmp/qmmp.h> +#include "filewriterplugin.h" +#include "settingsdialog.h" +#include "effectfilewriterfactory.h" + +const EffectProperties EffectFileWriterFactory::properties() const +{ + EffectProperties properties; + properties.name = tr("File Writer Plugin"); + properties.shortName = "filewriter"; + properties.hasSettings = true; + properties.hasAbout = true; + properties.priority = EffectProperties::EFFECT_PRIORITY_LOW; + return properties; +} + +Effect *EffectFileWriterFactory::create() +{ + return new FileWriterPlugin(); +} + +void EffectFileWriterFactory::showSettings(QWidget *parent) +{ + SettingsDialog *dialog = new SettingsDialog(parent); + dialog->show(); +} + +void EffectFileWriterFactory::showAbout(QWidget *parent) +{ + QMessageBox::about (parent, tr("About File Writer Plugin"), + tr("Qmmp File Writer Plugin")+"\n"+ + tr("Written by: Ilya Kotov <forkotov02@hotmail.ru>")); +} + +QTranslator *EffectFileWriterFactory::createTranslator(QObject *parent) +{ + QTranslator *translator = new QTranslator(parent); + QString locale = Qmmp::systemLanguageID(); + translator->load(QString(":/filewriter_plugin_") + locale); + return translator; +} + +Q_EXPORT_PLUGIN2(filewriter,EffectFileWriterFactory) diff --git a/src/plugins/Effect/filewriter/effectfilewriterfactory.h b/src/plugins/Effect/filewriter/effectfilewriterfactory.h new file mode 100644 index 000000000..7aecba9ec --- /dev/null +++ b/src/plugins/Effect/filewriter/effectfilewriterfactory.h @@ -0,0 +1,44 @@ +/*************************************************************************** + * Copyright (C) 2017 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * 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. * + ***************************************************************************/ +#ifndef EFFECTFILEWRITERFACTORY_H +#define EFFECTFILEWRITERFACTORY_H + +#include <QObject> +#include <qmmp/effectfactory.h> +#include <qmmp/effect.h> + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +class EffectFileWriterFactory : public QObject, public EffectFactory +{ +Q_OBJECT +Q_INTERFACES(EffectFactory) + +public: + const EffectProperties properties() const; + Effect *create(); + void showSettings(QWidget *parent); + void showAbout(QWidget *parent); + QTranslator *createTranslator(QObject *parent); +}; + + +#endif diff --git a/src/plugins/Effect/filewriter/filewriter.pro b/src/plugins/Effect/filewriter/filewriter.pro new file mode 100644 index 000000000..bc3784640 --- /dev/null +++ b/src/plugins/Effect/filewriter/filewriter.pro @@ -0,0 +1,34 @@ +include(../../plugins.pri) + +HEADERS += effectfilewriterfactory.h \ + filewriterplugin.h \ + settingsdialog.h + +SOURCES += effectfilewriterfactory.cpp \ + filewriterplugin.cpp \ + settingsdialog.cpp + +TARGET =$$PLUGINS_PREFIX/Effect/filewriter + +CONFIG += warn_on plugin link_pkgconfig + +TEMPLATE = lib + +#RESOURCES = translations/translations.qrc + +unix { + target.path = $$LIB_DIR/qmmp/Effect + INSTALLS += target + + LIBS += -lqmmp + QMAKE_CLEAN =$$PLUGINS_PREFIX/Effect/libfilewriter.so + PKGCONFIG += ogg vorbis vorbisenc +} + +win32 { + LIBS += -lqmmp0 +} + +FORMS += \ + settingsdialog.ui + diff --git a/src/plugins/Effect/filewriter/filewriterplugin.cpp b/src/plugins/Effect/filewriter/filewriterplugin.cpp new file mode 100644 index 000000000..b9de0196c --- /dev/null +++ b/src/plugins/Effect/filewriter/filewriterplugin.cpp @@ -0,0 +1,209 @@ +/*************************************************************************** + * Copyright (C) 2017 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * 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. * + ***************************************************************************/ + +#include <QSettings> +#include <QDesktopServices> +#include <time.h> +#include <qmmp/soundcore.h> +#include <qmmpui/metadataformatter.h> +#include "filewriterplugin.h" + +FileWriterPlugin::FileWriterPlugin() +{ + qsrand(time(NULL)); + m_inited = false; +} + +FileWriterPlugin::~FileWriterPlugin() +{ + deinit(); +} + +void FileWriterPlugin::configure(quint32 srate, ChannelMap map) +{ + Effect::configure(srate, map); + if(SoundCore::instance()->state() == Qmmp::Playing || SoundCore::instance()->state() == Qmmp::Paused) + init(SoundCore::instance()->metaData()); +} + +void FileWriterPlugin::applyEffect(Buffer *b) +{ + if(!b->metaData.isNull()) + init(*b->metaData); + + if(!m_inited) + return; + + int frames = b->samples / channels(); + float **buffer = vorbis_analysis_buffer(&m_vd, frames); + + for(int i = 0; i < frames; i++) + { + for(int c = 0; c < channels(); ++c) + buffer[c][i] = b->data[i * channels() + c]; + } + + vorbis_analysis_wrote(&m_vd, frames); + + bool ok = true; + + while(ok && vorbis_analysis_blockout(&m_vd, &m_vb) == 1) + { + // analysis, assume we want to use bitrate management + vorbis_analysis(&m_vb, NULL); + vorbis_bitrate_addblock(&m_vb); + + while(ok && vorbis_bitrate_flushpacket(&m_vd, &m_op)) + { + // weld the packet into the bitstream + ogg_stream_packetin(&m_os, &m_op); + // write out pages (if any) + bool eos = false; + while(!eos) + { + if(ogg_stream_pageout(&m_os, &m_og)) + { + + if(m_file.write((char*)m_og.header, m_og.header_len) != m_og.header_len) + { + ok = false; + break; + } + + if(m_file.write((char*)m_og.body, m_og.body_len) != m_og.body_len) + { + ok = false; + break; + } + + eos = (ogg_page_eos(&m_og) != 0); + } + else + { + eos = true; + } + } + } + } + + if(!ok) + { + qWarning("FileWriterPlugin: unable to write file: output disabled"); + deinit(); + } +} + +void FileWriterPlugin::init(const QMap<Qmmp::MetaData, QString> &metaData) +{ + deinit(); + + QSettings settings(Qmmp::configFile(), QSettings::IniFormat); + float quality = settings.value("FileWriter/vorbis_quality", 0.8).toFloat(); + QString outDir = QDesktopServices::storageLocation(QDesktopServices::MusicLocation); + outDir = settings.value("FileWriter/out_dir", outDir).toString(); + QString fileName = settings.value("FileWriter/file_name", "%p%if(%p&%t, - ,)%t").toString(); + if(fileName.isEmpty()) + fileName = metaData[Qmmp::URL].section("/", 1); + + MetaDataFormatter formatter(fileName); + fileName = formatter.format(metaData, SoundCore::instance()->totalTime() / 1000); + if(!fileName.endsWith(".ogg", Qt::CaseInsensitive)) + fileName.append(".ogg"); + + m_file.setFileName(outDir + "/" + fileName); + + int j = 1; + while(m_file.exists()) + { + m_file.setFileName(outDir + "/" + fileName.left(fileName.count() - 4) + + QString("-%1.ogg").arg(j)); + } + + qDebug("FileWriterPlugin: writing file '%s'", qPrintable(m_file.fileName())); + + if(!m_file.open(QIODevice::WriteOnly)) + { + qWarning("FileWriterPlugin: unable to create output file, error: %s", + qPrintable(m_file.errorString())); + return; + } + + vorbis_info_init(&m_vi); + vorbis_encode_init_vbr(&m_vi, channels(), sampleRate(), quality); + vorbis_comment_init(&m_vc); + vorbis_analysis_init(&m_vd, &m_vi); + vorbis_block_init(&m_vd,&m_vb); + ogg_stream_init(&m_os,qrand()); + vorbis_comment_clear(&m_vc); + + static const struct + { + Qmmp::MetaData key; + const char *tag; + } tag_map[] = { + { Qmmp::TITLE, "title"}, + { Qmmp::ARTIST, "artist"}, + { Qmmp::ALBUM, "album"}, + { Qmmp::COMMENT, "comment"}, + { Qmmp::GENRE, "genre"}, + { Qmmp::TRACK, "tracknumber"}, + { Qmmp::YEAR, "date"}, + { Qmmp::COMPOSER, "composer"}, + { Qmmp::DISCNUMBER, "discnumber"}, + { Qmmp::UNKNOWN, 0} + }; + + int i = 0; + while(tag_map[i].key != Qmmp::UNKNOWN) + { + if(!metaData[tag_map[i].key].isEmpty()) + vorbis_comment_add_tag(&m_vc, tag_map[i].tag, metaData.value(tag_map[i].key).toUtf8().constData()); + i++; + } + + sendHeader(); + m_inited = true; +} + +void FileWriterPlugin::deinit() +{ + if(m_inited) + { + ogg_stream_clear(&m_os); + vorbis_block_clear(&m_vb); + vorbis_dsp_clear(&m_vd); + vorbis_comment_clear(&m_vc); + vorbis_info_clear(&m_vi); + m_file.close(); + m_inited = false; + } +} + +void FileWriterPlugin::sendHeader() +{ + ogg_packet header; + ogg_packet header_comm; + ogg_packet header_code; + + vorbis_analysis_headerout(&m_vd, &m_vc, &header, &header_comm, &header_code); + ogg_stream_packetin(&m_os, &header); // automatically placed in its own page + ogg_stream_packetin(&m_os, &header_comm); + ogg_stream_packetin(&m_os, &header_code); +} diff --git a/src/plugins/Effect/filewriter/filewriterplugin.h b/src/plugins/Effect/filewriter/filewriterplugin.h new file mode 100644 index 000000000..a19f15c6e --- /dev/null +++ b/src/plugins/Effect/filewriter/filewriterplugin.h @@ -0,0 +1,56 @@ +/*************************************************************************** + * Copyright (C) 2017 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * 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. * + ***************************************************************************/ + +#ifndef FILEWRITERPLUGIN_H +#define FILEWRITERPLUGIN_H + +#include <QMap> +#include <QFile> +#include <qmmp/effect.h> +#include <qmmp/qmmp.h> +#include <vorbis/vorbisenc.h> + +class FileWriterPlugin : public Effect +{ +public: + FileWriterPlugin(); + virtual ~FileWriterPlugin(); + + void configure(quint32 srate, ChannelMap map); + void applyEffect(Buffer *b); + +private: + void init(const QMap<Qmmp::MetaData, QString> &metaData); + void deinit(); + void sendHeader(); + + ogg_stream_state m_os; //take physical pages, weld into a logical stream of packets + ogg_page m_og; //one Ogg bitstream page. Vorbis packets are inside */ + ogg_packet m_op; //one raw packet of data for decode + vorbis_info m_vi; //struct that stores all the static vorbis bitstream settings + vorbis_comment m_vc; //struct that stores all the user comments + vorbis_dsp_state m_vd; //central working state for the packet->PCM decoder + vorbis_block m_vb; //local working space for packet->PCM decode + bool m_inited; + QFile m_file; + +}; + +#endif // FILEWRITERPLUGIN_H diff --git a/src/plugins/Effect/filewriter/settingsdialog.cpp b/src/plugins/Effect/filewriter/settingsdialog.cpp new file mode 100644 index 000000000..424c1dc91 --- /dev/null +++ b/src/plugins/Effect/filewriter/settingsdialog.cpp @@ -0,0 +1,88 @@ +/*************************************************************************** + * Copyright (C) 2017 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * 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. * + ***************************************************************************/ + +#include <QSettings> +#include <QDesktopServices> +#include <QMenu> +#include <qmmp/qmmp.h> +#include <qmmpui/filedialog.h> +#include "settingsdialog.h" + +SettingsDialog::SettingsDialog(QWidget *parent) + : QDialog(parent) +{ + m_ui.setupUi(this); + setAttribute(Qt::WA_DeleteOnClose, true); + + QMenu *fileNameMenu = new QMenu(this); + fileNameMenu->addAction(tr("Artist"))->setData("%p"); + fileNameMenu->addAction(tr("Album"))->setData("%a"); + fileNameMenu->addAction(tr("Album Artist"))->setData("%aa"); + fileNameMenu->addAction(tr("Title"))->setData("%t"); + fileNameMenu->addAction(tr("Track Number"))->setData("%n"); + fileNameMenu->addAction(tr("Two-digit Track Number"))->setData("%NN"); + fileNameMenu->addAction(tr("Genre"))->setData("%g"); + fileNameMenu->addAction(tr("Comment"))->setData("%c"); + fileNameMenu->addAction(tr("Composer"))->setData("%C"); + fileNameMenu->addAction(tr("Duration"))->setData("%l"); + fileNameMenu->addAction(tr("Disc Number"))->setData("%D"); + fileNameMenu->addAction(tr("File Name"))->setData("%f"); + fileNameMenu->addAction(tr("File Path"))->setData("%F"); + fileNameMenu->addAction(tr("Year"))->setData("%y"); + fileNameMenu->addAction(tr("Condition"))->setData("%p%if(%p&%t, - ,)%t"); + m_ui.fileNameButton->setMenu(fileNameMenu); + m_ui.fileNameButton->setPopupMode(QToolButton::InstantPopup); + connect(fileNameMenu, SIGNAL(triggered(QAction *)), SLOT(addTitleString(QAction *))); + + QSettings settings(Qmmp::configFile(), QSettings::IniFormat); + QString outDir = QDesktopServices::storageLocation(QDesktopServices::MusicLocation); + m_ui.outDirEdit->setText(settings.value("FileWriter/out_dir", outDir).toString()); + m_ui.outFileEdit->setText(settings.value("FileWriter/file_name", "%p%if(%p&%t, - ,)%t").toString()); + m_ui.qualitySpinBox->setValue(settings.value("FileWriter/vorbis_quality", 0.8).toFloat()); +} + +SettingsDialog::~SettingsDialog() +{ +} + +void SettingsDialog::accept() +{ + QSettings settings(Qmmp::configFile(), QSettings::IniFormat); + settings.setValue("FileWriter/out_dir", m_ui.outDirEdit->text()); + settings.setValue("FileWriter/file_name", m_ui.outFileEdit->text()); + settings.setValue("FileWriter/vorbis_quality", m_ui.qualitySpinBox->value()); + QDialog::accept(); +} + +void SettingsDialog::addTitleString(QAction *a) +{ + if (m_ui.outFileEdit->cursorPosition () < 1) + m_ui.outFileEdit->insert(a->data().toString()); + else + m_ui.outFileEdit->insert(" - "+a->data().toString()); +} + +void SettingsDialog::on_dirButton_clicked() +{ + QString dir = FileDialog::getExistingDirectory(this, tr("Choose a directory"), + m_ui.outDirEdit->text()); + if(!dir.isEmpty()) + m_ui.outDirEdit->setText(dir); +} diff --git a/src/plugins/Effect/filewriter/settingsdialog.h b/src/plugins/Effect/filewriter/settingsdialog.h new file mode 100644 index 000000000..f90900abf --- /dev/null +++ b/src/plugins/Effect/filewriter/settingsdialog.h @@ -0,0 +1,49 @@ +/*************************************************************************** + * Copyright (C) 2017 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * 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. * + ***************************************************************************/ +#ifndef SETTINGSDIALOG_H +#define SETTINGSDIALOG_H + +#include <QDialog> +#include "ui_settingsdialog.h" + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +class SettingsDialog : public QDialog +{ +Q_OBJECT +public: + SettingsDialog(QWidget *parent = 0); + + ~SettingsDialog(); + +public slots: + virtual void accept(); + +private slots: + void addTitleString(QAction *a); + void on_dirButton_clicked(); + +private: + Ui::SettingsDialog m_ui; + +}; + +#endif diff --git a/src/plugins/Effect/filewriter/settingsdialog.ui b/src/plugins/Effect/filewriter/settingsdialog.ui new file mode 100644 index 000000000..87dc4b0e8 --- /dev/null +++ b/src/plugins/Effect/filewriter/settingsdialog.ui @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>SettingsDialog</class> + <widget class="QDialog" name="SettingsDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>405</width> + <height>146</height> + </rect> + </property> + <property name="windowTitle"> + <string>File Writer Plugin Settings</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <property name="leftMargin"> + <number>6</number> + </property> + <property name="rightMargin"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>6</number> + </property> + <item row="0" column="0"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Output directory:</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLineEdit" name="outDirEdit"/> + </item> + <item row="0" column="2"> + <widget class="QToolButton" name="dirButton"> + <property name="text"> + <string notr="true">...</string> + </property> + </widget> + </item> + <item row="2" column="1" colspan="2"> + <widget class="QDoubleSpinBox" name="qualitySpinBox"> + <property name="minimum"> + <double>0.200000000000000</double> + </property> + <property name="maximum"> + <double>1.000000000000000</double> + </property> + <property name="singleStep"> + <double>0.010000000000000</double> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Output file name:</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLineEdit" name="outFileEdit"/> + </item> + <item row="1" column="2"> + <widget class="QToolButton" name="fileNameButton"> + <property name="text"> + <string notr="true">...</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_6"> + <property name="text"> + <string>Quality:</string> + </property> + </widget> + </item> + <item row="4" column="0" colspan="3"> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + <item row="3" column="0"> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>SettingsDialog</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>270</x> + <y>76</y> + </hint> + <hint type="destinationlabel"> + <x>91</x> + <y>88</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>SettingsDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>326</x> + <y>78</y> + </hint> + <hint type="destinationlabel"> + <x>139</x> + <y>60</y> + </hint> + </hints> + </connection> + </connections> +</ui> |
