Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 5773 → Rev 5774

/branches/Version13x/Scribus/scribus/mpalette.h
155,6 → 155,7
void setLIvalue(Qt::PenStyle p, Qt::PenCapStyle pc, Qt::PenJoinStyle pj);
void setStil(int s);
void setAli(int e);
void setParStyle(int e);
void setShadowOffs(int x, int y);
void setUnderline(int p, int w);
void newUnderline();
251,14 → 252,12
void updateSpinBoxConstants();
 
signals:
void ToggleAllPalettes();
void DocChanged();
void NewAbStyle(int);
void BackHome();
void Stellung(int);
void EditCL();
void EditLSt();
void NewTF(const QString&);
void NewParStyle(int);
void NewAlignment(int);
void NewEffects(int);
void ShapeEdit();
void NewFont(const QString&);
void UpdtGui(int);
 
protected:
/branches/Version13x/Scribus/scribus/mpalette.cpp
909,10 → 909,11
reparent(m_MainWindow, this->getWFlags(), p2);
connect(this, SIGNAL(DocChanged()), m_MainWindow, SLOT(slotDocCh()));
connect(this, SIGNAL(NewAbStyle(int)), m_MainWindow, SLOT(setNewAbStyle(int)));
connect(this, SIGNAL(Stellung(int)), m_MainWindow, SLOT(setItemHoch(int)));
connect(this, SIGNAL(EditCL()), m_MainWindow, SLOT(ToggleFrameEdit()));
connect(this, SIGNAL(NewTF(const QString&)), m_MainWindow, SLOT(SetNewFont(const QString&)));
connect(this, SIGNAL(NewParStyle(int)), m_MainWindow, SLOT(setNewParStyle(int)));
connect(this, SIGNAL(NewAlignment(int)), m_MainWindow, SLOT(setNewAlignment(int)));
connect(this, SIGNAL(NewEffects(int)), m_MainWindow, SLOT(setItemHoch(int)));
connect(this, SIGNAL(ShapeEdit()), m_MainWindow, SLOT(ToggleFrameEdit()));
connect(this, SIGNAL(NewFont(const QString&)), m_MainWindow, SLOT(SetNewFont(const QString&)));
connect(this, SIGNAL(UpdtGui(int)), m_MainWindow, SLOT(HaveNewSel(int)));
connect(this->Cpal, SIGNAL(QueryItem()), m_MainWindow, SLOT(GetBrushPen()));
connect(this->Cpal->gradEdit->Preview, SIGNAL(gradientChanged()), m_MainWindow, SLOT(updtGradFill()));
1629,7 → 1630,7
}
}
updateGeometry();
setFocus();
// setFocus();
repaint();
connect(TabStack, SIGNAL(currentChanged(int)), this, SLOT(SelTab(int)));
}
1984,9 → 1985,9
if ((HaveDoc) && (HaveItem))
{
CurItem->setImageScalingMode(FreeScale->isChecked(), Aspect->isChecked());
emit UpdtGui(2);
emit UpdtGui(PageItem::ImageFrame);
emit DocChanged();
setFocus();
// setFocus();
}
}
 
2109,17 → 2110,29
return;
bool tmp = HaveItem;
HaveItem = false;
if (e < 5)
{
// if (e < 5)
// {
GroupAlign->setEnabled(true);
GroupAlign->setStyle(e);
}
else
GroupAlign->setEnabled(false);
// }
// else
// GroupAlign->setEnabled(false);
// Spal->setFormat(e);
HaveItem = tmp;
}
 
 
void Mpalette::setParStyle(int e)
{
if (!m_MainWindow || m_MainWindow->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
Spal->setFormat(e);
HaveItem = tmp;
}
 
 
void Mpalette::setTScaleV(int e)
{
if (!m_MainWindow || m_MainWindow->ScriptRunning)
2803,7 → 2816,7
}
setBH(CurItem->width(), CurItem->height());
updateGeometry();
setFocus();
// setFocus();
repaint();
}
 
2942,7 → 2955,7
if ((HaveDoc) && (HaveItem))
{
if (findParagraphStyle(doc, doc->currentStyle) < 5)
emit NewAbStyle(a);
emit NewAlignment(a);
}
}
 
2950,7 → 2963,7
{
if (!m_MainWindow || m_MainWindow->ScriptRunning)
return;
emit Stellung(s);
emit NewEffects(s);
}
 
void Mpalette::newShadowOffs()
3235,7 → 3248,7
TabStack->raiseWidget(1);
}
*/
emit EditCL();
emit ShapeEdit();
// emit DocChanged();
}
}
3287,7 → 3300,7
if (!m_MainWindow || m_MainWindow->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
emit NewTF(c);
emit NewFont(c);
}
 
void Mpalette::DoRevert()
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
4819,8 → 4819,9
}
#else
ParagraphStyle newPStyle;
if (s > 4)
if (s > 4) {
newPStyle.setParent( & currItem->document()->docParagraphStyles[s] );
}
else {
newPStyle.setAlignment(s);
}
4827,12 → 4828,19
if (appMode == modeEdit)
{
if (s > 4)
currItem->itemText.eraseStyle(currItem->CPos, currItem->itemText.paragraphStyle(currItem->CPos));
currItem->itemText.applyStyle(currItem->CPos, newPStyle);
}
else {
ParagraphStyle newDefStyle(currItem->itemText.defaultStyle());
newDefStyle.applyStyle(newPStyle);
currItem->itemText.setDefaultStyle(newDefStyle);
if (s > 4) {
currItem->itemText.setDefaultStyle(newPStyle);
}
else {
ParagraphStyle newDefStyle(currItem->itemText.defaultStyle());
newDefStyle.applyStyle(newPStyle);
currItem->itemText.setDefaultStyle(newDefStyle);
}
}
#endif
// update view
/branches/Version13x/Scribus/scribus/style.cpp
54,6 → 54,8
 
void CharStyle::applyCharStyle(const CharStyle & other)
{
if (other.parent() != NULL)
setParent(other.parent());
if (other.csize != NOVALUE)
csize = other.csize;
if (other.cshade != NOVALUE)
97,6 → 99,8
 
void CharStyle::eraseCharStyle(const CharStyle & other)
{
if (other.parent() == parent())
setParent(NULL);
if (other.csize == csize)
csize = NOVALUE;
if (other.cshade == cshade)
/branches/Version13x/Scribus/scribus/actionmanager.cpp
254,11 → 254,11
(*scrActions)["alignBlock"]->setToggleAction(true);
(*scrActions)["alignForced"]->setToggleAction(true);
 
connect( (*scrActions)["alignLeft"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignCenter"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignRight"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignBlock"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignForced"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignLeft"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
connect( (*scrActions)["alignCenter"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
connect( (*scrActions)["alignRight"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
connect( (*scrActions)["alignBlock"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
connect( (*scrActions)["alignForced"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
 
//Shade actions
scrActionGroups->insert("shade", new QActionGroup(mainWindow, "shade", true));
/branches/Version13x/Scribus/scribus/scribus.cpp
472,8 → 472,8
connect(outlinePalette, SIGNAL(selectElement(int, int, bool)), this, SLOT(selectItemsFromOutlines(int, int, bool)));
connect(outlinePalette, SIGNAL(selectPage(int)), this, SLOT(selectPagesFromOutlines(int)));
connect(outlinePalette, SIGNAL(selectMasterPage(QString)), this, SLOT(manageMasterPages(QString)));
connect(propertiesPalette->Spal, SIGNAL(newStyle(int)), this, SLOT(setNewAbStyle(int)));
connect(propertiesPalette, SIGNAL(EditLSt()), this, SLOT(slotEditLineStyles()));
connect(propertiesPalette->Spal, SIGNAL(newStyle(int)), this, SLOT(setNewParStyle(int)));
// connect(propertiesPalette, SIGNAL(EditLSt()), this, SLOT(slotEditLineStyles()));
connect(nodePalette, SIGNAL(Schliessen()), this, SLOT(NoFrameEdit()));
connect(nodePalette, SIGNAL(DocChanged()), this, SLOT(slotDocCh()));
connect(layerPalette, SIGNAL(LayerChanged()), this, SLOT(showLayer()));
992,9 → 992,10
if (currItem->itemText.length() != 0)
{
// int ChPos = QMIN(currItem->CPos, static_cast<int>(currItem->itemText.length()-1));
int currentParaStyle = findParagraphStyle(doc, currItem->currentStyle());
setAbsValue(currentParaStyle);
propertiesPalette->setAli(currentParaStyle);
const ParagraphStyle currPStyle(currItem->currentStyle());
int currentParaStyle = findParagraphStyle(doc, *dynamic_cast<const ParagraphStyle*>(currPStyle.parent()));
setAbsValue(currPStyle.alignment());
propertiesPalette->setParStyle(currentParaStyle);
doc->currentStyle.charStyle() = currItem->currentCharStyle();
emit TextUnderline(doc->currentStyle.charStyle().underlineOffset(), doc->currentStyle.charStyle().underlineWidth());
emit TextStrike(doc->currentStyle.charStyle().strikethruOffset(), doc->currentStyle.charStyle().strikethruWidth());
6555,7 → 6556,7
}
 
//CB-->Doc
void ScribusMainWindow::setNewAbStyle(int a)
void ScribusMainWindow::setNewAlignment(int a)
{
//setActiveWindow();
if (HaveDoc)
6570,9 → 6571,25
}
}
 
void ScribusMainWindow::setNewParStyle(int a)
{
//setActiveWindow();
if (HaveDoc)
{
doc->currentStyle = doc->docParagraphStyles[a];
doc->itemSelection_SetParagraphStyle(a);
//done in setTBvals propertiesPalette->setParStyle(a);
PageItem *currItem = doc->m_Selection->itemAt(0);
//view->RefreshItem(currItem); //CB Now calling drawnew in itemSelection_SetParagraphStyle
setTBvals(currItem);
slotDocCh();
}
}
 
void ScribusMainWindow::setAbsValue(int a)
{
doc->currentStyle = doc->docParagraphStyles[a];
// doc->currentStyle = doc->docParagraphStyles[a];
doc->currentStyle.setAlignment(a<5 ? a : 0);
propertiesPalette->setAli(a);
QString alignment[] = {"Left", "Center", "Right", "Block", "Forced"};
for (int b=0; b<5; ++b)
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
569,7 → 569,7
// Now apply the style.
int mode = ScMW->doc->appMode;
ScMW->doc->appMode = modeEdit;
ScMW->setNewAbStyle(styleid);
ScMW->setNewParStyle(styleid);
ScMW->doc->appMode = mode;
}
else // for multiple selection
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
293,7 → 293,7
ScMW->doc->m_Selection->addItem(i);
if (i->HasSel)
ScMW->doc->appMode = modeEdit;
ScMW->setNewAbStyle(alignment);
ScMW->setNewAlignment(alignment);
ScMW->doc->appMode = Apm;
ScMW->view->Deselect();
Py_INCREF(Py_None);
/branches/Version13x/Scribus/scribus/scribus.h
469,7 → 469,8
void saveStyles(StilFormate *dia);
void slotEditLineStyles();
void saveLStyles(LineFormate *dia);
void setNewAbStyle(int a);
void setNewAlignment(int a);
void setNewParStyle(int a);
void setAbsValue(int a);
void selectItemsFromOutlines(PageItem *ite);
void selectItemsFromOutlines(int Page, int Item, bool single = false);