Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 27 → Rev 26

/trunk/Scribus/ChangeLogCVS
1,8 → 1,4
Changes since Version 0.9.10
09.06.2003 lineformats.cpp
multiline.cpp Added Support for Named Linestyles, allowing to have
Paths stroked with multiple Lines.
 
07.06.2003 pdflib.cpp
scribus.cpp Fixed grave Bug with the PDF-Exporter.
 
/trunk/Scribus/scribus/lineformats.h
File deleted
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: trunk/Scribus/scribus/multiline.cpp
===================================================================
--- trunk/Scribus/scribus/multiline.cpp (revision 27)
+++ trunk/Scribus/scribus/multiline.cpp (nonexistent)
@@ -1,532 +0,0 @@
-/****************************************************************************
-** Form implementation generated from reading ui file 'Mline.ui'
-**
-** Created: Mit Jun 4 23:28:21 2003
-** by: The User Interface Compiler ($Id$)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-
-#include "multiline.h"
-#include "multiline.moc"
-#include <qpainter.h>
-#include <qmessagebox.h>
-extern QPixmap loadIcon(QString nam);
-
-MultiLine::MultiLine( QWidget* parent, ScribusDoc* doc, multiLine ml, QString nam, bool ed, QMap<QString,multiLine> *Sty)
- : QDialog( parent, "Multiline", true, 0 )
-{
- setIcon(loadIcon("AppIcon.xpm"));
- setCaption( tr( "Edit Style" ) );
- Docu = doc;
- TempVorl = ml;
- CurLin = 0;
- TempStyles = Sty;
- GivenName = nam;
- MultiLineLayout = new QVBoxLayout( this, 5, 4, "MultiLineLayout");
- SName = new QLineEdit(this, "Name");
- SName->setReadOnly(!ed);
- SName->setText(nam);
- MultiLineLayout->addWidget(SName);
- Preview = new QLabel( this, "Preview" );
- Preview->setFrameShape( QLabel::Panel );
- Preview->setFrameShadow( QLabel::Sunken );
- Preview->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignHCenter ) );
- Preview->setScaledContents( FALSE );
- MultiLineLayout->addWidget( Preview );
-
- layout2 = new QHBoxLayout( 0, 0, 4, "layout2");
-
- AddStyle = new QPushButton( this, "AddStyle" );
- AddStyle->setPixmap(loadIcon("penciladd.png"));
- AddStyle->setText( QString::null );
- AddStyle->setAutoDefault(false);
- AddStyle->setDefault(false);
- layout2->addWidget( AddStyle );
-
- RemoveStyle = new QPushButton( this, "RemoveStyle" );
- RemoveStyle->setPixmap(loadIcon("pencilsub.png"));
- RemoveStyle->setText( QString::null );
- RemoveStyle->setAutoDefault(false);
- RemoveStyle->setDefault(false);
- layout2->addWidget( RemoveStyle );
- QSpacerItem* spacer = new QSpacerItem( 71, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- layout2->addItem( spacer );
- MultiLineLayout->addLayout( layout2 );
-
- Styles = new QListBox( this, "Styles" );
- RebuildList();
- MultiLineLayout->addWidget( Styles );
-
- Properties = new QGroupBox( this, "Properties" );
- Properties->setTitle( QString::null );
- Properties->setFrameShape( QGroupBox::NoFrame );
- Properties->setFrameShadow( QGroupBox::Plain );
- Properties->setColumnLayout(0, Qt::Vertical );
- Properties->layout()->setSpacing( 4 );
- Properties->layout()->setMargin( 0 );
- PropertiesLayout = new QVBoxLayout( Properties->layout() );
- PropertiesLayout->setAlignment( Qt::AlignTop );
-
- Dashes = new LineCombo(Properties);
- PropertiesLayout->addWidget( Dashes );
-
- LineEnds = new QComboBox( true, Properties, "LineEnds" );
- LineEnds->setEditable(false);
- LineEnds->insertItem(loadIcon("ButtCap.png"), tr( "FlatCap" ) );
- LineEnds->insertItem(loadIcon("SquareCap.png"), tr( "SquareCap" ) );
- LineEnds->insertItem(loadIcon("RoundCap.png"), tr( "RoundCap" ) );
- PropertiesLayout->addWidget( LineEnds );
-
- LineJoin = new QComboBox( true, Properties, "LineJoin" );
- LineJoin->setEditable(false);
- LineJoin->insertItem(loadIcon("MiterJoin.png"), tr( "MiterJoin" ) );
- LineJoin->insertItem(loadIcon("BevelJoin.png"), tr( "BevelJoin" ) );
- LineJoin->insertItem(loadIcon("BevelJoin.png"), tr( "RoundJoin" ) );
- PropertiesLayout->addWidget( LineJoin );
-
- layout1 = new QHBoxLayout( 0, 0, 6, "layout1");
-
- WidthText = new QLabel( Properties, "WidthText" );
- WidthText->setText( tr( "Linewidth:" ) );
- WidthText->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignLeft ) );
- layout1->addWidget( WidthText );
-
- LWidth = new MSpinBox( Properties, 1 );
- LWidth->setSuffix( tr( " pt" ) );
- LWidth->setDecimals(10);
- LWidth->setMaxValue( 300 );
- LWidth->setMinValue( 1 );
- layout1->addWidget( LWidth );
- PropertiesLayout->addLayout( layout1 );
-
- layout4 = new QHBoxLayout( 0, 0, 6, "layout4");
- Color = new QComboBox( true, Properties, "Color" );
- CListe::Iterator it;
- QPixmap pm = QPixmap(30, 15);
- for (it = doc->PageColors.begin(); it != doc->PageColors.end(); ++it)
- {
- pm.fill(doc->PageColors[it.key()].getRGBColor());
- Color->insertItem(pm, it.key());
- }
- Color->setEditable(false);
- layout4->addWidget( Color );
- Shade = new QSpinBox( Properties, "Shade" );
- Shade->setSuffix( tr( " %" ) );
- Shade->setMaxValue( 100 );
- Shade->setMinValue( 0 );
- layout4->addWidget( Shade );
- PropertiesLayout->addLayout( layout4 );
- MultiLineLayout->addWidget( Properties );
-
- layout3 = new QHBoxLayout( 0, 0, 6, "layout3");
-
- OK = new QPushButton( this, "OK" );
- OK->setText( tr( "OK" ) );
- OK->setAutoDefault(false);
- OK->setDefault(false);
- layout3->addWidget( OK );
-
- Cancel = new QPushButton( this, "Cancel" );
- Cancel->setText( tr( "Cancel" ) );
- Cancel->setAutoDefault(false);
- Cancel->setDefault(false);
- layout3->addWidget( Cancel );
- MultiLineLayout->addLayout( layout3 );
- resize( QSize(222, 349).expandedTo(minimumSizeHint()) );
- clearWState( WState_Polished );
-
- // signals and slots connections
- connect(Styles, SIGNAL(highlighted(int)), this, SLOT(slotEditStyle(int)));
- connect( Cancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( OK, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect(Dashes, SIGNAL(activated(int)), this, SLOT(NewLSty()));
- connect(LineJoin, SIGNAL(activated(int)), this, SLOT(NewLJoin()));
- connect(LineEnds, SIGNAL(activated(int)), this, SLOT(NewLEnd()));
- connect(LWidth, SIGNAL(valueChanged(int)), this, SLOT(NewLWidth()));
- connect(Color, SIGNAL(activated(int)), this, SLOT(NewLColor()));
- connect(AddStyle, SIGNAL(clicked()), this, SLOT(NewSubLine()));
- connect(RemoveStyle, SIGNAL(clicked()), this, SLOT(DelSubLine()));
- connect(Shade, SIGNAL(valueChanged(int)), this, SLOT(NewLShade()));
- if (ed)
- connect(SName, SIGNAL(lostFocus()), this, SLOT(NewName()));
- slotEditStyle(0);
- updatePreview();
-}
-
-MultiLine::~MultiLine()
-{
- // no need to delete child widgets, Qt does it all for us
-}
-
-void MultiLine::updatePreview()
-{
- QPixmap pm = QPixmap(200, 35);
- pm.fill(white);
- QPainter p;
- p.begin(&pm);
- for (int it = TempVorl.count()-1; it > -1; it--)
- {
- p.setPen(QPen(calcFarbe(TempVorl[it].Color, TempVorl[it].Shade),
- QMAX(static_cast<int>(TempVorl[it].Width), 1),
- static_cast<PenStyle>(TempVorl[it].Dash),
- static_cast<PenCapStyle>(TempVorl[it].LineEnd),
- static_cast<PenJoinStyle>(TempVorl[it].LineJoin)));
- p.drawLine(17, 17, 183, 17);
- }
- p.end();
- Preview->setPixmap(pm);
-}
-
-QColor MultiLine::calcFarbe(QString name, int shade)
-{
- QColor tmpf;
- int h, s, v, sneu;
- Docu->PageColors[name].getRGBColor().rgb(&h, &s, &v);
- if ((h == s) && (s == v))
- {
- Docu->PageColors[name].getRGBColor().hsv(&h, &s, &v);
- sneu = 255 - ((255 - v) * shade / 100);
- tmpf.setHsv(h, s, sneu);
- }
- else
- {
- Docu->PageColors[name].getRGBColor().hsv(&h, &s, &v);
- sneu = s * shade / 100;
- tmpf.setHsv(h, sneu, v);
- }
- return tmpf;
-}
-
-void MultiLine::updateSList()
-{
- QString tmp, tmp2;
- QPixmap pm = QPixmap(30, 15);
- pm.fill(calcFarbe(TempVorl[CurLin].Color, TempVorl[CurLin].Shade));
- tmp2 = " "+tmp.setNum(TempVorl[CurLin].Width)+tr(" pt ");
- switch (static_cast<PenStyle>(TempVorl[CurLin].Dash))
- {
- case SolidLine:
- tmp2 += tr("Solid Line");
- break;
- case DashLine:
- tmp2 += tr("Dashed Line");
- break;
- case DotLine:
- tmp2 += tr("Dotted Line");
- break;
- case DashDotLine:
- tmp2 += tr("Dash Dot Line");
- break;
- case DashDotDotLine:
- tmp2 += tr("Dash Dot Dot Line");
- break;
- default:
- tmp2 += tr("Solid Line");
- break;
- }
- tmp2 += " ";
- Styles->changeItem(pm, tmp2, CurLin);
- }
-
-void MultiLine::reSort()
-{
- int cc = 0;
- struct singleLine sl;
- sl.Color = TempVorl[CurLin].Color;
- sl.Shade = TempVorl[CurLin].Shade;
- sl.Dash = TempVorl[CurLin].Dash;
- sl.LineEnd = TempVorl[CurLin].LineEnd;
- sl.LineJoin = TempVorl[CurLin].LineJoin;
- sl.Width = TempVorl[CurLin].Width;
- multiLine::Iterator it3;
- for (it3 = TempVorl.begin(); it3 != TempVorl.end(); ++it3)
- {
- if (cc == CurLin)
- {
- TempVorl.erase(it3);
- break;
- }
- cc++;
- }
- cc = 0;
- multiLine::Iterator it2;
- bool fo = false;
- for (it2 = TempVorl.begin(); it2 != TempVorl.end(); ++it2)
- {
- if (sl.Width < (*it2).Width)
- {
- TempVorl.insert(it2, sl);
- fo = true;
- break;
- }
- cc++;
- }
- if (!fo)
- TempVorl.append(sl);
- CurLin = cc;
- RebuildList();
- slotEditStyle(cc);
- updatePreview();
-}
-
-void MultiLine::RebuildList()
-{
- QString tmp, tmp2;
- Styles->clear();
- multiLine::Iterator it;
- QPixmap pm2 = QPixmap(30, 15);
- for (it = TempVorl.begin(); it != TempVorl.end(); ++it)
- {
- pm2.fill(calcFarbe((*it).Color, (*it).Shade));
- tmp2 = " "+tmp.setNum((*it).Width)+tr(" pt ");
- switch (static_cast<PenStyle>((*it).Dash))
- {
- case SolidLine:
- tmp2 += tr("Solid Line");
- break;
- case DashLine:
- tmp2 += tr("Dashed Line");
- break;
- case DotLine:
- tmp2 += tr("Dotted Line");
- break;
- case DashDotLine:
- tmp2 += tr("Dash Dot Line");
- break;
- case DashDotDotLine:
- tmp2 += tr("Dash Dot Dot Line");
- break;
- default:
- tmp2 += tr("Solid Line");
- break;
- }
- tmp2 += " ";
- Styles->insertItem(pm2, tmp2);
- }
-}
-
-void MultiLine::NewName()
-{
- QString NameNew = SName->text();
- if (TempStyles->contains(NameNew))
- {
- QMessageBox::warning(this, tr("Warning"), tr("Name \"%1\" isn't unique.\nPlease choose another.").arg(NameNew), tr("OK"));
- SName->setText(GivenName);
- SName->setFocus();
- }
- else
- GivenName = NameNew;
-}
-
-void MultiLine::NewSubLine()
-{
- struct singleLine sl;
- sl.Color = TempVorl[CurLin].Color;
- sl.Shade = TempVorl[CurLin].Shade;
- sl.Dash = TempVorl[CurLin].Dash;
- sl.LineEnd = TempVorl[CurLin].LineEnd;
- sl.LineJoin = TempVorl[CurLin].LineJoin;
- sl.Width = TempVorl[CurLin].Width;
- int cc = 0;
- multiLine::Iterator it2;
- bool fo = false;
- for (it2 = TempVorl.begin(); it2 != TempVorl.end(); ++it2)
- {
- if (sl.Width < (*it2).Width)
- {
- TempVorl.insert(it2, sl);
- fo = true;
- break;
- }
- cc++;
- }
- if (!fo)
- TempVorl.append(sl);
- CurLin = cc;
- RebuildList();
- slotEditStyle(cc);
- updatePreview();
-}
-
-void MultiLine::DelSubLine()
-{
- if (TempVorl.count() == 1)
- return;
- int cc = 0;
- multiLine::Iterator it3;
- for (it3 = TempVorl.begin(); it3 != TempVorl.end(); ++it3)
- {
- if (cc == CurLin)
- {
- TempVorl.erase(it3);
- break;
- }
- cc++;
- }
- CurLin = 0;
- RebuildList();
- slotEditStyle(0);
- updatePreview();
-}
-
-void MultiLine::NewLJoin()
-{
- PenJoinStyle c = MiterJoin;
- switch (LineJoin->currentItem())
- {
- case 0:
- c = MiterJoin;
- break;
- case 1:
- c = BevelJoin;
- break;
- case 2:
- c = RoundJoin;
- break;
- }
- TempVorl[CurLin].LineJoin = static_cast<int>(c);
- updateSList();
-}
-
-void MultiLine::NewLEnd()
-{
- PenCapStyle c = FlatCap;
- switch (LineEnds->currentItem())
- {
- case 0:
- c = FlatCap;
- break;
- case 1:
- c = SquareCap;
- break;
- case 2:
- c = RoundCap;
- break;
- }
- TempVorl[CurLin].LineEnd = static_cast<int>(c);
- updateSList();
- updatePreview();
-}
-
-void MultiLine::NewLSty()
-{
- PenStyle c = SolidLine;
- switch (Dashes->currentItem())
- {
- case 0:
- c = SolidLine;
- break;
- case 1:
- c = DashLine;
- break;
- case 2:
- c = DotLine;
- break;
- case 3:
- c = DashDotLine;
- break;
- case 4:
- c = DashDotDotLine;
- break;
- }
- TempVorl[CurLin].Dash = static_cast<int>(c);
- updateSList();
- updatePreview();
-}
-
-void MultiLine::NewLColor()
-{
- TempVorl[CurLin].Color = Color->currentText();
- updateSList();
- updatePreview();
-}
-
-void MultiLine::NewLWidth()
-{
- TempVorl[CurLin].Width = static_cast<float>(LWidth->value()) / 10.0;
- reSort();
- updatePreview();
-}
-
-void MultiLine::NewLShade()
-{
- TempVorl[CurLin].Shade = Shade->value();
- updateSList();
- updatePreview();
-}
-
-void MultiLine::slotEditStyle( int i)
-{
- disconnect(Styles, SIGNAL(highlighted(int)), this, SLOT(slotEditStyle(int)));
- disconnect(Dashes, SIGNAL(activated(int)), this, SLOT(NewLSty()));
- disconnect(LineJoin, SIGNAL(activated(int)), this, SLOT(NewLJoin()));
- disconnect(LineEnds, SIGNAL(activated(int)), this, SLOT(NewLEnd()));
- disconnect(LWidth, SIGNAL(valueChanged(int)), this, SLOT(NewLWidth()));
- disconnect(Color, SIGNAL(activated(int)), this, SLOT(NewLColor()));
- disconnect(Shade, SIGNAL(valueChanged(int)), this, SLOT(NewLShade()));
- Styles->setSelected(i, true);
- CurLin = i;
- LWidth->setValue(qRound(TempVorl[i].Width*10));
- Color->setCurrentText(TempVorl[i].Color);
- Shade->setValue(TempVorl[i].Shade);
- switch (static_cast<PenStyle>(TempVorl[i].Dash))
- {
- case SolidLine:
- Dashes->setCurrentItem(0);
- break;
- case DashLine:
- Dashes->setCurrentItem(1);
- break;
- case DotLine:
- Dashes->setCurrentItem(2);
- break;
- case DashDotLine:
- Dashes->setCurrentItem(3);
- break;
- case DashDotDotLine:
- Dashes->setCurrentItem(4);
- break;
- default:
- Dashes->setCurrentItem(0);
- break;
- }
- switch (static_cast<PenCapStyle>(TempVorl[i].LineEnd))
- {
- case FlatCap:
- LineEnds->setCurrentItem(0);
- break;
- case SquareCap:
- LineEnds->setCurrentItem(1);
- break;
- case RoundCap:
- LineEnds->setCurrentItem(2);
- break;
- default:
- LineEnds->setCurrentItem(0);
- break;
- }
- switch (static_cast<PenJoinStyle>(TempVorl[i].LineJoin))
- {
- case MiterJoin:
- LineJoin->setCurrentItem(0);
- break;
- case BevelJoin:
- LineJoin->setCurrentItem(1);
- break;
- case RoundJoin:
- LineJoin->setCurrentItem(2);
- break;
- default:
- LineJoin->setCurrentItem(0);
- break;
- }
- connect(Styles, SIGNAL(highlighted(int)), this, SLOT(slotEditStyle(int)));
- connect(Dashes, SIGNAL(activated(int)), this, SLOT(NewLSty()));
- connect(LineJoin, SIGNAL(activated(int)), this, SLOT(NewLJoin()));
- connect(LineEnds, SIGNAL(activated(int)), this, SLOT(NewLEnd()));
- connect(LWidth, SIGNAL(valueChanged(int)), this, SLOT(NewLWidth()));
- connect(Color, SIGNAL(activated(int)), this, SLOT(NewLColor()));
- connect(Shade, SIGNAL(valueChanged(int)), this, SLOT(NewLShade()));
-}
-
/trunk/Scribus/scribus/multiline.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: trunk/Scribus/scribus/multiline.h
===================================================================
--- trunk/Scribus/scribus/multiline.h (revision 27)
+++ trunk/Scribus/scribus/multiline.h (nonexistent)
@@ -1,85 +0,0 @@
-/****************************************************************************
-** Form interface generated from reading ui file 'Mline.ui'
-**
-** Created: Mit Jun 4 23:28:08 2003
-** by: The User Interface Compiler ($Id$)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-
-#ifndef MULTILINE_H
-#define MULTILINE_H
-
-#include <qdialog.h>
-#include <qvariant.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qgroupbox.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qpixmap.h>
-#include <qlineedit.h>
-#include "linecombo.h"
-#include "mspinbox.h"
-#include "scribusdoc.h"
-
-class MultiLine : public QDialog
-{
- Q_OBJECT
-
-public:
- MultiLine( QWidget* parent, ScribusDoc* doc, multiLine ml, QString nam, bool ed, QMap<QString,multiLine> *Sty);
- void updatePreview();
- QColor calcFarbe(QString name, int shade);
- void updateSList();
- void reSort();
- void RebuildList();
- ~MultiLine();
-
- QLineEdit* SName;
- QLabel* Preview;
- QPushButton* AddStyle;
- QPushButton* RemoveStyle;
- QListBox* Styles;
- QGroupBox* Properties;
- LineCombo* Dashes;
- QComboBox* LineEnds;
- QComboBox* LineJoin;
- QLabel* WidthText;
- MSpinBox* LWidth;
- QComboBox* Color;
- QSpinBox* Shade;
- QPushButton* OK;
- QPushButton* Cancel;
- multiLine TempVorl;
- int CurLin;
- ScribusDoc* Docu;
- QMap<QString,multiLine> *TempStyles;
- QString GivenName;
-
-public slots:
- void NewName();
- void DelSubLine();
- void NewSubLine();
- void NewLJoin();
- void NewLEnd();
- void NewLSty();
- void NewLColor();
- void NewLWidth();
- void NewLShade();
- void slotEditStyle( int i);
-
-protected:
- QVBoxLayout* MultiLineLayout;
- QHBoxLayout* layout2;
- QVBoxLayout* PropertiesLayout;
- QHBoxLayout* layout1;
- QHBoxLayout* layout3;
- QHBoxLayout* layout4;
-};
-
-#endif // MULTILINE_H
/trunk/Scribus/scribus/multiline.h
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: trunk/Scribus/scribus/lineformats.cpp
===================================================================
--- trunk/Scribus/scribus/lineformats.cpp (revision 27)
+++ trunk/Scribus/scribus/lineformats.cpp (nonexistent)
@@ -1,157 +0,0 @@
-#include "lineformats.h"
-#include "lineformats.moc"
-#include "multiline.h"
-#include <qmessagebox.h>
-extern QPixmap loadIcon(QString nam);
-
-LineFormate::LineFormate( QWidget* parent, ScribusDoc *doc)
- : QDialog( parent, "Formate", true, 0)
-{
- resize( 327, 260 );
- setCaption( tr( "Edit Line Styles" ) );
- setIcon(loadIcon("AppIcon.xpm"));
- Docu = doc;
- TempStyles = doc->MLineStyles;
- StilFormateLayout = new QHBoxLayout( this );
- StilFormateLayout->setSpacing( 5 );
- StilFormateLayout->setMargin( 10 );
-
- ListBox1 = new QListBox( this, "ListBox1" );
- ListBox1->setMinimumSize( QSize( 200, 240 ) );
- StilFormateLayout->addWidget( ListBox1 );
-
- Layout15 = new QVBoxLayout;
- Layout15->setSpacing( 6 );
- Layout15->setMargin( 0 );
-
- NewB = new QPushButton( this, "NewB" );
- NewB->setText( tr( "New" ) );
- Layout15->addWidget( NewB );
-
- EditB = new QPushButton( this, "EditB" );
- EditB->setText( tr( "Edit" ) );
- EditB->setDefault( true );
- EditB->setEnabled(false);
- Layout15->addWidget( EditB );
-
- DublicateB = new QPushButton( this, "DublicateB" );
- DublicateB->setText( tr( "Duplicate" ) );
- DublicateB->setEnabled(false);
- Layout15->addWidget( DublicateB );
-
- DeleteB = new QPushButton( this, "DeleteB" );
- DeleteB->setText( tr( "Delete" ) );
- DeleteB->setEnabled(false);
- Layout15->addWidget( DeleteB );
-
- SaveB = new QPushButton( this, "SaveB" );
- SaveB->setText( tr( "Save" ) );
- Layout15->addWidget( SaveB );
-
- CancelB = new QPushButton( this, "CancelB" );
- CancelB->setText( tr( "Cancel" ) );
- Layout15->addWidget( CancelB );
- QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
- Layout15->addItem( spacer );
- StilFormateLayout->addLayout( Layout15 );
-
- // signals and slots connections
- connect(CancelB, SIGNAL(clicked()), this, SLOT(reject()));
- connect(SaveB, SIGNAL(clicked()), this, SLOT(accept()));
- connect(EditB, SIGNAL(clicked()), this, SLOT(editFormat()));
- connect(NewB, SIGNAL(clicked()), this, SLOT(neuesFormat()));
- connect(DublicateB, SIGNAL(clicked()), this, SLOT(dupFormat()));
- connect(DeleteB, SIGNAL(clicked()), this, SLOT(deleteFormat()));
- connect(ListBox1, SIGNAL(highlighted(QListBoxItem*)), this, SLOT(selFormat(QListBoxItem*)));
- if (ListBox1->count() > 0)
- sFnumber = TempStyles.begin().key();
- else
- sFnumber = "";
- UpdateFList();
-}
-
-void LineFormate::selFormat(QListBoxItem *c)
-{
- sFnumber = c->text();
- EditB->setEnabled(true);
- DublicateB->setEnabled(true);
- DeleteB->setEnabled(true);
-}
-
-void LineFormate::dupFormat()
-{
- multiLine ml;
- ml = TempStyles[sFnumber];
- MultiLine* dia = new MultiLine(this, Docu, ml, tr("Copy of")+" "+sFnumber, true, &TempStyles);
- if (dia->exec())
- {
- TempStyles.insert(dia->SName->text(), dia->TempVorl);
- sFnumber = dia->SName->text();
- }
- UpdateFList();
-}
-
-void LineFormate::neuesFormat()
-{
- struct singleLine sl;
- sl.Color = "Black";
- sl.Shade = 100;
- sl.Dash = SolidLine;
- sl.LineEnd = FlatCap;
- sl.LineJoin = MiterJoin;
- sl.Width = 1.0;
- multiLine ml;
- ml.append(sl);
- MultiLine* dia = new MultiLine(this, Docu, ml, tr("New Style"), true, &TempStyles);
- if (dia->exec())
- {
- TempStyles.insert(dia->SName->text(), dia->TempVorl);
- sFnumber = dia->SName->text();
- }
- UpdateFList();
-}
-
-void LineFormate::editFormat()
-{
- MultiLine* dia = new MultiLine(this, Docu, TempStyles[sFnumber], sFnumber, false, &TempStyles);
- if (dia->exec())
- TempStyles[sFnumber] = dia->TempVorl;
- delete dia;
- UpdateFList();
-}
-
-void LineFormate::deleteFormat()
-{
- int exit=QMessageBox::warning(this,
- tr("Warning"),
- tr("Do you really want do delete this Style?"),
- tr("No"),
- tr("Yes"),
- 0, 0, 1);
- if (exit == 1)
- {
- TempStyles.remove(sFnumber);
- UpdateFList();
- }
-}
-
-void LineFormate::UpdateFList()
-{
- disconnect(ListBox1, SIGNAL(highlighted(QListBoxItem*)), this, SLOT(selFormat(QListBoxItem*)));
- ListBox1->clear();
- QMap<QString,multiLine>::Iterator it;
- for (it = TempStyles.begin(); it != TempStyles.end(); ++it)
- {
- ListBox1->insertItem(it.key());
- }
- if (ListBox1->count() > 0)
- ListBox1->setSelected(ListBox1->findItem(sFnumber), true);
- if (ListBox1->count() == 0)
- {
- sFnumber = "";
- DublicateB->setEnabled(false);
- EditB->setEnabled(false);
- DeleteB->setEnabled(false);
- }
- connect(ListBox1, SIGNAL(highlighted(QListBoxItem*)), this, SLOT(selFormat(QListBoxItem*)));
-}
/trunk/Scribus/scribus/lineformats.cpp
Property changes:
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: trunk/Scribus/scribus/libabout/about.cpp
===================================================================
--- trunk/Scribus/scribus/libabout/about.cpp (revision 27)
+++ trunk/Scribus/scribus/libabout/about.cpp (revision 26)
@@ -32,7 +32,7 @@
tabLayout1->addWidget( PixmapLabel1 );
BuildID = new QLabel( tab, "BB" );
BuildID->setAlignment(Qt::AlignCenter);
- QString bu = "09. June 2003 ";
+ QString bu = "07. June 2003 ";
#ifdef HAVE_FREETYPE
bu += "F";
#else
Index: trunk/Scribus/scribus/Makefile.am
===================================================================
--- trunk/Scribus/scribus/Makefile.am (revision 27)
+++ trunk/Scribus/scribus/Makefile.am (revision 26)
@@ -1,7 +1,7 @@
bin_PROGRAMS = scribus
-scribus_SOURCES = lineformats.cpp multiline.cpp splash.cpp mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp kimageeffect.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scfonts_encoding.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp modify.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageback.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
-SOURCES = libpdf/pdflib.cpp libpostscript/pslib.cpp plugins/libchar/charselect.cpp libprefs/prefs.cpp libabout/about.cpp lineformats.cpp multiline.cpp splash.cpp mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp kimageeffect.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scfonts_encoding.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp modify.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageback.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
+scribus_SOURCES = splash.cpp mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp kimageeffect.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scfonts_encoding.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp modify.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageback.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
+SOURCES = libpdf/pdflib.cpp libpostscript/pslib.cpp plugins/libchar/charselect.cpp libprefs/prefs.cpp libabout/about.cpp splash.cpp mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp kimageeffect.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scfonts_encoding.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp modify.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageback.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
INTERFACES =
TRANSLATIONS =
/trunk/Scribus/scribus/scribus.cpp
66,7 → 66,6
#include "hysettings.h"
#include "guidemanager.h"
#include "mergedoc.h"
#include "lineformats.h"
extern QPixmap loadIcon(QString nam);
 
using namespace std;
389,7 → 388,6
connect(Tpal, SIGNAL(SelectSeite(int)), this, SLOT(SelectFromOutlS(int)));
connect(Mpal->Spal, SIGNAL(NewStyle(int)), this, SLOT(setNewAbStyle(int)));
connect(Mpal->Spal, SIGNAL(EditSt()), this, SLOT(slotEditStyles()));
connect(Mpal, SIGNAL(EditLSt()), this, SLOT(slotEditLineStyles()));
connect(Npal, SIGNAL(Schliessen()), this, SLOT(NoFrameEdit()));
connect(Lpal, SIGNAL(LayerActivated(int)), this, SLOT(changeLayer(int)));
connect(Lpal, SIGNAL(LayerRemoved(int)), this, SLOT(LayerRemove(int)));
493,7 → 491,6
MenID = editMenu->insertItem(tr("Colors..."), this , SLOT(slotEditColors()));
SetKeyEntry(14, tr("Colors..."), MenID, 0);
edid6 = editMenu->insertItem(tr("Styles..."), this , SLOT(slotEditStyles()));
edid6a = editMenu->insertItem(tr("Line Styles..."), this , SLOT(slotEditLineStyles()));
SetKeyEntry(15, tr("Styles..."), edid6, 0);
tman = editMenu->insertItem(tr("Templates..."), this, SLOT(ManageTemp()));
SetKeyEntry(16, tr("Templates..."), tman, 0);
512,7 → 509,6
editMenu->setItemEnabled(edid4, 0);
editMenu->setItemEnabled(edid5, 0);
editMenu->setItemEnabled(edid6, 0);
editMenu->setItemEnabled(edid6a, 0);
editMenu->setItemEnabled(tman, 0);
editMenu->setItemEnabled(jman, 0);
StilMenu = new QPopupMenu();
1687,7 → 1683,6
Mpal->SetDoc(doc);
Sepal->SetView(view);
Mpal->Spal->SetFormats(doc);
Mpal->SetLineFormats(doc);
Lpal->setLayers(&doc->Layers, &doc->ActiveLayer);
view->LaMenu();
view->setLayMenTxt(doc->ActiveLayer);
1778,7 → 1773,6
editMenu->setItemEnabled(edid2, 0);
editMenu->setItemEnabled(edid3, 0);
editMenu->setItemEnabled(edid6, 1);
editMenu->setItemEnabled(edid6a, 1);
for (a=0; a<6; ++a)
{
viewMenu->setItemEnabled(viewMenu->idAt(a), 1);
1830,7 → 1824,6
Mpal->SetDoc(doc);
Sepal->SetView(view);
Mpal->Spal->SetFormats(doc);
Mpal->SetLineFormats(doc);
Lpal->setLayers(&doc->Layers, &doc->ActiveLayer);
view->LaMenu();
view->setLayMenTxt(doc->ActiveLayer);
2600,7 → 2593,6
Sepal->Vie = 0;
Sepal->Rebuild();
Mpal->Spal->SetFormats(0);
Mpal->SetLineFormats(0);
if (doc->EditClip)
Npal->doc = 0;
BookPal->BView->clear();
2629,7 → 2621,6
editMenu->setItemEnabled(edid4, 0);
editMenu->setItemEnabled(edid5, 0);
editMenu->setItemEnabled(edid6, 0);
editMenu->setItemEnabled(edid6a, 0);
extraMenu->setItemEnabled(hyph, 0);
for (int a=0; a<6; ++a)
{
3253,7 → 3244,6
connect(doc->ActPage, SIGNAL(DelBM(PageItem *)), this, SLOT(DelBookMark(PageItem *)));
connect(doc->ActPage, SIGNAL(ChBMText(PageItem *)), this, SLOT(BookMarkTxT(PageItem *)));
connect(doc->ActPage, SIGNAL(NewBMNr(int, int)), BookPal->BView, SLOT(ChangeItem(int, int)));
connect(doc->ActPage, SIGNAL(RasterPic(bool)), this, SLOT(HaveRaster(bool)));
slotDocCh(!doc->loading);
}
 
4107,37 → 4097,6
ShadeMenu->setItemChecked(ShadeMenu->idAt(lb/10+1), true);
}
 
void ScribusApp::slotEditLineStyles()
{
if (HaveDoc)
{
LineFormate *dia = new LineFormate(this, doc);
if (dia->exec())
{
doc->MLineStyles = dia->TempStyles;
for (uint c = 0; c < view->DocPages.count(); ++c)
{
for (uint d = 0; d < view->DocPages.at(c)->Items.count(); ++d)
{
if (!doc->MLineStyles.contains(view->DocPages.at(c)->Items.at(d)->NamedLStyle))
view->DocPages.at(c)->Items.at(d)->NamedLStyle = "";
}
}
for (uint c1 = 0; c1 < view->MasterPages.count(); ++c1)
{
for (uint d1 = 0; d1 < view->MasterPages.at(c1)->Items.count(); ++d1)
{
if (!doc->MLineStyles.contains(view->MasterPages.at(c1)->Items.at(d1)->NamedLStyle))
view->MasterPages.at(c1)->Items.at(d1)->NamedLStyle = "";
}
}
Mpal->SetLineFormats(doc);
view->DrawNew();
}
delete dia;
}
}
 
void ScribusApp::slotEditStyles()
{
QValueList<uint> ers;
4169,44 → 4128,25
ers.append(0);
}
doc->Vorlagen = dia->TempVorl;
for (uint c=0; c<view->DocPages.count(); ++c)
for (uint c=0; c<view->Pages.count(); ++c)
{
for (uint d=0; d<view->DocPages.at(c)->Items.count(); ++d)
for (uint d=0; d<view->Pages.at(c)->Items.count(); ++d)
{
if (view->DocPages.at(c)->Items.at(d)->PType == 4)
if (view->Pages.at(c)->Items.at(d)->PType == 4)
{
for (uint e=0; e<view->DocPages.at(c)->Items.at(d)->Ptext.count(); ++e)
for (uint e=0; e<view->Pages.at(c)->Items.at(d)->Ptext.count(); ++e)
{
if (view->DocPages.at(c)->Items.at(d)->Ptext.at(e)->cab > 4)
view->DocPages.at(c)->Items.at(d)->Ptext.at(e)->cab = ers[view->DocPages.at(c)->Items.at(d)->Ptext.at(e)->cab];
if (view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cab > 4)
view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cab = ers[view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cab];
if (doc->Vorlagen[view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cab].Font != "")
{
view->DocPages.at(c)->Items.at(d)->Ptext.at(e)->cfont = doc->Vorlagen[view->DocPages.at(c)->Items.at(d)->Ptext.at(e)->cab].Font;
view->DocPages.at(c)->Items.at(d)->Ptext.at(e)->csize = doc->Vorlagen[view->DocPages.at(c)->Items.at(d)->Ptext.at(e)->cab].FontSize;
view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cfont = doc->Vorlagen[view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cab].Font;
view->Pages.at(c)->Items.at(d)->Ptext.at(e)->csize = doc->Vorlagen[view->Pages.at(c)->Items.at(d)->Ptext.at(e)->cab].FontSize;
}
}
}
}
}
for (uint c=0; c<view->MasterPages.count(); ++c)
{
for (uint d=0; d<view->MasterPages.at(c)->Items.count(); ++d)
{
if (view->MasterPages.at(c)->Items.at(d)->PType == 4)
{
for (uint e=0; e<view->MasterPages.at(c)->Items.at(d)->Ptext.count(); ++e)
{
if (view->MasterPages.at(c)->Items.at(d)->Ptext.at(e)->cab > 4)
view->MasterPages.at(c)->Items.at(d)->Ptext.at(e)->cab = ers[view->MasterPages.at(c)->Items.at(d)->Ptext.at(e)->cab];
if (doc->Vorlagen[view->MasterPages.at(c)->Items.at(d)->Ptext.at(e)->cab].Font != "")
{
view->MasterPages.at(c)->Items.at(d)->Ptext.at(e)->cfont = doc->Vorlagen[view->MasterPages.at(c)->Items.at(d)->Ptext.at(e)->cab].Font;
view->MasterPages.at(c)->Items.at(d)->Ptext.at(e)->csize = doc->Vorlagen[view->MasterPages.at(c)->Items.at(d)->Ptext.at(e)->cab].FontSize;
}
}
}
}
}
for (uint a=0; a<doc->Vorlagen.count(); ++a)
{
if (doc->Vorlagen[a].Font != "")
4304,43 → 4244,28
QMap<QString,QString>::Iterator it;
for (it = ers.begin(); it != ers.end(); ++it)
{
for (b=0; b<view->DocPages.count(); ++b)
for (b=0; b<view->Pages.count(); ++b)
{
for (c=0; c<view->DocPages.at(b)->Items.count(); ++c)
for (c=0; c<view->Pages.at(b)->Items.count(); ++c)
{
if (view->DocPages.at(b)->Items.at(c)->PType == 4)
if (view->Pages.at(b)->Items.at(c)->PType == 4)
{
for (d=0; d<view->DocPages.at(b)->Items.at(c)->Ptext.count(); ++d)
for (d=0; d<view->Pages.at(b)->Items.at(c)->Ptext.count(); ++d)
{
if (it.key() == view->DocPages.at(b)->Items.at(c)->Ptext.at(d)->ccolor)
view->DocPages.at(b)->Items.at(c)->Ptext.at(d)->ccolor = it.data();
if (it.key() == view->Pages.at(b)->Items.at(c)->Ptext.at(d)->ccolor)
{
view->Pages.at(b)->Items.at(c)->Ptext.at(d)->ccolor = it.data();
}
}
}
if (it.key() == view->DocPages.at(b)->Items.at(c)->Pcolor)
view->DocPages.at(b)->Items.at(c)->Pcolor = it.data();
if (it.key() == view->DocPages.at(b)->Items.at(c)->Pcolor2)
view->DocPages.at(b)->Items.at(c)->Pcolor2 = it.data();
}
}
}
for (it = ers.begin(); it != ers.end(); ++it)
{
for (b=0; b<view->MasterPages.count(); ++b)
{
for (c=0; c<view->MasterPages.at(b)->Items.count(); ++c)
{
if (view->MasterPages.at(b)->Items.at(c)->PType == 4)
if (it.key() == view->Pages.at(b)->Items.at(c)->Pcolor)
{
for (d=0; d<view->MasterPages.at(b)->Items.at(c)->Ptext.count(); ++d)
{
if (it.key() == view->MasterPages.at(b)->Items.at(c)->Ptext.at(d)->ccolor)
view->MasterPages.at(b)->Items.at(c)->Ptext.at(d)->ccolor = it.data();
}
view->Pages.at(b)->Items.at(c)->Pcolor = it.data();
}
if (it.key() == view->MasterPages.at(b)->Items.at(c)->Pcolor)
view->MasterPages.at(b)->Items.at(c)->Pcolor = it.data();
if (it.key() == view->MasterPages.at(b)->Items.at(c)->Pcolor2)
view->MasterPages.at(b)->Items.at(c)->Pcolor2 = it.data();
if (it.key() == view->Pages.at(b)->Items.at(c)->Pcolor2)
{
view->Pages.at(b)->Items.at(c)->Pcolor2 = it.data();
}
}
}
}
6567,20 → 6492,6
}
}
 
void ScribusApp::HaveRaster(bool art)
{
if (doc->ActPage->SelItem.count() != 0)
{
PageItem *b = doc->ActPage->SelItem.at(0);
if ((b->PType == 2) && (art))
{
StilMenu->clear();
StilMenu->insertItem(tr("Color"), ColorMenu);
StilMenu->insertItem(tr("Invert"), this, SLOT(InvertPict()));
}
}
}
 
void ScribusApp::slotTest()
{
}
/trunk/Scribus/scribus/libpdf/pdflib.cpp
1350,12 → 1350,12
else
PutPage("h\nf\n");
}
PutPage("q\n");
PutPage(SetClipPath(ite));
if (ite->Segments.count() != 0)
PutPage("h\nW*\nn\n");
else
PutPage("h\nW\nn\n");
PutPage("q\n");
if ((ite->flippedH % 2) != 0)
PutPage("-1 0 0 1 "+FToStr(ite->Width)+" 0 cm\n");
if ((ite->flippedV % 2) != 0)
1365,23 → 1365,10
PDF_Image(ite->InvPict, ite->Pfile, ite->LocalScX, ite->LocalScY, ite->LocalX, -ite->LocalY, false, ite->IProfile, ite->UseEmbedded, ite->IRender);
}
PutPage("Q\n");
if ((ite->Pcolor2 != "None") || (ite->NamedLStyle != ""))
if (ite->Pcolor2 != "None")
{
if (ite->NamedLStyle == "")
{
PutPage(SetClipPath(ite));
PutPage("h\nS\n");
}
else
{
multiLine ml = doc->MLineStyles[ite->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
PutPage(setStrokeMulti(&ml[it]));
PutPage(SetClipPath(ite));
PutPage("h\nS\n");
}
}
PutPage(SetClipPath(ite));
PutPage("h\nS\n");
}
break;
case 4:
1410,23 → 1397,9
PutPage(setTextSt(ite, PNr));
break;
case 5:
if (ite->NamedLStyle == "")
{
PutPage("0 0 m\n");
PutPage(FToStr(ite->Width)+" "+FToStr(-ite->Height)+" l\n");
PutPage("S\n");
}
else
{
multiLine ml = doc->MLineStyles[ite->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
PutPage(setStrokeMulti(&ml[it]));
PutPage("0 0 m\n");
PutPage(FToStr(ite->Width)+" "+FToStr(-ite->Height)+" l\n");
PutPage("S\n");
}
}
PutPage("0 0 m\n");
PutPage(FToStr(ite->Width)+" "+FToStr(-ite->Height)+" l\n");
PutPage("S\n");
break;
case 1:
case 3:
1444,44 → 1417,15
PutPage("h\nf\n");
}
}
if ((ite->Pcolor2 != "None") || (ite->NamedLStyle != ""))
if (ite->Pcolor2 != "None")
{
if (ite->NamedLStyle == "")
{
PutPage(SetClipPath(ite));
PutPage("h\nS\n");
}
else
{
multiLine ml = doc->MLineStyles[ite->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
PutPage(setStrokeMulti(&ml[it]));
PutPage(SetClipPath(ite));
PutPage("h\nS\n");
}
}
PutPage(SetClipPath(ite));
PutPage("h\nS\n");
}
break;
case 7:
if ((ite->Pcolor2 != "None") || (ite->NamedLStyle != ""))
{
if (ite->NamedLStyle == "")
{
PutPage(SetClipPath(ite));
PutPage("S\n");
}
else
{
multiLine ml = doc->MLineStyles[ite->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
PutPage(setStrokeMulti(&ml[it]));
PutPage(SetClipPath(ite));
PutPage("S\n");
}
}
}
PutPage(SetClipPath(ite));
PutPage("S\n");
break;
case 8:
if (ite->PoShow)
1489,25 → 1433,8
if (ite->PoLine.size() > 3)
{
PutPage("q\n");
if ((ite->Pcolor2 != "None") || (ite->NamedLStyle != ""))
{
if (ite->NamedLStyle == "")
{
PutPage(SetClipPath(ite));
PutPage("S\n");
}
else
{
multiLine ml = doc->MLineStyles[ite->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
PutPage(setStrokeMulti(&ml[it]));
PutPage(SetClipPath(ite));
PutPage("S\n");
}
}
}
PutPage("Q\n");
PutPage(SetClipPath(ite));
PutPage("S\nQ\n");
}
}
PutPage(setTextSt(ite, PNr));
1520,100 → 1447,6
}
}
 
QString PDFlib::setStrokeMulti(struct singleLine *sl)
{
QString tmp = "";
if (Options->UseRGB)
tmp += SetFarbe(sl->Color, sl->Shade)+" RG\n";
else
{
#ifdef HAVE_CMS
if ((CMSuse) && (Options->UseProfiles))
{
switch (Options->Intent)
{
case 0:
tmp += "/Perceptual";
break;
case 1:
tmp += "/RelativeColorimetric";
break;
case 2:
tmp += "/Saturation";
break;
case 3:
tmp += "/AbsoluteColorimetric";
break;
}
tmp += " ri\n";
tmp += "/"+ICCProfiles[Options->SolidProf].ResName+" CS\n";
tmp += SetFarbe(sl->Color, sl->Shade)+" SCN\n";
}
else
{
#endif
tmp += SetFarbe(sl->Color, sl->Shade)+" K\n";
}
#ifdef HAVE_CMS
}
#endif
tmp += FToStr(sl->Width)+" w\n";
QString Dt = FToStr(QMAX(sl->Width, 1));
QString Da = FToStr(QMAX(3*sl->Width, 1));
switch (static_cast<PenStyle>(sl->Dash))
{
case Qt::SolidLine:
tmp += "[] 0 d\n";
break;
case Qt::DashLine:
tmp += "["+Da+" "+Dt+"] 0 d\n";
break;
case Qt::DotLine:
tmp += "["+Dt+"] 0 d\n";
break;
case Qt::DashDotLine:
tmp += "["+Da+" "+Dt+" "+Dt+" "+Dt+"] 0 d\n";
break;
case Qt::DashDotDotLine:
tmp += "["+Da+" "+Dt+" "+Dt+" "+Dt+" "+Dt+" "+Dt+"] 0 d\n";
break;
default:
tmp += "[] 0 d\n";
break;
}
switch (static_cast<PenCapStyle>(sl->LineEnd))
{
case Qt::FlatCap:
tmp += "0 J\n";
break;
case Qt::SquareCap:
tmp += "2 J\n";
break;
case Qt::RoundCap:
tmp += "1 J\n";
break;
default:
tmp += "0 J\n";
break;
}
switch (static_cast<PenJoinStyle>(sl->LineJoin))
{
case Qt::MiterJoin:
tmp += "0 j\n";
break;
case Qt::BevelJoin:
tmp += "2 j\n";
break;
case Qt::RoundJoin:
tmp += "1 j\n";
break;
default:
tmp += "0 j\n";
break;
}
return tmp;
}
 
QString PDFlib::setTextSt(PageItem *ite, uint PNr)
{
struct Pti *hl;
/trunk/Scribus/scribus/libpdf/pdflib.h
58,7 → 58,6
QString FitKey(QString pass);
QString FToStr(float c);
QString IToStr(int c);
QString setStrokeMulti(struct singleLine *sl);
QString SetClipPath(PageItem *ite);
QString SetFarbe(QString farbe, int Shade);
QString setTextSt(PageItem *ite, uint PNr);
/trunk/Scribus/scribus/scribus.h
345,7 → 345,6
void slotFontOrg();
void slotPrefsOrg();
void slotEditStyles();
void slotEditLineStyles();
void setNewAbStyle(int a);
void setAbsValue(int a);
void SelectFromOutl(int Page, int Item);
373,7 → 372,6
void ModifyAnnot();
void ToggleGuides();
void ToggleUGuides();
void HaveRaster(bool art);
 
signals:
void TextISize(int);
472,7 → 470,6
int edid4;
int edid5;
int edid6;
int edid6a;
int Loesch;
int tman;
int jman;
/trunk/Scribus/scribus/page.cpp
6086,7 → 6086,6
b->Transparency = Buffer->Transparency;
b->Reverse = Buffer->Reverse;
b->InvPict = Buffer->InvPict;
b->NamedLStyle = Buffer->NamedLStyle;
if (Buffer->LayerNr != -1)
b->LayerNr = Buffer->LayerNr;
if (b->PType != 5)
6570,7 → 6569,7
Items.at(ItNr)->PicArt = false;
}
if (!doku->loading)
emit RasterPic(Items.at(ItNr)->isRaster);
emit HaveSel(2);
return;
}
if ((ext == "eps") || (ext == "ps"))
6709,7 → 6708,7
Items.at(ItNr)->PicArt = false;
}
if (!doku->loading)
emit RasterPic(Items.at(ItNr)->isRaster);
emit HaveSel(2);
return;
}
#ifdef HAVE_TIFF
6853,7 → 6852,7
Items.at(ItNr)->flippedH = 0;
Items.at(ItNr)->flippedV = 0;
if (!doku->loading)
emit RasterPic(Items.at(ItNr)->isRaster);
emit HaveSel(2);
emit DocChanged();
}
 
/trunk/Scribus/scribus/pageitem.cpp
192,7 → 192,6
Transparency = 0.0;
Reverse = false;
InvPict = false;
NamedLStyle = "";
}
 
/** Zeichnet das Item */
1120,24 → 1119,7
break;
case 5:
if (!Doc->RePos)
{
if (NamedLStyle == "")
p.drawLine(0, 0, qRound(Width), 0);
else
{
multiLine ml = Doc->MLineStyles[NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
p.setPen(QPen(tmp,
QMAX(static_cast<int>(ml[it].Width*Doc->Scale), 1),
static_cast<PenStyle>(ml[it].Dash),
static_cast<PenCapStyle>(ml[it].LineEnd),
static_cast<PenJoinStyle>(ml[it].LineJoin)));
p.drawLine(0, 0, qRound(Width), 0);
}
}
}
p.drawLine(0, 0, qRound(Width), 0);
break;
case 1:
case 3:
1145,11 → 1127,7
if (GrType == 0)
{
if (!Doc->RePos)
{
DrawPoly(&p, Clip, p.brush().color());
p.setBrush(NoBrush);
DrawPolyL(&p, Clip);
}
}
else
{
1197,24 → 1175,7
continue;
BezierPoints(&Bez, PoLine.pointQ(poi), PoLine.pointQ(poi+1), PoLine.pointQ(poi+3), PoLine.pointQ(poi+2));
if (!Doc->RePos)
{
if (NamedLStyle == "")
p.drawCubicBezier(Bez);
else
{
multiLine ml = Doc->MLineStyles[NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
p.setPen(QPen(tmp,
QMAX(static_cast<int>(ml[it].Width*Doc->Scale), 1),
static_cast<PenStyle>(ml[it].Dash),
static_cast<PenCapStyle>(ml[it].LineEnd),
static_cast<PenJoinStyle>(ml[it].LineJoin)));
p.drawCubicBezier(Bez);
}
}
}
p.drawCubicBezier(Bez);
}
}
break;
1229,24 → 1190,7
continue;
BezierPoints(&Bez, PoLine.pointQ(poi), PoLine.pointQ(poi+1), PoLine.pointQ(poi+3), PoLine.pointQ(poi+2));
if (!Doc->RePos)
{
if (NamedLStyle == "")
p.drawCubicBezier(Bez);
else
{
multiLine ml = Doc->MLineStyles[NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
p.setPen(QPen(tmp,
QMAX(static_cast<int>(ml[it].Width*Doc->Scale), 1),
static_cast<PenStyle>(ml[it].Dash),
static_cast<PenCapStyle>(ml[it].LineEnd),
static_cast<PenJoinStyle>(ml[it].LineJoin)));
p.drawCubicBezier(Bez);
}
}
}
p.drawCubicBezier(Bez);
}
}
}
1649,11 → 1593,24
p->drawPixmap(0, 0, ppm);
}
}
p->setBrush(Qt::NoBrush);
if (Segments.count() != 0)
{
QValueList<uint>::Iterator it2;
uint FirstVal = 0;
for (it2 = Segments.begin(); it2 != Segments.end(); ++it2)
{
p->drawPolyline(pts, FirstVal, (*it2)-FirstVal);
FirstVal = (*it2);
}
p->drawPolyline(pts, FirstVal);
}
else
p->drawPolyline(pts);
}
 
void PageItem::DrawPolyL(QPainter *p, QPointArray pts)
{
QColor tmp;
if (Segments.count() != 0)
{
QValueList<uint>::Iterator it2;
1660,63 → 1617,15
uint FirstVal = 0;
for (it2 = Segments.begin(); it2 != Segments.end(); ++it2)
{
if (NamedLStyle == "")
p->drawPolyline(pts, FirstVal, (*it2)-FirstVal);
else
{
multiLine ml = Doc->MLineStyles[NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
p->setPen(QPen(tmp,
QMAX(static_cast<int>(ml[it].Width*Doc->Scale), 1),
static_cast<PenStyle>(ml[it].Dash),
static_cast<PenCapStyle>(ml[it].LineEnd),
static_cast<PenJoinStyle>(ml[it].LineJoin)));
p->drawPolyline(pts, FirstVal, (*it2)-FirstVal);
}
}
p->drawPolyline(pts, FirstVal, (*it2)-FirstVal);
FirstVal = (*it2);
}
if (NamedLStyle == "")
p->drawPolyline(pts, FirstVal);
else
{
multiLine ml = Doc->MLineStyles[NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
p->setPen(QPen(tmp,
QMAX(static_cast<int>(ml[it].Width*Doc->Scale), 1),
static_cast<PenStyle>(ml[it].Dash),
static_cast<PenCapStyle>(ml[it].LineEnd),
static_cast<PenJoinStyle>(ml[it].LineJoin)));
p->drawPolyline(pts, FirstVal);
}
}
p->drawPolyline(pts, FirstVal);
}
else
{
if (NamedLStyle == "")
p->drawPolyline(pts);
else
{
multiLine ml = Doc->MLineStyles[NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
p->setPen(QPen(tmp,
QMAX(static_cast<int>(ml[it].Width*Doc->Scale), 1),
static_cast<PenStyle>(ml[it].Dash),
static_cast<PenCapStyle>(ml[it].LineEnd),
static_cast<PenJoinStyle>(ml[it].LineJoin)));
p->drawPolyline(pts);
}
}
}
p->drawPolyline(pts);
}
 
 
void PageItem::CopyIt(struct CLBuf *Buffer)
{
uint a;
1838,5 → 1747,4
Buffer->Transparency = Transparency;
Buffer->Reverse = Reverse;
Buffer->InvPict = InvPict;
Buffer->NamedLStyle = NamedLStyle;
}
/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
245,13 → 245,10
gr.setAttribute("transform", trans);
if (Item->PType != 4)
{
if (Item->NamedLStyle == "")
{
if ((Item->PType == 5) || (Item->PType == 7) || (Item->PType == 8))
gr.setAttribute("style", "fill:none; "+stroke+" "+strokeW+" "+strokeLC+" "+strokeLJ+" "+strokeDA);
else
gr.setAttribute("style", fill+" "+stroke+" "+strokeW+" "+strokeLC+" "+strokeLJ+" "+strokeDA);
}
if ((Item->PType == 5) || (Item->PType == 7) || (Item->PType == 8))
gr.setAttribute("style", "fill:none; "+stroke+" "+strokeW+" "+strokeLC+" "+strokeLJ+" "+strokeDA);
else
gr.setAttribute("style", fill+" "+stroke+" "+strokeW+" "+strokeLC+" "+strokeLJ+" "+strokeDA);
}
switch (Item->PType)
{
258,26 → 255,8
case 1:
case 3:
case 6:
if (Item->NamedLStyle == "")
{
ob = docu->createElement("path");
ob.setAttribute("d", SetClipPath(Item)+"Z");
}
else
{
ob = docu->createElement("path");
ob.setAttribute("d", SetClipPath(Item)+"Z");
ob.setAttribute("style", fill);
gr.appendChild(ob);
multiLine ml = plug->doc->MLineStyles[Item->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
ob = docu->createElement("path");
ob.setAttribute("d", SetClipPath(Item)+"Z");
ob.setAttribute("style", GetMultiStroke(plug, &ml[it], Item));
gr.appendChild(ob);
}
}
ob = docu->createElement("path");
ob.setAttribute("d", SetClipPath(Item)+"Z");
break;
case 2:
if (Item->Pcolor != "None")
305,42 → 284,11
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++;
gr.appendChild(ob);
}
if (Item->NamedLStyle == "")
{
ob = docu->createElement("path");
ob.setAttribute("d", SetClipPath(Item));
}
else
{
multiLine ml = plug->doc->MLineStyles[Item->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
ob = docu->createElement("path");
ob.setAttribute("d", SetClipPath(Item));
ob.setAttribute("style", GetMultiStroke(plug, &ml[it], Item));
gr.appendChild(ob);
}
}
break;
case 7:
if (Item->NamedLStyle == "")
{
ob = docu->createElement("path");
ob.setAttribute("d", SetClipPath(Item));
}
else
{
multiLine ml = plug->doc->MLineStyles[Item->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
ob = docu->createElement("path");
ob.setAttribute("d", SetClipPath(Item));
ob.setAttribute("style", GetMultiStroke(plug, &ml[it], Item));
gr.appendChild(ob);
}
}
ob = docu->createElement("path");
ob.setAttribute("d", SetClipPath(Item));
break;
case 4:
if (Item->Pcolor != "None")
368,43 → 316,15
}
break;
case 5:
if (Item->NamedLStyle == "")
{
ob = docu->createElement("path");
ob.setAttribute("d", "M 0 0 L "+FToStr(Item->Width)+" 0");
}
else
{
multiLine ml = plug->doc->MLineStyles[Item->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
ob = docu->createElement("path");
ob.setAttribute("d", "M 0 0 L "+FToStr(Item->Width)+" 0");
ob.setAttribute("style", GetMultiStroke(plug, &ml[it], Item));
gr.appendChild(ob);
}
}
ob = docu->createElement("path");
ob.setAttribute("d", "M 0 0 L "+FToStr(Item->Width)+" 0");
break;
case 8:
if (Item->PoShow)
{
if (Item->NamedLStyle == "")
{
ob = docu->createElement("path");
ob.setAttribute("d", SetClipPath(Item));
gr.appendChild(ob);
}
else
{
multiLine ml = plug->doc->MLineStyles[Item->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
ob = docu->createElement("path");
ob.setAttribute("d", SetClipPath(Item));
ob.setAttribute("style", GetMultiStroke(plug, &ml[it], Item));
gr.appendChild(ob);
}
}
ob = docu->createElement("path");
ob.setAttribute("d", SetClipPath(Item));
gr.appendChild(ob);
}
ob = docu->createElement("text");
for (d = 0; d < Item->MaxChars; d++)
526,72 → 446,6
return tmp.name();
}
 
QString SVGExPlug::GetMultiStroke(ScribusApp *plug, struct singleLine *sl, PageItem *Item)
{
QString tmp = "fill:none; ";
tmp += "stroke:"+SetFarbe(sl->Color, sl->Shade, plug)+"; ";
if (Item->Transparency != 0)
tmp += " stroke-opacity:"+FToStr(1.0 - Item->Transparency)+"; ";
tmp += "stroke-width:"+FToStr(sl->Width)+"; ";
tmp += "stroke-linecap:";
switch (static_cast<PenCapStyle>(sl->LineEnd))
{
case Qt::FlatCap:
tmp += "butt;";
break;
case Qt::SquareCap:
tmp += "square;";
break;
case Qt::RoundCap:
tmp += "round;";
break;
default:
tmp += "butt;";
break;
}
tmp += " stroke-linejoin:";
switch (static_cast<PenJoinStyle>(sl->LineJoin))
{
case Qt::MiterJoin:
tmp += "miter;";
break;
case Qt::BevelJoin:
tmp += "bevel;";
break;
case Qt::RoundJoin:
tmp += "round;";
break;
default:
tmp += "miter;";
break;
}
tmp += " stroke-dasharray:";
QString Dt = FToStr(QMAX(sl->Width, 1));
QString Da = FToStr(QMAX(3*sl->Width, 1));
switch (static_cast<PenStyle>(sl->Dash))
{
case Qt::SolidLine:
tmp += "none;";
break;
case Qt::DashLine:
tmp += Da+","+Dt+";";
break;
case Qt::DotLine:
tmp += Dt+";";
break;
case Qt::DashDotLine:
tmp += Da+","+Dt+","+Dt+","+Dt+";";
break;
case Qt::DashDotDotLine:
tmp += Da+","+Dt+","+Dt+","+Dt+","+Dt+","+Dt+";";
break;
default:
tmp += "none;";
break;
}
return tmp;
}
 
SVGExPlug::~SVGExPlug()
{
}
/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.h
31,7 → 31,6
QString IToStr(int c);
void SetTextProps(QDomElement *tp, struct Pti *hl, ScribusApp *plug);
QString SetFarbe(QString farbe, int shad, ScribusApp *plug);
QString GetMultiStroke(ScribusApp *plug, struct singleLine *sl, PageItem *Item);
int GradCount;
int ClipCount;
};
/trunk/Scribus/scribus/icons/pencilsub.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: trunk/Scribus/scribus/icons/penciladd.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/Scribus/scribus/icons/penciladd.png
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: trunk/Scribus/scribus/icons/Makefile.am
===================================================================
--- trunk/Scribus/scribus/icons/Makefile.am (revision 27)
+++ trunk/Scribus/scribus/icons/Makefile.am (revision 26)
@@ -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 back.png start.png forward.png finish.png penciladd.png pencilsub.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/
@@ -240,10 +240,6 @@
$(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
- $(mkinstalldirs) $(prefix)/lib/scribus/icons/
- $(INSTALL_DATA) $(srcdir)/penciladd.png $(prefix)/lib/scribus/icons/penciladd.png
- $(mkinstalldirs) $(prefix)/lib/scribus/icons/
- $(INSTALL_DATA) $(srcdir)/pencilsub.png $(prefix)/lib/scribus/icons/pencilsub.png
uninstall-local:
@@ -365,8 +361,6 @@
-rm -f $(prefix)/lib/scribus/icons/finish.png
-rm -f $(prefix)/lib/scribus/icons/forward.png
-rm -f $(prefix)/lib/scribus/icons/start.png
- -rm -f $(prefix)/lib/scribus/icons/penciladd.png
- -rm -f $(prefix)/lib/scribus/icons/pencilsub.png
####### kdevelop will overwrite this part!!! (end)############
/trunk/Scribus/scribus/pageitem.h
96,7 → 96,6
PenStyle PLineArt;
PenCapStyle PLineEnd;
PenJoinStyle PLineJoin;
QString NamedLStyle;
/** Element selektiert Ja/Nein */
bool Select;
/** Definiert die Clipping-Region des Elements; */
/trunk/Scribus/scribus/scribusdoc.h
25,7 → 25,6
#include <qcolor.h>
#include <qvaluelist.h>
#include <qvaluestack.h>
#include <qvaluevector.h>
#include <qptrlist.h>
#include <qfont.h>
#include <qmap.h>
165,7 → 164,6
float Transparency;
bool Reverse;
bool InvPict;
QString NamedLStyle;
};
 
/** Seitenraender */
221,15 → 219,6
typedef QMap<QString,CMYKColor> CListe;
typedef QMap<QString,QString> ProfilesL;
 
struct singleLine { float Width;
int Dash;
int LineEnd;
int LineJoin;
QString Color;
int Shade;
};
typedef QValueVector<singleLine> multiLine;
 
struct Layer { int LNr;
int Level;
QString Name;
567,7 → 556,6
FT_Library library;
QMap<QString,FT_Face> FFonts;
#endif
QMap<QString,multiLine> MLineStyles;
};
 
#endif
/trunk/Scribus/scribus/scribusview.cpp
989,28 → 989,11
p->PS_image(ite->InvPict, -ite->BBoxX+ite->LocalX, -ite->LocalY, ite->Pfile, ite->LocalScX, ite->LocalScY, ite->IProfile, ite->UseEmbedded, Ic);
}
p->PS_restore();
if ((ite->Pcolor2 != "None") || (ite->NamedLStyle != ""))
if (ite->Pcolor2 != "None")
{
if (ite->NamedLStyle == "")
{
SetClipPath(p, ite);
p->PS_closepath();
p->PS_stroke();
}
else
{
multiLine ml = Doc->MLineStyles[ite->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k);
p->PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
p->PS_setlinewidth(ml[it].Width);
p->PS_setdash(static_cast<PenStyle>(ml[it].Dash), static_cast<PenCapStyle>(ml[it].LineEnd), static_cast<PenJoinStyle>(ml[it].LineJoin));
SetClipPath(p, ite);
p->PS_closepath();
p->PS_stroke();
}
}
SetClipPath(p, ite);
p->PS_closepath();
p->PS_stroke();
}
p->PS_restore();
}
1029,7 → 1012,29
{
SetClipPath(p, ite);
p->PS_closepath();
p->PS_fill(multiPath);
if (ite->GrType != 0)
{
SetFarbe(ite->GrColor2, ite->GrShade2, &h, &s, &v, &k);
p->PS_GradientCol1(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
SetFarbe(ite->GrColor, ite->GrShade, &h, &s, &v, &k);
p->PS_GradientCol2(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
switch (ite->GrType)
{
case 1:
case 2:
case 3:
case 4:
p->PS_LinGradient(ite->Width, -ite->Height, ite->PType, ite->GrType, multiPath);
break;
case 5:
p->PS_RadGradient(ite->Width, -ite->Height, ite->PType, multiPath);
break;
default:
break;
}
}
else
p->PS_fill(multiPath);
}
if ((ite->flippedH % 2) != 0)
{
1222,6 → 1227,7
QString chx, chglyph;
PageItem *c;
struct Pti *hl;
bool needsStroke = false;
bool multiPath = false;
int Lnr = 0;
struct Layer ll;
1266,38 → 1272,16
switch (c->PType)
{
case 2:
if ((c->Pcolor != "None") || (c->GrType != 0))
if (c->Pcolor != "None")
{
SetClipPath(p, c);
p->PS_closepath();
if ((c->GrType != 0) && (a->PageNam == ""))
{
SetFarbe(c->GrColor2, c->GrShade2, &h, &s, &v, &k);
p->PS_GradientCol1(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
SetFarbe(c->GrColor, c->GrShade, &h, &s, &v, &k);
p->PS_GradientCol2(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
switch (c->GrType)
{
case 1:
case 2:
case 3:
case 4:
p->PS_LinGradient(c->Width, -c->Height, c->PType, c->GrType, multiPath);
break;
case 5:
p->PS_RadGradient(c->Width, -c->Height, c->PType, multiPath);
break;
default:
break;
}
}
else
p->PS_fill(multiPath);
p->PS_fill(multiPath);
}
p->PS_save();
SetClipPath(p, c);
p->PS_closepath();
p->PS_clip(multiPath);
p->PS_save();
if ((c->flippedH % 2) != 0)
{
p->PS_translate(c->Width, 0);
1317,31 → 1301,16
p->PS_image(c->InvPict, -c->BBoxX+c->LocalX, -c->LocalY, c->Pfile, c->LocalScX, c->LocalScY, c->IProfile, c->UseEmbedded, ic);
}
p->PS_restore();
if ((c->Pcolor2 != "None") || (c->NamedLStyle != ""))
if (c->Pcolor2 != "None")
{
if (c->NamedLStyle == "")
{
SetClipPath(p, c);
p->PS_closepath();
p->PS_stroke();
}
else
{
multiLine ml = Doc->MLineStyles[c->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k);
p->PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
p->PS_setlinewidth(ml[it].Width);
p->PS_setdash(static_cast<PenStyle>(ml[it].Dash), static_cast<PenCapStyle>(ml[it].LineEnd), static_cast<PenJoinStyle>(ml[it].LineJoin));
SetClipPath(p, c);
p->PS_closepath();
p->PS_stroke();
}
}
SetClipPath(p, c);
p->PS_closepath();
p->PS_stroke();
}
needsStroke = false;
break;
case 4:
needsStroke = false;
if (c->isBookmark)
{
QString bm = "";
1548,101 → 1517,22
}
break;
case 5:
if (c->NamedLStyle == "")
{
p->PS_moveto(0, 0);
p->PS_lineto(c->Width, -c->Height);
p->PS_stroke();
}
else
{
multiLine ml = Doc->MLineStyles[c->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k);
p->PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
p->PS_setlinewidth(ml[it].Width);
p->PS_setdash(static_cast<PenStyle>(ml[it].Dash), static_cast<PenCapStyle>(ml[it].LineEnd), static_cast<PenJoinStyle>(ml[it].LineJoin));
p->PS_moveto(0, 0);
p->PS_lineto(c->Width, -c->Height);
p->PS_stroke();
}
}
p->PS_moveto(0, 0);
p->PS_lineto(c->Width, -c->Height);
p->PS_stroke();
needsStroke = false;
break;
case 1:
case 3:
case 6:
if ((c->Pcolor != "None") || (c->GrType != 0))
{
SetClipPath(p, c);
p->PS_closepath();
if (c->GrType != 0)
{
SetFarbe(c->GrColor2, c->GrShade2, &h, &s, &v, &k);
p->PS_GradientCol1(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
SetFarbe(c->GrColor, c->GrShade, &h, &s, &v, &k);
p->PS_GradientCol2(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
switch (c->GrType)
{
case 1:
case 2:
case 3:
case 4:
p->PS_LinGradient(c->Width, -c->Height, c->PType, c->GrType, multiPath);
break;
case 5:
p->PS_RadGradient(c->Width, -c->Height, c->PType, multiPath);
break;
default:
break;
}
}
else
p->PS_fill(multiPath);
}
if ((c->Pcolor2 != "None") || (c->NamedLStyle != ""))
{
if (c->NamedLStyle == "")
{
SetClipPath(p, c);
p->PS_closepath();
p->PS_stroke();
}
else
{
multiLine ml = Doc->MLineStyles[c->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k);
p->PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
p->PS_setlinewidth(ml[it].Width);
p->PS_setdash(static_cast<PenStyle>(ml[it].Dash), static_cast<PenCapStyle>(ml[it].LineEnd), static_cast<PenJoinStyle>(ml[it].LineJoin));
SetClipPath(p, c);
p->PS_closepath();
p->PS_stroke();
}
}
}
SetClipPath(p, c);
p->PS_closepath();
needsStroke = true;
break;
case 7:
if (c->NamedLStyle == "")
{
SetClipPath(p, c);
p->PS_stroke();
}
else
{
multiLine ml = Doc->MLineStyles[c->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k);
p->PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
p->PS_setlinewidth(ml[it].Width);
p->PS_setdash(static_cast<PenStyle>(ml[it].Dash), static_cast<PenCapStyle>(ml[it].LineEnd), static_cast<PenJoinStyle>(ml[it].LineJoin));
SetClipPath(p, c);
p->PS_stroke();
}
}
case 7:
SetClipPath(p, c);
needsStroke = false;
p->PS_stroke();
break;
case 8:
if (c->PoShow)
1650,27 → 1540,12
if (c->PoLine.size() > 3)
{
p->PS_save();
if (c->NamedLStyle == "")
{
SetClipPath(p, c);
p->PS_stroke();
}
else
{
multiLine ml = Doc->MLineStyles[c->NamedLStyle];
for (int it = ml.count()-1; it > -1; it--)
{
SetFarbe(ml[it].Color, ml[it].Shade, &h, &s, &v, &k);
p->PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
p->PS_setlinewidth(ml[it].Width);
p->PS_setdash(static_cast<PenStyle>(ml[it].Dash), static_cast<PenCapStyle>(ml[it].LineEnd), static_cast<PenJoinStyle>(ml[it].LineJoin));
SetClipPath(p, c);
p->PS_stroke();
}
}
SetClipPath(p, c);
p->PS_stroke();
p->PS_restore();
}
}
needsStroke = false;
for (d = 0; d < c->MaxChars; ++d)
{
hl = c->Ptext.at(d);
1733,6 → 1608,49
}
break;
}
if (needsStroke)
{
if ((c->GrType != 0) && (a->PageNam == ""))
{
SetFarbe(c->GrColor2, c->GrShade2, &h, &s, &v, &k);
p->PS_GradientCol1(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
SetFarbe(c->GrColor, c->GrShade, &h, &s, &v, &k);
p->PS_GradientCol2(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
switch (c->GrType)
{
case 1:
case 2:
case 3:
case 4:
p->PS_LinGradient(c->Width, -c->Height, c->PType, c->GrType, multiPath);
break;
case 5:
p->PS_RadGradient(c->Width, -c->Height, c->PType, multiPath);
break;
default:
break;
}
if (c->Pcolor2 != "None")
p->PS_stroke();
}
else
{
if ((c->Pcolor2 != "None") && (c->Pcolor != "None"))
p->PS_fill_stroke(multiPath);
else
{
if ((c->Pcolor2 == "None") && (c->Pcolor == "None"))
p->PS_newpath();
else
{
if (c->Pcolor == "None")
p->PS_stroke();
if (c->Pcolor2 == "None")
p->PS_fill(multiPath);
}
}
}
}
p->PS_restore();
}
}
/trunk/Scribus/scribus/scribusXml.cpp
324,9 → 324,6
OB.Pwidth=QStoFloat(obj.attribute("PWIDTH"));
OB.Pcolor=obj.attribute("PCOLOR");
OB.Pcolor2=obj.attribute("PCOLOR2");
OB.NamedLStyle = obj.attribute("NAMEDLST", "");
if (!doc->MLineStyles.contains(OB.NamedLStyle))
OB.NamedLStyle = "";
OB.Shade=QStoInt(obj.attribute("SHADE"));
OB.Shade2=QStoInt(obj.attribute("SHADE2"));
OB.GrColor = obj.attribute("GRCOLOR","");
739,25 → 736,6
PFO = PFO.nextSibling();
}
}
if(pg.tagName()=="MultiLine")
{
multiLine ml;
QDomNode MuLn = PAGE.firstChild();
while(!MuLn.isNull())
{
QDomElement MuL = MuLn.toElement();
struct singleLine sl;
sl.Color = MuL.attribute("Color");
sl.Dash = QStoInt(MuL.attribute("Dash"));
sl.LineEnd = QStoInt(MuL.attribute("LineEnd"));
sl.LineJoin = QStoInt(MuL.attribute("LineJoin"));
sl.Shade = QStoInt(MuL.attribute("Shade"));
sl.Width = QStoFloat(MuL.attribute("Width"));
ml.append(sl);
MuLn = MuLn.nextSibling();
}
doc->MLineStyles.insert(pg.attribute("Name"), ml);
}
if(pg.tagName()=="PAGE")
{
/*
848,7 → 826,6
OB.Pwidth=QStoFloat(obj.attribute("PWIDTH"));
OB.Pcolor=obj.attribute("PCOLOR");
OB.Pcolor2=obj.attribute("PCOLOR2");
OB.NamedLStyle = obj.attribute("NAMEDLST", "");
OB.Shade=QStoInt(obj.attribute("SHADE"));
OB.Shade2=QStoInt(obj.attribute("SHADE2"));
OB.GrColor = obj.attribute("GRCOLOR","");
1288,9 → 1265,6
OB.Pwidth = QStoFloat(pg.attribute("PWIDTH"));
OB.Pcolor = pg.attribute("PCOLOR");
OB.Pcolor2 = pg.attribute("PCOLOR2");
OB.NamedLStyle = pg.attribute("NAMEDLST", "");
if (!doc->MLineStyles.contains(OB.NamedLStyle))
OB.NamedLStyle = "";
OB.Shade = QStoInt(pg.attribute("SHADE"));
OB.Shade2 = QStoInt(pg.attribute("SHADE2"));
OB.GrColor = pg.attribute("GRCOLOR","");
1544,7 → 1518,6
ob.setAttribute("PWIDTH",item->Pwidth);
ob.setAttribute("PCOLOR",item->Pcolor);
ob.setAttribute("PCOLOR2",item->Pcolor2);
ob.setAttribute("NAMEDLST",item->NamedLStyle);
ob.setAttribute("SHADE",item->Shade);
ob.setAttribute("SHADE2",item->Shade2);
ob.setAttribute("GRCOLOR",item->GrColor);
1859,7 → 1832,6
ob.setAttribute("PWIDTH",item->Pwidth);
ob.setAttribute("PCOLOR",item->Pcolor);
ob.setAttribute("PCOLOR2",item->Pcolor2);
ob.setAttribute("NAMEDLST",item->NamedLStyle);
ob.setAttribute("SHADE",item->Shade);
ob.setAttribute("SHADE2",item->Shade2);
ob.setAttribute("GRCOLOR",item->GrColor);
2158,26 → 2130,6
dc.setAttribute("AUTOMATIC", static_cast<int>(doc->Automatic));
dc.setAttribute("AUTOCHECK", static_cast<int>(doc->AutoCheck));
dc.setAttribute("GUIDELOCK", static_cast<int>(doc->GuideLock));
QMap<QString,multiLine>::Iterator itMU;
for (itMU = doc->MLineStyles.begin(); itMU != doc->MLineStyles.end(); ++itMU)
{
QDomElement MuL=docu.createElement("MultiLine");
MuL.setAttribute("Name",itMU.key());
multiLine ml = itMU.data();
multiLine::Iterator itMU2;
for (itMU2 = ml.begin(); itMU2 != ml.end(); ++itMU2)
{
QDomElement SuL=docu.createElement("SubLine");
SuL.setAttribute("Color", (*itMU2).Color);
SuL.setAttribute("Shade", (*itMU2).Shade);
SuL.setAttribute("Dash", (*itMU2).Dash);
SuL.setAttribute("LineEnd", (*itMU2).LineEnd);
SuL.setAttribute("LineJoin", (*itMU2).LineJoin);
SuL.setAttribute("Width", (*itMU2).Width);
MuL.appendChild(SuL);
}
dc.appendChild(MuL);
}
QMap<QString,QString>::Iterator itja;
for (itja = doc->JavaScripts.begin(); itja != doc->JavaScripts.end(); ++itja)
{
/trunk/Scribus/scribus/page.h
304,7 → 304,6
void NewBMNr(int, int);
void ChBMText(PageItem *);
void RotMode(int);
void RasterPic(bool);
};
 
#endif
/trunk/Scribus/scribus/mpalette.cpp
576,7 → 576,8
Layout13_2->addItem( spacer10 );
pageLayout_5->addLayout( Layout13_2 );
 
Layout12_2 = new QGridLayout( 0, 1, 1, 0, 3, "Layout12_2");
Layout12_2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout12_2");
 
Text8 = new QLabel( page_5, "Text8" );
Text8->setText( tr( "Linestyle:" ) );
Layout12_2->addWidget( Text8, 0, 0 );
583,6 → 584,7
LStyle = new LineCombo(page_5);
Layout12_2->addWidget( LStyle, 1, 0 );
TextLabel1 = new QLabel( page_5, "TextLabel1" );
 
TextLabel1->setText( tr( "Linewidth:" ) );
Layout12_2->addWidget( TextLabel1, 2, 0 );
LSize = new MSpinBox( page_5, 1 );
589,6 → 591,7
LSize->setSuffix( tr( " pt" ) );
LSize->setDecimals(10);
Layout12_2->addWidget( LSize, 3, 0 );
 
Text9 = new QLabel( page_5, "Text9" );
Text9->setText( tr( "Edges:" ) );
Layout12_2->addWidget( Text9, 4, 0 );
598,6 → 601,7
LJoinStyle->insertItem(loadIcon("BevelJoin.png"), tr( "BevelJoin" ) );
LJoinStyle->insertItem(loadIcon("BevelJoin.png"), tr( "RoundJoin" ) );
Layout12_2->addWidget( LJoinStyle, 5, 0 );
 
Text10 = new QLabel( page_5, "Text10" );
Text10->setText( tr( "Endings:" ) );
Layout12_2->addWidget( Text10, 6, 0 );
607,12 → 611,8
LEndStyle->insertItem(loadIcon("SquareCap.png"), tr( "SquareCap" ) );
LEndStyle->insertItem(loadIcon("RoundCap.png"), tr( "RoundCap" ) );
Layout12_2->addWidget( LEndStyle, 7, 0 );
 
pageLayout_5->addLayout( Layout12_2 );
 
StyledLine = new QListBox(page_5, "StyledL");
StyledLine->insertItem(tr("No Style"));
pageLayout_5->addWidget(StyledLine);
 
QSpacerItem* spacer11 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
pageLayout_5->addItem( spacer11 );
TabStack->addWidget( page_5, 4 );
684,8 → 684,6
connect(DRight, SIGNAL(valueChanged(int)), this, SLOT(NewTDist()));
connect(DBottom, SIGNAL(valueChanged(int)), this, SLOT(NewTDist()));
connect(buttonGroup5, SIGNAL(clicked(int)), this, SLOT(SelTab(int)));
connect(StyledLine, SIGNAL(clicked(QListBoxItem*)), this, SLOT(SetSTline(QListBoxItem*)));
connect(StyledLine, SIGNAL(selected(int)), this, SIGNAL(EditLSt()));
HaveItem = false;
Xpos->setValue(0);
Ypos->setValue(0);
771,7 → 769,6
 
void Mpalette::SetCurItem(PageItem *i)
{
disconnect(StyledLine, SIGNAL(clicked(QListBoxItem*)), this, SLOT(SetSTline(QListBoxItem*)));
HaveItem = false;
CurItem = i;
if (i->IFont != "");
782,23 → 779,6
DBottom->setValue(static_cast<int>(i->BExtra*10));
DRight->setValue(static_cast<int>(i->RExtra*10));
Revert->setOn(i->Reverse);
if (i->NamedLStyle == "")
{
StyledLine->setCurrentItem(0);
LStyle->setEnabled(true);
LSize->setEnabled(true);
LJoinStyle->setEnabled(true);
LEndStyle->setEnabled(true);
}
else
{
StyledLine->setSelected(StyledLine->findItem(i->NamedLStyle), true);
LStyle->setEnabled(false);
LSize->setEnabled(false);
LJoinStyle->setEnabled(false);
LEndStyle->setEnabled(false);
}
connect(StyledLine, SIGNAL(clicked(QListBoxItem*)), this, SLOT(SetSTline(QListBoxItem*)));
if (i->Locked)
{
Xpos->setEnabled(false);
1895,44 → 1875,3
emit DocChanged();
}
}
 
void Mpalette::SetLineFormats(ScribusDoc *dd)
{
disconnect(StyledLine, SIGNAL(clicked(QListBoxItem*)), this, SLOT(SetSTline(QListBoxItem*)));
StyledLine->clear();
if (dd != 0)
{
StyledLine->insertItem(tr("No Style"));
QMap<QString,multiLine>::Iterator it;
for (it = doc->MLineStyles.begin(); it != doc->MLineStyles.end(); ++it)
{
StyledLine->insertItem(it.key());
}
StyledLine->setSelected(StyledLine->currentItem(), false);
}
connect(StyledLine, SIGNAL(clicked(QListBoxItem*)), this, SLOT(SetSTline(QListBoxItem*)));
}
 
void Mpalette::SetSTline(QListBoxItem *c)
{
if (c == NULL)
return;
if (c->listBox()->currentItem() == 0)
{
CurItem->NamedLStyle = "";
LStyle->setEnabled(true);
LSize->setEnabled(true);
LJoinStyle->setEnabled(true);
LEndStyle->setEnabled(true);
}
else
{
CurItem->NamedLStyle = c->text();
LStyle->setEnabled(false);
LSize->setEnabled(false);
LJoinStyle->setEnabled(false);
LEndStyle->setEnabled(false);
}
doc->ActPage->RefreshItem(CurItem);
emit DocChanged();
}
/trunk/Scribus/scribus/mpalette.h
18,7 → 18,6
#include <qtooltip.h>
#include <qimage.h>
#include <qpixmap.h>
#include <qlistbox.h>
#include "mspinbox.h"
#include "pageitem.h"
#include "page.h"
140,7 → 139,6
QComboBox* LEndStyle;
QLabel* Text8;
LineCombo* LStyle;
QListBox* StyledLine;
PageItem *CurItem;
bool HaveDoc;
bool HaveItem;
168,8 → 166,6
void setLIvalue(PenStyle p, PenCapStyle pc, PenJoinStyle pj);
void setStil(int s);
void setAli(int e);
void SetLineFormats(ScribusDoc *dd);
void SetSTline(QListBoxItem *c);
private slots:
void SelTab(int t);
216,7 → 212,6
void BackHome();
void Stellung(int);
void EditCL();
void EditLSt();
 
protected:
QVBoxLayout* MpalLayout;
/trunk/Scribus/scribus/scribusdoc.cpp
136,7 → 136,6
hasName = false;
RotMode = 0;
ASaveTimer = new QTimer(this);
MLineStyles.clear();
#ifdef HAVE_FREETYPE
FT_Init_FreeType( &library );
#endif