Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 18533 → Rev 18534

/trunk/Scribus/scribus/ui/propertywidget_pareffectbase.ui
36,7 → 36,7
<item row="1" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QCheckBox" name="peIndent_">
<widget class="QCheckBox" name="peIndent">
<property name="text">
<string>AutoIndent</string>
</property>
61,12 → 61,12
<string>Offset</string>
</property>
<property name="buddy">
<cstring>peOffset_</cstring>
<cstring>peOffset</cstring>
</property>
</widget>
</item>
<item>
<widget class="ScrSpinBox" name="peOffset_">
<widget class="ScrSpinBox" name="peOffset">
<property name="minimum">
<double>-3000.000000000000000</double>
</property>
283,7 → 283,7
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1">
<widget class="QComboBox" name="bulletStrEdit_">
<widget class="QComboBox" name="bulletStrEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
307,12 → 307,12
<string>Bullet Char(s)</string>
</property>
<property name="buddy">
<cstring>bulletStrEdit_</cstring>
<cstring>bulletStrEdit</cstring>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="bulletCharTableButton_">
<widget class="QPushButton" name="bulletCharTableButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
/trunk/Scribus/scribus/ui/propertywidget_pareffect.h
65,7 → 65,7
void handlePECharStyle(QString);
 
private slots:
void on_bulletCharTableButton__toggled(bool checked);
void on_bulletCharTableButton_toggled(bool checked);
void insertSpecialChars(const QString &chars);
 
private:
77,13 → 77,13
void enableParEffect(bool);
void fillBulletStrEditCombo()
{
bulletStrEdit_->clear();
bulletStrEdit_->addItem(QChar(0x2022));
bulletStrEdit_->addItem("*");
bulletStrEdit_->addItem(QChar(0x2013));
bulletStrEdit_->setMinimumWidth(50);
if (bulletStrEdit_->currentText().isEmpty())
bulletStrEdit_->setEditText(QChar(0x2022));
bulletStrEdit->clear();
bulletStrEdit->addItem(QChar(0x2022));
bulletStrEdit->addItem("*");
bulletStrEdit->addItem(QChar(0x2013));
bulletStrEdit->setMinimumWidth(50);
if (bulletStrEdit->currentText().isEmpty())
bulletStrEdit->setEditText(QChar(0x2022));
}
 
void fillNumFormatCombo()
/trunk/Scribus/scribus/ui/propertiespalette.cpp
239,6 → 239,9
 
connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
connect(m_doc , SIGNAL(docChanged()) , this, SLOT(handleSelectionChanged()));
 
// Handle properties update when switching document
handleSelectionChanged();
}
 
void PropertiesPalette::unsetDoc()
406,6 → 409,8
SelTab(TabStack->currentIndex());
}
 
if (!sender())
{
xyzPal->handleSelectionChanged();
shapePal->handleSelectionChanged();
groupPal->handleSelectionChanged();
413,6 → 418,8
linePal->handleSelectionChanged();
textPal->handleSelectionChanged();
tablePal->handleSelectionChanged();
Cpal->handleSelectionChanged();
}
 
if (m_item->asOSGFrame())
{
/trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
31,7 → 31,7
fillBulletStrEditCombo();
fillNumFormatCombo();
enableParEffect(false);
bulletCharTableButton_->setIcon(loadIcon("22/insert-table.png"));
bulletCharTableButton->setIcon(loadIcon("22/insert-table.png"));
numStart->setMinimum(1);
numStart->setMaximum(9999);
numLevelSpin->setMinimum(1);
67,15 → 67,17
disconnectSignals();
return;
}
fillNumerationsCombo();
 
m_unitRatio = m_doc->unitRatio();
m_unitIndex = m_doc->unitIndex();
peOffset_->setSuffix(unitGetSuffixFromIndex(0));
 
fillNumerationsCombo();
 
connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
connect(m_doc , SIGNAL(docChanged()) , this, SLOT(handleSelectionChanged()));
connectSignals();
 
// Handle properties update when switching document
handleSelectionChanged();
}
 
void PropertyWidget_ParEffect::setCurrentItem(PageItem *item)
84,6 → 86,7
setDoc(item->doc());
 
m_item = item;
disconnectSignals();
 
if (!m_item) return;
 
96,6 → 99,7
else if (m_doc->appMode == modeEditTable)
m_item->asTable()->activeCell().textFrame()->currentTextProps(parStyle);
updateStyle(parStyle);
connectSignals();
}
}
 
107,9 → 111,9
m_unitRatio = m_doc->unitRatio();
m_unitIndex = m_doc->unitIndex();
 
peOffset_->blockSignals(true);
peOffset_->setNewUnit( m_unitIndex );
peOffset_->blockSignals(false);
peOffset->blockSignals(true);
peOffset->setNewUnit( m_unitIndex );
peOffset->blockSignals(false);
}
 
void PropertyWidget_ParEffect::fillNumerationsCombo()
153,8 → 157,8
}
void PropertyWidget_ParEffect::enableBullet(bool enable)
{
bulletStrEdit_->setVisible(enable);
bulletCharTableButton_->setVisible(enable);
bulletStrEdit->setVisible(enable);
bulletCharTableButton->setVisible(enable);
bullGroup->setVisible(enable);
if (enable)
{
179,9 → 183,9
}
void PropertyWidget_ParEffect::enableParEffect(bool enable)
{
peOffset_->setVisible(enable);
peOffset->setVisible(enable);
peCharStyleCombo->setVisible(enable);
peIndent_->setVisible(enable);
peIndent->setVisible(enable);
peGroup->setVisible(enable);
if (!enable)
{
223,7 → 227,7
QString numName = numComboBox->currentText();
int nFormat = 0;
dropCapLines->setValue(newPStyle.dropCapLines());
bulletStrEdit_->setEditText(newPStyle.bulletStr());
bulletStrEdit->setEditText(newPStyle.bulletStr());
numName = newPStyle.numName();
if (numName == "")
numName = "<local block>";
240,8 → 244,8
 
nFormat = newPStyle.numFormat();
numFormatCombo->setCurrentIndex(nFormat);
peOffset_->setValue(newPStyle.parEffectOffset() * m_unitRatio);
peIndent_->setChecked(newPStyle.parEffectIndent());
peOffset->setValue(newPStyle.parEffectOffset() * m_unitRatio);
peIndent->setChecked(newPStyle.parEffectIndent());
displayCharStyle(newPStyle.peCharStyleName());
 
enableParEffect(enablePE);
252,7 → 256,7
{
connect(peCombo, SIGNAL(activated(int)), this, SLOT(handleParEffectUse()), Qt::UniqueConnection);
connect(dropCapLines, SIGNAL(valueChanged(int)), this, SLOT(handleDropCapLines(int)), Qt::UniqueConnection);
connect(bulletStrEdit_, SIGNAL(editTextChanged(QString)), this, SLOT(handleBulletStr(QString)), Qt::UniqueConnection);
connect(bulletStrEdit, SIGNAL(editTextChanged(QString)), this, SLOT(handleBulletStr(QString)), Qt::UniqueConnection);
connect(numComboBox, SIGNAL(activated(QString)), this, SLOT(handleNumName(QString)), Qt::UniqueConnection);
connect(numLevelSpin, SIGNAL(valueChanged(int)), this, SLOT(handleNumLevel(int)), Qt::UniqueConnection);
connect(numFormatCombo, SIGNAL(activated(int)), this, SLOT(handleNumFormat(int)), Qt::UniqueConnection);
259,8 → 263,8
connect(numPrefix, SIGNAL(textChanged(QString)), this, SLOT(handleNumPrefix(QString)), Qt::UniqueConnection);
connect(numSuffix, SIGNAL(textChanged(QString)), this, SLOT(handleNumSuffix(QString)), Qt::UniqueConnection);
connect(numStart, SIGNAL(valueChanged(int)), this, SLOT(handleNumStart(int)), Qt::UniqueConnection);
connect(peOffset_, SIGNAL(valueChanged(double)), this, SLOT(handlePEOffset(double)), Qt::UniqueConnection);
connect(peIndent_, SIGNAL(toggled(bool)), this, SLOT(handlePEIndent(bool)), Qt::UniqueConnection);
connect(peOffset, SIGNAL(valueChanged(double)), this, SLOT(handlePEOffset(double)), Qt::UniqueConnection);
connect(peIndent, SIGNAL(toggled(bool)), this, SLOT(handlePEIndent(bool)), Qt::UniqueConnection);
connect(peCharStyleCombo, SIGNAL(activated(QString)), this, SLOT(handlePECharStyle(QString)), Qt::UniqueConnection);
}
 
268,7 → 272,7
{
disconnect(peCombo, SIGNAL(activated(int)), this, SLOT(handleParEffectUse()));
disconnect(dropCapLines, SIGNAL(valueChanged(int)), this, SLOT(handleDropCapLines(int)));
disconnect(bulletStrEdit_, SIGNAL(editTextChanged(QString)), this, SLOT(handleBulletStr(QString)));
disconnect(bulletStrEdit, SIGNAL(editTextChanged(QString)), this, SLOT(handleBulletStr(QString)));
disconnect(numComboBox, SIGNAL(activated(QString)), this, SLOT(handleNumName(QString)));
disconnect(numLevelSpin, SIGNAL(valueChanged(int)), this, SLOT(handleNumLevel(int)));
disconnect(numFormatCombo, SIGNAL(activated(int)), this, SLOT(handleNumFormat(int)));
275,8 → 279,8
disconnect(numPrefix, SIGNAL(textChanged(QString)), this, SLOT(handleNumPrefix(QString)));
disconnect(numSuffix, SIGNAL(textChanged(QString)), this, SLOT(handleNumSuffix(QString)));
disconnect(numStart, SIGNAL(valueChanged(int)), this, SLOT(handleNumStart(int)));
disconnect(peOffset_, SIGNAL(valueChanged(double)), this, SLOT(handlePEOffset(double)));
disconnect(peIndent_, SIGNAL(toggled(bool)), this, SLOT(handlePEIndent(bool)));
disconnect(peOffset, SIGNAL(valueChanged(double)), this, SLOT(handlePEOffset(double)));
disconnect(peIndent, SIGNAL(toggled(bool)), this, SLOT(handlePEIndent(bool)));
disconnect(peCharStyleCombo, SIGNAL(activated(QString)), this, SLOT(handlePECharStyle(QString)));
}
 
341,7 → 345,7
{
enableBullet(true);
newStyle.setHasBullet(true);
QString bStr = bulletStrEdit_->currentText();
QString bStr = bulletStrEdit->currentText();
if (bStr.isEmpty())
bStr = QChar(0x2022);
newStyle.setBulletStr(bStr);
372,8 → 376,8
newStyle.setHasBullet(false);
newStyle.setHasNum(false);
}
newStyle.setParEffectOffset(peOffset_->value() / m_unitRatio);
newStyle.setParEffectIndent(peIndent_->isChecked());
newStyle.setParEffectOffset(peOffset->value() / m_unitRatio);
newStyle.setParEffectIndent(peIndent->isChecked());
handleChanges(m_item, newStyle);
}
 
554,8 → 558,8
dropCapsGroup->setTitle(tr("Drop Caps"));
bullGroup->setTitle(tr("Bulleted List"));
bulletCharLabel->setText(tr("Bullet Char(s)"));
bulletCharTableButton_->setToolTip(tr("Enhanced char table to choose bullet chars"));
bulletCharTableButton_->setText(tr("Char Table"));
bulletCharTableButton->setToolTip(tr("Enhanced char table to choose bullet chars"));
bulletCharTableButton->setText(tr("Char Table"));
numGroup->setTitle(tr("Numbered List"));
numLevelLabel->setText(tr("Level"));
numComboLabel->setText(tr("Set"));
564,7 → 568,7
numPrefixLabel->setText(tr("Prefix"));
numSuffixLabel->setText(tr("Suffix"));
peOffsetLabel->setText(tr("Offset"));
peIndent_->setText(tr("Auto-Indent"));
peIndent->setText(tr("Auto-Indent"));
peCharStyleLabel->setText(tr("Char Style"));
peCharStyleCombo->setToolTip(tr("Choose chracter style or leave blank for use default paragraph style"));
}
578,7 → 582,7
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(paletteShown(bool)), bulletCharTableButton_, SLOT(setChecked(bool)));
connect(m_enhanced, SIGNAL(paletteShown(bool)), bulletCharTableButton, SLOT(setChecked(bool)));
m_enhanced->setDoc(m_doc);
m_enhanced->setEnabled(true);
QString styleName = peCharStyleCombo->currentText();
593,13 → 597,13
if (!m_enhanced || show)
return;
disconnect(m_enhanced, SIGNAL(insertSpecialChars(const QString &)), this, SLOT(insertSpecialChars(const QString &)));
disconnect(m_enhanced, SIGNAL(paletteShown(bool)), bulletCharTableButton_, SLOT(setChecked(bool)));
disconnect(m_enhanced, SIGNAL(paletteShown(bool)), bulletCharTableButton, SLOT(setChecked(bool)));
m_enhanced->close();
delete m_enhanced;
m_enhanced = NULL;
}
 
void PropertyWidget_ParEffect::on_bulletCharTableButton__toggled(bool checked)
void PropertyWidget_ParEffect::on_bulletCharTableButton_toggled(bool checked)
{
if (m_enhanced && !checked)
closeEnhanced();
608,5 → 612,5
}
void PropertyWidget_ParEffect::insertSpecialChars(const QString &chars)
{
bulletStrEdit_->lineEdit()->setText(chars);
bulletStrEdit->lineEdit()->setText(chars);
}
/trunk/Scribus/scribus/ui/propertiespalette_text.cpp
341,6 → 341,11
 
m_haveItem = true;
 
if (!sender())
{
parEffectWidgets->handleSelectionChanged();
}
 
if (m_item->asTextFrame() || m_item->asPathText() || m_item->asTable())
{
ParagraphStyle parStyle = m_item->itemText.defaultStyle();