Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 3940 → Rev 3941

/branches/Version13x/Scribus/scribus/hruler.cpp
221,7 → 221,8
RulerCode = 0;
currView->DrawNew();
//currView->EmitValues(currView->SelItem.at(0));
currView->EmitValues(currDoc->selection->itemAt(0));
//currView->EmitValues(currDoc->selection->itemAt(0));
currDoc->selection->itemAt(0)->emitAllToGUI();
}
else
{
/branches/Version13x/Scribus/scribus/scribusview.h
210,8 → 210,8
void selectPage(QMouseEvent *m);
bool SeleItem(QMouseEvent *m);
void SetupDraw(int Nr);
void updateGradientVectors(PageItem *currItem);
void EmitValues(PageItem *currItem);
//void updateGradientVectors(PageItem *currItem);
//void EmitValues(PageItem *currItem);
void Transform(PageItem *currItem, QPainter *p);
void TransformM(PageItem *currItem, QPainter *p);
void SetFrameRect();
/branches/Version13x/Scribus/scribus/pageitem.h
1093,6 → 1093,7
void rotation(double); //Degrees rotation
void colors(QString, QString, int, int); //lineColor, fillColor, lineShade, fillShade
void gradientType(int); //Normal, horizontal, vertical, etc.
void gradientColorUpdate(double, double, double, double, double, double); //Cpal updatespecialgradient
void transparency(double, double); //fillTransparency, lineTransparency
//Shape signals
void columns(int, double); //Number, gap
/branches/Version13x/Scribus/scribus/pageitem.cpp
3528,8 → 3528,11
GrStartX = QMIN(QMAX(GrStartX, 0), Width);
GrStartY = QMIN(QMAX(GrStartY, 0), Height);
//if (ScApp->view->SelItem.count()!=0 && this==ScApp->view->SelItem.at(0))
if (Doc->selection->count()!=0 && Doc->selection->primarySelectionIsMyself(this))
ScApp->propertiesPalette->updateColorSpecialGradient();
//if (Doc->selection->count()!=0 && Doc->selection->primarySelectionIsMyself(this))
// ScApp->propertiesPalette->updateColorSpecialGradient();
//CB Will only emit if connected, ie is first in GUI selection
double dur=Doc->unitRatio();
emit gradientColorUpdate(GrStartX*dur, GrStartY*dur, GrEndX*dur, GrEndY*dur, Width*dur, Height*dur);
}
 
void PageItem::SetPolyClip(int up)
3603,6 → 3606,7
connect(this, SIGNAL(colors(QString, QString, int, int)), ScApp, SLOT(setCSMenu(QString, QString, int, int)));
connect(this, SIGNAL(colors(QString, QString, int, int)), ScApp->propertiesPalette->Cpal, SLOT(setActFarben(QString, QString, int, int)));
connect(this, SIGNAL(gradientType(int)), ScApp->propertiesPalette->Cpal, SLOT(setActGradient(int)));
connect(this, SIGNAL(gradientColorUpdate(double, double, double, double, double, double)), ScApp->propertiesPalette->Cpal, SLOT(setSpecialGradient(double, double, double, double, double, double)));
connect(this, SIGNAL(rotation(double)), ScApp->propertiesPalette, SLOT(setR(double)));
connect(this, SIGNAL(transparency(double, double)), ScApp->propertiesPalette->Cpal, SLOT(setActTrans(double, double)));
//Shape signals
3649,5 → 3653,23
emit position(Xpos, Ypos);
emit widthAndHeight(Width, Height);
emit rotation(Rot);
// TODO, add the rest
emit lineWidth(Pwidth);
emit lineStyleCapJoin(PLineArt, PLineEnd, PLineJoin);
emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY );
emit colors(lineColorVal, fillColorVal, lineShadeVal, fillShadeVal);
emit gradientType(GrType);
double dur=Doc->unitRatio();
emit gradientColorUpdate(GrStartX*dur, GrStartY*dur, GrEndX*dur, GrEndY*dur, Width*dur, Height*dur);
if (GrType == 0)
emit transparency(fillTransparencyVal, lineTransparencyVal);
emit lineSpacing(LineSp);
emit textKerning(ExtraV);
emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
emit columns(Cols, ColGap);
if (Doc->appMode != modeEdit)
{
emit textStyle(textAlignment);
emit textFont(IFont);
emit textSize(ISize);
}
}
/branches/Version13x/Scribus/scribus/scribusview.cpp
1232,8 → 1232,9
}
else
//EmitValues(SelItem.at(0));
EmitValues(Doc->selection->itemAt(0));
updateContents();
//EmitValues(Doc->selection->itemAt(0));
Doc->selection->itemAt(0)->emitAllToGUI();
updateContents();
// }
}
}
1262,7 → 1263,8
currItem->isSingleSel = true;
//currItem->Select = true;
emit HaveSel(currItem->itemType());
EmitValues(currItem);
//EmitValues(currItem);
currItem->emitAllToGUI();
currItem->paintObj();
}
}
2708,7 → 2710,8
setMenTxt(currItem->OwnPage);
}
emit HaveSel(currItem->itemType());
EmitValues(currItem);
//EmitValues(currItem);
currItem->emitAllToGUI();
updateContents();
emit DocChanged();
}
2781,7 → 2784,10
else
{
emit HaveSel(currItem->itemType());
EmitValues(currItem);
//CB Dont think we need this here with the new selection code
//For a select, deselect operation, this will cause 2x emit
//EmitValues(currItem);
//currItem->emitAllToGUI();
}
}
}
7148,7 → 7154,8
emit ItemGeom(w, h);
}
else
EmitValues(currItem);
//EmitValues(currItem);
currItem->emitAllToGUI();
emit HaveSel(currItem->itemType());
}
}
7364,7 → 7371,8
}
else
{
EmitValues(currItem);
//EmitValues(currItem);
currItem->emitAllToGUI();
if (currItem->asLine())
emit ItemGeom(currItem->width(), currItem->height());
emit HaveSel(currItem->itemType());
7523,10 → 7531,12
}
else
{
EmitValues(currItem);
//CB Dont need this as creating the 0th selection does this
//EmitValues(currItem);
//currItem->emitAllToGUI();
currItem->paintObj();
if (currItem->asLine())
emit ItemGeom(currItem->width(), currItem->height());
//if (currItem->asLine())
// emit ItemGeom(currItem->width(), currItem->height());
emit HaveSel(currItem->itemType());
}
//if (SelItem.count() == 1)
7725,6 → 7735,7
ScApp->propertiesPalette->setGradientEditMode(false);
}
 
/*
void ScribusView::updateGradientVectors(PageItem *currItem)
{
currItem->updateGradientVectors();
7732,6 → 7743,7
if (Doc->selection->primarySelectionIsMyself(currItem))
ScApp->propertiesPalette->updateColorSpecialGradient();
}
*/
 
void ScribusView::SetupDraw(int nr)
{
7751,11 → 7763,14
Doc->appMode = modeNormal;
emit DocChanged();
currItem->Sizing = currItem->asLine() ? false : true;
EmitValues(currItem);
//EmitValues(currItem);
currItem->emitAllToGUI();
}
 
/*
void ScribusView::EmitValues(PageItem *currItem)
{
//emit ItemPos(currItem->xPos(), currItem->yPos());
//emit ItemGeom(currItem->width(), currItem->height());
//emit SetAngle(currItem->rotation());
7778,7 → 7793,7
}
ScApp->propertiesPalette->updateColorSpecialGradient();
}
 
*/
void ScribusView::ToggleBookmark()
{
//if (SelItem.count() != 0)
8909,7 → 8924,8
}
else
//EmitValues(SelItem.at(0));
EmitValues(Doc->selection->itemAt(0));
//EmitValues(Doc->selection->itemAt(0));
Doc->selection->itemAt(0)->emitAllToGUI();
}
}
 
11018,7 → 11034,8
//SelItem.append(currItem);
Doc->selection->addItem(currItem);
emit HaveSel(currItem->itemType());
EmitValues(currItem);
//EmitValues(currItem);
currItem->emitAllToGUI();
emit DocChanged();
updateContents();
}
11101,7 → 11118,8
emit HaveSel(newItem->itemType());
if (!Doc->isLoading())
emit UpdtObj(Doc->currentPage->pageNr(), newItem->ItemNr);
EmitValues(newItem);
//EmitValues(newItem);
newItem->emitAllToGUI();
emit DocChanged();
}
 
11116,7 → 11134,8
emit HaveSel(newItem->itemType());
if (!Doc->isLoading())
emit UpdtObj(Doc->currentPage->pageNr(), newItem->ItemNr);
EmitValues(newItem);
//EmitValues(newItem);
newItem->emitAllToGUI();
emit DocChanged();
}
 
11131,7 → 11150,8
emit HaveSel(newItem->itemType());
if (!Doc->isLoading())
emit UpdtObj(Doc->currentPage->pageNr(), newItem->ItemNr);
EmitValues(newItem);
//EmitValues(newItem);
newItem->emitAllToGUI();
emit DocChanged();
}
 
11146,7 → 11166,8
emit HaveSel(newItem->itemType());
if (!Doc->isLoading())
emit UpdtObj(Doc->currentPage->pageNr(), newItem->ItemNr);
EmitValues(newItem);
//EmitValues(newItem);
newItem->emitAllToGUI();
emit DocChanged();
}
 
11161,7 → 11182,8
emit HaveSel(newItem->itemType());
if (!Doc->isLoading())
emit UpdtObj(Doc->currentPage->pageNr(), newItem->ItemNr);
EmitValues(newItem);
//EmitValues(newItem);
newItem->emitAllToGUI();
emit DocChanged();
}
 
11193,7 → 11215,8
emit HaveSel(newItem->itemType());
if (!Doc->isLoading())
emit UpdtObj(Doc->currentPageNumber(), newItem->ItemNr);
EmitValues(newItem);
//EmitValues(newItem);
newItem->emitAllToGUI();
emit DocChanged();
}
}
/branches/Version13x/Scribus/scribus/scribus.cpp
1886,7 → 1886,8
//HaveNewSel(view->SelItem.at(0)->itemType());
HaveNewSel(doc->selection->itemAt(0)->itemType());
//view->EmitValues(view->SelItem.at(0));
view->EmitValues(doc->selection->itemAt(0));
//view->EmitValues(doc->selection->itemAt(0));
doc->selection->itemAt(0)->emitAllToGUI();
}
else
HaveNewSel(-1);
4521,7 → 4522,9
{
//currItem = view->SelItem.at(0);
currItem = doc->selection->itemAt(0);
view->EmitValues(currItem);
//CB Dont need this with the new selection code
//view->EmitValues(currItem);
//currItem->emitAllToGUI();
HaveNewSel(currItem->itemType());
}
}
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmdsetprop.cpp
23,7 → 23,8
currItem->SetFarbe(&tmp, c2, shade2);
currItem->fill_gradient.addStop(tmp, 1.0, 0.5, 1.0, c2, shade2);
currItem->GrType = typ;
ScApp->view->updateGradientVectors(currItem);
//ScApp->view->updateGradientVectors(currItem);
currItem->updateGradientVectors();
ScApp->view->RefreshItem(currItem);
Py_INCREF(Py_None);
return Py_None;
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
191,7 → 191,8
if (ScApp->doc->selection->count() != 0)
{
//ScApp->view->EmitValues(ScApp->view->SelItem.at(0));
ScApp->view->EmitValues(ScApp->doc->selection->itemAt(0));
//ScApp->view->EmitValues(ScApp->doc->selection->itemAt(0));
ScApp->doc->selection->itemAt(0)->emitAllToGUI();
//ScApp->HaveNewSel(ScApp->view->SelItem.at(0)->itemType());
ScApp->HaveNewSel(ScApp->doc->selection->itemAt(0)->itemType());
}
/branches/Version13x/Scribus/scribus/plugins/fileloader/oodraw/oodrawimp.cpp
718,12 → 718,14
if ((GradientAngle == 0) || (GradientAngle == 180))
{
ite->GrType = 2;
ScApp->view->updateGradientVectors(ite);
//ScApp->view->updateGradientVectors(ite);
ite->updateGradientVectors();
}
else if ((GradientAngle == 90) || (GradientAngle == 270))
{
ite->GrType = 1;
ScApp->view->updateGradientVectors(ite);
//ScApp->view->updateGradientVectors(ite);
ite->updateGradientVectors();
}
}
else
787,7 → 789,8
ite->GrEndX = ite->width() / 2.0;
ite->GrEndY = ite->height();
}
ScApp->view->updateGradientVectors(ite);
//ScApp->view->updateGradientVectors(ite);
ite->updateGradientVectors();
}
HaveGradient = false;
}