mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Text to speech settings
This commit is contained in:
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
|
|
||||||
QT += core gui winextras printsupport
|
QT += core gui winextras printsupport texttospeech
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
|
@ -36,5 +36,6 @@
|
|||||||
<file>resources/rotate-left.svg</file>
|
<file>resources/rotate-left.svg</file>
|
||||||
<file>resources/rotate-right.svg</file>
|
<file>resources/rotate-right.svg</file>
|
||||||
<file>resources/print.svg</file>
|
<file>resources/print.svg</file>
|
||||||
|
<file>resources/speech.svg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -69,6 +69,15 @@ void PDFViewerSettings::readSettings(QSettings& settings, const pdf::PDFCMSSetti
|
|||||||
m_colorManagementSystemSettings.profileDirectory = settings.value("profileDirectory", defaultCMSSettings.profileDirectory).toString();
|
m_colorManagementSystemSettings.profileDirectory = settings.value("profileDirectory", defaultCMSSettings.profileDirectory).toString();
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
|
settings.beginGroup("SpeechSettings");
|
||||||
|
m_settings.m_speechEngine = settings.value("speechEngine", defaultSettings.m_speechEngine).toString();
|
||||||
|
m_settings.m_speechLocale = settings.value("speechLocale", defaultSettings.m_speechLocale).toString();
|
||||||
|
m_settings.m_speechVoice = settings.value("speechVoice", defaultSettings.m_speechVoice).toString();
|
||||||
|
m_settings.m_speechRate = settings.value("speechRate", defaultSettings.m_speechRate).toDouble();
|
||||||
|
m_settings.m_speechPitch = settings.value("speechPitch", defaultSettings.m_speechPitch).toDouble();
|
||||||
|
m_settings.m_speechVolume = settings.value("speechVolume", defaultSettings.m_speechVolume).toDouble();
|
||||||
|
settings.endGroup();
|
||||||
|
|
||||||
emit settingsChanged();
|
emit settingsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,6 +114,15 @@ void PDFViewerSettings::writeSettings(QSettings& settings)
|
|||||||
settings.setValue("deviceCMYK", m_colorManagementSystemSettings.deviceCMYK);
|
settings.setValue("deviceCMYK", m_colorManagementSystemSettings.deviceCMYK);
|
||||||
settings.setValue("profileDirectory", m_colorManagementSystemSettings.profileDirectory);
|
settings.setValue("profileDirectory", m_colorManagementSystemSettings.profileDirectory);
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
|
settings.beginGroup("SpeechSettings");
|
||||||
|
settings.setValue("speechEngine", m_settings.m_speechEngine);
|
||||||
|
settings.setValue("speechLocale", m_settings.m_speechLocale);
|
||||||
|
settings.setValue("speechVoice", m_settings.m_speechVoice);
|
||||||
|
settings.setValue("speechRate", m_settings.m_speechRate);
|
||||||
|
settings.setValue("speechPitch", m_settings.m_speechPitch);
|
||||||
|
settings.setValue("speechVolume", m_settings.m_speechVolume);
|
||||||
|
settings.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString PDFViewerSettings::getDirectory() const
|
QString PDFViewerSettings::getDirectory() const
|
||||||
@ -205,7 +223,10 @@ PDFViewerSettings::Settings::Settings() :
|
|||||||
m_thumbnailsCacheLimit(PIXMAP_CACHE_LIMIT),
|
m_thumbnailsCacheLimit(PIXMAP_CACHE_LIMIT),
|
||||||
m_fontCacheLimit(pdf::DEFAULT_FONT_CACHE_LIMIT),
|
m_fontCacheLimit(pdf::DEFAULT_FONT_CACHE_LIMIT),
|
||||||
m_instancedFontCacheLimit(pdf::DEFAULT_REALIZED_FONT_CACHE_LIMIT),
|
m_instancedFontCacheLimit(pdf::DEFAULT_REALIZED_FONT_CACHE_LIMIT),
|
||||||
m_multithreadingStrategy(pdf::PDFExecutionPolicy::Strategy::PageMultithreaded)
|
m_multithreadingStrategy(pdf::PDFExecutionPolicy::Strategy::PageMultithreaded),
|
||||||
|
m_speechRate(0.0),
|
||||||
|
m_speechPitch(0.0),
|
||||||
|
m_speechVolume(1.0)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,14 @@ public:
|
|||||||
int m_thumbnailsCacheLimit;
|
int m_thumbnailsCacheLimit;
|
||||||
int m_fontCacheLimit;
|
int m_fontCacheLimit;
|
||||||
int m_instancedFontCacheLimit;
|
int m_instancedFontCacheLimit;
|
||||||
|
|
||||||
|
// Speech settings
|
||||||
|
QString m_speechEngine;
|
||||||
|
QString m_speechLocale;
|
||||||
|
QString m_speechVoice;
|
||||||
|
double m_speechRate;
|
||||||
|
double m_speechPitch;
|
||||||
|
double m_speechVolume;
|
||||||
};
|
};
|
||||||
|
|
||||||
const Settings& getSettings() const { return m_settings; }
|
const Settings& getSettings() const { return m_settings; }
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QListWidgetItem>
|
#include <QListWidgetItem>
|
||||||
|
#include <QTextToSpeech>
|
||||||
|
|
||||||
namespace pdfviewer
|
namespace pdfviewer
|
||||||
{
|
{
|
||||||
@ -46,6 +47,8 @@ PDFViewerSettingsDialog::PDFViewerSettingsDialog(const PDFViewerSettings::Settin
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
m_textToSpeechEngines = QTextToSpeech::availableEngines();
|
||||||
|
|
||||||
new QListWidgetItem(QIcon(":/resources/engine.svg"), tr("Engine"), ui->optionsPagesWidget, EngineSettings);
|
new QListWidgetItem(QIcon(":/resources/engine.svg"), tr("Engine"), ui->optionsPagesWidget, EngineSettings);
|
||||||
new QListWidgetItem(QIcon(":/resources/rendering.svg"), tr("Rendering"), ui->optionsPagesWidget, RenderingSettings);
|
new QListWidgetItem(QIcon(":/resources/rendering.svg"), tr("Rendering"), ui->optionsPagesWidget, RenderingSettings);
|
||||||
new QListWidgetItem(QIcon(":/resources/shading.svg"), tr("Shading"), ui->optionsPagesWidget, ShadingSettings);
|
new QListWidgetItem(QIcon(":/resources/shading.svg"), tr("Shading"), ui->optionsPagesWidget, ShadingSettings);
|
||||||
@ -54,6 +57,7 @@ PDFViewerSettingsDialog::PDFViewerSettingsDialog(const PDFViewerSettings::Settin
|
|||||||
new QListWidgetItem(QIcon(":/resources/cms.svg"), tr("Colors"), ui->optionsPagesWidget, ColorManagementSystemSettings);
|
new QListWidgetItem(QIcon(":/resources/cms.svg"), tr("Colors"), ui->optionsPagesWidget, ColorManagementSystemSettings);
|
||||||
new QListWidgetItem(QIcon(":/resources/security.svg"), tr("Security"), ui->optionsPagesWidget, SecuritySettings);
|
new QListWidgetItem(QIcon(":/resources/security.svg"), tr("Security"), ui->optionsPagesWidget, SecuritySettings);
|
||||||
new QListWidgetItem(QIcon(":/resources/ui.svg"), tr("UI"), ui->optionsPagesWidget, UISettings);
|
new QListWidgetItem(QIcon(":/resources/ui.svg"), tr("UI"), ui->optionsPagesWidget, UISettings);
|
||||||
|
new QListWidgetItem(QIcon(":/resources/speech.svg"), tr("Speech"), ui->optionsPagesWidget, SpeechSettings);
|
||||||
|
|
||||||
ui->renderingEngineComboBox->addItem(tr("Software"), static_cast<int>(pdf::RendererEngine::Software));
|
ui->renderingEngineComboBox->addItem(tr("Software"), static_cast<int>(pdf::RendererEngine::Software));
|
||||||
ui->renderingEngineComboBox->addItem(tr("Hardware accelerated (OpenGL)"), static_cast<int>(pdf::RendererEngine::OpenGL));
|
ui->renderingEngineComboBox->addItem(tr("Hardware accelerated (OpenGL)"), static_cast<int>(pdf::RendererEngine::OpenGL));
|
||||||
@ -130,6 +134,12 @@ PDFViewerSettingsDialog::PDFViewerSettingsDialog(const PDFViewerSettings::Settin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Text to speech
|
||||||
|
for (const QString& engine : m_textToSpeechEngines)
|
||||||
|
{
|
||||||
|
ui->speechEnginesComboBox->addItem(engine, engine);
|
||||||
|
}
|
||||||
|
|
||||||
ui->optionsPagesWidget->setCurrentRow(0);
|
ui->optionsPagesWidget->setCurrentRow(0);
|
||||||
adjustSize();
|
adjustSize();
|
||||||
loadData();
|
loadData();
|
||||||
@ -179,6 +189,10 @@ void PDFViewerSettingsDialog::on_optionsPagesWidget_currentItemChanged(QListWidg
|
|||||||
ui->stackedWidget->setCurrentWidget(ui->uiPage);
|
ui->stackedWidget->setCurrentWidget(ui->uiPage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SpeechSettings:
|
||||||
|
ui->stackedWidget->setCurrentWidget(ui->speechPage);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Q_ASSERT(false);
|
Q_ASSERT(false);
|
||||||
break;
|
break;
|
||||||
@ -289,6 +303,16 @@ void PDFViewerSettingsDialog::loadData()
|
|||||||
ui->cmsProfileDirectoryEdit->setEnabled(false);
|
ui->cmsProfileDirectoryEdit->setEnabled(false);
|
||||||
ui->cmsProfileDirectoryEdit->setText(QString());
|
ui->cmsProfileDirectoryEdit->setText(QString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Text-to-speech
|
||||||
|
ui->speechEnginesComboBox->setCurrentIndex(ui->speechEnginesComboBox->findData(m_settings.m_speechEngine));
|
||||||
|
QString speechEngine = ui->speechEnginesComboBox->currentData().toString();
|
||||||
|
setSpeechEngine(speechEngine);
|
||||||
|
ui->speechLocaleComboBox->setCurrentIndex(ui->speechLocaleComboBox->findData(m_settings.m_speechLocale));
|
||||||
|
ui->speechVoiceComboBox->setCurrentIndex(ui->speechVoiceComboBox->findData(m_settings.m_speechVoice));
|
||||||
|
ui->speechRateEdit->setValue(m_settings.m_speechRate);
|
||||||
|
ui->speechPitchEdit->setValue(m_settings.m_speechPitch);
|
||||||
|
ui->speechVolumeEdit->setValue(m_settings.m_speechVolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PDFViewerSettingsDialog::saveData()
|
void PDFViewerSettingsDialog::saveData()
|
||||||
@ -424,8 +448,36 @@ void PDFViewerSettingsDialog::saveData()
|
|||||||
{
|
{
|
||||||
m_otherSettings.maximumRecentFileCount = ui->maximumRecentFileCountEdit->value();
|
m_otherSettings.maximumRecentFileCount = ui->maximumRecentFileCountEdit->value();
|
||||||
}
|
}
|
||||||
|
else if (sender == ui->speechEnginesComboBox)
|
||||||
|
{
|
||||||
|
m_settings.m_speechEngine = ui->speechEnginesComboBox->currentData().toString();
|
||||||
|
}
|
||||||
|
else if (sender == ui->speechLocaleComboBox)
|
||||||
|
{
|
||||||
|
m_settings.m_speechLocale = ui->speechLocaleComboBox->currentData().toString();
|
||||||
|
}
|
||||||
|
else if (sender == ui->speechVoiceComboBox)
|
||||||
|
{
|
||||||
|
m_settings.m_speechVoice = ui->speechVoiceComboBox->currentData().toString();
|
||||||
|
}
|
||||||
|
else if (sender == ui->speechRateEdit)
|
||||||
|
{
|
||||||
|
m_settings.m_speechRate = ui->speechRateEdit->value();
|
||||||
|
}
|
||||||
|
else if (sender == ui->speechPitchEdit)
|
||||||
|
{
|
||||||
|
m_settings.m_speechPitch = ui->speechPitchEdit->value();
|
||||||
|
}
|
||||||
|
else if (sender == ui->speechVolumeEdit)
|
||||||
|
{
|
||||||
|
m_settings.m_speechVolume = ui->speechVolumeEdit->value();
|
||||||
|
}
|
||||||
|
|
||||||
loadData();
|
const bool loadData = !qobject_cast<const QDoubleSpinBox*>(sender) && !qobject_cast<const QSpinBox*>(sender);
|
||||||
|
if (loadData)
|
||||||
|
{
|
||||||
|
this->loadData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PDFViewerSettingsDialog::loadActionShortcutsTable()
|
void PDFViewerSettingsDialog::loadActionShortcutsTable()
|
||||||
@ -480,6 +532,35 @@ bool PDFViewerSettingsDialog::saveActionShortcutsTable()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PDFViewerSettingsDialog::setSpeechEngine(const QString& engine)
|
||||||
|
{
|
||||||
|
if (m_currentSpeechEngine == engine)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_currentSpeechEngine = engine;
|
||||||
|
QTextToSpeech textToSpeech(engine, nullptr);
|
||||||
|
|
||||||
|
QVector<QLocale> locales = textToSpeech.availableLocales();
|
||||||
|
ui->speechLocaleComboBox->setUpdatesEnabled(false);
|
||||||
|
ui->speechLocaleComboBox->clear();
|
||||||
|
for (const QLocale& locale : locales)
|
||||||
|
{
|
||||||
|
ui->speechLocaleComboBox->addItem(QString("%1 (%2)").arg(locale.nativeLanguageName(), locale.nativeCountryName()), locale.name());
|
||||||
|
}
|
||||||
|
ui->speechLocaleComboBox->setUpdatesEnabled(true);
|
||||||
|
|
||||||
|
QVector<QVoice> voices = textToSpeech.availableVoices();
|
||||||
|
ui->speechVoiceComboBox->setUpdatesEnabled(false);
|
||||||
|
ui->speechVoiceComboBox->clear();
|
||||||
|
for (const QVoice& voice : voices)
|
||||||
|
{
|
||||||
|
ui->speechVoiceComboBox->addItem(QString("%1 (%2, %3)").arg(voice.name(), QVoice::genderName(voice.gender()), QVoice::ageName(voice.age())), voice.name());
|
||||||
|
}
|
||||||
|
ui->speechVoiceComboBox->setUpdatesEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
void PDFViewerSettingsDialog::accept()
|
void PDFViewerSettingsDialog::accept()
|
||||||
{
|
{
|
||||||
if (saveActionShortcutsTable())
|
if (saveActionShortcutsTable())
|
||||||
|
@ -69,7 +69,8 @@ public:
|
|||||||
ShortcutSettings,
|
ShortcutSettings,
|
||||||
ColorManagementSystemSettings,
|
ColorManagementSystemSettings,
|
||||||
SecuritySettings,
|
SecuritySettings,
|
||||||
UISettings
|
UISettings,
|
||||||
|
SpeechSettings
|
||||||
};
|
};
|
||||||
|
|
||||||
const PDFViewerSettings::Settings& getSettings() const { return m_settings; }
|
const PDFViewerSettings::Settings& getSettings() const { return m_settings; }
|
||||||
@ -78,7 +79,6 @@ public:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_optionsPagesWidget_currentItemChanged(QListWidgetItem* current, QListWidgetItem* previous);
|
void on_optionsPagesWidget_currentItemChanged(QListWidgetItem* current, QListWidgetItem* previous);
|
||||||
|
|
||||||
void on_cmsProfileDirectoryButton_clicked();
|
void on_cmsProfileDirectoryButton_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -88,12 +88,16 @@ private:
|
|||||||
void loadActionShortcutsTable();
|
void loadActionShortcutsTable();
|
||||||
bool saveActionShortcutsTable();
|
bool saveActionShortcutsTable();
|
||||||
|
|
||||||
|
void setSpeechEngine(const QString& engine);
|
||||||
|
|
||||||
Ui::PDFViewerSettingsDialog* ui;
|
Ui::PDFViewerSettingsDialog* ui;
|
||||||
PDFViewerSettings::Settings m_settings;
|
PDFViewerSettings::Settings m_settings;
|
||||||
pdf::PDFCMSSettings m_cmsSettings;
|
pdf::PDFCMSSettings m_cmsSettings;
|
||||||
OtherSettings m_otherSettings;
|
OtherSettings m_otherSettings;
|
||||||
QList<QAction*> m_actions;
|
QList<QAction*> m_actions;
|
||||||
bool m_isLoadingData;
|
bool m_isLoadingData;
|
||||||
|
QStringList m_textToSpeechEngines;
|
||||||
|
QString m_currentSpeechEngine;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace pdfviewer
|
} // namespace pdfviewer
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QStackedWidget" name="stackedWidget">
|
<widget class="QStackedWidget" name="stackedWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>7</number>
|
<number>8</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="enginePage">
|
<widget class="QWidget" name="enginePage">
|
||||||
<layout class="QVBoxLayout" name="enginePageLayout">
|
<layout class="QVBoxLayout" name="enginePageLayout">
|
||||||
@ -887,6 +887,136 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="speechPage">
|
||||||
|
<layout class="QVBoxLayout" name="speechPageLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="speechGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Speech Settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="speechGroupBoxLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="speechWidgetsLayout">
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="speechVoiceLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Voice</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="speechPitchLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Pitch</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="speechVolumeLabe">
|
||||||
|
<property name="text">
|
||||||
|
<string>Volume</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="speechRateLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Rate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="speechSynthethiserLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Voice synthetiser</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="speechLocaleLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Locale</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="speechEnginesComboBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="speechLocaleComboBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="speechVoiceComboBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="speechRateEdit">
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="speechVolumeEdit">
|
||||||
|
<property name="maximum">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="speechPitchEdit">
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="speechInfoLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head/><body><p>Set speech settings to enable document reading. These settings are default settings for text to speech functionality, but some can be changed later. Pitch can have values from -1.0 to 1.0 and 0.0 is default. Rate can also have values ranging from -1.0 to 1.0, while 0.0 is normal speech flow. Volume can have values from 0.0 to 1.0.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>288</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
178
PdfForQtViewer/resources/speech.svg
Normal file
178
PdfForQtViewer/resources/speech.svg
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="30mm"
|
||||||
|
height="30mm"
|
||||||
|
viewBox="0 0 30 30"
|
||||||
|
version="1.1"
|
||||||
|
id="svg5291"
|
||||||
|
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||||
|
sodipodi:docname="speech.svg">
|
||||||
|
<defs
|
||||||
|
id="defs5285" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="0.49497475"
|
||||||
|
inkscape:cx="-720.23371"
|
||||||
|
inkscape:cy="504.12186"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="3840"
|
||||||
|
inkscape:window-height="2035"
|
||||||
|
inkscape:window-x="-13"
|
||||||
|
inkscape:window-y="-13"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata5288">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
<dc:creator>
|
||||||
|
<cc:Agent>
|
||||||
|
<dc:title>Jakub Melka</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:creator>
|
||||||
|
<cc:license
|
||||||
|
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||||
|
</cc:Work>
|
||||||
|
<cc:License
|
||||||
|
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||||
|
</cc:License>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Vrstva 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-267)">
|
||||||
|
<rect
|
||||||
|
style="fill:#ffffff;fill-opacity:0.9948007;stroke:#000000;stroke-width:1.39999998;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="rect827"
|
||||||
|
width="7.0398064"
|
||||||
|
height="7.2760415"
|
||||||
|
x="5.5562501"
|
||||||
|
y="278.05869" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:0.69999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 12.596056,278.05869 5.87753,-5.69801"
|
||||||
|
id="path831"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:0.69999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 12.596056,285.33472 5.69801,5.87753"
|
||||||
|
id="path831-3"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:0.69999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 18.473586,272.36068 -0.17952,18.85157"
|
||||||
|
id="path848"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||||
|
x="21.426525"
|
||||||
|
y="275.73883"
|
||||||
|
id="text854"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan852"
|
||||||
|
x="21.426525"
|
||||||
|
y="285.39432"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:0.26458332" /></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||||
|
x="25.962238"
|
||||||
|
y="272.19531"
|
||||||
|
id="text858"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan856"
|
||||||
|
x="25.962238"
|
||||||
|
y="281.8508"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:0.26458332" /></text>
|
||||||
|
<g
|
||||||
|
id="g4572">
|
||||||
|
<g
|
||||||
|
id="text862"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||||
|
aria-label="~">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path864"
|
||||||
|
style="stroke-width:0.26458332"
|
||||||
|
d="m 27.160395,274.77545 q -0.01034,0.5116 -0.118856,1.00769 -0.103353,0.4961 -0.335897,0.88367 -0.237711,0.39791 -0.573608,0.62528 -0.335897,0.22738 -0.852661,0.22738 -0.485758,0 -0.862996,-0.20154 -0.377238,-0.2067 -0.81132,-0.7338 -0.5271,-0.64596 -0.764812,-0.81132 -0.237711,-0.16537 -0.496093,-0.16537 -0.485759,0 -0.744141,0.45475 -0.258382,0.44959 -0.304891,1.46245 h -0.862996 q 0.01033,-0.51677 0.113688,-1.00252 0.10852,-0.49093 0.335897,-0.88884 0.222208,-0.38241 0.578776,-0.61495 0.356567,-0.23771 0.852661,-0.23771 0.480591,0 0.857829,0.20154 0.382405,0.19637 0.821655,0.7338 0.413411,0.50643 0.676961,0.74414 0.26355,0.23255 0.578776,0.23255 0.532267,0 0.780314,-0.52193 0.253215,-0.52194 0.268718,-1.39527 z" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
transform="translate(-0.03100652,3.6756618)"
|
||||||
|
id="g4572-2">
|
||||||
|
<g
|
||||||
|
id="text862-6"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||||
|
aria-label="~">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path864-3"
|
||||||
|
style="stroke-width:0.26458332"
|
||||||
|
d="m 27.160395,274.77545 q -0.01034,0.5116 -0.118856,1.00769 -0.103353,0.4961 -0.335897,0.88367 -0.237711,0.39791 -0.573608,0.62528 -0.335897,0.22738 -0.852661,0.22738 -0.485758,0 -0.862996,-0.20154 -0.377238,-0.2067 -0.81132,-0.7338 -0.5271,-0.64596 -0.764812,-0.81132 -0.237711,-0.16537 -0.496093,-0.16537 -0.485759,0 -0.744141,0.45475 -0.258382,0.44959 -0.304891,1.46245 h -0.862996 q 0.01033,-0.51677 0.113688,-1.00252 0.10852,-0.49093 0.335897,-0.88884 0.222208,-0.38241 0.578776,-0.61495 0.356567,-0.23771 0.852661,-0.23771 0.480591,0 0.857829,0.20154 0.382405,0.19637 0.821655,0.7338 0.413411,0.50643 0.676961,0.74414 0.26355,0.23255 0.578776,0.23255 0.532267,0 0.780314,-0.52193 0.253215,-0.52194 0.268718,-1.39527 z" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
transform="translate(-0.08637403,6.8460108)"
|
||||||
|
id="g4572-5">
|
||||||
|
<g
|
||||||
|
id="text862-1"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||||
|
aria-label="~">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path864-0"
|
||||||
|
style="stroke-width:0.26458332"
|
||||||
|
d="m 27.160395,274.77545 q -0.01034,0.5116 -0.118856,1.00769 -0.103353,0.4961 -0.335897,0.88367 -0.237711,0.39791 -0.573608,0.62528 -0.335897,0.22738 -0.852661,0.22738 -0.485758,0 -0.862996,-0.20154 -0.377238,-0.2067 -0.81132,-0.7338 -0.5271,-0.64596 -0.764812,-0.81132 -0.237711,-0.16537 -0.496093,-0.16537 -0.485759,0 -0.744141,0.45475 -0.258382,0.44959 -0.304891,1.46245 h -0.862996 q 0.01033,-0.51677 0.113688,-1.00252 0.10852,-0.49093 0.335897,-0.88884 0.222208,-0.38241 0.578776,-0.61495 0.356567,-0.23771 0.852661,-0.23771 0.480591,0 0.857829,0.20154 0.382405,0.19637 0.821655,0.7338 0.413411,0.50643 0.676961,0.74414 0.26355,0.23255 0.578776,0.23255 0.532267,0 0.780314,-0.52193 0.253215,-0.52194 0.268718,-1.39527 z" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
transform="translate(-0.11738003,10.521682)"
|
||||||
|
id="g4572-2-8">
|
||||||
|
<g
|
||||||
|
id="text862-6-6"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||||
|
aria-label="~">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path864-3-3"
|
||||||
|
style="stroke-width:0.26458332"
|
||||||
|
d="m 27.160395,274.77545 q -0.01034,0.5116 -0.118856,1.00769 -0.103353,0.4961 -0.335897,0.88367 -0.237711,0.39791 -0.573608,0.62528 -0.335897,0.22738 -0.852661,0.22738 -0.485758,0 -0.862996,-0.20154 -0.377238,-0.2067 -0.81132,-0.7338 -0.5271,-0.64596 -0.764812,-0.81132 -0.237711,-0.16537 -0.496093,-0.16537 -0.485759,0 -0.744141,0.45475 -0.258382,0.44959 -0.304891,1.46245 h -0.862996 q 0.01033,-0.51677 0.113688,-1.00252 0.10852,-0.49093 0.335897,-0.88884 0.222208,-0.38241 0.578776,-0.61495 0.356567,-0.23771 0.852661,-0.23771 0.480591,0 0.857829,0.20154 0.382405,0.19637 0.821655,0.7338 0.413411,0.50643 0.676961,0.74414 0.26355,0.23255 0.578776,0.23255 0.532267,0 0.780314,-0.52193 0.253215,-0.52194 0.268718,-1.39527 z" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 10 KiB |
Reference in New Issue
Block a user