Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 3616 → Rev 3617

/branches/Version13x/Scribus/scribus/edit1format.h
23,7 → 23,7
class ScribusDoc;
class StyleSelect;
class Tabruler;
class PageItem;
class PageItem_TextFrame;
 
 
class SCRIBUS_API EditStyle : public QDialog
/branches/Version13x/Scribus/scribus/Makefile.am
123,6 → 123,12
page.cpp \
pageitemattributes.ui \
pageitem.cpp \
pageitem_imageframe.cpp \
pageitem_line.cpp \
pageitem_pathtext.cpp \
pageitem_polygon.cpp \
pageitem_polyline.cpp \
pageitem_textframe.cpp \
pagelayout.cpp \
pageselector.cpp \
pagesize.cpp \
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
24,6 → 24,12
 
#include "page.h"
#include "pageitem.h"
#include "pageitem_imageframe.h"
#include "pageitem_line.h"
#include "pageitem_pathtext.h"
#include "pageitem_polygon.h"
#include "pageitem_polyline.h"
#include "pageitem_textframe.h"
#include "undomanager.h"
#include "undostate.h"
#include "prefsmanager.h"
2152,26 → 2158,31
//Q_ASSERTs here will warn on creation issues when a coder specifies the frameType incorrectly
//for items that do not have/need a frameType for creation.
case PageItem::ImageFrame:
newItem = new PageItem(this, PageItem::ImageFrame, x, y, b, h, 1, toolSettings.dBrushPict, "None");
//newItem = new PageItem(this, PageItem::ImageFrame, x, y, b, h, 1, toolSettings.dBrushPict, "None");
newItem = new PageItem_ImageFrame(this, x, y, b, h, 1, toolSettings.dBrushPict, "None");
Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
break;
case PageItem::TextFrame:
newItem = new PageItem(this, PageItem::TextFrame, x, y, b, h, w, "None", outline);
//newItem = new PageItem(this, PageItem::TextFrame, x, y, b, h, w, "None", outline);
newItem = new PageItem_TextFrame(this, x, y, b, h, w, "None", outline);
Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
break;
case PageItem::Line:
{
double lineWidth = w == 0.0 ? 1.0 : w;
newItem = new PageItem(this, PageItem::Line, x, y, b, h, lineWidth, "None", outline);
//newItem = new PageItem(this, PageItem::Line, x, y, b, h, lineWidth, "None", outline);
newItem = new PageItem_Line(this, x, y, b, h, lineWidth, "None", outline);
Q_ASSERT(frameType==PageItem::Unspecified);
}
break;
case PageItem::Polygon:
newItem = new PageItem(this, PageItem::Polygon, x, y, b, h, w, fill, outline);
//newItem = new PageItem(this, PageItem::Polygon, x, y, b, h, w, fill, outline);
newItem = new PageItem_Polygon(this, x, y, b, h, w, fill, outline);
Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Ellipse || frameType==PageItem::Unspecified);
break;
case PageItem::PolyLine:
newItem = new PageItem(this, PageItem::PolyLine, x, y, b, h, w, fill, outline);
//newItem = new PageItem(this, PageItem::PolyLine, x, y, b, h, w, fill, outline);
newItem = new PageItem_PolyLine(this, x, y, b, h, w, fill, outline);
Q_ASSERT(frameType==PageItem::Unspecified);
break;
case PageItem::PathText:
/branches/Version13x/Scribus/scribus/edit1format.cpp
11,6 → 11,7
#include "scribusdoc.h"
#include "styleselect.h"
#include "pageitem.h"
#include "pageitem_textframe.h"
#include "scribusdoc.h"
#include "scribusstructs.h"
#include "scpaths.h"
299,7 → 300,7
previewText->setPaletteBackgroundColor(paletteBackgroundColor());
layoutPreview->addWidget(previewText);
// preview setting - reading first paragraphs from LoremIpsum.txt etc.
previewItem = new PageItem(parentDoc, PageItem::TextFrame, 0, 0, previewText->width(), previewText->height(), 0, "None", parentDoc->toolSettings.dPenText);
previewItem = new PageItem_TextFrame(parentDoc, 0, 0, previewText->width(), previewText->height(), 0, "None", parentDoc->toolSettings.dPenText);
previewItem->FrameType = PageItem::TextFrame;
LoremParser *m = new LoremParser("loremipsum.xml");
lorem = m->createLorem(3);
/branches/Version13x/Scribus/scribus/pageitem.h
165,7 → 165,6
PageItem* embedded;
};
 
 
ObjAttrVector* getObjectAttributes();
/*!
* brief Returns a complete ObjectAttribute struct if 1 is found, or ObjectAttribute.name will be QString::null if 0 or >1 are found
177,9 → 176,12
void DrawObj(ScPainter *p, QRect e);
void DrawObj_Pre(ScPainter *p, double &sc);
void DrawObj_Post(ScPainter *p);
virtual void DrawObj_Item(ScPainter *p);
virtual void DrawObj_Item(ScPainter *p, double sc);
virtual void DrawObj_Item(ScPainter *p, QRect e, double sc);
void DrawObj_ImageFrame(ScPainter *p, double sc);
void DrawObj_TextFrame(ScPainter *p, QRect e, double sc);
void DrawObj_Line(ScPainter *p);
//void DrawObj_TextFrame(ScPainter *p, QRect e, double sc);
//void DrawObj_Line(ScPainter *p);
void DrawObj_Polygon(ScPainter *p);
void DrawObj_PolyLine(ScPainter *p);
void DrawObj_PathText(ScPainter *p, double sc);
/branches/Version13x/Scribus/scribus/pageitem.cpp
326,25 → 326,28
DrawObj_Pre(p, sc);
switch(itemType())
{
case ImageFrame:
DrawObj_ImageFrame(p, sc);
break;
case TextFrame:
DrawObj_TextFrame(p, e, sc);
//DrawObj_TextFrame(p, e, sc);
DrawObj_Item(p, e, sc);
break;
case Line:
DrawObj_Line(p);
break;
case Polygon:
DrawObj_Polygon(p);
break;
case PolyLine:
DrawObj_PolyLine(p);
break;
//case Line:
// DrawObj_Line(p);
// break;
//case Polygon:
//DrawObj_Polygon(p);
// break;
//case PolyLine:
// DrawObj_PolyLine(p);
// break;
//case ImageFrame:
//DrawObj_ImageFrame(p, sc);
// break;
case ImageFrame:
case PathText:
DrawObj_PathText(p, sc);
DrawObj_Item(p, sc);
break;
default:
DrawObj_Item(p);
break;
}
DrawObj_Post(p);
545,24 → 548,30
switch(embedded->itemType())
{
case ImageFrame:
embedded->DrawObj_ImageFrame(p, sc);
//embedded->DrawObj_ImageFrame(p, sc);
embedded->DrawObj_Item(p, sc);
break;
case TextFrame:
embedded->DrawObj_TextFrame(p, e, sc);
//embedded->DrawObj_TextFrame(p, e, sc);
embedded->DrawObj_Item(p, e, sc);
break;
case Line:
embedded->Pwidth = pws * QMIN(hl->scale / 1000.0, hl->scalev / 1000.0);
embedded->DrawObj_Line(p);
//embedded->DrawObj_Line(p);
embedded->DrawObj_Item(p);
break;
case Polygon:
embedded->DrawObj_Polygon(p);
//embedded->DrawObj_Polygon(p);
embedded->DrawObj_Item(p);
break;
case PolyLine:
embedded->Pwidth = pws * QMIN(hl->scale / 1000.0, hl->scalev / 1000.0);
embedded->DrawObj_PolyLine(p);
//embedded->DrawObj_PolyLine(p);
embedded->DrawObj_Item(p);
break;
case PathText:
embedded->DrawObj_PathText(p, sc);
//embedded->DrawObj_PathText(p, sc);
embedded->DrawObj_Item(p, sc);
break;
default:
break;
587,7 → 596,7
}
}
 
/** Zeichnet das Item */
/*
void PageItem::DrawObj_ImageFrame(ScPainter *p, double sc)
{
if(!Doc->RePos)
645,8 → 654,9
}
}
}
*/
 
/** Zeichnet das Item */
/*
void PageItem::DrawObj_TextFrame(ScPainter *p, QRect e, double sc)
{
switch (itemType())
2561,8 → 2571,9
}
Dirty = false;
}
*/
 
/** Zeichnet das Item */
/*
void PageItem::DrawObj_Line(ScPainter *p)
{
if (!Doc->RePos)
2614,8 → 2625,8
}
}
}
 
/** Zeichnet das Item */
*/
/*
void PageItem::DrawObj_Polygon(ScPainter *p)
{
if (!Doc->RePos)
2624,8 → 2635,8
p->fillPath();
}
}
 
/** Zeichnet das Item */
*/
/*
void PageItem::DrawObj_PolyLine(ScPainter *p)
{
if (!Doc->RePos && PoLine.size()>=4)
2737,8 → 2748,8
}
}
}
 
/** Zeichnet das Item */
*/
/*
void PageItem::DrawObj_PathText(ScPainter *p, double sc)
{
uint a;
2915,8 → 2926,8
first = false;
}
}
*/
 
 
void PageItem::paintObj(QRect e, QPixmap *ppX)
{
if (!Doc->DoDrawing)
3050,7 → 3061,7
{
uint zae = 0;
uint za2 = base;
QString chx = "#";
QString chx("#");
if ((!Doc->masterPageMode) && (OwnPage != -1))
{
do
3068,7 → 3079,7
if (za2+zae == itemText.count())
break;
}
QString out="%1";
QString out("%1");
QString out2;
out2 = out.arg(OwnPage+Doc->FirstPnum, -zae);
chx = out2.mid(base-za2, 1);
4473,8 → 4484,8
}
else
{
mx = x - ox;
my = y - oy;
mx = -mx;
my = -my;
ScApp->view->RotateItem(rt, this);
ScApp->view->MoveItem(mx, my, this, false);
ScApp->view->SizeItem(w, h, this, false, true, true);
4588,12 → 4599,16
 
void PageItem::restoreName(SimpleState *state, bool isUndo)
{
QString oldName = state->get("OLD_NAME");
QString newName = state->get("NEW_NAME");
if (isUndo)
{
QString oldName = state->get("OLD_NAME");
setItemName(oldName);
}
else
{
QString newName = state->get("NEW_NAME");
setItemName(newName);
}
}
 
void PageItem::restoreArrow(SimpleState *state, bool isUndo, bool isStart)
5396,3 → 5411,16
}
return true;
}
 
 
void PageItem::DrawObj_Item(ScPainter *p)
{
}
 
void PageItem::DrawObj_Item(ScPainter *p, double sc)
{
}
 
void PageItem::DrawObj_Item(ScPainter *p, QRect e, double sc)
{
}
/branches/Version13x/Scribus/scribus/scribusdoc.h
39,6 → 39,8
#include "documentinformation.h"
#include "undoobject.h"
#include "pageitem.h"
#include "pageitem_line.h"
#include "pageitem_textframe.h"
 
#ifdef HAVE_CMS
#include CMS_INC