/trunk/Scribus/configure.in |
---|
133,6 → 133,7 |
AC_CONFIG_FILES([scribus/libprefs/Makefile]) |
AC_CONFIG_FILES([scribus/plugins/libchar/Makefile]) |
AC_CONFIG_FILES([scribus/plugins/svgexplugin/Makefile]) |
AC_CONFIG_FILES([scribus/plugins/printpreview/Makefile]) |
AC_CONFIG_FILES([scribus/plugins/Makefile]) |
AC_CONFIG_FILES([scribus/libpostscript/Makefile]) |
AC_CONFIG_FILES([scribus/profiles/Makefile]) |
/trunk/Scribus/ChangeLogCVS |
---|
1,4 → 1,9 |
Changes since Version 0.9.10 |
02.06.2003 svgexplugin.cpp Improved Image Support, Images are now save as PNG-Images in the |
same Folder as the SVG File. |
preview.cpp Added New Plugin for Print Preview. |
Needs Ghostscript to work. |
01.06.2003 svgexplugin.cpp Added Support for Images. |
page.cpp Fixed Crash when loading Documents with Images. |
/trunk/Scribus/scribus/icons/finish.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
## -0,0 +1 ## |
+application/octet-stream |
\ No newline at end of property |
Index: Scribus/scribus/icons/start.png |
=================================================================== |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/Scribus/scribus/icons/start.png |
---|
Property changes: |
Added: svn:mime-type |
## -0,0 +1 ## |
+application/octet-stream |
\ No newline at end of property |
Index: Scribus/scribus/icons/back.png |
=================================================================== |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/Scribus/scribus/icons/back.png |
---|
Property changes: |
Added: svn:mime-type |
## -0,0 +1 ## |
+application/octet-stream |
\ No newline at end of property |
Index: Scribus/scribus/icons/forward.png |
=================================================================== |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/Scribus/scribus/icons/forward.png |
---|
Property changes: |
Added: svn:mime-type |
## -0,0 +1 ## |
+application/octet-stream |
\ No newline at end of property |
Index: Scribus/scribus/icons/Makefile.am |
=================================================================== |
--- Scribus/scribus/icons/Makefile.am (revision 22) |
+++ Scribus/scribus/icons/Makefile.am (revision 23) |
@@ -1,7 +1,7 @@ |
####### kdevelop will overwrite this part!!! (begin)########## |
-EXTRA_DIST = Kreuz.xpm Bild.xpm Editm.xpm Kreise.xpm Lock.xpm Lupe.xpm Rechtecke.xpm Rotieren.xpm Stift.xpm Text.xpm Unlock.xpm DateiClos.xpm DateiNeu.xpm DateiOpen.xpm DateiPrint.xpm DateiSave.xpm AppIcon.xpm LupeZ.xpm Gross.xpm Klein.xpm DragPix.xpm Rotieren2.xpm HandC.xpm scribus_logo.jpg DateiClos16.png DateiNeu16.png DateiOpen16.png DateiPrint16.png DateiSave16.png editcopy.png editcut.png editdelete.png editpaste.png exit.png doc.png image.png pdf.png postscript.png txt.png Zeichen.xpm Hoch.xpm Kapital.xpm Strike.xpm Tief.xpm Unter.xpm Kern.xpm Spacing.xpm Corner.xpm FlipH.xpm FlipV.xpm Winkel.xpm acrobat.png scribusicon.png text_block.png text_center.png text_left.png text_right.png Text2.xpm spline.png triangle.png Stiftalt.xpm beziertool.png AddNode.png DeleteNode.png MoveAsym.png MoveKontrol.png MoveNode.png MoveSym.png BevelJoin.png ButtCap.png MiterJoin.png RoundJoin.png SquareCap.png ResetNode.png RoundCap.png Reset1Node.png BezierClose.png PolyCut.png AddPoint.png DelPoint.png Split.png Deletelayer.png Layervisible.xpm Lowerlayer.png Newlayer.png Raiselayer.png checkbox.png combobox.png listbox.png pushbutton.png textview.png charset.png goto.png document2.png trashcan.png trashcan2.png gohome.png bottom.png down.png top.png up.png irreg.png oval.png rect.png text_force.png ok.png Revers.png hmirror.png vmirror.png shear_right.png shear_left.png shear_up.png shear_down.png Splash.png |
+EXTRA_DIST = Kreuz.xpm Bild.xpm Editm.xpm Kreise.xpm Lock.xpm Lupe.xpm Rechtecke.xpm Rotieren.xpm Stift.xpm Text.xpm Unlock.xpm DateiClos.xpm DateiNeu.xpm DateiOpen.xpm DateiPrint.xpm DateiSave.xpm AppIcon.xpm LupeZ.xpm Gross.xpm Klein.xpm DragPix.xpm Rotieren2.xpm HandC.xpm scribus_logo.jpg DateiClos16.png DateiNeu16.png DateiOpen16.png DateiPrint16.png DateiSave16.png editcopy.png editcut.png editdelete.png editpaste.png exit.png doc.png image.png pdf.png postscript.png txt.png Zeichen.xpm Hoch.xpm Kapital.xpm Strike.xpm Tief.xpm Unter.xpm Kern.xpm Spacing.xpm Corner.xpm FlipH.xpm FlipV.xpm Winkel.xpm acrobat.png scribusicon.png text_block.png text_center.png text_left.png text_right.png Text2.xpm spline.png triangle.png Stiftalt.xpm beziertool.png AddNode.png DeleteNode.png MoveAsym.png MoveKontrol.png MoveNode.png MoveSym.png BevelJoin.png ButtCap.png MiterJoin.png RoundJoin.png SquareCap.png ResetNode.png RoundCap.png Reset1Node.png BezierClose.png PolyCut.png AddPoint.png DelPoint.png Split.png Deletelayer.png Layervisible.xpm Lowerlayer.png Newlayer.png Raiselayer.png checkbox.png combobox.png listbox.png pushbutton.png textview.png charset.png goto.png document2.png trashcan.png trashcan2.png gohome.png bottom.png down.png top.png up.png irreg.png oval.png rect.png text_force.png ok.png Revers.png hmirror.png vmirror.png shear_right.png shear_left.png shear_up.png shear_down.png Splash.png back.png start.png forward.png finish.png |
install-data-local: |
$(mkinstalldirs) $(prefix)/lib/scribus/icons/ |
@@ -232,6 +232,14 @@ |
$(INSTALL_DATA) $(srcdir)/shear_down.png $(prefix)/lib/scribus/icons/shear_down.png |
$(mkinstalldirs) $(prefix)/lib/scribus/icons/ |
$(INSTALL_DATA) $(srcdir)/Splash.png $(prefix)/lib/scribus/icons/Splash.png |
+ $(mkinstalldirs) $(prefix)/lib/scribus/icons/ |
+ $(INSTALL_DATA) $(srcdir)/back.png $(prefix)/lib/scribus/icons/back.png |
+ $(mkinstalldirs) $(prefix)/lib/scribus/icons/ |
+ $(INSTALL_DATA) $(srcdir)/finish.png $(prefix)/lib/scribus/icons/finish.png |
+ $(mkinstalldirs) $(prefix)/lib/scribus/icons/ |
+ $(INSTALL_DATA) $(srcdir)/forward.png $(prefix)/lib/scribus/icons/forward.png |
+ $(mkinstalldirs) $(prefix)/lib/scribus/icons/ |
+ $(INSTALL_DATA) $(srcdir)/start.png $(prefix)/lib/scribus/icons/start.png |
uninstall-local: |
@@ -349,6 +357,10 @@ |
-rm -f $(prefix)/lib/scribus/icons/shear_up.png |
-rm -f $(prefix)/lib/scribus/icons/shear_down.png |
-rm -f $(prefix)/lib/scribus/icons/Splash.png |
+ -rm -f $(prefix)/lib/scribus/icons/back.png |
+ -rm -f $(prefix)/lib/scribus/icons/finish.png |
+ -rm -f $(prefix)/lib/scribus/icons/forward.png |
+ -rm -f $(prefix)/lib/scribus/icons/start.png |
####### kdevelop will overwrite this part!!! (end)############ |
/trunk/Scribus/scribus/libabout/about.cpp |
---|
32,8 → 32,7 |
tabLayout1->addWidget( PixmapLabel1 ); |
BuildID = new QLabel( tab, "BB" ); |
BuildID->setAlignment(Qt::AlignCenter); |
QString bu; |
bu.sprintf("%s %s ", __TIME__, __DATE__); |
QString bu = "02. June 2003 "; |
#ifdef HAVE_FREETYPE |
bu += "F"; |
#else |
/trunk/Scribus/scribus/helpbrowser.cpp |
---|
21,331 → 21,6 |
#include <config.h> |
extern QPixmap loadIcon(QString nam); |
static const char* const image0_data[] = { |
"16 16 85 2", |
"Qt c None", |
".c c #000000", |
".a c #181418", |
".K c #201c20", |
".z c #202020", |
".p c #292429", |
".b c #292829", |
".k c #312829", |
".2 c #313031", |
"#q c #313431", |
".T c #393031", |
"#r c #393431", |
"#s c #393439", |
".# c #393839", |
"#p c #393c39", |
".U c #410808", |
".3 c #413c41", |
".l c #414441", |
".G c #4a484a", |
"#n c #521c08", |
".F c #524c52", |
".y c #525052", |
".g c #525552", |
".o c #5a595a", |
".n c #625d62", |
".d c #626162", |
".E c #626562", |
".7 c #6a2400", |
".0 c #6a2808", |
"#k c #6a2c00", |
".u c #6a656a", |
".r c #6a696a", |
".H c #6a6d6a", |
"#h c #732400", |
".P c #732808", |
".q c #737173", |
"#e c #7b4410", |
"#a c #834818", |
".j c #838183", |
".8 c #8b5929", |
".m c #8b898b", |
".X c #946941", |
".O c #946d41", |
".S c #948d94", |
".4 c #9c6d4a", |
".i c #9c959c", |
".f c #9c999c", |
".L c #9c9d9c", |
"#m c #a44000", |
".t c #a4a1a4", |
".V c #a4a5a4", |
"#g c #ac4800", |
".s c #acaaac", |
"#l c #b44400", |
"#d c #b4aeb4", |
".h c #b4b2b4", |
".J c #b4b6b4", |
"#. c #bd5500", |
".x c #bdb6bd", |
".I c #bdbabd", |
".v c #bdbebd", |
"#c c #c55900", |
".e c #c5c2c5", |
".Q c #d5beb4", |
".N c #d5bebd", |
".6 c #de6500", |
"#f c #de7931", |
"#b c #de955a", |
"#o c #ded6d5", |
"#i c #ded6de", |
"#j c #dedade", |
".R c #dedede", |
".9 c #e6a57b", |
".Z c #e6baa4", |
".5 c #e6c6b4", |
".W c #e6dee6", |
".M c #e6e2e6", |
".1 c #e6e6e6", |
"## c #eee2e6", |
".D c #eee6ee", |
".w c #eeeaee", |
".Y c #f6e2d5", |
".A c #f6f2f6", |
".B c #fffaff", |
".C c #ffffff", |
"QtQtQtQtQtQtQt.#.aQtQtQtQtQtQtQt", |
"QtQtQt.b.cQt.d.e.f.#QtQtQtQtQtQt", |
"QtQtQt.b.c.g.e.h.i.j.bQtQtQtQtQt", |
"QtQtQt.k.l.e.m.n.o.d.j.pQtQtQtQt", |
"QtQtQt.g.e.q.r.s.t.u.g.j.pQtQtQt", |
"QtQt.g.e.q.r.v.w.w.x.r.y.j.zQtQt", |
"Qt.d.e.q.u.v.A.B.C.D.x.E.F.j.pQt", |
".G.e.H.u.I.A.B.B.B.B.A.J.d.G.j.K", |
"Qt.b.b.L.M.B.N.O.P.Q.C.R.S.T.UQt", |
"QtQt.b.V.W.B.X.Y.Z.0.B.1.i.2QtQt", |
"QtQt.3.s.1.B.4.5.6.7.C.M.s.bQtQt", |
"QtQt.#.s.M.B.8.9#..7.B##.s.bQtQt", |
"QtQt.3.s.D.B#a#b#c.7.C.M#d.bQtQt", |
"QtQt.#.s.M.B#e#f#g#h.B.M.s.bQtQt", |
"QtQt.3.t#i#j#k#l#m#n#j#o.t.bQtQt", |
"QtQtQt#p#q#r.b.b.b.b.2#s.b.bQtQt"}; |
static const char* const image1_data[] = { |
"16 16 95 2", |
"Qt c None", |
"#w c None", |
".n c None", |
"#q c None", |
".k c None", |
".l c None", |
".p c None", |
".r c None", |
".j c None", |
".g c None", |
".w c None", |
"#b c None", |
"#e c None", |
".s c None", |
"#v c None", |
".A c None", |
".d c None", |
"#B c None", |
".h c None", |
".# c None", |
".B c None", |
".U c None", |
"#x c None", |
"#r c None", |
"#A c None", |
"#C c None", |
".q c None", |
"#c c None", |
".b c None", |
".i c None", |
".F c None", |
".a c None", |
"#d c None", |
".m c None", |
".c c None", |
".f c None", |
".e c None", |
".v c None", |
"#u c None", |
".G c None", |
".z c #000000", |
"#z c #081020", |
".T c #081829", |
"#y c #081831", |
"#a c #081c29", |
".2 c #081c31", |
"#f c #082031", |
"#n c #082439", |
"#p c #082839", |
".Y c #0895bd", |
".3 c #101420", |
"#o c #102841", |
".K c #104462", |
".t c #104c73", |
".o c #105073", |
"#s c #105573", |
".L c #10557b", |
"#l c #10597b", |
"#m c #106183", |
"#k c #1081a4", |
".0 c #1095bd", |
".Z c #1099bd", |
".X c #1099c5", |
".7 c #10a1cd", |
".H c #18486a", |
".C c #184c6a", |
".x c #184c73", |
".M c #185573", |
".4 c #18597b", |
"#j c #1891b4", |
".5 c #1891bd", |
".W c #18b2cd", |
".O c #18b6d5", |
".u c #203852", |
"#h c #2095b4", |
"#t c #20a5cd", |
"#i c #2999b4", |
".8 c #29bede", |
"## c #29cad5", |
".6 c #39dae6", |
".9 c #41d6e6", |
"#. c #4adae6", |
"#g c #4adeee", |
".1 c #5aaec5", |
".J c #5ac6de", |
".N c #7bd6e6", |
".y c #83a1bd", |
".D c #83a1c5", |
".S c #83c6e6", |
".P c #a4e2f6", |
".Q c #cdeeff", |
".R c #d5eeff", |
".V c #deeeff", |
".E c #e6f2ff", |
".I c #ffffff", |
"Qt.#Qt.#.a.b.c.d.e.f.g.d.e.f.g.d", |
".h.g.i.j.k.l.m.n.oQt.p.n.p.gQt.j", |
"Qt.#Qt.#.q.r.s.t.u.rQt.rQt.rQt.r", |
".v.j.w.gQt.j.x.y.z.jQt.gQt.j.A.g", |
".g.r.B.rQt.C.D.E.zQt.g.r.g.r.F.r", |
"QtQt.G.B.H.y.I.J.K.L.o.L.o.LQtQt", |
"Qt.rQt.M.D.I.N.O.P.Q.I.R.S.T.U.#", |
".GQt.t.y.V.J.W.X.Y.Z.0.Z.1.2Qt.g", |
".U.#.3.4.5.6.7.X.8.9#.##.8#a#b#c", |
"#dQt#e#f.L.5#g.7.Z#h#i#j#k.z.p.j", |
".g.r.g.r.T#l.5.6#m#n#o#p.z.z#qQt", |
".p.j.p.g#r.T#s#t.zQt.pQt.p#u.pQt", |
"#v.rQt.r#w#x#y#s.z.r.g.r.g.c.g.r", |
".p.g.A#c#dQt#e#z.z.g.p.j#A.g.p.j", |
".g.r#B.r.g.r.g.r.z.r.g.r.g.r.g.r", |
".p.j.p#C.p.j.p.g#e.j.p.g.p.jQtQt"}; |
static const char* const image2_data[] = { |
"16 16 87 2", |
".b c None", |
".z c None", |
"#u c None", |
".i c None", |
".j c None", |
".o c None", |
".g c None", |
".e c None", |
".B c None", |
".w c None", |
".E c None", |
".u c None", |
".d c None", |
".c c None", |
".h c None", |
".D c None", |
".q c None", |
".f c None", |
".p c None", |
".v c None", |
".x c None", |
".m c None", |
".a c None", |
".# c None", |
".y c None", |
".t c None", |
".C c None", |
".n c None", |
".G c None", |
".F c None", |
".k c None", |
"Qt c None", |
"#t c #000000", |
"## c #000408", |
"#p c #000810", |
"#i c #000c18", |
"#n c #080c10", |
"#r c #081018", |
"#k c #081420", |
"#l c #081820", |
"#s c #082841", |
".Y c #088db4", |
".W c #0895c5", |
"#j c #103452", |
".l c #103852", |
".s c #10385a", |
"#q c #10405a", |
"#o c #104462", |
".K c #104c6a", |
".r c #104c73", |
"#m c #10597b", |
"#h c #10658b", |
".1 c #10698b", |
"#. c #106994", |
".X c #1095bd", |
"#f c #1099bd", |
".Z c #1099c5", |
".U c #109dc5", |
".7 c #10a1c5", |
".0 c #10a5cd", |
".V c #10aecd", |
"#g c #10c2de", |
"#a c #18405a", |
".O c #185073", |
"#e c #1895b4", |
".9 c #18a1c5", |
".6 c #18bad5", |
".H c #204862", |
".L c #294c6a", |
"#c c #2991ac", |
"#d c #2995b4", |
".A c #317d9c", |
".J c #3181a4", |
".4 c #41d2de", |
".5 c #4adeee", |
".8 c #4ae2ee", |
".T c #5ac2de", |
"#b c #6aa5c5", |
".3 c #94ceee", |
".P c #a4cee6", |
".M c #acdeee", |
".S c #c5e2f6", |
".2 c #d5e6f6", |
".I c #e6f2ff", |
".Q c #e6f6ff", |
".R c #f6f6ff", |
".N c #ffffff", |
"Qt.#Qt.a.b.c.d.e.f.c.d.e.b.c.g.e", |
".b.h.i.h.j.h.k.l.m.h.n.h.o.h.b.h", |
".f.e.p.c.#.e.q.r.s.e.t.c.u.e.v.c", |
".w.h.x.h.y.h.z.r.A.l.B.h.C.h.e.h", |
".D.c.E.e.F.#.G.H.I.J.s.e.D.c.D.e", |
".e.h.K.r.r.r.H.L.M.N.A.l.e.h.e.h", |
".D.e.O.P.Q.R.Q.S.T.U.N.J.s.e.D.c", |
".e.h.r.R.T.V.W.X.Y.Z.0.I.1.l.e.h", |
".D.c.L.2.3.4.5.6.Z.7.8.9#.##.D.e", |
".e.h#a#b#c#d#e#f#g.8.9#h#i.h.e.h", |
".D.e#j#k#k#k#l#m.8.9#.#n.D.e.D.c", |
".e.h.e.h.e.h.e#o.9#h#p.h.e.h.e.h", |
".D.c.D.e.D.c.D#q#.#r.D.e.D.c.D.e", |
".e.h.e.h.e.h.e#s##.h.e.h.e.h.e.h", |
".D.e.D.c.D.e.D#t.D.e.D.c.D.e.D.c", |
".e.h#u.h.B.#.B.#.e.h.e.h.e.h.e.h"}; |
/* |
* Constructs a HelpBrowser which is a child of 'parent', with the |
* name 'name' and widget flags set to 'f' |
356,9 → 31,6 |
HelpBrowser::HelpBrowser( QWidget* parent, QString Capt, QString Datei ) |
: QWidget( parent, "Help", WType_TopLevel | WDestructiveClose ) |
{ |
QPixmap image0( ( const char** ) image0_data ); |
QPixmap image1( ( const char** ) image1_data ); |
QPixmap image2( ( const char** ) image2_data ); |
resize( 547, 450 ); |
setCaption( Capt ); |
setIcon(loadIcon("AppIcon.xpm")); |
375,7 → 47,7 |
HomeB->setMinimumSize( QSize( 0, 0 ) ); |
HomeB->setMaximumSize( QSize( 32767, 32767 ) ); |
HomeB->setText( tr( "" ) ); |
HomeB->setPixmap( image0 ); |
HomeB->setPixmap(loadIcon("gohome.png")); |
Layout13->addWidget( HomeB ); |
BackB = new QToolButton( this, "BackB" ); |
382,7 → 54,7 |
BackB->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, BackB->sizePolicy().hasHeightForWidth() ) ); |
BackB->setMinimumSize( QSize( 0, 0 ) ); |
BackB->setMaximumSize( QSize( 32767, 32767 ) ); |
BackB->setPixmap( image1 ); |
BackB->setPixmap(loadIcon("back.png")); |
Layout13->addWidget( BackB ); |
ForwB = new QToolButton( this, "ForwB" ); |
389,7 → 61,7 |
ForwB->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, ForwB->sizePolicy().hasHeightForWidth() ) ); |
ForwB->setMinimumSize( QSize( 0, 0 ) ); |
ForwB->setMaximumSize( QSize( 32767, 32767 ) ); |
ForwB->setPixmap( image2 ); |
ForwB->setPixmap(loadIcon("forward.png")); |
Layout13->addWidget( ForwB ); |
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); |
Layout13->addItem( spacer ); |
/trunk/Scribus/scribus/plugins/Makefile.am |
---|
1,5 → 1,5 |
####### kdevelop will overwrite this part!!! (begin)########## |
SUBDIRS = libchar svgexplugin |
SUBDIRS = libchar svgexplugin printpreview |
####### kdevelop will overwrite this part!!! (end)############ |
/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp |
---|
22,6 → 22,7 |
#include <qtextstream.h> |
extern void Level2Layer(ScribusDoc *doc, struct Layer *ll, int Level); |
extern QString Path2Relative(QString Path); |
extern QImage LoadPict(QString fn); |
QString Name() |
{ |
267,7 → 268,7 |
} |
if ((Item->PicAvail) && (Item->Pfile != "")) |
{ |
/* ob = docu->createElement("clipPath"); |
ob = docu->createElement("clipPath"); |
ob.setAttribute("id", Clipi+IToStr(ClipCount)); |
ob.setAttribute("clipPathUnits", "userSpaceOnUse"); |
QDomElement cl = docu->createElement("path"); |
274,12 → 275,14 |
cl.setAttribute("d", SetClipPath(Item)+"Z"); |
ob.appendChild(cl); |
gr.appendChild(ob); |
QImage img = LoadPict(Item->Pfile); |
QFileInfo fi = QFileInfo(Item->Pfile); |
img.save(fi.baseName()+".png", "PNG"); |
ob = docu->createElement("image"); |
ob.setAttribute("clip-path", "url(#"+Clipi+IToStr(ClipCount)+")"); |
ob.setAttribute("clip-rule", "evenodd"); */ |
ob = docu->createElement("image"); |
ob.setAttribute("transform", "translate("+FToStr(Item->LocalX)+", "+FToStr(Item->LocalY)+") scale("+FToStr(Item->LocalScX)+", "+FToStr(Item->LocalScY)+")"); |
ob.setAttribute("xlink:href", Path2Relative(Item->Pfile)); |
ob.setAttribute("clip-rule", "evenodd"); |
ob.setAttribute("transform", "scale("+FToStr(Item->LocalScX)+", "+FToStr(Item->LocalScY)+") translate("+FToStr(Item->LocalX)+", "+FToStr(Item->LocalY)+")"); |
ob.setAttribute("xlink:href", fi.baseName()+".png"); |
ClipCount++; |
} |
break; |
/trunk/Scribus/scribus/plugins/printpreview/preview.cpp |
---|
0,0 → 1,235 |
/*************************************************************************** |
preview.cpp - description |
------------------- |
begin : Sun Jun 1 08:00:00 CEST 2003 |
copyright : (C) 2003 by Franz Schmid |
email : Franz.Schmid@altmuehlnet.de |
***************************************************************************/ |
/*************************************************************************** |
* * |
* This program is free software; you can redistribute it and/or modify * |
* it under the terms of the GNU General Public License as published by * |
* the Free Software Foundation; either version 2 of the License, or * |
* (at your option) any later version. * |
* * |
***************************************************************************/ |
#include "preview.h" |
#include "preview.moc" |
#include <qimage.h> |
#include <cstdlib> |
extern QPixmap loadIcon(QString nam); |
QString Name() |
{ |
return "Print Preview"; |
} |
int Type() |
{ |
return 1; |
} |
void Run(QWidget *d, ScribusApp *plug) |
{ |
if (plug->HaveDoc) |
{ |
PPreview *dia = new PPreview(d, plug); |
dia->exec(); |
delete dia; |
} |
} |
PPreview::PPreview( QWidget* parent, ScribusApp *pl) : QDialog( parent, "Preview", true, 0 ) |
{ |
QString tmp; |
setCaption(tr("Print Preview")); |
app = pl; |
APage = 0; |
MPage = app->doc->PageC; |
setIcon(loadIcon("AppIcon.xpm")); |
PLayout = new QVBoxLayout(this, 0, 0, "PLayout"); |
Layout1 = new QHBoxLayout; |
Layout1->setSpacing(6); |
Layout1->setMargin(0); |
First = new QToolButton(this, "First"); |
First->setMaximumSize(QSize(24,24)); |
First->setText(tr("")); |
First->setPixmap(loadIcon("start.png")); |
Layout1->addWidget(First); |
Back = new QToolButton(this, "Back"); |
Back->setMaximumSize(QSize(24,24)); |
Back->setText(tr("")); |
Back->setPixmap(loadIcon("back.png")); |
Layout1->addWidget(Back); |
Text1 = new QLabel(this); |
Text1->setText(tr("Page:")); |
Layout1->addWidget(Text1); |
SeitenAusw = new QComboBox( true, this, "SeitenAusw" ); |
SeitenAusw->setEditable(false); |
for (int a = 0; a < MPage; a++) |
{ |
SeitenAusw->insertItem(tmp.setNum(a+1)); |
} |
Layout1->addWidget(SeitenAusw); |
Forward = new QToolButton(this, "Forward"); |
Forward->setMaximumSize(QSize(24,24)); |
Forward->setText(tr("")); |
Forward->setPixmap(loadIcon("forward.png")); |
Layout1->addWidget(Forward); |
Last = new QToolButton(this, "Last"); |
Last->setMaximumSize(QSize(24,24)); |
Last->setText(tr("")); |
Last->setPixmap(loadIcon("finish.png")); |
Layout1->addWidget(Last); |
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); |
Layout1->addItem(spacer); |
Layout2 = new QVBoxLayout; |
Layout2->setSpacing(1); |
Layout2->setMargin(0); |
AliasText = new QCheckBox(this, "TextAntiAlias"); |
AliasText->setText(tr("Antialias Text")); |
AliasText->setChecked(true); |
Layout2->addWidget(AliasText); |
AliasGr = new QCheckBox(this, "GraphicsAntiAlias"); |
AliasGr->setText(tr("Antialias Graphics")); |
AliasGr->setChecked(true); |
Layout2->addWidget(AliasGr); |
Layout1->addLayout(Layout2); |
PLayout->addLayout(Layout1); |
Anzeige = new QScrollView(this); |
Anz = new QLabel(Anzeige->viewport()); |
Anz->setPixmap(CreatePreview(0, 72)); |
Anzeige->addChild(Anz, 0, 0); |
PLayout->addWidget(Anzeige); |
resize(500, 500); |
connect(First, SIGNAL(clicked()), this, SLOT(ToStart())); |
connect(Back, SIGNAL(clicked()), this, SLOT(BackW())); |
connect(Forward, SIGNAL(clicked()), this, SLOT(ForW())); |
connect(Last, SIGNAL(clicked()), this, SLOT(ToEnd())); |
connect(AliasText, SIGNAL(clicked()), this, SLOT(ToggleTextAA())); |
connect(AliasGr, SIGNAL(clicked()), this, SLOT(ToggleTextAA())); |
connect(SeitenAusw, SIGNAL(activated(int)), this, SLOT(ToSeite(int))); |
setPageCombo(0); |
} |
PPreview::~PPreview() |
{ |
} |
void PPreview::ToStart() |
{ |
if (APage == 0) |
return; |
Anz->setPixmap(CreatePreview(0, 72)); |
APage = 0; |
setPageCombo(APage); |
} |
void PPreview::BackW() |
{ |
if (APage == 0) |
return; |
APage--; |
Anz->setPixmap(CreatePreview(APage, 72)); |
setPageCombo(APage); |
} |
void PPreview::ForW() |
{ |
if (APage == MPage-1) |
return; |
APage++; |
Anz->setPixmap(CreatePreview(APage, 72)); |
setPageCombo(APage); |
} |
void PPreview::ToEnd() |
{ |
if (APage == MPage-1) |
return; |
Anz->setPixmap(CreatePreview(MPage-1, 72)); |
APage = MPage-1; |
setPageCombo(APage); |
} |
void PPreview::ToSeite(int num) |
{ |
if (num == APage) |
return; |
Anz->setPixmap(CreatePreview(num, 72)); |
} |
void PPreview::ToggleTextAA() |
{ |
Anz->setPixmap(CreatePreview(APage, 72)); |
} |
void PPreview::setPageCombo(int num) |
{ |
disconnect(SeitenAusw, SIGNAL(activated(int)), this, SLOT(ToSeite(int))); |
SeitenAusw->setCurrentItem(num); |
if (num == 0) |
{ |
First->setEnabled(false); |
Back->setEnabled(false); |
} |
else |
{ |
First->setEnabled(true); |
Back->setEnabled(true); |
} |
if (num == MPage-1) |
{ |
Forward->setEnabled(false); |
Last->setEnabled(false); |
} |
else |
{ |
Forward->setEnabled(true); |
Last->setEnabled(true); |
} |
connect(SeitenAusw, SIGNAL(activated(int)), this, SLOT(ToSeite(int))); |
} |
QPixmap PPreview::CreatePreview(int Seite, int Res) |
{ |
int ret = -1; |
QString cmd1, cmd2, tmp, tmp2, tmp3; |
QMap<QString,QFont> ReallyUsed; |
QPixmap Bild; |
ReallyUsed.clear(); |
app->GetUsedFonts(&ReallyUsed); |
PSLib *dd = app->getPSDriver(true, app->Prefs.AvailFonts, ReallyUsed, app->doc->PageColors, false); |
if (dd != NULL) |
{ |
dd->PS_set_file(app->PrefsPfad+"/tmp.ps"); |
app->view->CreatePS(dd, Seite, Seite+1, 1, false, tr("All"), true, false, false, false); |
delete dd; |
app->closePSDriver(); |
} |
else |
return Bild; |
float b = app->doc->PageB * Res / 72; |
float h = app->doc->PageH * Res / 72; |
cmd1 = "gs -q -dNOPAUSE -sDEVICE=png16m -r"+tmp.setNum(Res)+" -g"+tmp2.setNum(qRound(b))+"x"+tmp3.setNum(qRound(h)); |
if (AliasText->isChecked()) |
cmd1 += " -dTextAlphaBits=4"; |
if (AliasGr->isChecked()) |
cmd1 += " -dGraphicsAlphaBits=4"; |
cmd1 += " -sOutputFile="+app->PrefsPfad+"/sc.png "; |
cmd2 = " -c showpage -c quit"; |
ret = system(cmd1 + app->PrefsPfad+"/tmp.ps" + cmd2); |
if (ret == 0) |
{ |
QImage image; |
image.load(app->PrefsPfad+"/sc.png"); |
image = image.convertDepth(32); |
Bild.convertFromImage(image); |
system("rm -f "+app->PrefsPfad+"/sc.png"); |
system("rm -f "+app->PrefsPfad+"/tmp.ps"); |
} |
return Bild; |
} |
Property changes: |
Added: svn:eol-style |
## -0,0 +1 ## |
+native |
\ No newline at end of property |
Added: svn:keywords |
## -0,0 +1 ## |
+Author Date Id Revision |
\ No newline at end of property |
Index: Scribus/scribus/plugins/printpreview/preview.h |
=================================================================== |
--- Scribus/scribus/plugins/printpreview/preview.h (nonexistent) |
+++ Scribus/scribus/plugins/printpreview/preview.h (revision 23) |
@@ -0,0 +1,64 @@ |
+#ifndef PRVIEW_H |
+#define PRVIEW_H |
+ |
+#include <qdialog.h> |
+#include <qlabel.h> |
+#include <qpixmap.h> |
+#include <qscrollview.h> |
+#include <qlayout.h> |
+#include <qtoolbutton.h> |
+#include <qcombobox.h> |
+#include <qcheckbox.h> |
+#include "scribus.h" |
+ |
+/** Calls the Plugin with the main Application window as parent |
+ * and the main Application Class as parameter */ |
+extern "C" void Run(QWidget *d, ScribusApp *plug); |
+/** Returns the Name of the Plugin. |
+ * This name appears in the relevant Menue-Entrys */ |
+extern "C" QString Name(); |
+/** Returns the Type of the Plugin. |
+ * 1 = the Plugin is a normal Plugin, which appears in the Extras Menue |
+ * 2 = the Plugins is a import Plugin, which appears in the Import Menue |
+ * 3 = the Plugins is a export Plugin, which appears in the Export Menue */ |
+extern "C" int Type(); |
+ |
+class PPreview : public QDialog |
+{ |
+ Q_OBJECT |
+ |
+public: |
+ PPreview( QWidget* parent, ScribusApp *plug ); |
+ ~PPreview(); |
+ void setPageCombo(int num); |
+ QPixmap CreatePreview(int Seite, int Res); |
+ QToolButton* First; |
+ QToolButton* Back; |
+ QLabel* Text1; |
+ QComboBox* SeitenAusw; |
+ QToolButton* Forward; |
+ QToolButton* Last; |
+ QCheckBox* AliasText; |
+ QCheckBox* AliasGr; |
+ QScrollView* Anzeige; |
+ QLabel* Anz; |
+ QPixmap* Bild; |
+ ScribusApp *app; |
+ int APage; |
+ int MPage; |
+ |
+public slots: |
+ void ToStart(); |
+ void BackW(); |
+ void ForW(); |
+ void ToEnd(); |
+ void ToSeite(int num); |
+ void ToggleTextAA(); |
+ |
+protected: |
+ QVBoxLayout* PLayout; |
+ QHBoxLayout* Layout1; |
+ QVBoxLayout* Layout2; |
+ |
+}; |
+#endif // QUERY_H |
/Scribus/scribus/plugins/printpreview/preview.h |
---|
Property changes: |
Added: svn:eol-style |
## -0,0 +1 ## |
+native |
\ No newline at end of property |
Added: svn:keywords |
## -0,0 +1 ## |
+Author Date Id Revision |
\ No newline at end of property |
Index: Scribus/scribus/plugins/printpreview/Makefile.am |
=================================================================== |
--- Scribus/scribus/plugins/printpreview/Makefile.am (nonexistent) |
+++ Scribus/scribus/plugins/printpreview/Makefile.am (revision 23) |
@@ -0,0 +1,16 @@ |
+libdir = $(prefix)/lib/scribus/plugins |
+AM_CPPFLAGS = -I$(top_builddir)/scribus |
+lib_LTLIBRARIES = libpreview.la |
+ |
+INCLUDES = $(LIBFREETYPE_CFLAGS) $(all_includes) |
+ |
+libpreview_la_LDFLAGS = -version-info 0:0:0 |
+ |
+libpreview_la_METASOURCES = AUTO |
+ |
+libpreview_la_SOURCES = preview.cpp |
+KDE_OPTIONS = qtonly |
+ |
+EXTRA_DIST = preview.cpp preview.h |
+ |
+AM_LDFLAGS = -s $(LIBFREETYPE_LIBS) |
/Scribus/scribus/plugins/printpreview/Makefile.am |
---|
Property changes: |
Added: svn:eol-style |
## -0,0 +1 ## |
+native |
\ No newline at end of property |
Added: svn:keywords |
## -0,0 +1 ## |
+Author Date Id Revision |
\ No newline at end of property |