/branches/Version13x/Scribus/scribus/mpalette.cpp |
---|
486,8 → 486,7 |
StrokeIcon->setPixmap(loadIcon("Stiftalt.xpm")); |
StrokeIcon->setScaledContents( false ); |
layout23->addWidget( StrokeIcon ); |
TxStroke = new ScComboBox( true, page_3, "TxStroke" ); |
TxStroke->setEditable(false); |
TxStroke = new ScComboBox( false, page_3, "TxStroke" ); |
layout23->addWidget( TxStroke ); |
ShadeTxt1 = new QLabel( "", page_3, "ShadeTxt" ); |
ShadeTxt1->setPixmap(loadIcon("shade.png")); |
500,8 → 499,7 |
FillIcon = new QLabel( "", page_3, "FillIcon" ); |
FillIcon->setPixmap(loadIcon("fill.png")); |
layout24->addWidget( FillIcon ); |
TxFill = new ScComboBox( true, page_3, "TxFill" ); |
TxFill->setEditable(false); |
TxFill = new ScComboBox( false, page_3, "TxFill" ); |
layout24->addWidget( TxFill ); |
ShadeTxt2 = new QLabel("", page_3, "ShadeTxt" ); |
ShadeTxt2->setPixmap(loadIcon("shade.png")); |
535,8 → 533,7 |
styleLabel = new QLabel( Spal, "St&yle:", page_3, "styleLabel" ); |
GroupBox3aLayout->addWidget( styleLabel, 0, 0 ); |
GroupBox3aLayout->addWidget( Spal, 0, 1 ); |
langCombo = new ScComboBox( true, page_3, "Lang" ); |
langCombo->setEditable(false); |
langCombo = new ScComboBox( false, page_3, "Lang" ); |
langLabel = new QLabel( langCombo, "Lan&guage:", page_3, "langLabel" ); |
GroupBox3aLayout->addWidget( langLabel, 1, 0 ); |
GroupBox3aLayout->addWidget( langCombo, 1, 1 ); |
624,13 → 621,11 |
GroupBoxCMLayout->setAlignment( Qt::AlignTop ); |
TextCms1 = new QLabel( GroupBoxCM, "xposLabel" ); |
GroupBoxCMLayout->addWidget( TextCms1 ); |
InputP = new ScComboBox( true, GroupBoxCM, "InputP" ); |
InputP->setEditable(false); |
InputP = new ScComboBox( false, GroupBoxCM, "InputP" ); |
GroupBoxCMLayout->addWidget(InputP); |
TextCms2 = new QLabel( GroupBoxCM, "TextCms2" ); |
GroupBoxCMLayout->addWidget(TextCms2); |
MonitorI = new ScComboBox( true, GroupBoxCM, "MonitorI" ); |
MonitorI->setEditable(false); |
MonitorI = new ScComboBox( false, GroupBoxCM, "MonitorI" ); |
GroupBoxCMLayout->addWidget(MonitorI); |
pageLayout_4->addWidget(GroupBoxCM); |
642,8 → 637,7 |
pageLayout_5 = new QVBoxLayout( page_5, 0, 5, "pageLayout_5"); |
Layout13_2 = new QHBoxLayout( 0, 0, 4, "Layout13_2"); |
LineMode = new ScComboBox( true, page_5, "LMode" ); |
LineMode->setEditable(false); |
LineMode = new ScComboBox( false, page_5, "LMode" ); |
LineModeT = new QLabel( LineMode, "&Basepoint:", page_5, "LModeText" ); |
Layout13_2->addWidget( LineModeT ); |
Layout13_2->addWidget( LineMode ); |
669,13 → 663,11 |
linewidthLabel = new QLabel(LSize, "Line &Width:", page_5, "linewidthLabel" ); |
Layout12_2->addWidget( linewidthLabel, 3, 0 ); |
Layout12_2->addWidget( LSize, 3, 1 ); |
LJoinStyle = new ScComboBox( true, page_5, "LJoin" ); |
LJoinStyle->setEditable(false); |
LJoinStyle = new ScComboBox( false, page_5, "LJoin" ); |
edgesLabel = new QLabel( LJoinStyle, "Ed&ges:", page_5, "edgesLabel" ); |
Layout12_2->addWidget( edgesLabel, 4, 0 ); |
Layout12_2->addWidget( LJoinStyle, 4, 1 ); |
LEndStyle = new ScComboBox( true, page_5, "LCap" ); |
LEndStyle->setEditable(false); |
LEndStyle = new ScComboBox( false, page_5, "LCap" ); |
endingsLabel = new QLabel( LEndStyle, "&Endings:", page_5, "endingsLabel" ); |
Layout12_2->addWidget( endingsLabel, 5, 0 ); |
Layout12_2->addWidget( LEndStyle, 5, 1 ); |
3334,7 → 3326,7 |
if ((HaveDoc) && (HaveItem)) |
{ |
CurItem->Extra = Dist->value(); |
ScApp->view->UpdatePolyClip(CurItem); |
CurItem->UpdatePolyClip(); |
ScApp->view->AdjustItemSize(CurItem); |
ScApp->view->RefreshItem(CurItem); |
emit DocChanged(); |
3348,7 → 3340,7 |
if ((HaveDoc) && (HaveItem)) |
{ |
CurItem->BaseOffs = -LineW->value(); |
ScApp->view->UpdatePolyClip(CurItem); |
CurItem->UpdatePolyClip(); |
ScApp->view->AdjustItemSize(CurItem); |
ScApp->view->RefreshItem(CurItem); |
emit DocChanged(); |
/branches/Version13x/Scribus/scribus/checkDocument.cpp |
---|
127,8 → 127,7 |
layout1 = new QHBoxLayout( 0, 0, 5, "layout1"); |
textLabel1 = new QLabel( this, "textLabel1" ); |
layout1->addWidget( textLabel1 ); |
curCheckProfile = new ScComboBox( true, this, "Profiles" ); |
curCheckProfile->setEditable(false); |
curCheckProfile = new ScComboBox( false, this, "Profiles" ); |
layout1->addWidget( curCheckProfile ); |
checkDocumentLayout->addLayout( layout1 ); |
reportDisplay = new QListView( this, "reportDisplay" ); |
/branches/Version13x/Scribus/scribus/cpalette.cpp |
---|
83,8 → 83,7 |
GradLayout = new QVBoxLayout( 0, 0, 6, "GradLayout"); |
QFont fo = QFont(font()); |
fo.setPointSize(fo.pointSize()-1); |
gradientQCombo = new ScComboBox( true, this, "gradientQCombo" ); |
gradientQCombo->setEditable(false); |
gradientQCombo = new ScComboBox( false, this, "gradientQCombo" ); |
gradientQCombo->setFont(fo); |
GradLayout->addWidget( gradientQCombo ); |
gradEdit = new GradientEditor(this); |
/branches/Version13x/Scribus/scribus/multiline.cpp |
---|
69,15 → 69,13 |
Dashes = new LineCombo(Properties); |
PropertiesLayout->addWidget( Dashes ); |
LineEnds = new ScComboBox( true, Properties, "LineEnds" ); |
LineEnds->setEditable(false); |
LineEnds = new ScComboBox( false, Properties, "LineEnds" ); |
LineEnds->insertItem(loadIcon("ButtCap.png"), tr( "Flat Cap" ) ); |
LineEnds->insertItem(loadIcon("SquareCap.png"), tr( "Square Cap" ) ); |
LineEnds->insertItem(loadIcon("RoundCap.png"), tr( "Round Cap" ) ); |
PropertiesLayout->addWidget( LineEnds ); |
LineJoin = new ScComboBox( true, Properties, "LineJoin" ); |
LineJoin->setEditable(false); |
LineJoin = new ScComboBox( false, Properties, "LineJoin" ); |
LineJoin->insertItem(loadIcon("MiterJoin.png"), tr( "Miter Join" ) ); |
LineJoin->insertItem(loadIcon("BevelJoin.png"), tr( "Bevel Join" ) ); |
LineJoin->insertItem(loadIcon("RoundJoin.png"), tr( "Round Join" ) ); |
96,7 → 94,7 |
PropertiesLayout->addLayout( layout1 ); |
layout4 = new QHBoxLayout( 0, 0, 6, "layout4"); |
Color = new ScComboBox( true, Properties, "Color" ); |
Color = new ScComboBox( false, Properties, "Color" ); |
ColorList::Iterator it; |
QPixmap * pm; |
for (it = doc->PageColors.begin(); it != doc->PageColors.end(); ++it) |
104,7 → 102,6 |
pm = getWidePixmap(doc->PageColors[it.key()].getRawRGBColor()); |
Color->insertItem(*pm, it.key()); |
} |
Color->setEditable(false); |
layout4->addWidget( Color ); |
Shade = new QSpinBox( Properties, "Shade" ); |
Shade->setSuffix( tr( " %" ) ); |
/branches/Version13x/Scribus/scribus/page.cpp |
---|
322,7 → 322,7 |
ScApp->doc->Items.take(newItem->ItemNr); |
ScApp->doc->Items.append(oldItem); |
oldItem->ItemNr = ScApp->doc->Items.count()-1; |
ScApp->view->UpdatePolyClip(oldItem); |
oldItem->UpdatePolyClip(); |
ScApp->view->AdjustItemSize(oldItem); |
} |
else |
/branches/Version13x/Scribus/scribus/scribusdoc.cpp |
---|
2680,7 → 2680,6 |
PageItem* ScribusDoc::convertItemTo(PageItem *currItem, PageItem::ItemType newType, PageItem* secondaryItem) |
{ |
bool transactionConversion=false; |
//Item to convert is null, return |
Q_ASSERT(currItem!=NULL); |
if (currItem==NULL) |
2691,6 → 2690,7 |
//Take the item to convert from the docs Items list |
PageItem *oldItem = Items.take(currItem->ItemNr); |
//Create a new item from the old one |
bool transactionConversion=false; |
PageItem *newItem; |
switch (newType) |
{ |
2757,7 → 2757,7 |
polyLineItem->ClipEdited = true; |
polyLineItem->FrameType = 3; |
polyLineItem->Rot = currItem->Rot; |
ScApp->view->SetPolyClip(polyLineItem, qRound(QMAX(polyLineItem->Pwidth / 2, 1))); |
polyLineItem->SetPolyClip(qRound(QMAX(polyLineItem->Pwidth / 2, 1))); |
ScApp->view->AdjustItemSize(polyLineItem); |
newItem->setLineColor("None"); |
2787,7 → 2787,7 |
case PageItem::PolyLine: |
newItem->convertTo(PageItem::PolyLine); |
newItem->ClipEdited = true; |
ScApp->view->SetPolyClip(newItem, qRound(QMAX(newItem->Pwidth / 2, 1))); |
newItem->SetPolyClip(qRound(QMAX(newItem->Pwidth / 2, 1))); |
ScApp->view->AdjustItemSize(newItem); |
break; |
case PageItem::PathText: |
2803,8 → 2803,8 |
newItem->PLineJoin = secondaryItem->PLineJoin; |
/* if (!Doc->loading) |
emit UpdtObj(Doc->currentPage->pageNr(), b->ItemNr); */ |
newItem->UpdatePolyClip(); |
//FIXME: Stop using the view here |
ScApp->view->UpdatePolyClip(newItem); |
ScApp->view->AdjustItemSize(newItem); |
double dx = secondaryItem->Xpos - newItem->Xpos; |
double dy = secondaryItem->Ypos - newItem->Ypos; |
/branches/Version13x/Scribus/scribus/scribusview.h |
---|
176,9 → 176,9 |
bool MoveItem(double newX, double newY, PageItem* ite, bool fromMP = false); |
void MoveItemI(PageItem* currItem, double newX, double newY, bool redraw = true); |
void UpdateClip(PageItem *currItem); |
void SetPolyClip(PageItem *currItem, int up); |
//void SetPolyClip(PageItem *currItem, int up); |
void ConvertClip(PageItem *currItem); |
void UpdatePolyClip(PageItem *currItem); |
//void UpdatePolyClip(PageItem *currItem); |
void MarkClip(PageItem *currItem, FPointArray cli, bool once = false); |
bool PointOnLine(QPoint Start, QPoint Ende, QRect MArea); |
void MirrorPolyH(); |
195,7 → 195,7 |
void RotateGroup(double win); |
void scaleGroup(double scx, double scy); |
void RotateItem(double win, int ite); |
void RotateItem(double win, PageItem *pi); |
void RotateItem(double win, PageItem *currItem); |
void AdjustItemSize(PageItem *currItem); |
void AdvanceSel(PageItem *currItem, int oldPos, int len, int dir, int expandSel, int state); |
void setNewPos(PageItem *currItem, int oldPos, int len, int dir); |
/branches/Version13x/Scribus/scribus/charselect.cpp |
---|
273,8 → 273,7 |
rangeLabel = new QLabel( this, "fontLabel" ); |
rangeLabel->setText( tr( "Character Class:" ) ); |
selectionsLayout->addWidget( rangeLabel ); |
rangeSelector = new ScComboBox( true, this, "rangeSelector" ); |
rangeSelector->setEditable(false); |
rangeSelector = new ScComboBox( false, this, "rangeSelector" ); |
characterClass = 0; |
selectionsLayout->addWidget( rangeSelector ); |
QSpacerItem* spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); |
/branches/Version13x/Scribus/scribus/edit1format.cpp |
---|
114,8 → 114,7 |
FillIcon = new QLabel( "", GroupFont, "FillIcon" ); |
FillIcon->setPixmap(loadIcon("fill.png")); |
layout5->addWidget( FillIcon ); |
TxFill = new ScComboBox( true, GroupFont, "TxFill" ); |
TxFill->setEditable(false); |
TxFill = new ScComboBox( false, GroupFont, "TxFill" ); |
layout5->addWidget( TxFill ); |
pixmapLabel3_20 = new QLabel( GroupFont, "pixmapLabel3_20" ); |
pixmapLabel3_20->setMinimumSize( QSize( 22, 22 ) ); |
132,8 → 131,7 |
StrokeIcon = new QLabel( "", GroupFont, "StrokeIcon" ); |
StrokeIcon->setPixmap(loadIcon("Stiftalt.xpm")); |
layout6->addWidget( StrokeIcon ); |
TxStroke = new ScComboBox( true, GroupFont, "TxStroke" ); |
TxStroke->setEditable(false); |
TxStroke = new ScComboBox( false, GroupFont, "TxStroke" ); |
layout6->addWidget( TxStroke ); |
pixmapLabel3_19 = new QLabel( "", GroupFont, "pixmapLabel3_19" ); |
pixmapLabel3_19->setMinimumSize( QSize( 22, 22 ) ); |
/branches/Version13x/Scribus/scribus/story.cpp |
---|
1663,8 → 1663,7 |
FillIcon = new QLabel( "", this, "FillIcon" ); |
FillIcon->setPixmap(loadIcon("fill.png")); |
FillIcon->setScaledContents( false ); |
TxFill = new ScComboBox( true, this, "TxFill" ); |
TxFill->setEditable(false); |
TxFill = new ScComboBox( false, this, "TxFill" ); |
PM2 = new ShadeButton(this); |
setCurrentDocument(doc); |
//TxFill->listBox()->setMinimumWidth(TxFill->listBox()->maxItemWidth()+24); |
1723,8 → 1722,7 |
StrokeIcon = new QLabel( "", this, "StrokeIcon" ); |
StrokeIcon->setPixmap(loadIcon("Stiftalt.xpm")); |
StrokeIcon->setScaledContents( false ); |
TxStroke = new ScComboBox( true, this, "TxStroke" ); |
TxStroke->setEditable(false); |
TxStroke = new ScComboBox( false, this, "TxStroke" ); |
PM1 = new ShadeButton(this); |
setCurrentDocument(doc); |
//TxStroke->listBox()->setMinimumWidth(TxStroke->listBox()->maxItemWidth()+24); |
/branches/Version13x/Scribus/scribus/tabtools.cpp |
---|
89,8 → 89,7 |
subTabTextLayout->addMultiCellWidget( fontComboText, 0, 0, 1, 3, Qt::AlignLeft ); |
textLabel1b = new QLabel( fontComboText, tr( "Font:" ), subTabText, "textLabel1b" ); |
subTabTextLayout->addWidget( textLabel1b, 0, 0 ); |
sizeComboText = new ScComboBox( true, subTabText, "SizeCombo" ); |
sizeComboText->setEditable(false); |
sizeComboText = new ScComboBox( false, subTabText, "SizeCombo" ); |
QString ar_sizes[] = {" 7", " 9", "10", "11", "12", "14", "18", "24", "36", "48", "60", "72"}; |
size_t f_size = sizeof(ar_sizes) / sizeof(*ar_sizes); |
for (uint s = 0; s < f_size; ++s) |
104,8 → 103,7 |
textLabel2b = new QLabel(sizeComboText, tr( "Size:" ), subTabText, "textLabel2b" ); |
subTabTextLayout->addWidget( textLabel2b, 1, 0 ); |
colorComboText = new ScComboBox( true, subTabText, "colorComboText" ); |
colorComboText->setEditable(false); |
colorComboText = new ScComboBox( false, subTabText, "colorComboText" ); |
ColorList::Iterator itc; |
colorComboText->insertItem( tr("None")); |
if (prefsData->dPenText == "None") |
144,8 → 142,7 |
textLabelTS = new QLabel( shadingText, tr( "Shading:" ), subTabText, "textLabelTS" ); |
subTabTextLayout->addWidget( textLabelTS, 2, 2 ); |
colorComboStrokeText = new ScComboBox( true, subTabText, "colorComboStrokeText" ); |
colorComboStrokeText->setEditable(false); |
colorComboStrokeText = new ScComboBox( false, subTabText, "colorComboStrokeText" ); |
colorComboStrokeText->insertItem( tr("None")); |
if (prefsData->dStrokeText == "None") |
colorComboStrokeText->setCurrentItem(colorComboStrokeText->count()-1); |
183,8 → 180,7 |
textLabelTSS = new QLabel( shadingTextStroke, tr( "Shading:" ), subTabText, "textLabelTS" ); |
subTabTextLayout->addWidget( textLabelTSS, 3, 2 ); |
colorComboTextBackground = new ScComboBox( true, subTabText, "colorComboTextBackground" ); |
colorComboTextBackground->setEditable(false); |
colorComboTextBackground = new ScComboBox( false, subTabText, "colorComboTextBackground" ); |
colorComboTextBackground->insertItem( tr("None")); |
if (prefsData->dTextBackGround == "None") |
colorComboTextBackground->setCurrentItem(colorComboTextBackground->count()-1); |
222,8 → 218,7 |
textLabelTSB = new QLabel( shadingTextBack, tr( "Shading:" ), subTabText, "textLabelTSS" ); |
subTabTextLayout->addWidget( textLabelTSB, 4, 2 ); |
colorComboTextLine = new ScComboBox( true, subTabText, "colorComboTextLine" ); |
colorComboTextLine->setEditable(false); |
colorComboTextLine = new ScComboBox( false, subTabText, "colorComboTextLine" ); |
colorComboTextLine->insertItem( tr("None")); |
if (prefsData->dTextLineColor == "None") |
colorComboTextLine->setCurrentItem(colorComboTextLine->count()-1); |
261,8 → 256,7 |
textLabelTSL = new QLabel( shadingTextLine, tr( "Shading:" ), subTabText, "textLabelTSL" ); |
subTabTextLayout->addWidget( textLabelTSL, 5, 2 ); |
tabFillCombo = new ScComboBox( true, subTabText, "tabFillCombo" ); |
tabFillCombo->setEditable(false); |
tabFillCombo = new ScComboBox( false, subTabText, "tabFillCombo" ); |
tabFillCombo->insertItem( tr("None")); |
tabFillCombo->insertItem( tr("Dot")); |
tabFillCombo->insertItem( tr("Hyphen")); |
270,22 → 264,18 |
tabFillCombo->insertItem( tr("Custom")); |
if (prefsData->tabFillChar.isEmpty()) |
{ |
tabFillCombo->setEditable(false); |
tabFillCombo->setCurrentItem(0); |
} |
else if (prefsData->tabFillChar == ".") |
{ |
tabFillCombo->setEditable(false); |
tabFillCombo->setCurrentItem(1); |
} |
else if (prefsData->tabFillChar == "-") |
{ |
tabFillCombo->setEditable(false); |
tabFillCombo->setCurrentItem(2); |
} |
else if (prefsData->tabFillChar == "_") |
{ |
tabFillCombo->setEditable(false); |
tabFillCombo->setCurrentItem(3); |
} |
else |
325,8 → 315,7 |
subTabShape = new QWidget( subStackTools, "subTabShape" ); |
subTabShapeLayout = new QGridLayout( subTabShape, 1, 1, 11, 6, "subTabShapeLayout"); |
subTabShapeLayout->setAlignment( Qt::AlignTop ); |
colorComboLineShape = new ScComboBox( true, subTabShape, "colorComboLineShape" ); |
colorComboLineShape->setEditable(false); |
colorComboLineShape = new ScComboBox( false, subTabShape, "colorComboLineShape" ); |
colorComboLineShape->insertItem( tr("None")); |
if (prefsData->dPen == "None") |
colorComboLineShape->setCurrentItem(colorComboLineShape->count()-1); |
363,8 → 352,7 |
subTabShapeLayout->addWidget( shadingLineShape, 1, 1, Qt::AlignLeft ); |
textLabel8b = new QLabel( shadingLineShape, tr( "&Shading:" ), subTabShape, "textLabel8b" ); |
subTabShapeLayout->addWidget( textLabel8b, 1, 0 ); |
comboFillShape = new ScComboBox( true, subTabShape, "comboFillShape" ); |
comboFillShape->setEditable(false); |
comboFillShape = new ScComboBox( false, subTabShape, "comboFillShape" ); |
comboFillShape->insertItem( tr("None")); |
if (prefsData->dBrush == "None") |
comboFillShape->setCurrentItem(comboFillShape->count()-1); |
438,8 → 426,7 |
subTabLine = new QWidget( subStackTools, "subTabLine" ); |
subTabLineLayout = new QGridLayout( subTabLine, 1, 1, 11, 6, "subTabLineLayout"); |
subTabLineLayout->setAlignment( Qt::AlignTop ); |
colorComboLine = new ScComboBox( true, subTabLine, "colorComboLine" ); |
colorComboLine->setEditable(false); |
colorComboLine = new ScComboBox( false, subTabLine, "colorComboLine" ); |
colorComboLine->insertItem( tr("None")); |
if (prefsData->dPenLine == "None") |
colorComboLine->setCurrentItem(colorComboLine->count()-1); |
578,8 → 565,7 |
checkRatioImage->setChecked(prefsData->aspectRatio); |
buttonGroup5Layout->addWidget( checkRatioImage ); |
subTabImageLayout->addMultiCellWidget( buttonGroup5, 1, 1, 0, 1 ); |
comboFillImage = new ScComboBox( true, subTabImage, "comboFillImage" ); |
comboFillImage->setEditable(false); |
comboFillImage = new ScComboBox( false, subTabImage, "comboFillImage" ); |
comboFillImage->insertItem( tr("None")); |
if (prefsData->dBrushPict == "None") |
comboFillImage->setCurrentItem(comboFillImage->count()-1); |
/branches/Version13x/Scribus/scribus/pageitem.h |
---|
236,11 → 236,21 |
void SetRectFrame(); |
void SetOvalFrame(); |
void SetFrameRound(); |
void SetPolyClip(int up); |
void UpdatePolyClip(); |
//QRect getRedrawBounding(const double); |
//void setRedrawBounding(); |
void getBoundingRect(double *x1, double *y1, double *x2, double *y2); |
void copyToCopyPasteBuffer(struct CopyPasteBuffer *Buffer); |
double SetZeichAttr(struct ScText *hl, int *chs, QString *chx); |
void SetFarbe(QColor *tmp, QString farbe, int shad); |
void DrawZeichenS(ScPainter *p, struct ZZ *hl); |
/branches/Version13x/Scribus/scribus/extimageprops.cpp |
---|
69,8 → 69,7 |
textLabel1 = new QLabel( tab, "textLabel1" ); |
textLabel1->setText( tr( "Blend Mode:" ) ); |
layout1->addWidget( textLabel1 ); |
blendMode = new ScComboBox( true, tab, "blendMode" ); |
blendMode->setEditable(false); |
blendMode = new ScComboBox( false, tab, "blendMode" ); |
blendMode->clear(); |
blendMode->insertItem( tr("Normal")); |
blendMode->insertItem( tr("Darken")); |
/branches/Version13x/Scribus/scribus/pageitem.cpp |
---|
5725,3 → 5725,59 |
GrStartX = QMIN(QMAX(GrStartX, 0), Width); |
GrStartY = QMIN(QMAX(GrStartY, 0), Height); |
} |
void PageItem::SetPolyClip(int up) |
{ |
Clip.resize(0); |
if (PoLine.size() < 4) |
return; |
double rot; |
QPoint np, np2; |
QPointArray cl, cl1, cl2; |
cl = FlattenPath(PoLine, Segments); |
for (uint a = 0; a < cl.size()-1; ++a) |
{ |
rot = xy2Deg(cl.point(a+1).x()-cl.point(a).x(),cl.point(a+1).y()-cl.point(a).y()); |
QWMatrix ma; |
ma.rotate(rot); |
np = ma*QPoint(0, -up); |
cl1.resize(cl1.size()+1); |
cl1.setPoint(cl1.size()-1, np+cl.point(a)); |
cl1.resize(cl1.size()+1); |
cl1.setPoint(cl1.size()-1, np+cl.point(a+1)); |
cl2.resize(cl2.size()+1); |
cl2.setPoint(cl2.size()-1, np2+cl.point(a)); |
cl2.resize(cl2.size()+1); |
cl2.setPoint(cl2.size()-1, np2+cl.point(a+1)); |
} |
cl1.resize(cl1.size()+1); |
cl1.setPoint(cl1.size()-1, np+cl.point(cl.size()-1)); |
cl2.resize(cl2.size()+1); |
cl2.setPoint(cl2.size()-1, np2+cl.point(cl.size()-1)); |
Clip.putPoints(Clip.size(), cl1.size(), cl1); |
for (int a2 = cl2.size()-1; a2 > -1; a2--) |
{ |
Clip.resize(Clip.size()+1); |
Clip.setPoint(Clip.size()-1, cl2.point(a2)); |
} |
} |
void PageItem::UpdatePolyClip() |
{ |
struct ScText *hl; |
int asce = 1; |
int desc = 1; |
uint itemTextCount=itemText.count(); |
for (uint a = 0; a < itemTextCount; ++a) |
{ |
hl = itemText.at(a); |
int des = static_cast<int>(hl->cfont->numDescender * (-hl->csize / 10.0)); |
int asc = static_cast<int>(hl->cfont->numAscent * (hl->csize / 10.0)); |
if (asc > asce) |
asce = asc; |
if (des > desc) |
desc = des; |
} |
SetPolyClip(static_cast<int>(asce+BaseOffs)); |
} |
/branches/Version13x/Scribus/scribus/hysettings.cpp |
---|
13,13 → 13,12 |
input = new QCheckBox( tr("Hyphenate Text Automatically &During Typing"), this, "inp"); |
layout3->addMultiCellWidget(input, 1, 1, 0, 1); |
language = new ScComboBox( true, this, "Language" ); |
language = new ScComboBox( false, this, "Language" ); |
QMap<QString,QString>::Iterator it; |
for (it = langs->begin(); it != langs->end(); ++it) |
lada.append(it.data()); |
lada.sort(); |
language->insertStringList(lada); |
language->setEditable(false); |
text1 = new QLabel( language, tr( "&Language:" ), this, "Text1" ); |
layout3->addWidget( text1, 2, 0 ); |
layout3->addWidget( language, 2, 1, Qt::AlignLeft ); |
/branches/Version13x/Scribus/scribus/scribusview.cpp |
---|
2816,7 → 2816,7 |
else |
{ |
SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem->ItemNr, false, false, false); |
SetPolyClip(currItem, qRound(QMAX(currItem->Pwidth / 2, 1))); |
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1))); |
AdjustItemSize(currItem); |
currItem->Sizing = ssiz; |
currItem->ContourLine = currItem->PoLine.copy(); |
2838,7 → 2838,7 |
else |
{ |
SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem->ItemNr, false, false); |
SetPolyClip(currItem, qRound(QMAX(currItem->Pwidth / 2, 1))); |
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1))); |
AdjustItemSize(currItem); |
currItem->ContourLine = currItem->PoLine.copy(); |
} |
4025,7 → 4025,7 |
edited = true; |
Doc->EditClipMode = 0; |
currItem->convertTo(PageItem::PolyLine); |
SetPolyClip(currItem, qRound(QMAX(currItem->Pwidth / 2, 1))); |
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1))); |
emit PolyOpen(); |
} |
else |
4052,7 → 4052,7 |
currItem->ClipEdited = true; |
edited = true; |
Doc->EditClipMode = 0; |
SetPolyClip(currItem, qRound(QMAX(currItem->Pwidth / 2, 1))); |
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1))); |
emit PolyOpen(); |
} |
} |
4628,7 → 4628,7 |
MoveItem(0, npf2.y(), currItem); |
} |
SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem->ItemNr, false, false, false); |
SetPolyClip(currItem, qRound(QMAX(currItem->Pwidth / 2, 1))); |
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1))); |
currItem->paintObj(); |
emit ItemPos(currItem->Xpos, currItem->Ypos); |
emit SetSizeValue(currItem->Pwidth); |
5141,6 → 5141,7 |
} |
} |
void ScribusView::UpdateClip(PageItem* currItem) |
{ |
if (Doc->appMode == modeDrawBezierLine) |
5194,7 → 5195,7 |
currItem->PoLine.map(ma); |
currItem->ContourLine.map(ma); |
if (currItem->asPathText()) |
UpdatePolyClip(currItem); |
currItem->UpdatePolyClip(); |
else |
currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments); |
} |
5244,7 → 5245,7 |
currItem->PoLine.map(ma); |
currItem->ContourLine.map(ma); |
if (currItem->asPathText()) |
UpdatePolyClip(currItem); |
currItem->UpdatePolyClip(); |
else |
currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments); |
currItem->OldB2 = currItem->Width; |
5255,6 → 5256,7 |
updateGradientVectors(currItem); |
} |
/*CB Moved to PageItem |
void ScribusView::SetPolyClip(PageItem *currItem, int up) |
{ |
QPoint np, np2; |
5306,9 → 5308,9 |
if (des > desc) |
desc = des; |
} |
SetPolyClip(currItem, static_cast<int>(asce+currItem->BaseOffs)); |
currItem->SetPolyClip(static_cast<int>(asce+currItem->BaseOffs)); |
} |
*/ |
void ScribusView::MarkClip(PageItem *currItem, FPointArray cli, bool once) |
{ |
double x, y; |
5513,7 → 5515,7 |
currItem->PoLine.map(ma); |
currItem->PoLine.translate(currItem->Width, 0); |
if (currItem->asPathText()) |
UpdatePolyClip(currItem); |
currItem->UpdatePolyClip(); |
else |
currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments); |
setRedrawBounding(currItem); |
5560,7 → 5562,7 |
currItem->PoLine.map(ma); |
currItem->PoLine.translate(0, currItem->Height); |
if (currItem->asPathText()) |
UpdatePolyClip(currItem); |
currItem->UpdatePolyClip(); |
else |
currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments); |
setRedrawBounding(currItem); |
5705,7 → 5707,7 |
double y = ma2.m22() * n.y() + ma2.m12() * n.x() + ma2.dy(); |
MoveItem(x-oldPos.x(), y-oldPos.y(), currItem); |
if (currItem->asPathText()) |
UpdatePolyClip(currItem); |
currItem->UpdatePolyClip(); |
setRedrawBounding(currItem); |
RefreshItem(currItem); |
MarkClip(currItem, currItem->PoLine, true); |
6364,7 → 6366,7 |
for (aa = 0; aa < bb->itemText.count(); ++aa) |
bb->itemText.at(aa)->csize = QMAX(qRound(bb->itemText.at(aa)->csize*((scx+scy)/2)), 1); |
if (bb->asPathText()) |
UpdatePolyClip(bb); |
bb->UpdatePolyClip(); |
} |
bb->LocalX = oldLocalX; |
bb->LocalY = oldLocalY; |
6435,13 → 6437,10 |
RotateItem(win, Doc->Items.at(ite)); |
} |
void ScribusView::RotateItem(double win, PageItem *pi) |
void ScribusView::RotateItem(double win, PageItem *currItem) |
{ |
PageItem *currItem; |
currItem = pi; |
if (currItem->locked()) |
return; |
FPoint n; |
QRect oldR(currItem->getRedrawBounding(Scale)); |
if ((Doc->RotMode != 0) && !(currItem->asLine())) |
{ |
6451,6 → 6450,7 |
ma.rotate(currItem->Rot); |
double ro = win-currItem->Rot; |
currItem->Rot = win; |
FPoint n; |
switch (Doc->RotMode) |
{ |
case 2: |
6518,7 → 6518,7 |
currItem->ClipEdited = true; |
currItem->PoLine = Clip.copy(); |
if (currItem->asPolyLine()) |
SetPolyClip(currItem, qRound(QMAX(currItem->Pwidth / 2, 1))); |
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1))); |
else |
currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments); |
currItem->Sizing = siz; |
9404,7 → 9404,7 |
currItem->OldPwidth = currItem->Pwidth; |
currItem->setLineWidth(w); |
if (currItem->asPolyLine()) |
SetPolyClip(currItem, qRound(QMAX(currItem->Pwidth / 2, 1))); |
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1))); |
if (currItem->asLine()) |
{ |
int ph = static_cast<int>(QMAX(1.0, w / 2.0)); |
9559,7 → 9559,7 |
currItem->itemText.at(a)->cfont = (*Doc->AllFonts)[fon]; |
if (currItem->asPathText()) |
{ |
UpdatePolyClip(currItem); |
currItem->UpdatePolyClip(); |
AdjustItemSize(currItem); |
} |
/* if (!Doc->loading) |
10508,7 → 10508,7 |
} |
if (currItem->asPathText()) |
{ |
UpdatePolyClip(currItem); |
currItem->UpdatePolyClip(); |
AdjustItemSize(currItem); |
} |
RefreshItem(currItem); |
11643,7 → 11643,7 |
bb->ClipEdited = true; |
bb->FrameType = 3; |
bb->Rot = currItem->Rot; |
SetPolyClip(bb, qRound(QMAX(bb->Pwidth / 2, 1))); |
bb->SetPolyClip(qRound(QMAX(bb->Pwidth / 2, 1))); |
AdjustItemSize(bb); |
newGroupedItems.append(bb); |
} |
/branches/Version13x/Scribus/scribus/fontcombo.cpp |
---|
105,11 → 105,9 |
prefsManager = PrefsManager::instance(); |
currDoc = 0; |
fontComboLayout = new QVBoxLayout( this, 0, 0, "fontComboLayout"); |
fontFamily = new ScComboBox( true, this, "fontFamily" ); |
fontFamily->setEditable(false); |
fontFamily = new ScComboBox( false, this, "fontFamily" ); |
fontComboLayout->addWidget(fontFamily); |
fontStyle = new ScComboBox( true, this, "fontStyle" ); |
fontStyle->setEditable(false); |
fontStyle = new ScComboBox( false, this, "fontStyle" ); |
fontComboLayout->addWidget(fontStyle); |
QStringList flist = prefsManager->appPrefs.AvailFonts.fontMap.keys(); |
fontFamily->insertStringList(flist); |
/branches/Version13x/Scribus/scribus/scribus.cpp |
---|
1292,7 → 1292,7 |
else |
{ |
view->SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem->ItemNr, false, false); |
view->SetPolyClip(currItem, qRound(QMAX(currItem->Pwidth / 2, 1))); |
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1))); |
view->AdjustItemSize(currItem); |
currItem->ContourLine = currItem->PoLine.copy(); |
currItem->ClipEdited = true; |
3985,7 → 3985,7 |
if (ite->asPathText()) |
{ |
ite->Frame = false; |
view->UpdatePolyClip(ite); |
ite->UpdatePolyClip(); |
} |
else |
{ |
4022,7 → 4022,7 |
if (ite->itemType() == PageItem::PathText) |
{ |
ite->Frame = false; |
view->UpdatePolyClip(ite); |
ite->UpdatePolyClip(); |
ite->DrawObj(painter, rd); |
} |
else |
4063,7 → 4063,7 |
if (ite->itemType() == PageItem::PathText) |
{ |
ite->Frame = false; |
view->UpdatePolyClip(ite); |
ite->UpdatePolyClip(); |
} |
ite->DrawObj(painter, rd); |
} |
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp |
---|
160,7 → 160,7 |
if (ite->itemType() == PageItem::PathText) |
{ |
ite->Frame = false; |
ScApp->view->UpdatePolyClip(ite); |
ite->UpdatePolyClip(); |
ite->DrawObj(painter, rd); |
} |
else |
/branches/Version13x/Scribus/scribus/cmykfw.cpp |
---|
82,8 → 82,7 |
TextLabel3->setMinimumSize( QSize( 100, 22 ) ); |
Layout23->addWidget( TextLabel3 ); |
ComboBox1 = new ScComboBox( true, this, "ComboBox1" ); |
ComboBox1->setEditable(false); |
ComboBox1 = new ScComboBox( false, this, "ComboBox1" ); |
ComboBox1->insertItem( tr( "CMYK" ) ); |
ComboBox1->insertItem( tr( "RGB" ) ); |
ComboBox1->insertItem( tr( "Web Safe RGB" ) ); |
163,8 → 162,7 |
Frame4Layout->setSpacing( 6 ); |
Frame4Layout->setMargin( 0 ); |
Swatches = new ScComboBox( true, Frame4, "ComboBox1" ); |
Swatches->setEditable(false); |
Swatches = new ScComboBox( false, Frame4, "ComboBox1" ); |
Swatches->insertItem( tr( "HSV-Colormap" ) ); |
Swatches->insertItem("X11 RGB-Set"); |
Swatches->insertItem("X11 Grey-Set"); |
/branches/Version13x/Scribus/scribus/pagelayout.cpp |
---|
39,14 → 39,12 |
} |
else |
{ |
layoutsCombo = new ScComboBox( true, this, "layoutsCombo" ); |
layoutsCombo->setEditable(false); |
layoutsCombo = new ScComboBox( false, this, "layoutsCombo" ); |
layoutGroupLayout->addWidget( layoutsCombo ); |
} |
layoutLabel1 = new QLabel( this, "layoutLabel1" ); |
layoutGroupLayout->addWidget( layoutLabel1 ); |
firstPage = new ScComboBox( true, this, "firstPage" ); |
firstPage->setEditable(false); |
firstPage = new ScComboBox( false, this, "firstPage" ); |
layoutGroupLayout->addWidget( firstPage ); |
languageChange(); |
clearWState( WState_Polished ); |
/branches/Version13x/Scribus/scribus/pageselector.cpp |
---|
96,7 → 96,6 |
v = new PageValidator(1, LastPG, this); |
PageCombo = new ScComboBox( true, this, "PageCombo" ); |
PageCombo->setEditable( true ); |
PageCombo->setDuplicatesEnabled( false ); |
PageCombo->lineEdit()->setAlignment(Qt::AlignHCenter); |
QString tmp; |