Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 3945 → Rev 3946

/branches/Version13x/Scribus/scribus/pageitem.h
1088,6 → 1088,8
 
signals:
//Frame signals
void myself(PageItem *);
void frameType(int);
void position(double, double); //X,Y
void widthAndHeight(double, double); //W,H
void rotation(double); //Degrees rotation
/branches/Version13x/Scribus/scribus/pageitem.cpp
618,6 → 618,7
void PageItem::setRotation(const double newRotation)
{
Rot=newRotation;
emit rotation(Rot);
}
 
void PageItem::rotateBy(const double dR)
2195,6 → 2196,7
}
*/
itemTypeVal = newType;
emit frameType(itemTypeVal);
}
 
void PageItem::setLayer(int layerId)
3598,6 → 3600,10
if (!Doc->selection->primarySelectionIsMyself(this))
return false;
connect(this, SIGNAL(myself(PageItem *)), ScApp->propertiesPalette, SLOT(SetCurItem(PageItem *)));
connect(this, SIGNAL(frameType(int)), ScApp, SLOT(HaveNewSel(int)));
connect(this, SIGNAL(frameType(int)), ScApp->view, SLOT(selectionChanged()));
connect(this, SIGNAL(frameType(int)), ScApp->propertiesPalette, SLOT(NewSel(int)));
connect(this, SIGNAL(position(double, double)), ScApp->propertiesPalette, SLOT(setXY(double, double)));
connect(this, SIGNAL(widthAndHeight(double, double)), ScApp->propertiesPalette, SLOT(setBH(double, double)));
connect(this, SIGNAL(colors(QString, QString, int, int)), ScApp, SLOT(setCSMenu(QString, QString, int, int)));
3647,7 → 3653,8
 
void PageItem::emitAllToGUI()
{
qDebug("bling");
emit myself(this);
emit frameType(itemTypeVal);
emit position(Xpos, Ypos);
emit widthAndHeight(Width, Height);
emit rotation(Rot);
/branches/Version13x/Scribus/scribus/scribusview.cpp
1219,8 → 1219,9
emit AddBM(currItem);
}
}
//CB done by addItem
//emit HaveSel(SelItem.at(0)->itemType());
emit HaveSel(Doc->selection->itemAt(0)->itemType());
//emit HaveSel(Doc->selection->itemAt(0)->itemType());
//if (SelItem.count() > 1)
if (Doc->selection->count() > 1)
{
1263,8 → 1264,10
Doc->selection->addItem(currItem);
currItem->isSingleSel = true;
//currItem->Select = true;
emit HaveSel(currItem->itemType());
//CB done by additem if 1st item and emitAllToGUI if not
//emit HaveSel(currItem->itemType());
//EmitValues(currItem);
//CB FIXME dont call this if the added item is item 0
currItem->emitAllToGUI();
currItem->paintObj();
}
1533,7 → 1536,7
emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
emit ItemGradient(currItem->GrType);
emit ItemTrans(currItem->fillTransparency(), currItem->lineTransparency());
emit HaveSel(PageItem::PolyLine);
//emit HaveSel(PageItem::PolyLine);
}
updateContents();
emit PaintingDone();
2712,7 → 2715,8
Doc->currentPage = Doc->Pages->at(currItem->OwnPage);
setMenTxt(currItem->OwnPage);
}
emit HaveSel(currItem->itemType());
//CB done with emitAllToGUI
//emit HaveSel(currItem->itemType());
//EmitValues(currItem);
currItem->emitAllToGUI();
updateContents();
2778,20 → 2782,21
{
setGroupRect();
paintGroupRect();
emit HaveSel(currItem->itemType());
//CB shouldnt need this i think
//emit HaveSel(currItem->itemType());
double x, y, w, h;
getGroupRect(&x, &y, &w, &h);
emit ItemPos(x, y);
emit ItemGeom(w, h);
}
else
/*else
{
emit HaveSel(currItem->itemType());
//CB Dont think we need this here with the new selection code
//For a select, deselect operation, this will cause 2x emit
//emit HaveSel(currItem->itemType());
//EmitValues(currItem);
//currItem->emitAllToGUI();
}
}*/
}
}
if ((Doc->appMode == modeEdit) && !HanMove)
4419,19 → 4424,22
SetupDraw(z);
break;
}
emit HaveSel(PageItem::Polygon);
//CB done with addItem
//emit HaveSel(PageItem::Polygon);
break;
case modeDrawPicture:
selectPage(m);
z = Doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, Rxp, Ryp, 1+Rxpd, 1+Rypd, 1, Doc->toolSettings.dBrushPict, "None", !Mpressed);
SetupDraw(z);
emit HaveSel(PageItem::ImageFrame);
//CB done with addItem
//emit HaveSel(PageItem::ImageFrame);
break;
case modeDrawText:
selectPage(m);
z = Doc->itemAdd(PageItem::TextFrame, PageItem::Unspecified, Rxp, Ryp, 1+Rxpd, 1+Rypd, Doc->toolSettings.dWidth, "None", Doc->toolSettings.dPenText, Mpressed);
SetupDraw(z);
emit HaveSel(PageItem::TextFrame);
//CB done with addItem
//emit HaveSel(PageItem::TextFrame);
break;
case modeMagnifier:
Mpressed = true;
4547,13 → 4555,14
Doc->selection->addItem(currItem);
currItem->paintObj();
Imoved = true;
qDebug("emit ItemPos(currItem->xPos(), currItem->yPos());");
emit SetSizeValue(currItem->Pwidth);
emit SetLineArt(currItem->PLineArt, currItem->PLineEnd, currItem->PLineJoin);
emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
emit ItemGradient(currItem->GrType);
emit ItemTrans(currItem->fillTransparency(), currItem->lineTransparency());
emit HaveSel(PageItem::Line);
//CB done with addItem
//emit ItemPos(currItem->xPos(), currItem->yPos());
//emit SetSizeValue(currItem->Pwidth);
//emit SetLineArt(currItem->PLineArt, currItem->PLineEnd, currItem->PLineJoin);
//emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
//emit ItemGradient(currItem->GrType);
//emit ItemTrans(currItem->fillTransparency(), currItem->lineTransparency());
//emit HaveSel(PageItem::Line);
break;
case modeRotation:
if (GetItem(&currItem))
4698,13 → 4707,14
Doc->selection->addItem(currItem);
currItem->paintObj();
Imoved = true;
qDebug("emit ItemPos(currItem->xPos(), currItem->yPos());");
emit SetSizeValue(currItem->Pwidth);
emit SetLineArt(currItem->PLineArt, currItem->PLineEnd, currItem->PLineJoin);
emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
emit ItemGradient(currItem->GrType);
emit ItemTrans(currItem->fillTransparency(), currItem->lineTransparency());
emit HaveSel(PageItem::Polygon);
//CB done with additem
//emit ItemPos(currItem->xPos(), currItem->yPos());
//emit SetSizeValue(currItem->Pwidth);
//emit SetLineArt(currItem->PLineArt, currItem->PLineEnd, currItem->PLineJoin);
//emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
//emit ItemGradient(currItem->GrType);
//emit ItemTrans(currItem->fillTransparency(), currItem->lineTransparency());
//emit HaveSel(PageItem::Polygon);
break;
}
case modeDrawBezierLine:
4746,13 → 4756,15
SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem->ItemNr, false, false, false);
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1)));
currItem->paintObj();
qDebug("emit ItemPos(currItem->xPos(), currItem->yPos());");
//qDebug("emit ItemPos(currItem->xPos(), currItem->yPos());");
//CB FIXME are these emitted already?
emit SetSizeValue(currItem->Pwidth);
emit SetLineArt(currItem->PLineArt, currItem->PLineEnd, currItem->PLineJoin);
emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
emit ItemGradient(currItem->GrType);
emit ItemTrans(currItem->fillTransparency(), currItem->lineTransparency());
emit HaveSel(PageItem::PolyLine);
//CB Should have been emitted already
//emit HaveSel(PageItem::PolyLine);
break;
case modeInsertPDFButton:
case modeInsertPDFTextfield:
4796,7 → 4808,8
break;
}
SetupDraw(z);
emit HaveSel(PageItem::TextFrame);
//CB done with addItem
//emit HaveSel(PageItem::TextFrame);
break;
case modeDrawFreehandLine:
RecordP.resize(0);
7157,11 → 7170,13
getGroupRect(&x, &y, &w, &h);
emit ItemPos(x, y);
emit ItemGeom(w, h);
//CB move in here as the emitAllToGUI will do it otherwise
emit HaveSel(currItem->itemType());
}
else
//EmitValues(currItem);
currItem->emitAllToGUI();
emit HaveSel(currItem->itemType());
}
}
 
7377,9 → 7392,10
{
//EmitValues(currItem);
currItem->emitAllToGUI();
if (currItem->asLine())
emit ItemGeom(currItem->width(), currItem->height());
emit HaveSel(currItem->itemType());
//CB done by the emitAllToGUI
//if (currItem->asLine())
// emit ItemGeom(currItem->width(), currItem->height());
//emit HaveSel(currItem->itemType());
}
p.end();
if (!currItem->ChangedMasterItem)
7541,7 → 7557,7
currItem->paintObj();
//if (currItem->asLine())
// emit ItemGeom(currItem->width(), currItem->height());
emit HaveSel(currItem->itemType());
//emit HaveSel(currItem->itemType());
}
//if (SelItem.count() == 1)
if (Doc->selection->count() == 1)
/branches/Version13x/Scribus/scribus/scribus.cpp
2610,10 → 2610,10
scrActions["itemLock"]->setOn(currItem->locked());
scrActions["itemLockSize"]->setOn(currItem->sizeLocked());
}
propertiesPalette->NewSel(Nr);
//propertiesPalette->NewSel(Nr);
if (Nr != -1)
{
propertiesPalette->SetCurItem(currItem);
//propertiesPalette->SetCurItem(currItem);
outlinePalette->slotShowSelect(currItem->OwnPage, currItem->ItemNr);
if (currItem->FrameType == 0)
SCustom->setPixmap(SCustom->getIconPixmap(0));
2623,6 → 2623,8
SCustom->setPixmap(SCustom->getIconPixmap(currItem->FrameType-2));
actionManager->connectNewSelectionActions(view);
}
else
propertiesPalette->NewSel(Nr);
}
 
void ScribusApp::slotDocCh(bool /*reb*/)
6641,7 → 6643,7
currItem->FrameType = f+2;
break;
}
propertiesPalette->SetCurItem(currItem);
//propertiesPalette->SetCurItem(currItem);
view->RefreshItem(currItem);
slotDocCh();
}