コード例 #1
0
    void onDraw(SkCanvas* canvas) override {
        sk_sp<SkImage> image0(make_image(canvas));

        const ImageFilterFactory factories[] = {
            IFCCast([]{ return SkBlurImageFilter::Make(8, 8, nullptr); }),
            IFCCast([]{ return SkDilateImageFilter::Make(8, 8, nullptr); }),
            IFCCast([]{ return SkErodeImageFilter::Make(8, 8, nullptr); }),
            IFCCast([]{ return SkOffsetImageFilter::Make(8, 8, nullptr); }),
        };

        const SkMatrix matrices[] = {
            SkMatrix::MakeScale(SK_ScalarHalf, SK_ScalarHalf),
            SkMatrix::MakeScale(2, 2),
            SkMatrix::MakeTrans(10, 10)
        };

        const SkScalar spacer = image0->width() * 3.0f / 2;

        canvas->translate(40, 40);
        for (auto&& factory : factories) {
            sk_sp<SkImageFilter> filter(factory());

            canvas->save();
            show_image(canvas, image0.get(), filter);
            for (const auto& matrix : matrices) {
                sk_sp<SkImageFilter> localFilter(filter->makeWithLocalMatrix(matrix));
                canvas->translate(spacer, 0);
                show_image(canvas, image0.get(), std::move(localFilter));
            }
            canvas->restore();
            canvas->translate(0, spacer);
        }
    }
コード例 #2
0
ファイル: main.cpp プロジェクト: ngzHappy/OCVT0
static inline void run(MainWindow * window ) {

    QImage image0("images:000000");

    const float width_image_=image0.width();
    const float height_image_=image0.height();

    auto len_ =maxLength(width_image_,height_image_ );

    const float diff_width_image_=0.0f;
    const float diff_height_image_=len_/2;

    std::vector< cv::Point2f > from_{ {0,4},{4,0},{0,0} };
    std::vector< cv::Point2f > to_{
        {2+diff_width_image_,diff_height_image_+2},
        {2+diff_width_image_,diff_height_image_-2},
        {diff_width_image_,diff_height_image_}
    };

    cv::Mat atmax_ = cv::getAffineTransform(from_,to_);

    auto cvImage0=qImage2CVmat(image0);
    cv::Mat ans( len_,len_,atmax_.type() );
    cv::warpAffine(cvImage0.first,ans,atmax_,{len_,len_});

    window->insertImage( cvMat2QImage(ans).first.copy() )
        ->setWindowTitle(QObject::trUtf8(u8"变换后图像"));
    window->insertImage(image0)
        ->setWindowTitle(QObject::trUtf8(u8"原始图像"));
}
コード例 #3
0
ファイル: main.cpp プロジェクト: ngzHappy/OCVT0
static inline void run(MainWindow * window ) {

    QImage image0("images:000005");

    auto mat=qImage2CVmat(image0);

    cv::Mat ans;
    cv::linearPolar(mat.first,ans,
        cv::Point2f( mat.second.width() ,mat.second.height()/2 ),
        mat.second.width()  ,
        cv::InterpolationFlags::INTER_LINEAR);

    window->insertImage(image0)
        ->setWindowTitle(QObject::trUtf8(u8"原始图像"));

    window->insertImage( cvMat2QImage(ans).first.copy() )
        ->setWindowTitle(QObject::trUtf8(u8"变换后图像"));

}
コード例 #4
0
ファイル: missing.cpp プロジェクト: ivro/scribus
MissingFont::MissingFont( QWidget* parent, QString fon, ScribusDoc* doc ) : QDialog( parent )
{
	QPixmap image0( ( const char** ) image100_data );
	setModal(true);
	setWindowTitle( tr("Missing Font"));
	setWindowIcon(QIcon(loadIcon("AppIcon.png")));
	missingFontLayout = new QHBoxLayout( this );
	missingFontLayout->setMargin(10);
	missingFontLayout->setSpacing(0);
	missingFontGridLayout = new QGridLayout;
	missingFontGridLayout->setSpacing( 10 );
	missingFontGridLayout->setMargin( 0 );
	notInstalledLabel = new QLabel( tr("The Font %1 is not installed.").arg(fon), this );
	missingFontGridLayout->addWidget( notInstalledLabel, 0, 0, 1, 4 );
	pixmapLabel = new QLabel( this );
	pixmapLabel->setPixmap( image0 );
	missingFontGridLayout->addWidget( pixmapLabel, 1, 0 );
	useLabel = new QLabel( tr( "Use" ), this );
	missingFontGridLayout->addWidget( useLabel, 1, 1 );
	replaceFontCombo = new FontCombo(this);
	if (doc != 0)
	{
		setCurrentComboItem(replaceFontCombo, doc->toolSettings.defFont);
		replacementFont = doc->toolSettings.defFont;
	}
	else
	{
		setCurrentComboItem(replaceFontCombo, PrefsManager::instance()->appPrefs.toolSettings.defFont);
		replacementFont = PrefsManager::instance()->appPrefs.toolSettings.defFont;
	}
	missingFontGridLayout->addWidget( replaceFontCombo, 1, 2 );
	insteadLabel = new QLabel( tr( "instead" ), this );
	missingFontGridLayout->addWidget( insteadLabel, 1, 3 );
	okButton = new QPushButton( CommonStrings::tr_OK, this );
	missingFontGridLayout->addWidget( okButton, 2, 2 );
	missingFontLayout->addLayout( missingFontGridLayout );

	// signals and slots connections
	connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
	connect( replaceFontCombo, SIGNAL( activated(const QString&) ), this, SLOT( newFont(const QString&) ) );
}
コード例 #5
0
void WindowTexture::generateWindowTexture()  //randomly generate windows texture for buildings
{
    CBitmap image0("building/texture/1.bmp");    

    glBindTexture(GL_TEXTURE_2D, m_nTextureId[0]);    //bind this texture to be active
    glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,image0.GetWidth(),image0.GetHeight(),0,GL_RGBA,GL_UNSIGNED_BYTE,image0.GetBits()); //load data into texture
        
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); //specify minificaton filtering
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); //specify magnificaton filtering

    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);    //specify texture coordinate treatment
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);    //specify texture coordinate treatment

    glEnable(GL_TEXTURE_2D);

    CBitmap image1("building/texture/2.bmp");    

    glBindTexture(GL_TEXTURE_2D, m_nTextureId[1]);    //bind this texture to be active
    glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,image1.GetWidth(),image1.GetHeight(),0,GL_RGBA,GL_UNSIGNED_BYTE,image1.GetBits()); //load data into texture
        
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); //specify minificaton filtering
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); //specify magnificaton filtering

    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);    //specify texture coordinate treatment
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);    //specify texture coordinate treatment

    glEnable(GL_TEXTURE_2D);

    CBitmap image2("building/texture/3.bmp");    

    glBindTexture(GL_TEXTURE_2D, m_nTextureId[2]);    //bind this texture to be active
    glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,image2.GetWidth(),image2.GetHeight(),0,GL_RGBA,GL_UNSIGNED_BYTE,image2.GetBits()); //load data into texture
        
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); //specify minificaton filtering
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); //specify magnificaton filtering

    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);    //specify texture coordinate treatment
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);    //specify texture coordinate treatment

    glEnable(GL_TEXTURE_2D);

    CBitmap image3("building/texture/4.bmp");    

    glBindTexture(GL_TEXTURE_2D, m_nTextureId[3]);    //bind this texture to be active
    glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,image3.GetWidth(),image3.GetHeight(),0,GL_RGBA,GL_UNSIGNED_BYTE,image3.GetBits()); //load data into texture
        
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); //specify minificaton filtering
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); //specify magnificaton filtering

    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);    //specify texture coordinate treatment
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);    //specify texture coordinate treatment

    glEnable(GL_TEXTURE_2D);

    CBitmap image4("building/texture/5.bmp");    

    glBindTexture(GL_TEXTURE_2D, m_nTextureId[4]);    //bind this texture to be active
    glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,image4.GetWidth(),image4.GetHeight(),0,GL_RGBA,GL_UNSIGNED_BYTE,image4.GetBits()); //load data into texture
        
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); //specify minificaton filtering
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); //specify magnificaton filtering

    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);    //specify texture coordinate treatment
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);    //specify texture coordinate treatment

    glEnable(GL_TEXTURE_2D);

    CBitmap image100("building/texture/mailbox_asdf.bmp");

    glBindTexture(GL_TEXTURE_2D, m_nTextureId[numTex]);    //bind this texture to be active
    glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,image100.GetWidth(),image100.GetHeight(),0,GL_RGBA,GL_UNSIGNED_BYTE,image100.GetBits()); //load data into texture
        
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); //specify minificaton filtering
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); //specify magnificaton filtering

    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);    //specify texture coordinate treatment
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);    //specify texture coordinate treatment

    glEnable(GL_TEXTURE_2D);

    textureBounded = true;
}
コード例 #6
0
ファイル: mainwindow.cpp プロジェクト: lpxxn/MyQtMVDemo
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    //:/image/cat.jpg

    ui->setupUi(this);

    QString imagepath = ":/new/prefix1/folder.png";
    QPixmap image0(imagepath);
    QPixmap image = image0.scaled(QSize(100,100));
    qDebug() << image.size();
    QIcon myIcon =  QIcon(image);



    QSplitter *page= new QSplitter();

    //customer
    QList<QVariant> title;
    title<<"one"<<"two";

    QList<ItemObject*> values;
    GetData(values);
    data =new ItemModel(Q_NULLPTR);
    data->setHeaderTitle(title);
    data->BindingData(values);
    selections = new QItemSelectionModel(data);

    table = new QTableView;
    table->setModel(data);
    table->setSelectionModel(selections);
    table->setItemDelegate(new MyTableViewStyleDelegate());
    table->horizontalHeader()->setSectionsMovable(true);
    table->setSelectionBehavior(QAbstractItemView::SelectRows);
    table->verticalHeader()->setSectionsMovable(true);
    table->horizontalHeader()->setStretchLastSection(true);
    // Set StaticContents to enable minimal repaints on resizes.
    table->viewport()->setAttribute(Qt::WA_StaticContents);
    table->setContextMenuPolicy(Qt::CustomContextMenu);
    connect(table, SIGNAL(customContextMenuRequested(QPoint)),SLOT(customMenuRequested(QPoint)));

    //table->setStyleSheet("QTableView{background-color: rgb(250, 250, 115);" "alternate-background-color: rgb(141, 163, 215);}");
    //table->setItemDelegateForColumn(0,new MyLineItemDelegate());
    table->setItemDelegateForColumn(0,new CheckBoxDelegate(table));

    table->setItemDelegateForColumn(1,new ReadOnlyDelegate());
    table->setSelectionBehavior(QAbstractItemView::SelectRows);
    table->setEditTriggers(QAbstractItemView::NoEditTriggers);
    table->setIconSize(QSize(1,1));
    //header checkbox
    TableCheckedHeader *m_customHeader = NULL;
    m_customHeader = new TableCheckedHeader(Qt::Horizontal, this);
    table->setHorizontalHeader(m_customHeader);
    connect(m_customHeader, SIGNAL(toggled(bool)), this, SLOT(_headertoggled(bool)));
    page->addWidget(table);


    QTreeView *tree = new QTreeView;
    tree->setModel(data);
    tree->setSelectionModel(selections);

    tree->setUniformRowHeights(true);
    tree->header()->setStretchLastSection(false);
    tree->viewport()->setAttribute(Qt::WA_StaticContents);
    // Disable the focus rect to get minimal repaints when scrolling on Mac.
    tree->setAttribute(Qt::WA_MacShowFocusRect, false);
    page->addWidget(tree);

    list = new QListView;
    //QObject::connect(list,SIGNAL(doubleClicked(QModelIndex),this,SLOT(doubleClicked(QModelIndex))));
    list->setModel(data);
    list->setIconSize(QSize(80,80));

    list->setItemDelegate(new MyListItemDelegege());
    list->setSelectionModel(selections);
    list->setSpacing(5);
    list->setViewMode(QListView::IconMode);
    list->setDragEnabled(false);
    list->setSelectionRectVisible(false);
    //list->setSelectionMode(QAbstractItemView::ExtendedSelection);
    list->setAlternatingRowColors(false);
    list->setResizeMode(QListWidget::Adjust);
    //list->viewport()->setAttribute(Qt::WA_StaticContents);

    list->setAttribute(Qt::WA_MacShowFocusRect, true);
    //list->setItemDelegateForColumn(1,new MyLineItemDelegate());

    list->setEditTriggers(QAbstractItemView::NoEditTriggers);
    //menu
    list->setContextMenuPolicy(Qt::CustomContextMenu);
    connect(list,SIGNAL(customContextMenuRequested(QPoint)),SLOT(CustomListMenuRequested(QPoint)));
    page->addWidget(list);




    this->setCentralWidget(page);
}
コード例 #7
0
ファイル: smiliespopup.cpp プロジェクト: icefox/kinkatta
/* 
 *  Constructs a Smilies which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 */
Smilies::Smilies( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    QPixmap image0( SmallIcon("face_smile") );
    QPixmap image1( SmallIcon("face_angel") );
    QPixmap image2( SmallIcon("face_embarrassed") );
    QPixmap image3( SmallIcon("face_yell") );
    QPixmap image4( SmallIcon("face_wink") );
    QPixmap image5( SmallIcon("face_glasses") );
    QPixmap image6( SmallIcon("face_moneymouth") );
    QPixmap image7( SmallIcon("face_crossedlips") );
    QPixmap image8( SmallIcon("face_sad") );
    QPixmap image9( SmallIcon("face_scream") );
    QPixmap image10( SmallIcon("face_cry") );
    QPixmap image11( SmallIcon("face_burp") );
    QPixmap image12( SmallIcon("face_kiss") );
    QPixmap image13( SmallIcon("face_think") );
    QPixmap image14( SmallIcon("face_tongue") );
    QPixmap image15( SmallIcon("face_luke") );
    QPixmap image16( SmallIcon("face_bigsmile") );
    QPixmap image17( SmallIcon("face_oneeye") );
    if ( !name )
	setName( "Smilies" );
    resize( 124, 139 ); 
    setCaption( tr( "kaim-smiles" ) );
    SmiliesLayout = new QGridLayout( this ); 
    SmiliesLayout->setSpacing( 0 );
    SmiliesLayout->setMargin( 0 );

    smile = new QToolButton( this, "smile" );
    smile->setText( tr( " " ) );
    smile->setPixmap( image0 );

    SmiliesLayout->addWidget( smile, 0, 0 );

    angel = new QToolButton( this, "angel" );
    angel->setText( tr( " " ) );
    angel->setPixmap( image1 );

    SmiliesLayout->addWidget( angel, 2, 3 );

    embarrassed = new QToolButton( this, "embarrassed" );
    embarrassed->setText( tr( " " ) );
    embarrassed->setPixmap( image2 );

    SmiliesLayout->addWidget( embarrassed, 2, 2 );

    yell = new QToolButton( this, "yell" );
    yell->setText( tr( " " ) );
    yell->setPixmap( image3 );

    SmiliesLayout->addWidget( yell, 1, 2 );

    wink = new QToolButton( this, "wink" );
    wink->setText( tr( " " ) );
    wink->setPixmap( image4 );

    SmiliesLayout->addWidget( wink, 0, 3 );

    glasses = new QToolButton( this, "glasses" );
    glasses->setText( tr( " " ) );
    glasses->setPixmap( image5 );

    SmiliesLayout->addWidget( glasses, 2, 0 );

    moneymouth = new QToolButton( this, "moneymouth" );
    moneymouth->setText( tr( " " ) );
    moneymouth->setPixmap( image6 );

    SmiliesLayout->addWidget( moneymouth, 3, 3 );

    crossedlips = new QToolButton( this, "crossedlips" );
    crossedlips->setText( tr( " " ) );
    crossedlips->setPixmap( image7 );

    SmiliesLayout->addWidget( crossedlips, 3, 2 );

    sad = new QToolButton( this, "sad" );
    sad->setText( tr( " " ) );
    sad->setPixmap( image8 );

    SmiliesLayout->addWidget( sad, 0, 2 );

    scream = new QToolButton( this, "scream" );
    scream->setText( tr( " " ) );
    scream->setPixmap( image9 );

    SmiliesLayout->addWidget( scream, 1, 1 );

    cry = new QToolButton( this, "cry" );
    cry->setText( tr( " " ) );
    cry->setPixmap( image10 );

    SmiliesLayout->addWidget( cry, 3, 1 );

    burp = new QToolButton( this, "burp" );
    burp->setText( tr( " " ) );
    burp->setPixmap( image11 );

    SmiliesLayout->addWidget( burp, 2, 1 );

    kiss = new QToolButton( this, "kiss" );
    kiss->setText( tr( " " ) );
    kiss->setPixmap( image12 );

    SmiliesLayout->addWidget( kiss, 1, 3 );

    think = new QToolButton( this, "think" );
    think->setText( tr( " " ) );
    think->setPixmap( image13 );

    SmiliesLayout->addWidget( think, 3, 0 );

    tongue = new QToolButton( this, "tongue" );
    tongue->setText( tr( " " ) );
    tongue->setPixmap( image14 );

    SmiliesLayout->addWidget( tongue, 1, 0 );

    luke = new QToolButton( this, "luke" );
    luke->setText( tr( " " ) );
    luke->setPixmap( image15 );

    SmiliesLayout->addWidget( luke, 4, 2 );

    bigsmile = new QToolButton( this, "bigsmile" );
    bigsmile->setText( tr( " " ) );
    bigsmile->setPixmap( image16 );

    SmiliesLayout->addWidget( bigsmile, 0, 1 );

    oneeye = new QToolButton( this, "oneeye" );
    oneeye->setText( tr( " " ) );
    oneeye->setPixmap( image17 );

    SmiliesLayout->addWidget( oneeye, 4, 1 );

		QObject::connect( smile, SIGNAL(clicked()), SLOT(smileClicked()) );
		QObject::connect( angel, SIGNAL(clicked()), SLOT(angelClicked()) );
		QObject::connect( embarrassed, SIGNAL(clicked()), SLOT(embarrassedClicked()) );
		QObject::connect( yell, SIGNAL(clicked()), SLOT(yellClicked()) );
		QObject::connect( wink, SIGNAL(clicked()), SLOT(winkClicked()) );
		QObject::connect( glasses, SIGNAL(clicked()), SLOT(glassesClicked()) );
		QObject::connect( moneymouth, SIGNAL(clicked()), SLOT(moneymouthClicked()) );
		QObject::connect( crossedlips, SIGNAL(clicked()), SLOT(crossedlipsClicked()) );
		QObject::connect( sad, SIGNAL(clicked()), SLOT(sadClicked()) );
		QObject::connect( scream, SIGNAL(clicked()), SLOT(screamClicked()) );
		QObject::connect( cry, SIGNAL(clicked()), SLOT(cryClicked()) );
		QObject::connect( burp, SIGNAL(clicked()), SLOT(burpClicked()) );
		QObject::connect( kiss, SIGNAL(clicked()), SLOT(kissClicked()) );
		QObject::connect( think, SIGNAL(clicked()), SLOT(thinkClicked()) );
		QObject::connect( tongue, SIGNAL(clicked()), SLOT(tongueClicked()) );
		QObject::connect( luke, SIGNAL(clicked()), SLOT(lukeClicked()) );
		QObject::connect( bigsmile, SIGNAL(clicked()), SLOT(bigsmileClicked()) );
		QObject::connect( oneeye, SIGNAL(clicked()), SLOT(oneeyeClicked()) );

}
コード例 #8
0
ファイル: chintz_base.cpp プロジェクト: SiccarPoint/child
/* 
 *  Constructs a Chintz_base 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.
 */
Chintz_base::Chintz_base( QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "Chintz_base" );
    resize( 790, 620 ); 
    QFont f( font() );
    f.setFamily( "adobe-helvetica" );
    setFont( f ); 
    setCaption( tr( "Chintz v0.2"  ) );
    QToolTip::add(  this, tr( "" ) );

    altered_state=false;

    //Make the menu bar at the top of the widget

    menu=new QMenuBar(this);
    menu->setSeparator(QMenuBar::InWindowsStyle);
    QPopupMenu *file=new QPopupMenu(this);
    file->insertItem("&New Control File",this,SLOT(Clear()),CTRL+Key_N);
    file->insertItem("&Open Control File",this,SLOT(OpenChildControlFile()),CTRL+Key_O);
    file->insertItem("&Save Control File",this,SLOT(WriteTheOutput()),CTRL+Key_S);
    file->insertItem("&Save Control File As...",this,SLOT(SaveAs()));
    file->insertItem("&Quit",this,SLOT(Close()),CTRL+Key_Q);
    QPopupMenu *help=new QPopupMenu(this);
    menu->insertSeparator(0);
    help->insertItem("&About",this,SLOT(About()));
    help->insertItem("&Contents",this,SLOT(Help()));
    menu->insertItem("&File",file,4); 
    menu->insertItem("&Help",help,7);
 
    QPixmap image0( ( const char** ) image0_data );
    QPixmap image1( ( const char** ) image1_data );
    QPixmap image2( ( const char** ) image2_data );

    Framebutt = new QFrame( this, "Framebutt" );
    Framebutt->setGeometry( QRect( 10, 30, 750, 40 ) ); 
    Framebutt->setFrameShape( QFrame::Panel );
    Framebutt->setFrameShadow( QFrame::Raised );

    Newby = new QPushButton( Framebutt, "Newby" );
    Newby->setGeometry( QRect( 10, 10, 24, 22 ) ); 
    Newby->setText( tr( ""  ) );
    Newby->setPixmap( image0 );
    QToolTip::add(  Newby, tr( "New Control File" ) );

    Save = new QPushButton( Framebutt, "Save" );
    Save->setGeometry( QRect( 70, 10, 22, 22 ) ); 
    Save->setText( tr( ""  ) );
    Save->setPixmap( image1 );
    QToolTip::add(  Save, tr( "Save Control File" ) );

    OPeny = new QPushButton( Framebutt, "OPeny" );
    OPeny->setGeometry( QRect( 40, 10, 24, 22 ) ); 
    OPeny->setText( tr( ""  ) );
    OPeny->setPixmap( image2 );
    QToolTip::add(  OPeny, tr( "Open Control File" ) );

    connect( Newby, SIGNAL( clicked() ), this, SLOT( Clear() ));
    connect( Save, SIGNAL( clicked() ), this, SLOT( WriteTheOutput() ) );
    connect( OPeny, SIGNAL( clicked() ), this, SLOT( OpenChildControlFile() ));

    CONTROLFILENAME="";
    CONTROLFILENAMELine=new QLineEdit(Framebutt,"CNTRL");
    CONTROLFILENAMELine->setGeometry( QRect( 490, 10, 224, 22 ) ); 
    CONTROLFILENAMELine->setText( tr( ""  ) );
    connect(CONTROLFILENAMELine, SIGNAL( textChanged(const QString&) ), this, SLOT( altered() ) );
    connect(CONTROLFILENAMELine, SIGNAL( returnPressed() ), this, SLOT( control() ) );

    QLabel* Cntrl=new QLabel(Framebutt,"Cntrlabel");
    Cntrl->setGeometry( QRect( 380, 10, 100, 22 ) );
    Cntrl->setText(tr("Child Control File"));
    QFont Cf=Cntrl->font();
    Cf.setBold(true);
    Cntrl->setFont(Cf);

    Br = new QToolButton( Framebutt, "Br" );
    Br->setGeometry( QRect( 714, 10, 20, 23 ) ); 
    Br->setText( tr( "..."  ) );
    QToolTip::add(  Br, tr( "browse" ) );
    connect(Br, SIGNAL( clicked() ), this, SLOT( ChildFileSelect() ) );

    QPalette pal;
    QColorGroup cg;
    cg.setColor( QColorGroup::Foreground, QColor( 200, 110, 250) );
    cg.setColor( QColorGroup::Background, QColor( 192, 192, 192) );
    pal.setActive(cg);
    pal.setInactive(cg);
    Cntrl->setPalette(pal);

    StatusFrame = new QFrame( this, "StatusFrame" );
    StatusFrame->setGeometry( QRect( 10, 590, 751, 21 ) ); 
    StatusFrame->setFrameShape( QFrame::StyledPanel );
    StatusFrame->setFrameShadow( QFrame::Raised );

    Status = new QLabel( StatusFrame, "Status" );
    Status->setGeometry( QRect( 10, 1, 101, 16 ) ); 
    cg.setColor( QColorGroup::Foreground, QColor( 255, 0, 0) );
    cg.setColor( QColorGroup::Background, QColor( 192, 192, 192) );
    pal.setActive(cg);
    pal.setInactive(cg);
    Status->setPalette(pal);

#include "generated_chintz_base_constructor_insert"

    QFileInfo q(".ChintzDefaults");
    if (q.exists()){
      ReadChildControlFile(".ChintzDefaults");
      altered_state=false;
      Status->setText("");
    }
}