#include "simapi.h"
/****************************************************************************
** Form implementation generated from reading ui file './filecfgbase.ui'
**
** Created: вт мар 30 16:44:23 2004
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.1.2   edited Dec 19 11:45 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "filecfgbase.h"

#include <qvariant.h>
#include <qwidget.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qbuttongroup.h>
#include <qradiobutton.h>
#include <qcheckbox.h>
#include <qmultilineedit.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

#include "editfile.h"
static const char* const img0_filecfgbase[] = { 
"22 22 2 1",
". c None",
"# c #a4c610",
"........######........",
".....###########......",
"....##############....",
"...################...",
"..######......######..",
"..#####........#####..",
".#####.......#..#####.",
".####.......###..####.",
"####.......#####..####",
"####......#####...####",
"####....#######...####",
"####....######....####",
"####...########...####",
".####.##########..####",
".####..####.#########.",
".#####..##...########.",
"..#####.......#######.",
"..######......######..",
"...###################",
"....##################",
"......###########.###.",
"........######.....#.."};

static const char* const img1_filecfgbase[] = { 
"22 22 2 1",
". c None",
"# c #a1c410",
"........######........",
".....###########......",
"....##############....",
"...################...",
"..######......######..",
"..#####........#####..",
".#####.......#..#####.",
".####.......###..####.",
"####.......#####..####",
"####......#####...####",
"####....#######...####",
"####....######....####",
"####...########...####",
".####.##########..####",
".####..####.#########.",
".#####..##...########.",
"..#####.......#######.",
"..######......######..",
"...###################",
"....##################",
"......###########.###.",
"........######.....#.."};


/* 
 *  Constructs a FileConfigBase as a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f'.
 */
FileConfigBase::FileConfigBase( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl ),
      image0( (const char **) img0_filecfgbase ),
      image1( (const char **) img1_filecfgbase )
{
    if ( !name )
	setName( "FileCfg" );
    FileCfgLayout = new QVBoxLayout( this, 11, 6, "FileCfgLayout"); 

    lblPath = new QLabel( this, "lblPath" );
    FileCfgLayout->addWidget( lblPath );

    edtPath = new EditFile( this, "edtPath" );
    FileCfgLayout->addWidget( edtPath );

    grpAccept = new QButtonGroup( this, "grpAccept" );
    grpAccept->setColumnLayout(0, Qt::Vertical );
    grpAccept->layout()->setSpacing( 6 );
    grpAccept->layout()->setMargin( 11 );
    grpAcceptLayout = new QVBoxLayout( grpAccept->layout() );
    grpAcceptLayout->setAlignment( Qt::AlignTop );

    btnDialog = new QRadioButton( grpAccept, "btnDialog" );
    grpAcceptLayout->addWidget( btnDialog );

    btnAccept = new QRadioButton( grpAccept, "btnAccept" );
    grpAcceptLayout->addWidget( btnAccept );

    chkOverwrite = new QCheckBox( grpAccept, "chkOverwrite" );
    grpAccept->insert( chkOverwrite, 100 );
    grpAcceptLayout->addWidget( chkOverwrite );

    btnDecline = new QRadioButton( grpAccept, "btnDecline" );
    grpAccept->insert( btnDecline, 2 );
    grpAcceptLayout->addWidget( btnDecline );

    edtDecline = new QMultiLineEdit( grpAccept, "edtDecline" );
    grpAcceptLayout->addWidget( edtDecline );
    FileCfgLayout->addWidget( grpAccept );
    languageChange();
    resize( QSize(378, 292).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

/*
 *  Destroys the object and frees any allocated resources
 */
FileConfigBase::~FileConfigBase()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FileConfigBase::languageChange()
{
    setProperty( "caption", i18n( "Form1" ) );
    lblPath->setProperty( "text", i18n( "Path for incoming files:" ) );
    grpAccept->setProperty( "title", i18n( "Accept mode" ) );
    btnDialog->setProperty( "text", i18n( "Show response" ) );
    btnAccept->setProperty( "text", i18n( "Auto accept" ) );
    chkOverwrite->setProperty( "text", i18n( "Overwrite files" ) );
    btnDecline->setProperty( "text", i18n( "Auto decline" ) );
}

#include "filecfgbase.moc"
