Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 146 → Rev 147

/trunk/Scribus/scribus/dcolor.cpp
12,14 → 12,7
#include <qiconset.h>
extern QPixmap loadIcon(QString nam);
 
/*
* 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)
DelColor::DelColor( QWidget* parent, CListe farben, QString Fnam, bool HDoc)
: QDialog( parent, "dd", true, 0 )
{
setName( "DelColor" );
40,24 → 33,27
TextLabel3 = new QLabel( this, "TextLabel3" );
TextLabel3->setText( tr( "?" ) );
Layout4->addWidget( TextLabel3, 0, 2 );
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)
if (HDoc)
{
pm.fill(farben[it.key()].getRGBColor());
Fausw->insertItem(QIconSet(pm), it.key());
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));
}
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 );
75,7 → 71,8
setMaximumSize(sizeHint());
connect( PushButton2, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( PushButton3, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( Fausw, SIGNAL(activated(int)), this, SLOT( ReplaceColor(int) ) );
if (HDoc)
connect( Fausw, SIGNAL(activated(int)), this, SLOT( ReplaceColor(int) ) );
}
 
void DelColor::ReplaceColor(int id)