Subversion Repositories Scribus

Rev

Rev 161 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 paul 1
/****************************************************************************
2
** Form implementation generated from reading ui file 'Cdel.ui'
3
**
4
** Created: Tue Apr 24 22:08:43 2001
5
**      by:  The User Interface Compiler (uic)
6
**
7
** WARNING! All changes made in this file will be lost!
8
****************************************************************************/
9
#include "dcolor.h"
10
#include "dcolor.moc"
11
#include <qpixmap.h>
12
#include <qiconset.h>
13
extern QPixmap loadIcon(QString nam);
14
 
147 Franz 15
DelColor::DelColor( QWidget* parent, CListe farben, QString Fnam, bool HDoc)
3 paul 16
    : QDialog( parent, "dd", true, 0 )
17
{
161 Franz 18
        setName( "DelColor" );
3 paul 19
    setCaption( tr( "Delete Color" ) );
83 Franz 20
        setIcon(loadIcon("AppIcon.png"));
3 paul 21
    DLayout = new QVBoxLayout( this );
22
    DLayout->setSpacing( 5 );
23
    DLayout->setMargin( 10 );
24
    Layout4 = new QGridLayout;
25
    Layout4->setSpacing( 6 );
26
    Layout4->setMargin( 5 );
27
    TextLabel1 = new QLabel( this, "TextLabel1" );
224 Franz 28
    TextLabel1->setText( tr( "Delete color:" ) );
3 paul 29
    Layout4->addWidget( TextLabel1, 0, 0 );
30
    DColor = new QLabel( this, "DColor" );
31
    DColor->setText( Fnam );
32
    Layout4->addWidget( DColor, 0, 1 );
33
    TextLabel3 = new QLabel( this, "TextLabel3" );
34
    TextLabel3->setText( tr( "?" ) );
35
    Layout4->addWidget( TextLabel3, 0, 2 );
161 Franz 36
        if (HDoc)
37
        {
147 Franz 38
        TextLabel4 = new QLabel( this, "TextLabel4" );
39
        TextLabel4->setText( tr( "Replace it with:" ) );
40
        Layout4->addWidget( TextLabel4, 1, 0 );
148 Franz 41
        Ersatz = new QComboBox(false, this);
161 Franz 42
                Ersatz->setEditable(false);
43
                CListe::Iterator it;
44
                QPixmap pm = QPixmap(15, 15);
45
                farben.remove(Fnam);
46
                for (it = farben.begin(); it != farben.end(); ++it)
47
                {
48
                        pm.fill(farben[it.key()].getRGBColor());
49
                        Ersatz->insertItem(pm, it.key());
50
                }
147 Franz 51
        Layout4->addWidget( Ersatz, 1, 1 );
148 Franz 52
        EFarbe = Ersatz->text(0);
161 Franz 53
        }
3 paul 54
    DLayout->addLayout( Layout4 );
55
    Layout3 = new QHBoxLayout;
56
    Layout3->setSpacing( 6 );
57
    Layout3->setMargin( 0 );
58
    PushButton2 = new QPushButton( this, "PushButton12" );
59
    PushButton2->setText( tr( "OK" ) );
60
    Layout3->addWidget( PushButton2 );
61
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
62
    Layout3->addItem( spacer );
63
    PushButton3 = new QPushButton( this, "PushButton13" );
64
    PushButton3->setText( tr( "Cancel" ) );
65
    PushButton3->setDefault( TRUE );
66
    Layout3->addWidget( PushButton3 );
67
    DLayout->addLayout( Layout3 );
68
    setMaximumSize(sizeHint());
69
    connect( PushButton2, SIGNAL( clicked() ), this, SLOT( accept() ) );
70
    connect( PushButton3, SIGNAL( clicked() ), this, SLOT( reject() ) );
161 Franz 71
        if (HDoc)
148 Franz 72
        connect( Ersatz, SIGNAL(activated(int)), this, SLOT( ReplaceColor(int) ) );
3 paul 73
}
74
 
75
void DelColor::ReplaceColor(int id)
76
{
148 Franz 77
    EFarbe = Ersatz->text(id);
3 paul 78
}
79