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

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

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


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

    chkStatus = new QCheckBox( this, "chkStatus" );
    MessageCfgLayout->addWidget( chkStatus );

    chkOnline = new QCheckBox( this, "chkOnline" );
    MessageCfgLayout->addWidget( chkOnline );

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

    btnNoOpen = new QRadioButton( grpWindow, "btnNoOpen" );
    grpWindowLayout->addWidget( btnNoOpen );

    btnMinimize = new QRadioButton( grpWindow, "btnMinimize" );
    grpWindowLayout->addWidget( btnMinimize );

    btnRaise = new QRadioButton( grpWindow, "btnRaise" );
    grpWindowLayout->addWidget( btnRaise );
    MessageCfgLayout->addWidget( grpWindow );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    MessageCfgLayout->addItem( spacer );
    languageChange();
    resize( QSize(387, 238).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( chkStatus, chkOnline );
    setTabOrder( chkOnline, btnNoOpen );
    setTabOrder( btnNoOpen, btnMinimize );
    setTabOrder( btnMinimize, btnRaise );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void MessageConfigBase::languageChange()
{
    setProperty( "caption", i18n( "Form1" ) );
    chkStatus->setProperty( "text", i18n( "Save &status changes to history" ) );
    chkOnline->setProperty( "text", i18n( "Open window if user go online" ) );
    grpWindow->setProperty( "title", i18n( "New message" ) );
    btnNoOpen->setProperty( "text", i18n( "&No open" ) );
    btnMinimize->setProperty( "text", i18n( "Open and &minimize" ) );
    btnRaise->setProperty( "text", i18n( "Open and &raise" ) );
}

#include "msgcfgbase.moc"
