#include "simapi.h"
/****************************************************************************
** Form implementation generated from reading ui file './autoreplybase.ui'
**
** Created: вт мар 30 16:43:58 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 "autoreplybase.h"

#include <qvariant.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

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


/* 
 *  Constructs a AutoReplyBase as 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.
 */
AutoReplyBase::AutoReplyBase( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl ),
      image0( (const char **) img0_autoreplybase )
{
    if ( !name )
	setName( "AutoReply" );
    setProperty( "sizeGripEnabled", QVariant( TRUE, 0 ) );
    AutoReplyLayout = new QVBoxLayout( this, 11, 6, "AutoReplyLayout"); 

    edtAutoResponse = new MultiLineEdit( this, "edtAutoResponse" );
    AutoReplyLayout->addWidget( edtAutoResponse );

    chkNoShow = new QCheckBox( this, "chkNoShow" );
    AutoReplyLayout->addWidget( chkNoShow );

    Layout2 = new QHBoxLayout( 0, 0, 6, "Layout2"); 

    btnHelp = new QPushButton( this, "btnHelp" );
    btnHelp->setProperty( "accel", QKeySequence( 4144 ) );
    Layout2->addWidget( btnHelp );

    lblTime = new QLabel( this, "lblTime" );
    lblTime->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, 0, 0, lblTime->sizePolicy().hasHeightForWidth() ) );
    Layout2->addWidget( lblTime );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout2->addItem( spacer );

    buttonOk = new QPushButton( this, "buttonOk" );
    buttonOk->setProperty( "autoDefault", QVariant( TRUE, 0 ) );
    buttonOk->setProperty( "default", QVariant( TRUE, 0 ) );
    Layout2->addWidget( buttonOk );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setProperty( "autoDefault", QVariant( TRUE, 0 ) );
    Layout2->addWidget( buttonCancel );
    AutoReplyLayout->addLayout( Layout2 );
    languageChange();
    resize( QSize(351, 247).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AutoReplyBase::languageChange()
{
    setProperty( "caption", i18n( "MyDialog" ) );
    chkNoShow->setProperty( "text", i18n( "Don't show this dialog" ) );
    btnHelp->setProperty( "text", i18n( "&Help" ) );
    lblTime->setProperty( "text", QString::null );
    buttonOk->setProperty( "text", i18n( "&OK" ) );
    buttonCancel->setProperty( "text", i18n( "&Cancel" ) );
}

#include "autoreplybase.moc"
