use new settings dialog API
This commit is contained in:
parent
b2a14b8260
commit
b6a636cf8a
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>General options page</string>
|
||||
<string>Auto correction</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox { font-weight: bold };</string>
|
||||
|
|
|
@ -2,8 +2,16 @@
|
|||
<ui version="4.0">
|
||||
<class>QtGui::EditorDbQueryOptionsPage</class>
|
||||
<widget class="QWidget" name="QtGui::EditorDbQueryOptionsPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>222</width>
|
||||
<height>74</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>General options page</string>
|
||||
<string>MusicBrainz</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox { font-weight: bold };</string>
|
||||
|
@ -48,7 +56,4 @@
|
|||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="usageButtonGroup"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
<string>Fields</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
|
|
|
@ -2,8 +2,16 @@
|
|||
<ui version="4.0">
|
||||
<class>QtGui::EditorGeneralOptionPage</class>
|
||||
<widget class="QWidget" name="QtGui::EditorGeneralOptionPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>468</width>
|
||||
<height>374</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>General options page</string>
|
||||
<string>General</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox { font-weight: bold };</string>
|
||||
|
@ -28,7 +36,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="enableWithinDirRadioButton">
|
||||
<property name="text">
|
||||
<string>Yes, but only if both files are in the same directory</string>
|
||||
<string>Yes, but only if both files are in the sa&me directory</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">usageButtonGroup</string>
|
||||
|
@ -38,7 +46,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="enableForAllRadioButton">
|
||||
<property name="text">
|
||||
<string>Yes, regardless where the files are stored</string>
|
||||
<string>Yes, &regardless where the files are stored</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">usageButtonGroup</string>
|
||||
|
@ -57,14 +65,14 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="multipleTagsOneEditorRadioButton">
|
||||
<property name="text">
|
||||
<string>Use one editor for tags with the same target</string>
|
||||
<string>Use one editor for ta&gs with the same target</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="multipleTagsSeparateEditorsRadioButton">
|
||||
<property name="text">
|
||||
<string>Use always separate editors</string>
|
||||
<string>Use always se&parate editors</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
<string>Temp files</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>General options page</string>
|
||||
<string>General</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox { font-weight: bold };</string>
|
||||
|
|
|
@ -2,6 +2,14 @@
|
|||
<ui version="4.0">
|
||||
<class>QtGui::FileLayoutPage</class>
|
||||
<widget class="QWidget" name="QtGui::FileLayoutPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>315</width>
|
||||
<height>544</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -9,7 +17,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
<string>File layout</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox { font-weight: bold };</string>
|
||||
|
@ -181,7 +189,7 @@ another position would prevent rewriting the entire file</string>
|
|||
<item>
|
||||
<widget class="QRadioButton" name="indexPosBeforeDataRadioButton">
|
||||
<property name="text">
|
||||
<string>befo&re (media) data / at the beginning of the file</string>
|
||||
<string>before (media) data / at the be&ginning of the file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -2,8 +2,16 @@
|
|||
<ui version="4.0">
|
||||
<class>QtGui::Id3v1OptionPage</class>
|
||||
<widget class="QWidget" name="QtGui::Id3v1OptionPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>357</width>
|
||||
<height>168</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>ID3v1 options page</string>
|
||||
<string>ID3v1</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox { font-weight: bold };</string>
|
||||
|
@ -18,7 +26,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="alwaysCreateRadioButton">
|
||||
<property name="text">
|
||||
<string>Always create an ID3v1 tag</string>
|
||||
<string>Always &create an ID3v1 tag</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">usageButtonGroup</string>
|
||||
|
@ -28,7 +36,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="keepExistingRadioButton">
|
||||
<property name="text">
|
||||
<string>Keep and update existing ID3v1 tag (but don't create a new one)</string>
|
||||
<string>Kee&p and update existing ID3v1 tag (but don't create a new one)</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">usageButtonGroup</string>
|
||||
|
@ -38,7 +46,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="removeExistingRadioButton">
|
||||
<property name="text">
|
||||
<string>Remove existing ID3v1 tag</string>
|
||||
<string>&Remove existing ID3v1 tag</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">usageButtonGroup</string>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>ID3v2 options page</string>
|
||||
<string>ID3v2</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox { font-weight: bold };</string>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="usageButtonGroup"/>
|
||||
<buttongroup name="multipleSucessiveButtonGroup"/>
|
||||
<buttongroup name="versionButtonGroup"/>
|
||||
<buttongroup name="multipleSucessiveButtonGroup"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Info options page</string>
|
||||
<string>File info</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox { font-weight: bold };</string>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <qtutilities/settingsdialog/optioncategory.h>
|
||||
#include <qtutilities/settingsdialog/optioncategorymodel.h>
|
||||
#include <qtutilities/settingsdialog/qtsettings.h>
|
||||
|
||||
#include <QFileDialog>
|
||||
|
||||
|
@ -22,17 +23,13 @@ using namespace Media;
|
|||
namespace QtGui {
|
||||
|
||||
// FileBrowserGeneralOptionPage
|
||||
FileBrowserGeneralOptionPage::FileBrowserGeneralOptionPage()
|
||||
FileBrowserGeneralOptionPage::FileBrowserGeneralOptionPage(QWidget *parentWidget) :
|
||||
FileBrowserGeneralOptionPageBase(parentWidget)
|
||||
{}
|
||||
|
||||
FileBrowserGeneralOptionPage::~FileBrowserGeneralOptionPage()
|
||||
{}
|
||||
|
||||
QString FileBrowserGeneralOptionPage::displayName() const
|
||||
{
|
||||
return QApplication::translate("QtGui::FileBrowserGeneralOptionPage", "General");
|
||||
}
|
||||
|
||||
bool FileBrowserGeneralOptionPage::apply()
|
||||
{
|
||||
if(hasBeenShown()) {
|
||||
|
@ -51,17 +48,13 @@ void FileBrowserGeneralOptionPage::reset()
|
|||
}
|
||||
|
||||
// EditorGeneralOptionPage
|
||||
EditorGeneralOptionPage::EditorGeneralOptionPage()
|
||||
EditorGeneralOptionPage::EditorGeneralOptionPage(QWidget *parentWidget) :
|
||||
EditorGeneralOptionPageBase(parentWidget)
|
||||
{}
|
||||
|
||||
EditorGeneralOptionPage::~EditorGeneralOptionPage()
|
||||
{}
|
||||
|
||||
QString EditorGeneralOptionPage::displayName() const
|
||||
{
|
||||
return QApplication::translate("QtGui::EditorGeneralOptionPage", "General");
|
||||
}
|
||||
|
||||
bool EditorGeneralOptionPage::apply()
|
||||
{
|
||||
if(hasBeenShown()) {
|
||||
|
@ -114,17 +107,12 @@ void EditorGeneralOptionPage::reset()
|
|||
|
||||
// EditorTempOptionPage
|
||||
EditorTempOptionPage::EditorTempOptionPage(QWidget *parentWindow) :
|
||||
UiFileBasedOptionPage<Ui::EditorTempOptionPage>(parentWindow)
|
||||
EditorTempOptionPageBase(parentWindow)
|
||||
{}
|
||||
|
||||
EditorTempOptionPage::~EditorTempOptionPage()
|
||||
{}
|
||||
|
||||
QString EditorTempOptionPage::displayName() const
|
||||
{
|
||||
return QApplication::translate("QtGui::EditorTempOptionPage", "Temp files");
|
||||
}
|
||||
|
||||
bool EditorTempOptionPage::apply()
|
||||
{
|
||||
if(hasBeenShown()) {
|
||||
|
@ -142,7 +130,7 @@ void EditorTempOptionPage::reset()
|
|||
|
||||
QWidget *EditorTempOptionPage::setupWidget()
|
||||
{
|
||||
auto *widget = UiFileBasedOptionPage<Ui::EditorTempOptionPage>::setupWidget();
|
||||
auto *widget = EditorTempOptionPageBase::setupWidget();
|
||||
QObject::connect(ui()->selectPushButton, &QPushButton::clicked, std::bind(&EditorTempOptionPage::showDirectorySelection, this));
|
||||
ui()->notificationLabel->setText(QApplication::tr("Currently this directory must be on the same partition as the files you want to edit."));
|
||||
ui()->notificationLabel->setNotificationType(NotificationType::Information);
|
||||
|
@ -162,18 +150,13 @@ void EditorTempOptionPage::showDirectorySelection()
|
|||
}
|
||||
|
||||
// EditorFieldsOptionPage
|
||||
EditorFieldsOptionPage::EditorFieldsOptionPage() :
|
||||
EditorFieldsOptionPage::EditorFieldsOptionPage(QWidget *parentWidget) :
|
||||
m_model(nullptr)
|
||||
{}
|
||||
|
||||
EditorFieldsOptionPage::~EditorFieldsOptionPage()
|
||||
{}
|
||||
|
||||
QString EditorFieldsOptionPage::displayName() const
|
||||
{
|
||||
return QApplication::translate("QtGui::EditorFieldsOptionPage", "Fields");
|
||||
}
|
||||
|
||||
bool EditorFieldsOptionPage::apply()
|
||||
{
|
||||
if(hasBeenShown() && m_model) {
|
||||
|
@ -191,7 +174,7 @@ void EditorFieldsOptionPage::reset()
|
|||
|
||||
QWidget *EditorFieldsOptionPage::setupWidget()
|
||||
{
|
||||
auto *w = UiFileBasedOptionPage<Ui::EditorFieldsOptionPage>::setupWidget();
|
||||
auto *w = EditorFieldsOptionPageBase::setupWidget();
|
||||
if(!m_model) {
|
||||
m_model = new KnownFieldModel(w);
|
||||
}
|
||||
|
@ -200,18 +183,14 @@ QWidget *EditorFieldsOptionPage::setupWidget()
|
|||
}
|
||||
|
||||
// EditorAutoCorrectionOptionPage
|
||||
EditorAutoCorrectionOptionPage::EditorAutoCorrectionOptionPage() :
|
||||
EditorAutoCorrectionOptionPage::EditorAutoCorrectionOptionPage(QWidget *parentWidget) :
|
||||
EditorAutoCorrectionOptionPageBase(parentWidget),
|
||||
m_model(nullptr)
|
||||
{}
|
||||
|
||||
EditorAutoCorrectionOptionPage::~EditorAutoCorrectionOptionPage()
|
||||
{}
|
||||
|
||||
QString EditorAutoCorrectionOptionPage::displayName() const
|
||||
{
|
||||
return QApplication::translate("QtGui::EditorAutoCorrectionOptionPage", "Auto correction/completion");
|
||||
}
|
||||
|
||||
bool EditorAutoCorrectionOptionPage::apply()
|
||||
{
|
||||
if(hasBeenShown()) {
|
||||
|
@ -241,7 +220,7 @@ void EditorAutoCorrectionOptionPage::reset()
|
|||
|
||||
QWidget *EditorAutoCorrectionOptionPage::setupWidget()
|
||||
{
|
||||
auto *w = UiFileBasedOptionPage<Ui::EditorAutoCorrectionOptionPage>::setupWidget();
|
||||
auto *w = EditorAutoCorrectionOptionPageBase::setupWidget();
|
||||
if(!m_model) {
|
||||
m_model = new KnownFieldModel(w);
|
||||
}
|
||||
|
@ -250,17 +229,13 @@ QWidget *EditorAutoCorrectionOptionPage::setupWidget()
|
|||
}
|
||||
|
||||
// EditorDbQueryOptionsPage
|
||||
EditorDbQueryOptionsPage::EditorDbQueryOptionsPage()
|
||||
EditorDbQueryOptionsPage::EditorDbQueryOptionsPage(QWidget *parentWidget) :
|
||||
EditorDbQueryOptionsPageBase(parentWidget)
|
||||
{}
|
||||
|
||||
EditorDbQueryOptionsPage::~EditorDbQueryOptionsPage()
|
||||
{}
|
||||
|
||||
QString EditorDbQueryOptionsPage::displayName() const
|
||||
{
|
||||
return QApplication::translate("QtGui::EditorDbQueryOptionsPage", "Database queries");
|
||||
}
|
||||
|
||||
bool EditorDbQueryOptionsPage::apply()
|
||||
{
|
||||
if(hasBeenShown()) {
|
||||
|
@ -279,17 +254,13 @@ void EditorDbQueryOptionsPage::reset()
|
|||
}
|
||||
|
||||
// InfoOptionPage
|
||||
InfoOptionPage::InfoOptionPage()
|
||||
InfoOptionPage::InfoOptionPage(QWidget *parentWidget) :
|
||||
InfoOptionPageBase(parentWidget)
|
||||
{}
|
||||
|
||||
InfoOptionPage::~InfoOptionPage()
|
||||
{}
|
||||
|
||||
QString InfoOptionPage::displayName() const
|
||||
{
|
||||
return QApplication::translate("QtGui::InfoOptionPage", "Info");
|
||||
}
|
||||
|
||||
bool InfoOptionPage::apply()
|
||||
{
|
||||
if(hasBeenShown()) {
|
||||
|
@ -306,17 +277,13 @@ void InfoOptionPage::reset()
|
|||
}
|
||||
|
||||
// TagProcessingGeneralOptionPage
|
||||
TagProcessingGeneralOptionPage::TagProcessingGeneralOptionPage()
|
||||
TagProcessingGeneralOptionPage::TagProcessingGeneralOptionPage(QWidget *parentWidget) :
|
||||
TagProcessingGeneralOptionPageBase(parentWidget)
|
||||
{}
|
||||
|
||||
TagProcessingGeneralOptionPage::~TagProcessingGeneralOptionPage()
|
||||
{}
|
||||
|
||||
QString TagProcessingGeneralOptionPage::displayName() const
|
||||
{
|
||||
return QApplication::translate("QtGui::TagProcessingGeneralOptionPage", "General");
|
||||
}
|
||||
|
||||
bool TagProcessingGeneralOptionPage::apply()
|
||||
{
|
||||
if(hasBeenShown()) {
|
||||
|
@ -375,17 +342,13 @@ void TagProcessingGeneralOptionPage::reset()
|
|||
}
|
||||
|
||||
// Id3v1OptionPage
|
||||
Id3v1OptionPage::Id3v1OptionPage()
|
||||
Id3v1OptionPage::Id3v1OptionPage(QWidget *parentWidget) :
|
||||
Id3v1OptionPageBase(parentWidget)
|
||||
{}
|
||||
|
||||
Id3v1OptionPage::~Id3v1OptionPage()
|
||||
{}
|
||||
|
||||
QString Id3v1OptionPage::displayName() const
|
||||
{
|
||||
return QApplication::translate("QtGui::Id3v1OptionPage", "ID3v1");
|
||||
}
|
||||
|
||||
bool Id3v1OptionPage::apply()
|
||||
{
|
||||
if(hasBeenShown()) {
|
||||
|
@ -418,17 +381,13 @@ void Id3v1OptionPage::reset()
|
|||
}
|
||||
|
||||
// Id3v2OptionPage
|
||||
Id3v2OptionPage::Id3v2OptionPage()
|
||||
Id3v2OptionPage::Id3v2OptionPage(QWidget *parentWidget) :
|
||||
Id3v2OptionPageBase(parentWidget)
|
||||
{}
|
||||
|
||||
Id3v2OptionPage::~Id3v2OptionPage()
|
||||
{}
|
||||
|
||||
QString Id3v2OptionPage::displayName() const
|
||||
{
|
||||
return QApplication::translate("QtGui::Id3v2OptionPage", "ID3v2");
|
||||
}
|
||||
|
||||
bool Id3v2OptionPage::apply()
|
||||
{
|
||||
if(hasBeenShown()) {
|
||||
|
@ -487,26 +446,28 @@ void Id3v2OptionPage::reset()
|
|||
}
|
||||
|
||||
// FileLayoutPage
|
||||
FileLayoutPage::FileLayoutPage()
|
||||
FileLayoutPage::FileLayoutPage(QWidget *parentWidget) :
|
||||
FileLayoutPageBase(parentWidget)
|
||||
{}
|
||||
|
||||
FileLayoutPage::~FileLayoutPage()
|
||||
{}
|
||||
|
||||
QString FileLayoutPage::displayName() const
|
||||
{
|
||||
return QApplication::translate("QtGui::FileLayoutPage", "File layout");
|
||||
}
|
||||
|
||||
bool FileLayoutPage::apply()
|
||||
{
|
||||
// error handling
|
||||
errors().clear();
|
||||
bool ok = true;
|
||||
|
||||
if(hasBeenShown()) {
|
||||
Settings::forceRewrite() = ui()->forceRewriteCheckBox->isChecked();
|
||||
if(ui()->minPaddingSpinBox->value() > ui()->maxPaddingSpinBox->value()) {
|
||||
return false;
|
||||
errors() << QCoreApplication::translate("QtGui::FileLayoutPage", "Minimum padding must be less or equal than maximum padding.");
|
||||
ok = false;
|
||||
} else {
|
||||
Settings::maxPadding() = static_cast<size_t>(ui()->maxPaddingSpinBox->value());
|
||||
Settings::minPadding() = static_cast<size_t>(ui()->minPaddingSpinBox->value());
|
||||
}
|
||||
Settings::maxPadding() = static_cast<size_t>(ui()->maxPaddingSpinBox->value());
|
||||
Settings::minPadding() = static_cast<size_t>(ui()->minPaddingSpinBox->value());
|
||||
Settings::preferredPadding() = static_cast<size_t>(ui()->preferredPaddingSpinBox->value());
|
||||
if(ui()->tagPosBeforeDataRadioButton->isChecked()) {
|
||||
preferredTagPosition() = ElementPosition::BeforeData;
|
||||
|
@ -525,7 +486,7 @@ bool FileLayoutPage::apply()
|
|||
}
|
||||
forceIndexPosition() = ui()->indexPosForceCheckBox->isChecked();
|
||||
}
|
||||
return true;
|
||||
return ok;
|
||||
}
|
||||
|
||||
void FileLayoutPage::reset()
|
||||
|
@ -564,7 +525,7 @@ void FileLayoutPage::reset()
|
|||
|
||||
QWidget *FileLayoutPage::setupWidget()
|
||||
{
|
||||
auto *widget = Dialogs::UiFileBasedOptionPage<Ui::FileLayoutPage>::setupWidget();
|
||||
auto *widget = FileLayoutPageBase::setupWidget();
|
||||
ui()->preferredTagPosLabel->setNotificationType(NotificationType::Warning);
|
||||
ui()->preferredTagPosLabel->setText(QApplication::translate("QtGui::FileLayoutPage", "These options might be ignored if not supported by either the format or the implementation."));
|
||||
QObject::connect(ui()->minPaddingSpinBox, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged), ui()->maxPaddingSpinBox, &QSpinBox::setMinimum);
|
||||
|
@ -607,6 +568,9 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
|
|||
category->setIcon(QIcon::fromTheme(QStringLiteral("view-list-tree"), QIcon(QStringLiteral(":/tageditor/icons/hicolor/32x32/settingscategories/system-file-manager.png"))));
|
||||
category->assignPages(QList<Dialogs::OptionPage *>() << new FileBrowserGeneralOptionPage);
|
||||
categories << category;
|
||||
|
||||
categories << Dialogs::qtOptionCategory(this);
|
||||
|
||||
categoryModel()->setCategories(categories);
|
||||
|
||||
setMinimumSize(800, 450);
|
||||
|
@ -616,5 +580,4 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
|
|||
SettingsDialog::~SettingsDialog()
|
||||
{}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -24,197 +24,36 @@ class KnownFieldModel;
|
|||
|
||||
namespace QtGui {
|
||||
|
||||
// FileBrowserGeneralOptionPage
|
||||
namespace Ui {
|
||||
class FileBrowserGeneralOptionPage;
|
||||
}
|
||||
DECLARE_UI_FILE_BASED_OPTION_PAGE(FileBrowserGeneralOptionPage)
|
||||
|
||||
class FileBrowserGeneralOptionPage : public Dialogs::UiFileBasedOptionPage<Ui::FileBrowserGeneralOptionPage>
|
||||
{
|
||||
public:
|
||||
explicit FileBrowserGeneralOptionPage();
|
||||
~FileBrowserGeneralOptionPage();
|
||||
DECLARE_UI_FILE_BASED_OPTION_PAGE(EditorGeneralOptionPage)
|
||||
|
||||
QString displayName() const;
|
||||
bool apply();
|
||||
void reset();
|
||||
};
|
||||
|
||||
// EditorGeneralOptionPage
|
||||
namespace Ui {
|
||||
class EditorGeneralOptionPage;
|
||||
}
|
||||
|
||||
class EditorGeneralOptionPage : public Dialogs::UiFileBasedOptionPage<Ui::EditorGeneralOptionPage>
|
||||
{
|
||||
public:
|
||||
explicit EditorGeneralOptionPage();
|
||||
~EditorGeneralOptionPage();
|
||||
|
||||
QString displayName() const;
|
||||
bool apply();
|
||||
void reset();
|
||||
};
|
||||
|
||||
// EditorTempOptionPage
|
||||
namespace Ui {
|
||||
class EditorTempOptionPage;
|
||||
}
|
||||
|
||||
class EditorTempOptionPage : public Dialogs::UiFileBasedOptionPage<Ui::EditorTempOptionPage>
|
||||
{
|
||||
public:
|
||||
explicit EditorTempOptionPage(QWidget *parentWindow);
|
||||
~EditorTempOptionPage();
|
||||
|
||||
QString displayName() const;
|
||||
bool apply();
|
||||
void reset();
|
||||
|
||||
protected:
|
||||
QWidget *setupWidget();
|
||||
|
||||
private:
|
||||
BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE(EditorTempOptionPage)
|
||||
DECLARE_SETUP_WIDGETS
|
||||
void showDirectorySelection();
|
||||
};
|
||||
END_DECLARE_OPTION_PAGE
|
||||
|
||||
// EditorFieldsOptionPage
|
||||
namespace Ui {
|
||||
class EditorFieldsOptionPage;
|
||||
}
|
||||
|
||||
class EditorFieldsOptionPage : public Dialogs::UiFileBasedOptionPage<Ui::EditorFieldsOptionPage>
|
||||
{
|
||||
public:
|
||||
explicit EditorFieldsOptionPage();
|
||||
~EditorFieldsOptionPage();
|
||||
|
||||
QString displayName() const;
|
||||
bool apply();
|
||||
void reset();
|
||||
private:
|
||||
QWidget *setupWidget();
|
||||
BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE(EditorFieldsOptionPage)
|
||||
DECLARE_SETUP_WIDGETS
|
||||
Settings::KnownFieldModel *m_model;
|
||||
};
|
||||
END_DECLARE_OPTION_PAGE
|
||||
|
||||
// EditorAutoCorrectionOptionPage
|
||||
namespace Ui {
|
||||
class EditorAutoCorrectionOptionPage;
|
||||
}
|
||||
|
||||
class EditorAutoCorrectionOptionPage : public Dialogs::UiFileBasedOptionPage<Ui::EditorAutoCorrectionOptionPage>
|
||||
{
|
||||
public:
|
||||
explicit EditorAutoCorrectionOptionPage();
|
||||
~EditorAutoCorrectionOptionPage();
|
||||
|
||||
QString displayName() const;
|
||||
bool apply();
|
||||
void reset();
|
||||
private:
|
||||
QWidget *setupWidget();
|
||||
BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE(EditorAutoCorrectionOptionPage)
|
||||
DECLARE_SETUP_WIDGETS
|
||||
Settings::KnownFieldModel *m_model;
|
||||
};
|
||||
END_DECLARE_OPTION_PAGE
|
||||
|
||||
// EditorDbQueryOptionPage
|
||||
namespace Ui {
|
||||
class EditorDbQueryOptionsPage;
|
||||
}
|
||||
DECLARE_UI_FILE_BASED_OPTION_PAGE(EditorDbQueryOptionsPage)
|
||||
|
||||
class EditorDbQueryOptionsPage : public Dialogs::UiFileBasedOptionPage<Ui::EditorDbQueryOptionsPage>
|
||||
{
|
||||
public:
|
||||
explicit EditorDbQueryOptionsPage();
|
||||
~EditorDbQueryOptionsPage();
|
||||
DECLARE_UI_FILE_BASED_OPTION_PAGE(InfoOptionPage)
|
||||
|
||||
QString displayName() const;
|
||||
bool apply();
|
||||
void reset();
|
||||
};
|
||||
DECLARE_UI_FILE_BASED_OPTION_PAGE(TagProcessingGeneralOptionPage)
|
||||
|
||||
// EditorInfoOptionPage
|
||||
namespace Ui {
|
||||
class InfoOptionPage;
|
||||
}
|
||||
DECLARE_UI_FILE_BASED_OPTION_PAGE(Id3v1OptionPage)
|
||||
|
||||
class InfoOptionPage : public Dialogs::UiFileBasedOptionPage<Ui::InfoOptionPage>
|
||||
{
|
||||
public:
|
||||
explicit InfoOptionPage();
|
||||
~InfoOptionPage();
|
||||
DECLARE_UI_FILE_BASED_OPTION_PAGE(Id3v2OptionPage)
|
||||
|
||||
QString displayName() const;
|
||||
bool apply();
|
||||
void reset();
|
||||
};
|
||||
|
||||
|
||||
// TagProcessingGeneralOptionPage
|
||||
namespace Ui {
|
||||
class TagProcessingGeneralOptionPage;
|
||||
}
|
||||
|
||||
class TagProcessingGeneralOptionPage : public Dialogs::UiFileBasedOptionPage<Ui::TagProcessingGeneralOptionPage>
|
||||
{
|
||||
public:
|
||||
explicit TagProcessingGeneralOptionPage();
|
||||
~TagProcessingGeneralOptionPage();
|
||||
|
||||
QString displayName() const;
|
||||
bool apply();
|
||||
void reset();
|
||||
};
|
||||
|
||||
// Id3v1OptionPage
|
||||
namespace Ui {
|
||||
class Id3v1OptionPage;
|
||||
}
|
||||
|
||||
class Id3v1OptionPage : public Dialogs::UiFileBasedOptionPage<Ui::Id3v1OptionPage>
|
||||
{
|
||||
public:
|
||||
explicit Id3v1OptionPage();
|
||||
~Id3v1OptionPage();
|
||||
|
||||
QString displayName() const;
|
||||
bool apply();
|
||||
void reset();
|
||||
};
|
||||
|
||||
// Id3v2OptionPage
|
||||
namespace Ui {
|
||||
class Id3v2OptionPage;
|
||||
}
|
||||
|
||||
class Id3v2OptionPage : public Dialogs::UiFileBasedOptionPage<Ui::Id3v2OptionPage>
|
||||
{
|
||||
public:
|
||||
explicit Id3v2OptionPage();
|
||||
~Id3v2OptionPage();
|
||||
|
||||
QString displayName() const;
|
||||
bool apply();
|
||||
void reset();
|
||||
};
|
||||
|
||||
// FileLayoutPage
|
||||
namespace Ui {
|
||||
class FileLayoutPage;
|
||||
}
|
||||
|
||||
class FileLayoutPage : public Dialogs::UiFileBasedOptionPage<Ui::FileLayoutPage>
|
||||
{
|
||||
public:
|
||||
explicit FileLayoutPage();
|
||||
~FileLayoutPage();
|
||||
|
||||
QString displayName() const;
|
||||
bool apply();
|
||||
void reset();
|
||||
|
||||
private:
|
||||
QWidget *setupWidget();
|
||||
};
|
||||
DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_SETUP(FileLayoutPage)
|
||||
|
||||
class SettingsDialog : public Dialogs::SettingsDialog
|
||||
{
|
||||
|
@ -222,7 +61,6 @@ class SettingsDialog : public Dialogs::SettingsDialog
|
|||
public:
|
||||
explicit SettingsDialog(QWidget *parent = nullptr);
|
||||
~SettingsDialog();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -2,8 +2,16 @@
|
|||
<ui version="4.0">
|
||||
<class>QtGui::TagProcessingGeneralOptionPage</class>
|
||||
<widget class="QWidget" name="QtGui::TagProcessingGeneralOptionPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>361</width>
|
||||
<height>398</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>General options page</string>
|
||||
<string>General</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox { font-weight: bold };</string>
|
||||
|
@ -18,7 +26,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="autoRadioButton">
|
||||
<property name="text">
|
||||
<string>no preference (most appropriate encoding will be used)</string>
|
||||
<string>&no preference (most appropriate encoding will be used)</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">preferredTextEncodingButtonGroup</string>
|
||||
|
@ -28,7 +36,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="latin1RadioButton">
|
||||
<property name="text">
|
||||
<string>ISO 8859-1/Latin-1</string>
|
||||
<string>ISO &8859-1/Latin-1</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">preferredTextEncodingButtonGroup</string>
|
||||
|
@ -48,7 +56,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="utf16leRadioButton">
|
||||
<property name="text">
|
||||
<string>UTF-16 Little Endian</string>
|
||||
<string>UTF-&16 Little Endian</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">preferredTextEncodingButtonGroup</string>
|
||||
|
@ -58,7 +66,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="utf16beRadioButton">
|
||||
<property name="text">
|
||||
<string>UTF-16 Big Endian</string>
|
||||
<string>UTF-1&6 Big Endian</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -74,7 +82,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="ignoreUnsupportedRadioButton">
|
||||
<property name="text">
|
||||
<string>Ignore them but keep them when saving</string>
|
||||
<string>Ignore &them but keep them when saving</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">unsupportedButtonGroup</string>
|
||||
|
@ -84,7 +92,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="discardUnsupportedRadioButton">
|
||||
<property name="text">
|
||||
<string>Discard them when saving</string>
|
||||
<string>Dis&card them when saving</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">unsupportedButtonGroup</string>
|
||||
|
|
Loading…
Reference in New Issue