#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './priorityconfigbase.ui'
**
** Created: 木  7月 19 22:29:43 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 "priorityconfigbase.h"

#include <qvariant.h>
#include <kpushbutton.h>
#include <qcheckbox.h>
#include <qgroupbox.h>
#include <klineedit.h>
#include <klistbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "kpushbutton.h"
#include "klineedit.h"
#include "klistbox.h"

/*
 *  Constructs a PriorityConfigFormBase 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.
 */
PriorityConfigFormBase::PriorityConfigFormBase( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "PriorityConfigFormBase" );
    setMinimumSize( QSize( 580, 260 ) );
    setMaximumSize( QSize( 580, 260 ) );
    setBaseSize( QSize( 580, 260 ) );
    setModal( TRUE );

    m_OkButton = new KPushButton( this, "m_OkButton" );
    m_OkButton->setGeometry( QRect( 350, 210, 100, 35 ) );

    m_CancelButton = new KPushButton( this, "m_CancelButton" );
    m_CancelButton->setGeometry( QRect( 460, 210, 100, 35 ) );

    m_CustomizeCheckBox = new QCheckBox( this, "m_CustomizeCheckBox" );
    m_CustomizeCheckBox->setGeometry( QRect( 10, 10, 550, 24 ) );

    m_PrioritySettingGroupBox = new QGroupBox( this, "m_PrioritySettingGroupBox" );
    m_PrioritySettingGroupBox->setGeometry( QRect( 10, 40, 561, 160 ) );

    m_PriorityEdit = new KLineEdit( m_PrioritySettingGroupBox, "m_PriorityEdit" );
    m_PriorityEdit->setGeometry( QRect( 10, 70, 201, 31 ) );

    m_PriorityListBox = new KListBox( m_PrioritySettingGroupBox, "m_PriorityListBox" );
    m_PriorityListBox->setGeometry( QRect( 300, 20, 250, 130 ) );

    m_AddPriorityButton = new KPushButton( m_PrioritySettingGroupBox, "m_AddPriorityButton" );
    m_AddPriorityButton->setGeometry( QRect( 220, 50, 70, 31 ) );

    m_DeletePriorityButton = new KPushButton( m_PrioritySettingGroupBox, "m_DeletePriorityButton" );
    m_DeletePriorityButton->setGeometry( QRect( 220, 90, 70, 31 ) );
    languageChange();
    resize( QSize(580, 260).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_CustomizeCheckBox, SIGNAL( clicked() ), this, SLOT( slotCustomizePriorityClicked() ) );
    connect( m_AddPriorityButton, SIGNAL( clicked() ), this, SLOT( slotAddPriorityClicked() ) );
    connect( m_CancelButton, SIGNAL( clicked() ), this, SLOT( slotCancelClicked() ) );
    connect( m_DeletePriorityButton, SIGNAL( clicked() ), this, SLOT( slotDeletePriorityClicked() ) );
    connect( m_OkButton, SIGNAL( clicked() ), this, SLOT( slotOKClicked() ) );

    // tab order
    setTabOrder( m_CustomizeCheckBox, m_PriorityEdit );
    setTabOrder( m_PriorityEdit, m_AddPriorityButton );
    setTabOrder( m_AddPriorityButton, m_DeletePriorityButton );
    setTabOrder( m_DeletePriorityButton, m_PriorityListBox );
    setTabOrder( m_PriorityListBox, m_OkButton );
    setTabOrder( m_OkButton, m_CancelButton );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PriorityConfigFormBase::languageChange()
{
    setCaption( tr2i18n( "KIpMessenger - Priority Settings" ) );
    m_OkButton->setText( tr2i18n( "O&K" ) );
    m_OkButton->setAccel( QKeySequence( tr2i18n( "Alt+K" ) ) );
    m_CancelButton->setText( tr2i18n( "C&ancel" ) );
    m_CancelButton->setAccel( QKeySequence( tr2i18n( "Alt+A" ) ) );
    m_CustomizeCheckBox->setText( tr2i18n( "Customi&ze Priority setting." ) );
    m_CustomizeCheckBox->setAccel( QKeySequence( tr2i18n( "Alt+Z" ) ) );
    m_PrioritySettingGroupBox->setTitle( tr2i18n( "Priority Setting" ) );
    m_AddPriorityButton->setText( tr2i18n( ">>" ) );
    m_DeletePriorityButton->setText( tr2i18n( "<<" ) );
}

void PriorityConfigFormBase::slotCustomizePriorityClicked()
{
    qWarning( "PriorityConfigFormBase::slotCustomizePriorityClicked(): Not implemented yet" );
}

void PriorityConfigFormBase::slotAddPriorityClicked()
{
    qWarning( "PriorityConfigFormBase::slotAddPriorityClicked(): Not implemented yet" );
}

void PriorityConfigFormBase::slotDeletePriorityClicked()
{
    qWarning( "PriorityConfigFormBase::slotDeletePriorityClicked(): Not implemented yet" );
}

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

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

#include "priorityconfigbase.moc"
