r22905 by jghali - Fix failure to define custom bullet char using character palette
scribus-commit
scribus-commit at lists.scribus.net
Mon Mar 18 12:01:58 UTC 2019
Author: jghali
Date: Mon Mar 18 12:01:58 2019
New Revision: 22905
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22905
Log:
Fix failure to define custom bullet char using character palette
Modified:
trunk/Scribus/scribus/ui/charselectenhanced.h
trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
trunk/Scribus/scribus/ui/propertywidget_pareffect.h
trunk/Scribus/scribus/ui/smpstylewidget.cpp
trunk/Scribus/scribus/ui/smpstylewidget.h
Modified: trunk/Scribus/scribus/ui/charselectenhanced.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22905&path=/trunk/Scribus/scribus/ui/charselectenhanced.h
==============================================================================
--- trunk/Scribus/scribus/ui/charselectenhanced.h (original)
+++ trunk/Scribus/scribus/ui/charselectenhanced.h Mon Mar 18 12:01:58 2019
@@ -29,7 +29,7 @@
QString getUsedFont();
signals:
- /*! \brief A signall emitted when press the "Insert" button.
+ /*! \brief A signal emitted when press the "Insert" button.
Glyphs are handled in CharSelect parent.
*/
void insertSpecialChars(const QVector<uint> & chars);
Modified: trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22905&path=/trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp (original)
+++ trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp Mon Mar 18 12:01:58 2019
@@ -615,7 +615,7 @@
QApplication::changeOverrideCursor(QCursor(Qt::WaitCursor));
m_enhanced = new CharSelectEnhanced(this);
m_enhanced->setModal(true);
- connect(m_enhanced, SIGNAL(insertSpecialChars(const QString &)), this, SLOT(insertSpecialChars(const QString &)));
+ connect(m_enhanced, SIGNAL(insertSpecialChars(const QVector<uint> &)), this, SLOT(insertSpecialChars(const QVector<uint> &)));
connect(m_enhanced, SIGNAL(paletteShown(bool)), bulletCharTableButton, SLOT(setChecked(bool)));
m_enhanced->setDoc(m_doc);
m_enhanced->setEnabled(true);
@@ -630,7 +630,7 @@
{
if (!m_enhanced || show)
return;
- disconnect(m_enhanced, SIGNAL(insertSpecialChars(const QString &)), this, SLOT(insertSpecialChars(const QString &)));
+ disconnect(m_enhanced, SIGNAL(insertSpecialChars(const QVector<uint> &)), this, SLOT(insertSpecialChars(const QVector<uint> &)));
disconnect(m_enhanced, SIGNAL(paletteShown(bool)), bulletCharTableButton, SLOT(setChecked(bool)));
m_enhanced->close();
delete m_enhanced;
@@ -644,7 +644,8 @@
else if (!m_enhanced && checked)
openEnhanced();
}
-void PropertyWidget_ParEffect::insertSpecialChars(const QString &chars)
-{
+void PropertyWidget_ParEffect::insertSpecialChars(const QVector<uint> &charCodes)
+{
+ QString chars = QString::fromUcs4(charCodes.data(), charCodes.length());
bulletStrEdit->lineEdit()->setText(chars);
}
Modified: trunk/Scribus/scribus/ui/propertywidget_pareffect.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22905&path=/trunk/Scribus/scribus/ui/propertywidget_pareffect.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pareffect.h (original)
+++ trunk/Scribus/scribus/ui/propertywidget_pareffect.h Mon Mar 18 12:01:58 2019
@@ -1,5 +1,7 @@
#ifndef PROPERTYWIDGET_PAREFFECT_H
#define PROPERTYWIDGET_PAREFFECT_H
+
+#include <QVector>
#include "ui_propertywidget_pareffectbase.h"
#include "numeration.h"
@@ -67,7 +69,7 @@
private slots:
void on_bulletCharTableButton_toggled(bool checked);
- void insertSpecialChars(const QString &chars);
+ void insertSpecialChars(const QVector<uint> &charCodes);
private:
void openEnhanced();
Modified: trunk/Scribus/scribus/ui/smpstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22905&path=/trunk/Scribus/scribus/ui/smpstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smpstylewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/smpstylewidget.cpp Mon Mar 18 12:01:58 2019
@@ -1134,8 +1134,9 @@
connectPESignals();
}
-void SMPStyleWidget::insertSpecialChars(const QString &chars)
-{
+void SMPStyleWidget::insertSpecialChars(const QVector<uint> &charCodes)
+{
+ QString chars = QString::fromUcs4(charCodes.data(), charCodes.length());
bulletStrEdit->lineEdit()->setText(chars);
}
@@ -1194,7 +1195,7 @@
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
m_enhanced = new CharSelectEnhanced(this);
m_enhanced->setModal(true);
- connect(m_enhanced, SIGNAL(insertSpecialChars(const QString &)), this, SLOT(insertSpecialChars(const QString &)));
+ connect(m_enhanced, SIGNAL(insertSpecialChars(const QVector<uint> &)), this, SLOT(insertSpecialChars(const QVector<uint> &)));
connect(m_enhanced, SIGNAL(paletteShown(bool)), bulletCharTableButton, SLOT(setChecked(bool)));
m_enhanced->setDoc(m_Doc);
m_enhanced->setEnabled(true);
@@ -1215,7 +1216,7 @@
{
if (!m_enhanced || show)
return;
- disconnect(m_enhanced, SIGNAL(insertSpecialChars(const QString &)), this, SLOT(insertSpecialChars(const QString &)));
+ disconnect(m_enhanced, SIGNAL(insertSpecialChars(const QVector<uint> &)), this, SLOT(insertSpecialChars(const QVector<uint> &)));
disconnect(m_enhanced, SIGNAL(paletteShown(bool)), bulletCharTableButton, SLOT(setChecked(bool)));
m_enhanced->close();
delete m_enhanced;
Modified: trunk/Scribus/scribus/ui/smpstylewidget.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22905&path=/trunk/Scribus/scribus/ui/smpstylewidget.h
==============================================================================
--- trunk/Scribus/scribus/ui/smpstylewidget.h (original)
+++ trunk/Scribus/scribus/ui/smpstylewidget.h Mon Mar 18 12:01:58 2019
@@ -10,6 +10,9 @@
class QEvent;
class CharStyle;
+
+#include <QVector>
+
#include "ui_smpstylewidget.h"
#include "styles/styleset.h"
@@ -18,6 +21,7 @@
class SMPStyleWidget : public QWidget, Ui::SMPStyleWidget
{
Q_OBJECT
+
public:
SMPStyleWidget(ScribusDoc *doc, StyleSet<CharStyle> *cstyles);
~SMPStyleWidget();
@@ -76,7 +80,7 @@
void slotLineSpacingModeChanged(int);
void slotDropCap(bool isOn);
void slotBullets(bool isOn);
- void insertSpecialChars(const QString &);
+ void insertSpecialChars(const QVector<uint> &charCodes);
void slotNumbering(bool isOn);
void slotParentParEffects();
void slotDefaultOpticalMargins();
More information about the scribus-commit
mailing list