#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './idiomconfigbase.ui'
**
** Created: 木  7月 19 22:29:45 2007
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.5   edited Aug 31 12:13 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "idiomconfigbase.h"

#include <qvariant.h>
#include <kpushbutton.h>
#include <klistbox.h>
#include <qlabel.h>
#include <ktextedit.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

#include "kpushbutton.h"
#include "klistbox.h"
#include "ktextedit.h"
static const unsigned char img0_idiomconfigbase[] = { 
    0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
    0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20,
    0x08, 0x06, 0x00, 0x00, 0x00, 0x73, 0x7a, 0x7a, 0xf4, 0x00, 0x00, 0x01,
    0x47, 0x49, 0x44, 0x41, 0x54, 0x58, 0x85, 0xc5, 0x96, 0xc1, 0x72, 0xc3,
    0x20, 0x0c, 0x44, 0x77, 0x33, 0xfe, 0xec, 0x52, 0x8f, 0x0d, 0xff, 0xad,
    0x1e, 0x5c, 0xd3, 0xc4, 0x80, 0x24, 0x70, 0x68, 0xf6, 0x94, 0x19, 0x84,
    0xf6, 0x49, 0x28, 0x18, 0x0a, 0x3e, 0xab, 0x25, 0xff, 0x12, 0xd4, 0x59,
    0x08, 0x12, 0x32, 0x85, 0x53, 0x40, 0x3e, 0x54, 0xf3, 0xdf, 0x35, 0x01,
    0x67, 0xf8, 0x03, 0x00, 0x1e, 0xae, 0x28, 0x01, 0x66, 0x41, 0x2c, 0x76,
    0xc8, 0x7d, 0x89, 0x10, 0x27, 0x3f, 0x2f, 0xcd, 0xf6, 0x75, 0x00, 0x80,
    0x72, 0x48, 0x10, 0x21, 0x04, 0xac, 0x76, 0xe9, 0xd9, 0xfc, 0x48, 0xf3,
    0x1a, 0xe3, 0x07, 0x50, 0xcc, 0x35, 0x03, 0x4b, 0x7e, 0x80, 0x81, 0x11,
    0xb8, 0xc2, 0xdd, 0x03, 0x98, 0x24, 0x1f, 0x00, 0xcb, 0xe1, 0xb1, 0xd4,
    0xaa, 0xbe, 0x3a, 0x84, 0xa4, 0x92, 0x7c, 0xf4, 0xdf, 0xe7, 0xdc, 0x47,
    0x39, 0xa8, 0x04, 0x28, 0x07, 0xc8, 0x5b, 0xb5, 0xe7, 0xac, 0x6b, 0xf9,
    0x04, 0xe4, 0xa2, 0x05, 0x78, 0x45, 0x8a, 0x39, 0xfd, 0xad, 0xdc, 0x1f,
    0x1f, 0xc2, 0xdb, 0x37, 0xa1, 0x48, 0xbe, 0xe2, 0x9a, 0xd2, 0x3a, 0x3b,
    0x04, 0x90, 0x4d, 0xff, 0x1c, 0x86, 0xcc, 0xbb, 0x01, 0x3c, 0xd5, 0xf6,
    0x98, 0xbb, 0x01, 0x7a, 0x8d, 0xf3, 0x3e, 0xd0, 0x84, 0x98, 0x7a, 0x15,
    0x7b, 0xa4, 0x76, 0x60, 0x64, 0xc0, 0xe6, 0x7d, 0x8c, 0x1c, 0xe6, 0x23,
    0x6a, 0x02, 0x58, 0xd5, 0xbb, 0x6f, 0x49, 0xa3, 0x23, 0x0b, 0x00, 0xc4,
    0x2d, 0xb9, 0x92, 0x9d, 0x4a, 0x5b, 0x44, 0x44, 0x63, 0xcf, 0x37, 0x0a,
    0xe8, 0x13, 0x22, 0x6d, 0xf1, 0x75, 0x61, 0xb5, 0x8e, 0x60, 0xde, 0x5b,
    0x34, 0xab, 0x7b, 0x06, 0x8a, 0x2a, 0xae, 0xeb, 0x7b, 0x54, 0x9f, 0x6f,
    0xb7, 0x01, 0x3c, 0x4a, 0x7b, 0x2c, 0x40, 0x5b, 0xe0, 0x4d, 0x80, 0xb4,
    0x97, 0x1b, 0xac, 0xea, 0x6b, 0xf1, 0xc4, 0x71, 0x92, 0x61, 0x0d, 0x08,
    0x6b, 0x28, 0x62, 0x28, 0x47, 0x60, 0xb3, 0x69, 0xb5, 0x4d, 0x00, 0x10,
    0x3b, 0x60, 0x6a, 0x39, 0xe2, 0x16, 0xf1, 0xb5, 0x06, 0x9a, 0x00, 0x1a,
    0x44, 0x0f, 0x4c, 0x2d, 0x87, 0x9c, 0x8f, 0x31, 0x0b, 0xc0, 0x03, 0x31,
    0x22, 0x01, 0xe8, 0xfe, 0x1a, 0x3e, 0x57, 0xf9, 0x4e, 0x18, 0xed, 0x39,
    0xfa, 0x2f, 0xfa, 0x01, 0x0a, 0xe4, 0x7b, 0x1d, 0x5c, 0x06, 0xbc, 0xac,
    0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};


/*
 *  Constructs a IdiomConfigDialogBase 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.
 */
IdiomConfigDialogBase::IdiomConfigDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    QImage img;
    img.loadFromData( img0_idiomconfigbase, sizeof( img0_idiomconfigbase ), "PNG" );
    image0 = img;
    if ( !name )
	setName( "IdiomConfigDialogBase" );
    setMinimumSize( QSize( 640, 440 ) );
    setMaximumSize( QSize( 640, 440 ) );
    setBaseSize( QSize( 640, 440 ) );
    setIcon( image0 );
    setModal( TRUE );

    m_CancelButton = new KPushButton( this, "m_CancelButton" );
    m_CancelButton->setGeometry( QRect( 530, 400, 100, 28 ) );

    m_IdiomListBox = new KListBox( this, "m_IdiomListBox" );
    m_IdiomListBox->setGeometry( QRect( 360, 50, 270, 340 ) );

    m_AddIdiomButton = new KPushButton( this, "m_AddIdiomButton" );
    m_AddIdiomButton->setGeometry( QRect( 280, 150, 69, 28 ) );

    m_OKButton = new KPushButton( this, "m_OKButton" );
    m_OKButton->setGeometry( QRect( 420, 400, 100, 28 ) );
    m_OKButton->setDefault( TRUE );

    m_DeleteIdiomButton = new KPushButton( this, "m_DeleteIdiomButton" );
    m_DeleteIdiomButton->setGeometry( QRect( 280, 200, 69, 28 ) );

    textLabel2 = new QLabel( this, "textLabel2" );
    textLabel2->setGeometry( QRect( 10, 20, 260, 20 ) );

    textLabel1 = new QLabel( this, "textLabel1" );
    textLabel1->setGeometry( QRect( 360, 20, 270, 20 ) );

    m_IdiomTextEdit = new KTextEdit( this, "m_IdiomTextEdit" );
    m_IdiomTextEdit->setGeometry( QRect( 10, 50, 260, 340 ) );
    QFont m_IdiomTextEdit_font(  m_IdiomTextEdit->font() );
    m_IdiomTextEdit->setFont( m_IdiomTextEdit_font ); 
    m_IdiomTextEdit->setVScrollBarMode( KTextEdit::AlwaysOn );
    m_IdiomTextEdit->setHScrollBarMode( KTextEdit::AlwaysOn );
    m_IdiomTextEdit->setWordWrap( KTextEdit::NoWrap );
    languageChange();
    resize( QSize(640, 440).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_AddIdiomButton, SIGNAL( clicked() ), this, SLOT( slotAddIdiomClicked() ) );
    connect( m_CancelButton, SIGNAL( clicked() ), this, SLOT( slotCancelClicked() ) );
    connect( m_DeleteIdiomButton, SIGNAL( clicked() ), this, SLOT( slotDeleteIdiomClicked() ) );
    connect( m_OKButton, SIGNAL( clicked() ), this, SLOT( slotOKClicked() ) );

    // tab order
    setTabOrder( m_IdiomListBox, m_IdiomTextEdit );
    setTabOrder( m_IdiomTextEdit, m_OKButton );
    setTabOrder( m_OKButton, m_CancelButton );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void IdiomConfigDialogBase::languageChange()
{
    setCaption( tr2i18n( "KIpMessenger - Idiom Setting" ) );
    m_CancelButton->setText( tr2i18n( "C&ancel" ) );
    m_CancelButton->setAccel( QKeySequence( tr2i18n( "Alt+A" ) ) );
    m_AddIdiomButton->setText( tr2i18n( ">>" ) );
    m_OKButton->setText( tr2i18n( "&OK" ) );
    m_OKButton->setAccel( QKeySequence( tr2i18n( "Alt+O" ) ) );
    m_DeleteIdiomButton->setText( tr2i18n( "<<" ) );
    textLabel2->setText( tr2i18n( "Additional Idiom text" ) );
    textLabel1->setText( tr2i18n( "Active Idiom List" ) );
}

void IdiomConfigDialogBase::slotAddIdiomClicked()
{
    qWarning( "IdiomConfigDialogBase::slotAddIdiomClicked(): Not implemented yet" );
}

void IdiomConfigDialogBase::slotDeleteIdiomClicked()
{
    qWarning( "IdiomConfigDialogBase::slotDeleteIdiomClicked(): Not implemented yet" );
}

void IdiomConfigDialogBase::slotOKClicked()
{
    qWarning( "IdiomConfigDialogBase::slotOKClicked(): Not implemented yet" );
}

void IdiomConfigDialogBase::slotCancelClicked()
{
    qWarning( "IdiomConfigDialogBase::slotCancelClicked(): Not implemented yet" );
}

#include "idiomconfigbase.moc"
