28 setMinimumSize(600, 400);
33 m_quickWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
36 this->setWindowTitle(i18nc(
"@title:window",
"Edit Style Preset"));
39 Q_FOREACH (
const QString langCode, KLocalizedString::languages()) {
40 wellFormedBCPNames.append(langCode.split(
"_").join(
"-"));
46 m_quickWidget->setSource(QUrl(
"qrc:/CssStylePresetEdit.qml"));
49 qWarning() <<
"Errors in " << windowTitle() <<
":" <<
m_quickWidget->errors();
52 m_quickWidget->rootObject()->setProperty(
"locales", QVariant::fromValue(wellFormedBCPNames));
110 const QString before =
m_quickWidget->rootObject()->property(
"beforeSample").toString();
111 const QString sample =
m_quickWidget->rootObject()->property(
"sampleText").toString();
112 const QString after =
m_quickWidget->rootObject()->property(
"afterSample").toString();
113 const QString styleType =
m_quickWidget->rootObject()->property(
"styleType").toString();
158 const bool makePixelRelative =
m_quickWidget->rootObject()->property(
"makePixelRelative").toBool();
160 const int canvasPPI =
m_quickWidget->rootObject()->property(
"canvasDPI").toInt();
162 if (storedPPI > 0 && !makePixelRelative) {
163 const double scale = double(storedPPI)/double(canvasPPI);
166 }
else if(storedPPI == 0 && makePixelRelative) {
167 const double scale = double(canvasPPI)/double(72);
The KoSvgTextPropertiesModel class.
lager::cursor< KoSvgTextPropertyData > textData
void scaleAbsoluteValues(const double scaleInline=1.0, const double scaleBlock=1.0)
scaleAbsoluteValues This scales all absolute values stored in these text properties....
The KoSvgTextPropertyData struct.
KoSvgTextProperties commonProperties
The properties common between all the selected text.
KoSvgTextProperties inheritedProperties
The properties that are inherited, so that widgets may be set correctly.