Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 4009 → Rev 4010

/branches/Version13x/Scribus/scribus/selection.h
133,7 → 133,7
* @param item
* @return
*/
const bool primarySelectionIsMyself(const PageItem* item, int listNumber=GUISelection);
const bool primarySelectionIs(const PageItem* item, int listNumber=GUISelection);
PageItem *itemAt(int index=0, int listNumber=GUISelection);
QStringList getSelectedItemsByName(int listNumber=GUISelection);
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
3385,3 → 3385,13
AObjects[i].height = AObjects[i].y2 - AObjects[i].y1;
}
}
 
void ScribusDoc::insertColor(QString nam, double c, double m, double y, double k)
{
if (!PageColors.contains(nam))
{
ScColor tmp = ScColor(static_cast<int>(255 * c), static_cast<int>(255 * m),
static_cast<int>(255 * y), static_cast<int>(255 * k));
PageColors.insert(nam, tmp);
}
}
/branches/Version13x/Scribus/scribus/scribusview.h
221,7 → 221,7
void SetFrameRect();
void SetFrameRounded();
void SetFrameOval();
void insertColor(QString nam, double c, double m, double y, double k);
//void insertColor(QString nam, double c, double m, double y, double k);
void ChLineWidth(double w);
void ChLineArt(PenStyle w);
void ChLineJoin(PenJoinStyle w);
/branches/Version13x/Scribus/scribus/selection.cpp
182,7 → 182,7
return false;
}
 
const bool Selection::primarySelectionIsMyself(const PageItem* item, int listNumber)
const bool Selection::primarySelectionIs(const PageItem* item, int listNumber)
{
if (sellists.contains(listNumber))
if (!sellists[listNumber].isEmpty() && (item==sellists[listNumber].first()))
/branches/Version13x/Scribus/scribus/docsections.cpp
34,8 → 34,7
"From: The page index for this section to start at.<br/>"
"To: The page index for this section to stop at.<br/>"
"Style: Select the page number style to be used.<br/>"
"Start: The index within the Style's range to star at. Eg. If Start=2 and Style=a,b,c, ..., the numbers will begin at b.<br/>"
) +"</qt>");
"Start: The index within the Style's range to star at. Eg. If Start=2 and Style=a,b,c, ..., the numbers will begin at b.") +"</qt>");
}
 
void DocSections::setup(const DocumentSectionMap docSections, int maxPageIndex)
/branches/Version13x/Scribus/scribus/pageitem.cpp
62,8 → 62,6
gYpos(other.gYpos),
gWidth(other.gWidth),
gHeight(other.gHeight),
RadRect(other.RadRect),
oldRot(other.oldRot),
Doc(other.Doc),
GrType(other.GrType),
GrStartX(other.GrStartX),
117,18 → 115,10
IRender(other.IRender),
PicArt(other.PicArt),
PicAvail(other.PicAvail),
LocalScX(other.LocalScX),
LocalScY(other.LocalScY),
LocalX(other.LocalX),
LocalY(other.LocalY),
OrigW(other.OrigW),
OrigH(other.OrigH),
BBoxX(other.BBoxX),
BBoxH(other.BBoxH),
Extra(other.Extra),
TExtra(other.TExtra),
BExtra(other.BExtra),
RExtra(other.RExtra),
LineSp(other.LineSp),
LineSpMode(other.LineSpMode),
CurX(other.CurX),
254,11 → 244,21
Height(other.Height),
Rot(other.Rot),
Select(other.Select),
LocalScX(other.LocalScX),
LocalScY(other.LocalScY),
LocalX(other.LocalX),
LocalY(other.LocalY),
Reverse(other.Reverse),
Extra(other.Extra),
TExtra(other.TExtra),
BExtra(other.BExtra),
RExtra(other.RExtra),
RadRect(other.RadRect),
oldXpos(other.oldXpos),
oldYpos(other.oldYpos),
oldWidth(other.oldWidth),
oldHeight(other.oldHeight)
oldHeight(other.oldHeight),
oldRot(other.oldRot)
{
}
 
1564,6 → 1564,7
}
fillColorVal = newColor;
setFillQColor();
emit colors(lineColorVal, fillColorVal, lineShadeVal, fillShadeVal);
}
 
int PageItem::fillShade() const
1590,6 → 1591,7
}
fillShadeVal = newShade;
setFillQColor();
emit colors(lineColorVal, fillColorVal, lineShadeVal, fillShadeVal);
}
 
double PageItem::fillTransparency() const
1638,6 → 1640,7
}
lineColorVal = newColor;
setLineQColor();
emit colors(lineColorVal, fillColorVal, lineShadeVal, fillShadeVal);
}
 
int PageItem::lineShade() const
1664,6 → 1667,7
}
lineShadeVal = newShade;
setLineQColor();
emit colors(lineColorVal, fillColorVal, lineShadeVal, fillShadeVal);
}
 
void PageItem::setLineQColor()
2070,6 → 2074,8
undoManager->action(this, ss);
}
TxtFill = newColor;
//CB Moved from the view, but we havent updated this, so unsure why we need this.
emit colors(lineColorVal, fillColorVal, lineShadeVal, fillShadeVal);
}
 
QString PageItem::fontStrokeColor() const
2113,6 → 2119,8
undoManager->action(this, ss);
}
ShTxtFill = newShade;
//CB Moved from the view, but we havent updated this, so unsure why we need this.
emit colors(lineColorVal, fillColorVal, lineShadeVal, fillShadeVal);
}
 
int PageItem::fontStrokeShade() const
3746,7 → 3754,7
{
if (!ScQApp->usingGUI())
return false;
if (!Doc->selection->primarySelectionIsMyself(this))
if (!Doc->selection->primarySelectionIs(this))
return false;
connect(this, SIGNAL(myself(PageItem *)), ScApp->propertiesPalette, SLOT(SetCurItem(PageItem *)));
/branches/Version13x/Scribus/scribus/scribusdoc.h
493,6 → 493,15
*
*/
void buildAlignItemList();
/**
* Insert a color into the documents color list
* @param nam Name of the colour
* @param c Cyan component
* @param m Magenta component
* @param y Yellow component
* @param k Black component
*/
void insertColor(QString nam, double c, double m, double y, double k);
 
protected:
void addSymbols();
/branches/Version13x/Scribus/scribus/scribusview.cpp
1257,6 → 1257,7
//emit HaveSel(currItem->itemType());
//EmitValues(currItem);
//CB FIXME dont call this if the added item is item 0
if (!Doc->selection->primarySelectionIs(currItem))
currItem->emitAllToGUI();
currItem->paintObj();
}
5150,7 → 5151,7
 
void ScribusView::ToView(QPainter *p)
{
QPoint out = contentsToViewport(QPoint(0, 0));
QPoint out(contentsToViewport(QPoint(0, 0)));
p->translate(qRound(-Doc->minCanvasCoordinate.x()*Scale), qRound(-Doc->minCanvasCoordinate.y()*Scale));
p->translate(out.x(), out.y());
}
6054,21 → 6055,17
currItem->setWidthHeight(newX, newY);
if ((Doc->RotMode != 0) && (fromMP) && (!Doc->isLoading()))
{
switch (Doc->RotMode)
double moveX=dX, moveY=dY;
if (Doc->RotMode==2)
{
case 2:
MoveItem(dX / 2.0, dY / 2.0, currItem);
break;
case 4:
MoveItem(dX, dY, currItem);
break;
case 3:
MoveItem(0.0, dY, currItem);
break;
case 1:
MoveItem(dX, 0.0, currItem);
break;
moveX/=2.0;
moveY/=2.0;
}
else if (Doc->RotMode==3)
moveX=0.0;
else if (Doc->RotMode==1)
moveY=0.0;
MoveItem(moveX, moveY, currItem);
}
currItem->setCornerRadius(QMIN(currItem->cornerRadius(), QMIN(currItem->width(),currItem->height())/2));
if ((currItem->asImageFrame()) && (!currItem->Sizing) && (!Doc->EditClip))
9097,6 → 9094,7
}
}
 
/* CB moved to the doc
void ScribusView::insertColor(QString nam, double c, double m, double y, double k)
{
if (!Doc->PageColors.contains(nam))
9106,6 → 9104,7
Doc->PageColors.insert(nam, tmp);
}
}
*/
 
void ScribusView::ChLineWidth(double w)
{
9344,7 → 9343,8
//if (i->lineColor() != "None")
// i->strokeQColor = Doc->PageColors[farbe].getShadeColorProof(i->lineShade());
RefreshItem(i);
emit ItemFarben(i->lineColor(), i->fillColor(), i->lineShade(), i->fillShade());
//CB Moved to set*Color
//emit ItemFarben(i->lineColor(), i->fillColor(), i->lineShade(), i->fillShade());
}
if (selectedItemCount > 1)
undoManager->commit();
9383,7 → 9383,8
}
}
RefreshItem(currItem);
emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
//CB Why send this when
//emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
}
if (selectedItemCount > 1)
undoManager->commit();
9421,7 → 9422,8
}
}
RefreshItem(currItem);
emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
//CB Moved to the item
//emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
}
if (selectedItemCount > 1)
undoManager->commit();
9777,7 → 9779,8
//if (currItem->fillColor() != "None")
// currItem->fillQColor = Doc->PageColors[farbe].getShadeColorProof(currItem->fillShade());
RefreshItem(currItem);
emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
//CB Moved to the item
//emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
}
//if (SelItem.count() > 1)
if (selectedItemCount > 1)
9804,7 → 9807,8
//CB Moved to currItem->setFillShade();
//if (currItem->fillColor() != "None")
// currItem->fillQColor = Doc->PageColors[currItem->fillColor()].getShadeColorProof(sha);
emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
//CB Moved to the item
//emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
RefreshItem(currItem);
}
if (selectedItemCount > 1)
9830,7 → 9834,8
//CB Moved to currItem->setLineShade()
//if (currItem->lineColor() != "None")
// currItem->strokeQColor = Doc->PageColors[currItem->lineColor()].getShadeColorProof(sha);
emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
//CB Moved to the item
//emit ItemFarben(currItem->lineColor(), currItem->fillColor(), currItem->lineShade(), currItem->fillShade());
RefreshItem(currItem);
}
if (selectedItemCount > 1)