From f3d1c81315878682f30457b39099a048c50f983d Mon Sep 17 00:00:00 2001 From: Hannes Matuschek Date: Thu, 21 Feb 2019 07:42:10 +0100 Subject: [PATCH] Added inter-char/inter-word pause and text settings. --- qso/qcodes.xml | 26 +++---- src/CMakeLists.txt | 4 +- src/application.cc | 7 +- src/colorbutton.cc | 30 ++++++++ src/colorbutton.hh | 26 +++++++ src/globals.cc | 1 + src/mainwindow.cc | 14 ++-- src/morseencoder.cc | 38 ++++++---- src/morseencoder.hh | 19 ++--- src/qrm.cc | 4 +- src/settings.cc | 167 +++++++++++++++++++++++++++++++++++++++----- src/settings.hh | 54 ++++++++++++-- src/textgen.cc | 2 +- 13 files changed, 323 insertions(+), 69 deletions(-) create mode 100644 src/colorbutton.cc create mode 100644 src/colorbutton.hh diff --git a/qso/qcodes.xml b/qso/qcodes.xml index 5098997..fa9e3a6 100644 --- a/qso/qcodes.xml +++ b/qso/qcodes.xml @@ -12,28 +12,28 @@ aa ab abt adr agn anr ant arnd bci bcnu - bk bn btr btu bug + bk bn btr btu bug buro b4 c cba cfm - ck cl condx cos cq - cs ctl cud cul cw + ck cl condx cos cq + cs ctl cud cul cw cx de dn dr dsw dx emrg enuf es fb - fer fm freq fwd ga + fer fr fm freq fwd ga ge gg gl gm gnd gud hee hi hr hv hw ii imp k lid - mh mils mni msg n + mh mils mni msg n nil nr nw ok om - op pls pse pwr px + op pls pse pwr px rr rx rfi rig rpt - rprt rst sae sase sed - sfr sig sigs sk sked - snr sri ssb stn temp - tfc tks tmw tnx tre - tt tu tvi tx trx + rprt rst sae sase sed + sfr sig sigs sk sked + snr sri ssb stn temp + tfc tks tmw tnx tre + tt tu tvi tx trx ufb ur urs vx vy wa wb wkd wx xyl - yl yr 73 88 55 + yl yr 73 88 55 @@ -44,7 +44,7 @@ -

+ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4ddb14d..e206a5f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,11 +1,11 @@ set(kochmorse_SOURCES main.cc qhal.cc globals.cc audiosink.cc effect.cc morseencoder.cc tutor.cc application.cc mainwindow.cc settings.cc aboutdialog.cc listwidget.cc morsedecoder.cc textgen.cc qsochat.cc qrm.cc - checkupdate.cc) + checkupdate.cc colorbutton.cc) set(kochmorse_MOC_HEADERS audiosink.hh effect.hh morseencoder.hh tutor.hh application.hh mainwindow.hh settings.hh aboutdialog.hh listwidget.hh morsedecoder.hh textgen.hh qsochat.hh qrm.hh - checkupdate.hh) + checkupdate.hh colorbutton.hh) set(kochmorse_HEADERS globals.hh qhal.hh ${kochmorse_MOC_HEADERS}) qt5_wrap_cpp(kochmorse_MOC_SOURCES ${kochmorse_MOC_HEADERS}) diff --git a/src/application.cc b/src/application.cc index 075dca3..32f5eac 100644 --- a/src/application.cc +++ b/src/application.cc @@ -33,8 +33,8 @@ Application::Application(int &argc, char *argv[]) settings.fadingMaxDamp(), settings.fadingRate(), this); _encoder = new MorseEncoder(settings.tone(), settings.tone()+settings.dashPitch(), - settings.speed(), settings.effSpeed(), settings.sound(), - settings.jitter(), this); + settings.speed(), settings.icPauseFactor(), settings.iwPauseFactor(), + settings.sound(), settings.jitter(), this); _audio_sink->setSource(_noiseEffect); _noiseEffect->setSource(_qrm); @@ -155,7 +155,8 @@ Application::applySettings() // Reconfigure encoder _encoder->setSpeed(settings.speed()); - _encoder->setEffSpeed(settings.effSpeed()); + _encoder->setICPFactor(settings.icPauseFactor()); + _encoder->setIWPFactor(settings.iwPauseFactor()); _encoder->setDotTone(settings.tone()); _encoder->setDashTone(settings.tone()+settings.dashPitch()); _encoder->setSound(settings.sound()); diff --git a/src/colorbutton.cc b/src/colorbutton.cc new file mode 100644 index 0000000..55e7037 --- /dev/null +++ b/src/colorbutton.cc @@ -0,0 +1,30 @@ +#include "colorbutton.hh" + +ColorButton::ColorButton(const QColor &color, QWidget *parent) + : QToolButton(parent), _color(color) +{ + setColor(color); + connect(this, SIGNAL(clicked()), this, SLOT(_onSelectColor())); +} + +const QColor & +ColorButton::color() const { + return _color; +} + +void +ColorButton::setColor(const QColor &color) { + _color = color; + QPixmap pixmap(64,64); + pixmap.fill(_color); + setIcon(QIcon(pixmap)); +} + +void +ColorButton::_onSelectColor() { + QColorDialog dialog(_color); + if (QDialog::Accepted != dialog.exec()) + return; + setColor(dialog.currentColor()); +} + diff --git a/src/colorbutton.hh b/src/colorbutton.hh new file mode 100644 index 0000000..9176557 --- /dev/null +++ b/src/colorbutton.hh @@ -0,0 +1,26 @@ +#ifndef COLORBUTTON_HH +#define COLORBUTTON_HH + +#include +#include +#include + + +class ColorButton : public QToolButton +{ + Q_OBJECT + +public: + explicit ColorButton(const QColor &color, QWidget *parent=nullptr); + + const QColor &color() const; + void setColor(const QColor &color); + +protected slots: + void _onSelectColor(); + +protected: + QColor _color; +}; + +#endif // COLORBUTTON_HH diff --git a/src/globals.cc b/src/globals.cc index 1419add..8748336 100644 --- a/src/globals.cc +++ b/src/globals.cc @@ -127,6 +127,7 @@ inline QHash _initProsignTable() { table[QChar(0x2403)] = "SK"; // SK -> ETX table[QChar(0x2406)] = "SN"; // SN -> ACK table[QChar(0x2407)] = "KN"; // KN -> BEL + table[QChar('\t')] = " "; // TAB -> " " return table; } diff --git a/src/mainwindow.cc b/src/mainwindow.cc index b99e9cb..3e54d99 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -25,13 +25,10 @@ MainWindow::MainWindow(Application &app, QWidget *parent) // Assemble text view _text = new QTextEdit(); _text->setMinimumSize(640,230); - QFont f = _text->document()->defaultFont(); - f.setFamily("Courier"); - f.setPointSize(14); - f.setStyleHint(QFont::Monospace); - _text->document()->setDefaultFont(f); + _text->document()->setDefaultFont(settings.textFont()); _text->setReadOnly(true); _text->setTextInteractionFlags(Qt::NoTextInteraction); + _text->setTabStopDistance(35); // Play button _play = new QAction( @@ -118,7 +115,12 @@ MainWindow::onSessionFinished() { void MainWindow::onCharSend(QString ch) { // Update text-field + QTextCharFormat old = _text->currentCharFormat(); + QTextCharFormat fmt = old; + fmt.setForeground(QColor("black")); + _text->setCurrentCharFormat(fmt); _text->insertPlainText(ch); + _text->setCurrentCharFormat(old); } void @@ -134,8 +136,10 @@ MainWindow::onCharReceived(QString ch) { void MainWindow::onPlayToggled(bool play) { + Settings settings; if (play) { _text->document()->clear(); + _text->document()->setDefaultFont(settings.textFont()); _app.startSession(); } else { _app.stopSession(); diff --git a/src/morseencoder.cc b/src/morseencoder.cc index e082fce..51cc6f1 100644 --- a/src/morseencoder.cc +++ b/src/morseencoder.cc @@ -5,10 +5,10 @@ #include -MorseEncoder::MorseEncoder(double ditFreq, double daFreq, double speed, double effSpeed, +MorseEncoder::MorseEncoder(double ditFreq, double daFreq, double speed, double icpFac, double iwpFac, Sound sound, Jitter jitter, QObject *parent) - : QIODevice(parent), _ditFreq(ditFreq), _daFreq(daFreq), _speed(speed), _effSpeed(effSpeed), - _sound(sound), _jitter(jitter), _unitLength(0), _effUnitLength(0), _ditSamples(4), _daSamples(4), + : QIODevice(parent), _ditFreq(ditFreq), _daFreq(daFreq), _speed(speed), _icpfac(icpFac), _iwpfac(iwpFac), + _sound(sound), _jitter(jitter), _unitLength(0), _ditSamples(4), _daSamples(4), _icPause(), _iwPause(), _current(0), _queue(), _tsend(0), _played(0) { _createSamples(); @@ -18,12 +18,14 @@ MorseEncoder::MorseEncoder(double ditFreq, double daFreq, double speed, double e void MorseEncoder::_createSamples() { - // ensure effective speed is <= speed - _effSpeed = std::min(_speed, _effSpeed); + // ensure effective pause factors are >= 1 + _icpfac = std::max(1.0, _icpfac); + _iwpfac = std::max(1.0, _iwpfac); // Compute unit (dit) length (PARIS std. = 50 units per word) in samples + // including 10 dits inter-character pauses (excl. 1 dit pause after last symbol) and + // and 5 dits inter-word pause (excl. 1+2 dit pause after last char). _unitLength = size_t((60.*Globals::sampleRate)/(50.*_speed)); - _effUnitLength = size_t((60.*Globals::sampleRate)/(50.*_effSpeed)); // The first and last epsilon samples are windowed size_t epsilon = 0; @@ -92,15 +94,15 @@ MorseEncoder::_createSamples() daData[i] = 0; } - // Compute inter-char pause (3 x effUnit, not incl. pause after symbol (dit or da)) - size_t icPauseLength = 3*_effUnitLength-_unitLength; + // Compute inter-char pause (3 x dit, not incl. pause after symbol (dit or da)) + size_t icPauseLength = (3*_icpfac*_unitLength)-_unitLength; _icPause.resize(icPauseLength*sizeof(int16_t)); int16_t *icPauseData = reinterpret_cast(_icPause.data()); for (size_t i=0; i(_iwPause.data()); for (size_t i=0; i=1). + * @param iwpFac Specifies the inter-word pause factor (>=1). * @param jitter Specifies the dit/da length jitter. * @param parent Specifies the @c QObject parent. */ - explicit MorseEncoder(double ditFreq, double daFreq, double speed, double effSpeed, + explicit MorseEncoder(double ditFreq, double daFreq, double speed, double icpFac, double iwpFac, Sound sound, Jitter jitter=JITTER_EXACT, QObject *parent=nullptr); /** Sends the given text. */ @@ -59,8 +60,10 @@ public: void resetTime(); /** (Re-) Sets the character speed. */ void setSpeed(int speed); - /** (Re-) Sets the effective (pause) speed. */ - void setEffSpeed(int speed); + /** (Re-) Sets the inter-char pause factor. */ + void setICPFactor(double factor); + /** (Re-) Sets the inter-word pause factor. */ + void setIWPFactor(double factor); /** (Re-) Sets the dot-tone (dit) frequency. */ void setDotTone(double freq); /** (Re-) Sets the dash-tone (da) frequency. */ @@ -98,8 +101,10 @@ protected: /** Char speed in WPM. */ double _speed; - /** Effective speed (pauses) in WPM. */ - double _effSpeed; + /** Inter-char pause factor. */ + double _icpfac; + /** Inter-word pause factor. */ + double _iwpfac; /** The sound variant. */ Sound _sound; /** The jitter. */ @@ -107,8 +112,6 @@ protected: /** Length of a "dit" in samples. */ size_t _unitLength; - /** Pause length in samples. */ - size_t _effUnitLength; /** A "dit" incl. inter-symbol pause. */ QVector _ditSamples; diff --git a/src/qrm.cc b/src/qrm.cc index d9cd8af..0092314 100644 --- a/src/qrm.cc +++ b/src/qrm.cc @@ -16,7 +16,7 @@ QRMGenerator::QRMGenerator(QIODevice *source, size_t num, double snr, QObject *p for (size_t i=0; i<_num; i++) { double f = ((rand() % 700) + 300), wpm = 15 + (rand() % 10); MorseEncoder::Jitter jitter = MorseEncoder::Jitter(rand()%4); - _encoder[i] = new MorseEncoder(f, f, wpm, wpm, MorseEncoder::SOUND_SHARP, jitter, this); + _encoder[i] = new MorseEncoder(f, f, wpm, 1., 1., MorseEncoder::SOUND_SHARP, jitter, this); _encoder[i]->open(QIODevice::ReadOnly); _generator[i] = new GenTextTutor(_encoder[i], ":/qso/qsogen.xml", this); connect(_generator[i], SIGNAL(sessionComplete()), _generator[i], SLOT(start())); @@ -59,7 +59,7 @@ QRMGenerator::setStations(int num) { for (size_t i=0; i<_num; i++) { double f = ((rand() % 700) + 300), wpm = 15 + (rand() % 10); MorseEncoder::Jitter jitter = MorseEncoder::Jitter(rand()%4); - _encoder[i] = new MorseEncoder(f, f, wpm, wpm, MorseEncoder::SOUND_SHARP, jitter, this); + _encoder[i] = new MorseEncoder(f, f, wpm, 1.0, 1.0, MorseEncoder::SOUND_SHARP, jitter, this); _encoder[i]->open(QIODevice::ReadOnly); _generator[i] = new GenTextTutor(_encoder[i], ":/qso/qsogen.xml", this); connect(_generator[i], SIGNAL(sessionComplete()), _generator[i], SLOT(start())); diff --git a/src/settings.cc b/src/settings.cc index c32f9f7..8751d68 100644 --- a/src/settings.cc +++ b/src/settings.cc @@ -13,6 +13,7 @@ #include #include #include +#include /* ********************************************************************************************* * @@ -64,14 +65,24 @@ Settings::setSpeed(int speed) { this->setValue("speed", speed); } -int -Settings::effSpeed() const { - return this->value("effSpeed", 15).toInt(); +double +Settings::icPauseFactor() const { + return this->value("icPauseFactor", 1).toDouble(); } void -Settings::setEffSpeed(int speed) { - speed = std::max(5, std::min(speed, 100)); - this->setValue("effSpeed", speed); +Settings::setICPauseFactor(double factor) { + factor = std::max(1.0, std::min(factor, 10.0)); + this->setValue("icPauseFactor", factor); +} + +double +Settings::iwPauseFactor() const { + return this->value("iwPauseFactor", 1).toDouble(); +} +void +Settings::setIWPauseFactor(double factor) { + factor = std::max(1.0, std::min(factor, 10.0)); + this->setValue("iwPauseFactor", factor); } int @@ -439,6 +450,47 @@ Settings::setQRMSNR(double db) { setValue("qrm/snr", db); } +QFont +Settings::textFont() const { + QString family = value("textFontFamily", "Courier").toString(); + int size = value("textFontSize", 14).toInt(); + QFont font(family, size); + font.setStyleHint(QFont::Monospace); + return font; +} +void +Settings::setTextFont(const QFont &font) { + setValue("textFontFamily", font.family()); + setValue("testFontSize", font.pointSize()); +} + +QColor +Settings::rxTextColor() const { + return value("textRXColor", QColor("black")).value(); +} +void +Settings::setRXTextColor(const QColor &color) { + setValue("textRXColor", color); +} + +QColor +Settings::txTextColor() const { + return value("textTXColor", QColor("red")).value(); +} +void +Settings::setTXTextColor(const QColor &color) { + setValue("textTXColor", color); +} + +QColor +Settings::summaryTextColor() const { + return value("textSummaryColor", QColor("blue")).value(); +} +void +Settings::setSummaryTextColor(const QColor &color) { + setValue("textSummaryColor", color); +} + /* ********************************************************************************************* * * Settings Dialog @@ -452,12 +504,14 @@ SettingsDialog::SettingsDialog(QWidget *parent) _code = new CodeSettingsView(); _effects = new EffectSettingsView(); _devices = new DeviceSettingsView(); + _appearance = new AppearanceSettingsView(); _tabs = new QTabWidget(); _tabs->addTab(_tutor, tr("Tutor")); _tabs->addTab(_code, tr("Morse Code")); _tabs->addTab(_effects, tr("Effects")); _tabs->addTab(_devices, tr("Devices")); + _tabs->addTab(_appearance, tr("Appearance")); QDialogButtonBox *bbox = new QDialogButtonBox(); bbox->addButton(QDialogButtonBox::Ok); @@ -502,10 +556,18 @@ CodeSettingsView::CodeSettingsView(QWidget *parent) _speed->setValue(settings.speed()); _speed->setToolTip(tr("Specifies the speed (in WPM) for the symbols.")); - _effSpeed = new QSpinBox(); - _effSpeed->setMinimum(5); _speed->setMaximum(100); - _effSpeed->setValue(settings.effSpeed()); - _effSpeed->setToolTip(tr("Specifies the pause lengths between symbols and words.")); + _icpFactor = new QSpinBox(); + _icpFactor->setMinimum(100); _icpFactor->setMaximum(1000); _icpFactor->setSingleStep(10); + _icpFactor->setValue(int(settings.icPauseFactor()*100)); + _icpFactor->setToolTip(tr("Specifies the relative pause lengths between symbols.")); + + _iwpFactor = new QSpinBox(); + _iwpFactor->setMinimum(100); _iwpFactor->setMaximum(1000); _iwpFactor->setSingleStep(10); + _iwpFactor->setValue(int(settings.iwPauseFactor()*100)); + _iwpFactor->setToolTip(tr("Specifies the relative pause lengths between words.")); + + _effSpeed = new QLabel(); + _onEffSpeedChanged(); _tone = new QLineEdit(QString::number(settings.tone())); QIntValidator *tone_val = new QIntValidator(20,20000); @@ -540,28 +602,55 @@ CodeSettingsView::CodeSettingsView(QWidget *parent) case MorseEncoder::JITTER_STRAIGHT: _jitter->setCurrentIndex(2); break; } - QFormLayout *layout = new QFormLayout(); - layout->addRow(tr("Speed (WPM)"), _speed); - layout->addRow(tr("Eff. speed (WPM)"), _effSpeed); - layout->addRow(tr("Tone (Hz)"), _tone); - layout->addRow(tr("Dash pitch (Hz)"), _daPitch); - layout->addRow(tr("Sound"), _sound); - layout->addRow(tr("Jitter"), _jitter); + QVBoxLayout *layout = new QVBoxLayout(); + + QGroupBox *speedBox = new QGroupBox(tr("Speed")); + QFormLayout *form = new QFormLayout(); + form->addRow(tr("Speed (WPM)"), _speed); + form->addRow(tr("Inter-symbol Pause (%)"), _icpFactor); + form->addRow(tr("Inter-word Pause (%)"), _iwpFactor); + form->addRow(tr("Eff. Speed (WPM)"), _effSpeed); + speedBox->setLayout(form); + layout->addWidget(speedBox); + + QGroupBox *soundBox = new QGroupBox(tr("Sound")); + form = new QFormLayout(); + form->addRow(tr("Tone (Hz)"), _tone); + form->addRow(tr("Dash pitch (Hz)"), _daPitch); + form->addRow(tr("Sound"), _sound); + form->addRow(tr("Jitter"), _jitter); + soundBox->setLayout(form); + layout->addWidget(soundBox); this->setLayout(layout); + + connect(_speed, SIGNAL(valueChanged(int)), this, SLOT(_onEffSpeedChanged())); + connect(_icpFactor, SIGNAL(valueChanged(int)), this, SLOT(_onEffSpeedChanged())); + connect(_iwpFactor, SIGNAL(valueChanged(int)), this, SLOT(_onEffSpeedChanged())); } void CodeSettingsView::save() { Settings settings; settings.setSpeed(_speed->value()); - settings.setEffSpeed(_effSpeed->value()); + settings.setICPauseFactor(double(_icpFactor->value())/100); + settings.setIWPauseFactor(double(_iwpFactor->value())/100); settings.setTone(_tone->text().toInt()); settings.setDashPitch(_daPitch->text().toInt()); settings.setSound(MorseEncoder::Sound(_sound->currentIndex())); settings.setJitter(MorseEncoder::Jitter(_jitter->currentIndex())); } +void +CodeSettingsView::_onEffSpeedChanged() { + double wpm = _speed->value(); + double icp = double(_icpFactor->value())/100; + double iwp = double(_iwpFactor->value())/100; + + int ewpm = 50.*wpm/(35+10*icp+5*iwp); + _effSpeed->setText(tr("%1").arg(ewpm)); +} + /* ********************************************************************************************* * * Tutor Settings Widget @@ -1263,3 +1352,45 @@ DeviceSettingsView::save() { settings.setInputDevice(_inputDevices->currentText()); settings.setDecoderLevel(_decoderLevel->value()); } + + +/* ********************************************************************************************* * + * Appearance Settings Widget + * ********************************************************************************************* */ +AppearanceSettingsView::AppearanceSettingsView(QWidget *parent) + : QWidget(parent) +{ + Settings settings; + + _font = new QFontComboBox(); + _font->setFontFilters(QFontComboBox::MonospacedFonts); + _font->setCurrentFont(settings.textFont()); + + _size = new QSpinBox(); + _size->setRange(3, 120); + _size->setValue(_font->currentFont().pointSize()); + + _rxColor = new ColorButton(settings.rxTextColor()); + _txColor = new ColorButton(settings.txTextColor()); + _sumColor = new ColorButton(settings.summaryTextColor()); + + QFormLayout *layout = new QFormLayout(); + layout->addRow(tr("Text Font"), _font); + layout->addRow(tr("Font Size (pt)"), _size); + layout->addRow(tr("RX Text Color"), _rxColor); + layout->addRow(tr("TX Text Color"), _txColor); + layout->addRow(tr("Summary Text Color"), _sumColor); + + setLayout(layout); +} + +void +AppearanceSettingsView::save() { + Settings settings; + QFont font = _font->currentFont(); + font.setPointSize(_size->value()); + settings.setTextFont(font); + settings.setRXTextColor(_rxColor->color()); + settings.setTXTextColor(_txColor->color()); + settings.setSummaryTextColor(_sumColor->color()); +} diff --git a/src/settings.hh b/src/settings.hh index 326b9ca..3730cc4 100644 --- a/src/settings.hh +++ b/src/settings.hh @@ -8,11 +8,14 @@ #include #include #include +#include #include #include #include "listwidget.hh" #include +#include #include "morseencoder.hh" +#include "colorbutton.hh" /** Represents the global persistent settings. */ @@ -48,10 +51,15 @@ public: /** Sets the character speed. */ void setSpeed(int speed); - /** Retunrs the current effective (pause) speed. */ - int effSpeed() const; - /** Sets the effective (pause) speed. */ - void setEffSpeed(int speed); + /** Returns the inter-symbol pause-length factor. */ + double icPauseFactor() const; + /** Sets the inter-symbol pause-length factor. */ + void setICPauseFactor(double factor); + + /** Returns the inter-word pause-length factor. */ + double iwPauseFactor() const; + /** Sets the inter-word pause-length factor. */ + void setIWPauseFactor(double factor); /** Returns the current tone frequency. */ int tone() const; @@ -173,6 +181,17 @@ public: /** QRM effect: signal to "noise" ratio. */ double qrmSNR() const; void setQRMSNR(double db); + + QFont textFont() const; + void setTextFont(const QFont &font); + + QColor rxTextColor() const; + void setRXTextColor(const QColor &color); + QColor txTextColor() const; + void setTXTextColor(const QColor &color); + QColor summaryTextColor() const; + void setSummaryTextColor(const QColor &color); + }; @@ -314,9 +333,14 @@ public: void save(); +protected slots: + void _onEffSpeedChanged(); + protected: QSpinBox *_speed; - QSpinBox *_effSpeed; + QSpinBox *_icpFactor; + QSpinBox *_iwpFactor; + QLabel *_effSpeed; QLineEdit *_tone; QLineEdit *_daPitch; QComboBox *_sound; @@ -368,6 +392,25 @@ protected: QSpinBox *_decoderLevel; }; + +class AppearanceSettingsView: public QWidget +{ + Q_OBJECT + +public: + explicit AppearanceSettingsView(QWidget *parent=0); + + void save(); + +protected: + QFontComboBox *_font; + QSpinBox *_size; + ColorButton *_rxColor; + ColorButton *_txColor; + ColorButton *_sumColor; +}; + + /** The preferences dialog. */ class SettingsDialog : public QDialog { @@ -387,6 +430,7 @@ protected: CodeSettingsView *_code; EffectSettingsView *_effects; DeviceSettingsView *_devices; + AppearanceSettingsView *_appearance; }; #endif // SETTINGSCTRL_HH diff --git a/src/textgen.cc b/src/textgen.cc index eb76ff4..9f53749 100644 --- a/src/textgen.cc +++ b/src/textgen.cc @@ -734,7 +734,7 @@ TextGen::parseSK(QXmlStreamReader &reader, QList &rules) { void TextGen::parsePause(QXmlStreamReader &reader, QList &rules) { - rules.append(new TextGenTextRule(" ", this)); + rules.append(new TextGenTextRule("\t", this)); while (! reader.atEnd()) { reader.readNext(); if (reader.isEndElement())