From: Simon A. Eugster Date: Sat, 20 Jun 2009 12:19:27 +0000 (+0000) Subject: re-indented ;) and more character explanations added X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d0d2c1275ae7c561cbddeef3baa8f29cf1fa68bc;p=kdenlive re-indented ;) and more character explanations added svn path=/trunk/kdenlive/; revision=3604 --- diff --git a/src/titlewidget.cpp b/src/titlewidget.cpp index 71b7d12a..db5d8b78 100644 --- a/src/titlewidget.cpp +++ b/src/titlewidget.cpp @@ -236,7 +236,7 @@ TitleWidget::TitleWidget(KUrl url, QString projectPath, Render *render, QWidget } m_unicodeDialog = new UnicodeDialog(UnicodeDialog::InputHex, m_lastUnicodeNumber); connect(m_unicodeDialog, SIGNAL(charSelected(QString)), this, SLOT(slotInsertUnicodeString(QString))); - connect(m_unicodeDialog, SIGNAL(newUnicodeNumber(QString)), this, SLOT(slotUnicodeNumber(QString))); + connect(m_unicodeDialog, SIGNAL(newUnicodeNumber(QString)), this, SLOT(slotUnicodeNumber(QString))); } TitleWidget::~TitleWidget() @@ -949,7 +949,7 @@ void TitleWidget::slotInsertUnicodeString(QString text) void TitleWidget::slotUnicodeNumber(QString newUnicodeNumber) { - m_lastUnicodeNumber = newUnicodeNumber; + m_lastUnicodeNumber = newUnicodeNumber; } void TitleWidget::slotUpdateText() @@ -1230,9 +1230,9 @@ void TitleWidget::writeChoices() titleConfig.writeEntry("background_alpha", horizontalSlider->value()); titleConfig.writeEntry("crop_image", cropImage->isChecked()); - - titleConfig.writeEntry("unicode_number", m_lastUnicodeNumber); - + + titleConfig.writeEntry("unicode_number", m_lastUnicodeNumber); + //! \todo Not sure if I should sync - it is probably safe to do it config->sync(); @@ -1263,7 +1263,7 @@ void TitleWidget::readChoices() horizontalSlider->setValue(titleConfig.readEntry("background_alpha", horizontalSlider->value())); cropImage->setChecked(titleConfig.readEntry("crop_image", cropImage->isChecked())); - - m_lastUnicodeNumber = titleConfig.readEntry("unicode_number", QString("2013")); + + m_lastUnicodeNumber = titleConfig.readEntry("unicode_number", QString("2013")); } diff --git a/src/titlewidget.h b/src/titlewidget.h index 70711fd5..9b20154b 100644 --- a/src/titlewidget.h +++ b/src/titlewidget.h @@ -97,8 +97,8 @@ private: QAction *m_buttonLoad; /** \brief Dialog for entering unicode in text fields */ UnicodeDialog *m_unicodeDialog; - /** \brief Stores the last used unicode */ - QString m_lastUnicodeNumber; + /** \brief Stores the last used unicode */ + QString m_lastUnicodeNumber; /** project path for storing title clips */ QString m_projectPath; /** \brief Store the current choices of font, background and rect values */ @@ -187,8 +187,8 @@ private slots: void slotUpdateText(); void slotInsertUnicode(); void slotInsertUnicodeString(QString); - /** \brief Called when unicode dialog closed, updates the last selected unicode number */ - void slotUnicodeNumber(QString); + /** \brief Called when unicode dialog closed, updates the last selected unicode number */ + void slotUnicodeNumber(QString); void displayBackgroundFrame(); @@ -198,7 +198,7 @@ private slots: void slotRectTool(); void slotSelectTool(); void slotImageTool(); - + /** \brief Called when accepted, stores the user selections for next time use */ void slotAccepted(); diff --git a/src/unicodedialog.cpp b/src/unicodedialog.cpp index 8a7b06ff..1eb151f5 100644 --- a/src/unicodedialog.cpp +++ b/src/unicodedialog.cpp @@ -17,13 +17,13 @@ const uint MAX_UNICODE_V1 = 65535; /// CONSTRUCTORS/DECONSTRUCTORS -UnicodeDialog::UnicodeDialog(InputMethod inputMeth, QString lastUnicodeNumber) : - inputMethod(inputMeth), - m_lastCursorPos(0), - m_lastUnicodeNumber(lastUnicodeNumber) +UnicodeDialog::UnicodeDialog(InputMethod inputMeth, QString lastUnicodeNumber) : + inputMethod(inputMeth), + m_lastCursorPos(0), + m_lastUnicodeNumber(lastUnicodeNumber) { setupUi(this); - showLastUnicode(); + showLastUnicode(); connect(unicodeNumber, SIGNAL(textChanged(QString)), this, SLOT(slotTextChanged(QString))); connect(unicodeNumber, SIGNAL(returnPressed()), this, SLOT(slotReturnPressed())); connect(arrowUp, SIGNAL(clicked()), this, SLOT(slotNextUnicode())); @@ -44,8 +44,8 @@ UnicodeDialog::UnicodeDialog(InputMethod inputMeth, QString lastUnicodeNumber) : arrowUp->setToolTip(i18n("Next Unicode character (Arrow Up)")); arrowDown->setToolTip(i18n("Previous Unicode character (Arrow Down)")); unicodeNumber->setToolTip(i18n("Enter your Unicode number here. Allowed characters: [0-9] and [a-f].")); - unicodeNumber->selectAll(); // Selection will be reset by setToolTip and similar, so set it here - + unicodeNumber->selectAll(); // Selection will be reset by setToolTip and similar, so set it here + } UnicodeDialog::~UnicodeDialog() @@ -58,8 +58,8 @@ UnicodeDialog::~UnicodeDialog() void UnicodeDialog::showLastUnicode() { unicodeNumber->setText(m_lastUnicodeNumber); - unicodeNumber->selectAll(); - slotTextChanged(m_lastUnicodeNumber); + unicodeNumber->selectAll(); + slotTextChanged(m_lastUnicodeNumber); } bool UnicodeDialog::controlCharacter(QString text) @@ -116,11 +116,11 @@ QString UnicodeDialog::unicodeInfo(QString unicode) } else if (u == "a") { infoText = i18n("Line Feed (newline character, \\\\n)"); } else if (u == "20") { - infoText = i18n("Standard space character. (See U+00a0 and U+2000–200b)"); + infoText = i18n("Standard space character. (Other space characters: U+00a0, U+2000–200b, U+202f)"); } else if (u == "a0") { - infoText = i18n("No-break space.   in HTML. See U+0020."); - } else if (u == "ab" || u == "bb" || u == "2039" || u == "203a") { - infoText = i18n("

« (u+00ab, &lfquo; in HTML) and » (u+00bb, &rfquo; in HTML) are called Guillemets or angle quotes. Usage in different countries: « France Â» (with non-breaking Space 0x00a0), «Switzerland», »Germany«, »Finland and Sweden».

and (U+2039/203a, ‹/›) are their single quote equivalents.

See Wikipedia:Guillemets

"); + infoText = i18n("No-break space.   in HTML. See U+2009 and U+0020."); + } else if (u == "ab" || u == "bb" || u == "2039" || u == "203a") { + infoText = i18n("

« (u+00ab, &lfquo; in HTML) and » (u+00bb, &rfquo; in HTML) are called Guillemets or angle quotes. Usage in different countries: « France Â» (with non-breaking Space 0x00a0), «Switzerland», »Germany«, »Finland and Sweden».

and (U+2039/203a, ‹/›) are their single quote equivalents.

See Wikipedia:Guillemets

"); } else if (u == "2002") { infoText = i18n("En Space (width of an n)"); } else if (u == "2003") { @@ -136,7 +136,7 @@ QString UnicodeDialog::unicodeInfo(QString unicode) } else if (u == "2008") { infoText = i18n("Punctuation Space. Width the same as between a punctuation character and the next character."); } else if (u == "2009") { - infoText = i18n("Thin space, in HTML also  . See Wikipedia:Space_(punctuation)"); + infoText = i18n("Thin space, in HTML also  . See U+202f and Wikipedia:Space_(punctuation)"); } else if (u == "200a") { infoText = i18n("Hair Space. Thinner than U+2009."); } else if (u == "2019") { @@ -145,8 +145,14 @@ QString UnicodeDialog::unicodeInfo(QString unicode) infoText = i18n("

An en Dash (dash of the width of an n).

Usage examples: In English language for value ranges (1878–1903), for relationships/connections (Zurich–Dublin). In the German language it is also used (with spaces!) for showing thoughts: “Es war – wie immer in den Ferien – ein regnerischer Tag.

See Wikipedia:Dash

"); } else if (u == "2014") { infoText = i18n("

An em Dash (dash of the widht of an m).

Usage examples: In English language to mark—like here—thoughts. Traditionally without spaces.

See Wikipedia:Dash

"); + } else if (u == "202f") { + infoText = i18n("

Narrow no-break space. Has the same width as U+2009.

Usage: For units (spaces are marked with U+2423, ␣): 230␣V, −21␣°C, 50␣lb, but 90° (no space). In German for abbreviations (like: i. d. R. instead of i. d. R. with U+00a0).

See Wikipedia:de:Schmales_Leerzeichen

"); } else if (u == "2026") { infoText = i18n("Ellipsis: If text has been left o… See Wikipedia:Ellipsis"); + } else if (u == "2212") { + infoText = i18n("Minus sign. For numbers: −42"); + } else if (u == "2423") { + infoText = i18n("Open box; stands for a space."); } else { infoText = i18n("No additional information available for this character."); } @@ -307,7 +313,7 @@ void UnicodeDialog::slotReturnPressed() QString text = trimmedUnicodeNumber(unicodeNumber->text()); if (!controlCharacter(text)) { emit charSelected(unicodeChar->text()); - emit newUnicodeNumber(unicodeNumber->text()); + emit newUnicodeNumber(unicodeNumber->text()); } emit accept(); } diff --git a/src/unicodedialog.h b/src/unicodedialog.h index 3dde58c4..f68a90ae 100644 --- a/src/unicodedialog.h +++ b/src/unicodedialog.h @@ -58,8 +58,8 @@ private: signals: /** \brief Contains the selected unicode character; emitted when Enter is pressed. */ void charSelected(const QString&); - /** \brief Contains the last used unicode number. */ - void newUnicodeNumber(const QString&); + /** \brief Contains the last used unicode number. */ + void newUnicodeNumber(const QString&); private slots: void slotTextChanged(QString text); diff --git a/thumbnailer/westleypreview.cpp b/thumbnailer/westleypreview.cpp index 3b3ae15e..c0caa653 100644 --- a/thumbnailer/westleypreview.cpp +++ b/thumbnailer/westleypreview.cpp @@ -40,7 +40,8 @@ #define DBG_AREA //#include "config.h" -extern "C" { +extern "C" +{ KDE_EXPORT ThumbCreator *new_creator() { return new MltPreview; }