Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 147 → Rev 146

/trunk/Scribus/ChangeLogCVS
1,10 → 1,4
Changes since Version 1.1.4
07.01.2004 Added the missing centered Tabulator.
Added the Colors of the XFree RGB Color Database as alternative
Default Colors.
Added a Button to restore the Default Colors to the Color Editor.
Updated the Russian Translation.
 
06.01.2004 The Tab-Key switches now between Docs when not in Edit-Mode.
Improved the MSpinBox API.
 
/trunk/Scribus/scribus/rgbscribus.txt
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/edit1format.cpp
===================================================================
--- trunk/Scribus/scribus/edit1format.cpp (revision 147)
+++ trunk/Scribus/scribus/edit1format.cpp (revision 146)
@@ -54,7 +54,7 @@
SizeC->setSuffix( tr( " pt" ) );
SizeC->setMinValue(1);
SizeC->setMaxValue(1024);
- SizeC->setValue(vor->FontSize / 10.0);
+ SizeC->setValue(vor->FontSize);
GroupFontLayout->addWidget( SizeC, 1, 1 );
TextF2 = new QLabel( GroupFont, "TextF2" );
/trunk/Scribus/scribus/libabout/about.cpp
54,7 → 54,7
tabLayout1->addWidget( PixmapLabel1 );
BuildID = new QLabel( tab, "BB" );
BuildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1. %2 %3 ").arg(7).arg("January").arg(2004);
QString bu = tr("%1. %2 %3 ").arg(6).arg("January").arg(2004);
#ifdef HAVE_CMS
bu += "C";
#else
/trunk/Scribus/scribus/scribus.cpp
199,43 → 199,14
Prefs.AppFontSize = qApp->font().pointSize();
/** Default Farbenliste */
Prefs.DColors.clear();
QString pfadC = PREL;
QString pfadC2 = pfadC + "/lib/scribus/rgbscribus.txt";
QFile fiC(pfadC2);
if (!fiC.exists())
{
Prefs.DColors.insert("White", CMYKColor(0, 0, 0, 0));
Prefs.DColors.insert("Black", CMYKColor(0, 0, 0, 255));
Prefs.DColors.insert("Blue", CMYKColor(255, 255, 0, 0));
Prefs.DColors.insert("Cyan", CMYKColor(255, 0, 0, 0));
Prefs.DColors.insert("Green", CMYKColor(255, 0, 255, 0));
Prefs.DColors.insert("Red", CMYKColor(0, 255, 255, 0));
Prefs.DColors.insert("Yellow", CMYKColor(0, 0, 255, 0));
Prefs.DColors.insert("Magenta", CMYKColor(0, 255, 0, 0));
}
else
{
if (fiC.open(IO_ReadOnly))
{
QString ColorEn, Cname;
int Rval, Gval, Bval;
QTextStream tsC(&fiC);
ColorEn = tsC.readLine();
while (!tsC.atEnd())
{
ColorEn = tsC.readLine();
QTextStream CoE(&ColorEn, IO_ReadOnly);
CoE >> Rval;
CoE >> Gval;
CoE >> Bval;
CoE >> Cname;
CMYKColor tmp;
tmp.setColorRGB(Rval, Gval, Bval);
Prefs.DColors.insert(Cname, tmp);
}
fiC.close();
}
}
Prefs.DColors.insert("White", CMYKColor(0, 0, 0, 0));
Prefs.DColors.insert("Black", CMYKColor(0, 0, 0, 255));
Prefs.DColors.insert("Blue", CMYKColor(255, 255, 0, 0));
Prefs.DColors.insert("Cyan", CMYKColor(255, 0, 0, 0));
Prefs.DColors.insert("Green", CMYKColor(255, 0, 255, 0));
Prefs.DColors.insert("Red", CMYKColor(0, 255, 255, 0));
Prefs.DColors.insert("Yellow", CMYKColor(0, 0, 255, 0));
Prefs.DColors.insert("Magenta", CMYKColor(0, 255, 0, 0));
DispX = 10;
DispY = 10;
Prefs.Wheelval = 40;
4714,7 → 4685,6
uint b, c, d;
CListe edc;
QMap<QString,QString> ers;
PageItem *ite;
if (HaveDoc)
{
edc = doc->PageColors;
4723,7 → 4693,7
{
edc = Prefs.DColors;
}
Farbmanager* dia = new Farbmanager(this, edc, HaveDoc);
Farbmanager* dia = new Farbmanager(this, edc);
if (dia->exec())
{
if (HaveDoc)
4759,34 → 4729,22
QMap<QString,QString>::Iterator it;
for (it = ers.begin(); it != ers.end(); ++it)
{
if (it.key() == doc->CurrTextFill)
doc->CurrTextFill = it.data();
if (it.key() == doc->CurrTextStroke)
doc->CurrTextStroke = it.data();
for (b=0; b<view->DocPages.count(); ++b)
{
for (c=0; c<view->DocPages.at(b)->Items.count(); ++c)
{
ite = view->DocPages.at(b)->Items.at(c);
if ((ite->PType == 4) || (ite->PType == 8))
if (view->DocPages.at(b)->Items.at(c)->PType == 4)
{
for (d=0; d<ite->Ptext.count(); ++d)
for (d=0; d<view->DocPages.at(b)->Items.at(c)->Ptext.count(); ++d)
{
if (it.key() == ite->Ptext.at(d)->ccolor)
ite->Ptext.at(d)->ccolor = it.data();
if (it.key() == ite->Ptext.at(d)->cstroke)
ite->Ptext.at(d)->cstroke = it.data();
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() == ite->Pcolor)
ite->Pcolor = it.data();
if (it.key() == ite->Pcolor2)
ite->Pcolor2 = it.data();
if (it.key() == ite->GrColor)
ite->GrColor = it.data();
if (it.key() == ite->GrColor2)
ite->GrColor2 = it.data();
view->DocPages.at(b)->AdjItemGradient(ite, ite->GrType, ite->GrColor2, ite->GrShade2, ite->GrColor, ite->GrShade);
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();
}
}
}
4796,26 → 4754,18
{
for (c=0; c<view->MasterPages.at(b)->Items.count(); ++c)
{
ite = view->MasterPages.at(b)->Items.at(c);
if ((ite->PType == 4) || (ite->PType == 8))
if (view->MasterPages.at(b)->Items.at(c)->PType == 4)
{
for (d=0; d<ite->Ptext.count(); ++d)
for (d=0; d<view->MasterPages.at(b)->Items.at(c)->Ptext.count(); ++d)
{
if (it.key() == ite->Ptext.at(d)->ccolor)
ite->Ptext.at(d)->ccolor = it.data();
if (it.key() == ite->Ptext.at(d)->cstroke)
ite->Ptext.at(d)->cstroke = it.data();
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();
}
}
if (it.key() == ite->Pcolor)
ite->Pcolor = it.data();
if (it.key() == ite->Pcolor2)
ite->Pcolor2 = it.data();
if (it.key() == ite->GrColor)
ite->GrColor = it.data();
if (it.key() == ite->GrColor2)
ite->GrColor2 = it.data();
view->MasterPages.at(b)->AdjItemGradient(ite, ite->GrType, ite->GrColor2, ite->GrShade2, ite->GrColor, ite->GrShade);
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();
}
}
}
/trunk/Scribus/scribus/tabmanager.cpp
49,7 → 49,6
Align->insertItem( tr( "Right" ) );
Align->insertItem( tr( "Full Stop" ) );
Align->insertItem( tr( "Comma" ) );
Align->insertItem( tr( "Center" ) );
Align->setEditable(false);
Align->setEnabled(false);
layout7->addWidget( Align, 1, 1 );
/trunk/Scribus/scribus/pageitem.cpp
729,11 → 729,6
RTab = false;
TabCode = 0;
}
if ((hl->ch == QChar(9)) && (TabCode == 4))
{
RTab = false;
TabCode = 0;
}
if (hl->ch == QChar(9))
{
wide = 1;
784,8 → 779,6
}
else
hl->xp = CurX;
if (TabCode == 4)
CurX += (wide+hl->cextra) / 2;
pt1 = QPoint(static_cast<int>(CurX+RExtra+lineCorr), static_cast<int>(CurY+desc+BExtra+lineCorr));
pt2 = QPoint(static_cast<int>(CurX+RExtra+lineCorr), static_cast<int>(CurY-asce));
if ((!cl.contains(pf.xForm(pt1))) || (!cl.contains(pf.xForm(pt2))) || (CurX+RExtra+lineCorr > ColBound.y()))
824,13 → 817,10
if (RTab)
{
uint rtx2 = 0;
double cen = 1;
if (TabCode == 4)
cen = 2;
for (uint rtx = StartRT; rtx < LiList.count(); ++rtx)
{
LiList.at(rtx)->xco = QMAX(LiList.at(rtx)->xco-(wide+hl->cextra) / cen, 0.0);
Ptext.at(StartRT2+rtx2)->xp = QMAX(Ptext.at(StartRT2+rtx2)->xp-(wide+hl->cextra) / cen, 0.0);
LiList.at(rtx)->xco = QMAX(LiList.at(rtx)->xco-(wide+hl->cextra), 0.0);
Ptext.at(StartRT2+rtx2)->xp = QMAX(Ptext.at(StartRT2+rtx2)->xp-(wide+hl->cextra), 0.0);
rtx2++;
}
}
/trunk/Scribus/scribus/page.cpp
5797,35 → 5797,11
}
}
 
void Page::AdjItemGradient(PageItem *b, int typ, QString col1, int sh1, QString col2, int sh2)
{
QColor tmp;
b->fill_gradient.clearStops();
if (typ == 5)
{
b->SetFarbe(&tmp, col2, sh2);
b->fill_gradient.addStop(tmp, 0.0, 0.5, 1.0);
b->SetFarbe(&tmp, col1, sh1);
b->fill_gradient.addStop(tmp, 1.0, 0.5, 1.0);
}
else
{
b->SetFarbe(&tmp, col1, sh1);
b->fill_gradient.addStop(tmp, 0.0, 0.5, 1.0);
b->SetFarbe(&tmp, col2, sh2);
b->fill_gradient.addStop(tmp, 1.0, 0.5, 1.0);
}
b->GrColor2 = col1;
b->GrShade2 = sh1;
b->GrColor = col2;
b->GrShade = sh2;
b->GrType = typ;
}
 
void Page::ItemGradFill(int typ, QString col1, int sh1, QString col2, int sh2)
{
uint a;
PageItem *i;
QColor tmp;
QString col1c, col2c;
if ((col1 == "None") || (col1 == ""))
col1c = "Black";
5840,7 → 5816,26
for (a = 0; a < SelItem.count(); ++a)
{
i = SelItem.at(a);
AdjItemGradient(i, typ, col1c, sh1, col2c, sh2);
i->fill_gradient.clearStops();
if (typ == 5)
{
i->SetFarbe(&tmp, col2c, sh2);
i->fill_gradient.addStop(tmp, 0.0, 0.5, 1.0);
i->SetFarbe(&tmp, col1c, sh1);
i->fill_gradient.addStop(tmp, 1.0, 0.5, 1.0);
}
else
{
i->SetFarbe(&tmp, col1c, sh1);
i->fill_gradient.addStop(tmp, 0.0, 0.5, 1.0);
i->SetFarbe(&tmp, col2c, sh2);
i->fill_gradient.addStop(tmp, 1.0, 0.5, 1.0);
}
i->GrColor2 = col1c;
i->GrShade2 = sh1;
i->GrColor = col2c;
i->GrShade = sh2;
i->GrType = typ;
RefreshItem(i);
}
}
/trunk/Scribus/scribus/page.h
132,7 → 132,6
void ItemTextPen(QString farbe);
void ItemTextPenS(int sha);
void ItemTextScale(int sha);
void AdjItemGradient(PageItem *b, int typ, QString col1, int sh1, QString col2, int sh2);
QRegion ViewReg();
/** Liste der Elemente */
QPtrList<PageItem> Items;
/trunk/Scribus/scribus/Makefile.am
7,11 → 7,9
 
SUBDIRS = icons libabout libprefs plugins libpostscript libpdf profiles dicts po qm
 
EXTRA_DIST = main.cpp scribus.cpp scribus.h scribusdoc.cpp scribusdoc.h scribusview.cpp scribusview.h newfile.h newfile.cpp pageitem.cpp pageitem.h pageback.cpp pageback.h hruler.cpp hruler.h vruler.cpp vruler.h colorm.cpp colorm.h query.cpp query.h dcolor.cpp dcolor.h cpalette.cpp cpalette.h mdup.cpp mdup.h docinfo.cpp docinfo.h reformdoc.cpp reformdoc.h serializer.cpp serializer.h align.cpp align.h fmitem.cpp fmitem.h fontprefs.cpp fontprefs.h missing.cpp missing.h tree.cpp tree.h pdfopts.cpp pdfopts.h inspage.cpp inspage.h delpages.cpp delpages.h movepage.cpp movepage.h mspinbox.cpp mspinbox.h helpbrowser.cpp helpbrowser.h icons5.h linkbutton.cpp linkbutton.h icons6.h linecombo.cpp linecombo.h scribusXml.cpp scribusXml.h cmykfw.cpp cmykfw.h cmykcolor.cpp cmykcolor.h util.cpp colorchart.cpp colorchart.h druck.cpp druck.h editformats.cpp editformats.h edit1format.cpp edit1format.h spalette.cpp spalette.h frameedit.cpp frameedit.h scfonts.cpp scfonts.h scrap.cpp scrap.h scfonts_ttf.cpp scfonts_ttf.h muster.cpp muster.h applytemplate.cpp applytemplate.h newtemp.cpp newtemp.h picstatus.cpp picstatus.h picsearch.cpp picsearch.h customfdialog.cpp customfdialog.h cmsprefs.cpp cmsprefs.h bookmwin.cpp bookmwin.h annot.cpp annot.h navigator.cpp navigator.h keymanager.cpp keymanager.h werktoolb.cpp werktoolb.h mpalette.h mpalette.cpp polyprops.cpp polyprops.h layers.cpp layers.h page.cpp page.h editor.cpp editor.h selfield.cpp selfield.h javadocs.cpp javadocs.h buttonicon.cpp buttonicon.h annota.cpp annota.h fpoint.cpp fpoint.h fpointarray.cpp fpointarray.h seiten.cpp seiten.h hysettings.cpp hysettings.h hnjalloc.c hnjalloc.h hyask.cpp hyask.h hyphen.c hyphen.h hyphenator.cpp hyphenator.h scribuswin.cpp scribuswin.h guidemanager.cpp guidemanager.h cupsoptions.cpp cupsoptions.h md5.c md5.h rc4.c rc4.h mergedoc.cpp mergedoc.h bookpalette.cpp bookpalette.h splash.h fontcombo.h scpainter.cpp scpainter.h vgradient.cpp vgradient.h story.cpp story.h autoform.cpp autoform.h fparser.cpp fparser.h tabmanager.cpp tabmanager.h art_kmisc.c art_kmisc.h art_render_misc.c art_render_misc.h art_render_pattern.c art_render_pattern.h art_rgb.c art_rgb.h art_rgb_affine_private.c art_rgb_affine_private.h art_rgb_svp.c art_rgb_svp.h art_rgba_affine.c art_rgba_affine.h gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-private.h gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlib.h gdk-pixbuf-xlibrgb.c gdk-pixbuf-xlibrgb.h rgbscribus.txt
EXTRA_DIST = main.cpp scribus.cpp scribus.h scribusdoc.cpp scribusdoc.h scribusview.cpp scribusview.h newfile.h newfile.cpp pageitem.cpp pageitem.h pageback.cpp pageback.h hruler.cpp hruler.h vruler.cpp vruler.h colorm.cpp colorm.h query.cpp query.h dcolor.cpp dcolor.h cpalette.cpp cpalette.h mdup.cpp mdup.h docinfo.cpp docinfo.h reformdoc.cpp reformdoc.h serializer.cpp serializer.h align.cpp align.h fmitem.cpp fmitem.h fontprefs.cpp fontprefs.h missing.cpp missing.h tree.cpp tree.h pdfopts.cpp pdfopts.h inspage.cpp inspage.h delpages.cpp delpages.h movepage.cpp movepage.h mspinbox.cpp mspinbox.h helpbrowser.cpp helpbrowser.h icons5.h linkbutton.cpp linkbutton.h icons6.h linecombo.cpp linecombo.h scribusXml.cpp scribusXml.h cmykfw.cpp cmykfw.h cmykcolor.cpp cmykcolor.h util.cpp colorchart.cpp colorchart.h druck.cpp druck.h editformats.cpp editformats.h edit1format.cpp edit1format.h spalette.cpp spalette.h frameedit.cpp frameedit.h scfonts.cpp scfonts.h scrap.cpp scrap.h scfonts_ttf.cpp scfonts_ttf.h muster.cpp muster.h applytemplate.cpp applytemplate.h newtemp.cpp newtemp.h picstatus.cpp picstatus.h picsearch.cpp picsearch.h customfdialog.cpp customfdialog.h cmsprefs.cpp cmsprefs.h bookmwin.cpp bookmwin.h annot.cpp annot.h navigator.cpp navigator.h keymanager.cpp keymanager.h werktoolb.cpp werktoolb.h mpalette.h mpalette.cpp polyprops.cpp polyprops.h layers.cpp layers.h page.cpp page.h editor.cpp editor.h selfield.cpp selfield.h javadocs.cpp javadocs.h buttonicon.cpp buttonicon.h annota.cpp annota.h fpoint.cpp fpoint.h fpointarray.cpp fpointarray.h seiten.cpp seiten.h hysettings.cpp hysettings.h hnjalloc.c hnjalloc.h hyask.cpp hyask.h hyphen.c hyphen.h hyphenator.cpp hyphenator.h scribuswin.cpp scribuswin.h guidemanager.cpp guidemanager.h cupsoptions.cpp cupsoptions.h md5.c md5.h rc4.c rc4.h mergedoc.cpp mergedoc.h bookpalette.cpp bookpalette.h splash.h fontcombo.h scpainter.cpp scpainter.h vgradient.cpp vgradient.h story.cpp story.h autoform.cpp autoform.h fparser.cpp fparser.h tabmanager.cpp tabmanager.h art_kmisc.c art_kmisc.h art_render_misc.c art_render_misc.h art_render_pattern.c art_render_pattern.h art_rgb.c art_rgb.h art_rgb_affine_private.c art_rgb_affine_private.h art_rgb_svp.c art_rgb_svp.h art_rgba_affine.c art_rgba_affine.h gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-private.h gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlib.h gdk-pixbuf-xlibrgb.c gdk-pixbuf-xlibrgb.h
 
install-data-local:
$(mkinstalldirs) $(prefix)/lib/scribus/
$(INSTALL_DATA) $(srcdir)/rgbscribus.txt $(prefix)/lib/scribus/rgbscribus.txt
$(mkinstalldirs) $(prefix)/include/scribus/
$(INSTALL_DATA) $(srcdir)/scribus.h $(prefix)/include/scribus/scribus.h
$(mkinstalldirs) $(prefix)/include/scribus/
92,7 → 90,6
$(INSTALL_DATA) $(srcdir)/fparser.h $(prefix)/include/scribus/fparser.h
 
uninstall-local:
-rm -f $(prefix)/lib/scribus/rgbscribus.txt
-rm -f $(prefix)/include/scribus/scribus.h
-rm -f $(prefix)/include/scribus/splash.h
-rm -f $(prefix)/include/scribus/fontcombo.h
/trunk/Scribus/scribus/qm/scribus.ru.qm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/Scribus/scribus/colorm.cpp
25,7 → 25,7
 
extern QPixmap loadIcon(QString nam);
 
Farbmanager::Farbmanager( QWidget* parent, CListe doco, bool HDoc )
Farbmanager::Farbmanager( QWidget* parent, CListe doco )
: QDialog( parent, "dd", true, 0 )
{
setName( "Farbmanager" );
34,7 → 34,6
DontChange += "Cyan";
DontChange += "Magenta";
DontChange += "Yellow";
HaveDoc = HDoc;
setSizePolicy(QSizePolicy((QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, sizePolicy().hasHeightForWidth() ) );
setMinimumSize( QSize( 300, 260 ) );
setSizeGripEnabled(true);
70,12 → 69,6
DelF->setEnabled( false );
DelF->setText( tr( "Delete" ) );
Layout1->addWidget( DelF );
if (!HaveDoc)
{
Rest = new QPushButton( this, "Rest" );
Rest->setText( tr( "Defaults" ) );
Layout1->addWidget( Rest );
}
SaveF = new QPushButton( this, "SaveF" );
SaveF->setText( tr( "Save" ) );
Layout1->addWidget( SaveF );
90,8 → 83,6
EditColors = doco;
updateCList();
// signals and slots connections
if (!HaveDoc)
connect( Rest, SIGNAL( clicked() ), this, SLOT( loadDefaults() ) );
connect( SaveF, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( CancF, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( NewF, SIGNAL( clicked() ), this, SLOT( neueFarbe() ) );
102,49 → 93,6
connect( ListBox1, SIGNAL( highlighted(QListBoxItem*) ), this, SLOT( selFarbe(QListBoxItem*) ) );
}
 
void Farbmanager::loadDefaults()
{
EditColors.clear();
QString pfadC = PREL;
QString pfadC2 = pfadC + "/lib/scribus/rgbscribus.txt";
QFile fiC(pfadC2);
if (!fiC.exists())
{
EditColors.insert("White", CMYKColor(0, 0, 0, 0));
EditColors.insert("Black", CMYKColor(0, 0, 0, 255));
EditColors.insert("Blue", CMYKColor(255, 255, 0, 0));
EditColors.insert("Cyan", CMYKColor(255, 0, 0, 0));
EditColors.insert("Green", CMYKColor(255, 0, 255, 0));
EditColors.insert("Red", CMYKColor(0, 255, 255, 0));
EditColors.insert("Yellow", CMYKColor(0, 0, 255, 0));
EditColors.insert("Magenta", CMYKColor(0, 255, 0, 0));
}
else
{
if (fiC.open(IO_ReadOnly))
{
QString ColorEn, Cname;
int Rval, Gval, Bval;
QTextStream tsC(&fiC);
ColorEn = tsC.readLine();
while (!tsC.atEnd())
{
ColorEn = tsC.readLine();
QTextStream CoE(&ColorEn, IO_ReadOnly);
CoE >> Rval;
CoE >> Gval;
CoE >> Bval;
CoE >> Cname;
CMYKColor tmp;
tmp.setColorRGB(Rval, Gval, Bval);
EditColors.insert(Cname, tmp);
}
fiC.close();
}
}
updateCList();
}
 
void Farbmanager::loadFarben()
{
QString fileName;
181,7 → 129,7
{
if (DontChange.contains(sFarbe))
return;
DelColor *dia = new DelColor(this, EditColors, sFarbe, HaveDoc);
DelColor *dia = new DelColor(this, EditColors, sFarbe);
if (dia->exec())
{
Ersatzliste.insert(sFarbe, dia->EFarbe);
/trunk/Scribus/scribus/dcolor.cpp
12,7 → 12,14
#include <qiconset.h>
extern QPixmap loadIcon(QString nam);
 
DelColor::DelColor( QWidget* parent, CListe farben, QString Fnam, bool HDoc)
/*
* Constructs a DelColor which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
DelColor::DelColor( QWidget* parent, CListe farben, QString Fnam)
: QDialog( parent, "dd", true, 0 )
{
setName( "DelColor" );
33,27 → 40,24
TextLabel3 = new QLabel( this, "TextLabel3" );
TextLabel3->setText( tr( "?" ) );
Layout4->addWidget( TextLabel3, 0, 2 );
if (HDoc)
TextLabel4 = new QLabel( this, "TextLabel4" );
TextLabel4->setText( tr( "Replace it with:" ) );
Layout4->addWidget( TextLabel4, 1, 0 );
Fausw = new QPopupMenu();
CListe::Iterator it;
QPixmap pm = QPixmap(15, 15);
farben.remove(Fnam);
for (it = farben.begin(); it != farben.end(); ++it)
{
TextLabel4 = new QLabel( this, "TextLabel4" );
TextLabel4->setText( tr( "Replace it with:" ) );
Layout4->addWidget( TextLabel4, 1, 0 );
Fausw = new QPopupMenu();
CListe::Iterator it;
QPixmap pm = QPixmap(15, 15);
farben.remove(Fnam);
for (it = farben.begin(); it != farben.end(); ++it)
{
pm.fill(farben[it.key()].getRGBColor());
Fausw->insertItem(QIconSet(pm), it.key());
}
Ersatz = new QPushButton( this, "Ersatz" );
Ersatz->setMinimumSize( QSize( 90, 24 ) );
Ersatz->setPopup(Fausw);
Ersatz->setText(Fausw->text(Fausw->idAt(0)));
Layout4->addWidget( Ersatz, 1, 1 );
EFarbe = Fausw->text(Fausw->idAt(0));
pm.fill(farben[it.key()].getRGBColor());
Fausw->insertItem(QIconSet(pm), it.key());
}
Ersatz = new QPushButton( this, "Ersatz" );
Ersatz->setMinimumSize( QSize( 90, 24 ) );
Ersatz->setPopup(Fausw);
Ersatz->setText(Fausw->text(Fausw->idAt(0)));
Layout4->addWidget( Ersatz, 1, 1 );
EFarbe = Fausw->text(Fausw->idAt(0));
DLayout->addLayout( Layout4 );
Layout3 = new QHBoxLayout;
Layout3->setSpacing( 6 );
71,8 → 75,7
setMaximumSize(sizeHint());
connect( PushButton2, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( PushButton3, SIGNAL( clicked() ), this, SLOT( reject() ) );
if (HDoc)
connect( Fausw, SIGNAL(activated(int)), this, SLOT( ReplaceColor(int) ) );
connect( Fausw, SIGNAL(activated(int)), this, SLOT( ReplaceColor(int) ) );
}
 
void DelColor::ReplaceColor(int id)
/trunk/Scribus/scribus/dcolor.h
21,7 → 21,7
Q_OBJECT
 
public:
DelColor(QWidget* parent, CListe farben, QString Fnam, bool HDoc );
DelColor(QWidget* parent, CListe farben, QString Fnam );
~DelColor() {};
QString EFarbe;
private:
/trunk/Scribus/scribus/colorm.h
22,7 → 22,7
Q_OBJECT
 
public:
Farbmanager( QWidget* parent, CListe doco, bool HDoc );
Farbmanager( QWidget* parent, CListe doco );
~Farbmanager() {};
CListe EditColors;
QMap<QString,QString> Ersatzliste;
33,16 → 33,13
QPushButton* EditF;
QPushButton* DupF;
QPushButton* DelF;
QPushButton* Rest;
QPushButton* SaveF;
QPushButton* CancF;
QString sFarbe;
QColor tmpFarbe;
QStringList DontChange;
bool HaveDoc;
 
private slots:
void loadDefaults();
void loadFarben();
void delFarbe();
void duplFarbe();