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

#include <qvariant.h>
#include <qgroupbox.h>
#include <qcheckbox.h>
#include <klistbox.h>
#include <kpushbutton.h>
#include <klineedit.h>
#include <qlabel.h>
#include <qframe.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

#include "klistbox.h"
#include "kpushbutton.h"
#include "klineedit.h"
static const unsigned char img0_clickableurlconfigbase[] = { 
    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,
    0x9e, 0x49, 0x44, 0x41, 0x54, 0x58, 0x85, 0xc5, 0x96, 0x41, 0x92, 0x83,
    0x20, 0x10, 0x45, 0x7f, 0xa7, 0x5c, 0xe6, 0x02, 0xdc, 0x2f, 0x37, 0xc8,
    0x76, 0x18, 0x8b, 0xd1, 0x6d, 0xe6, 0x04, 0x78, 0x3e, 0x2f, 0x90, 0x7d,
    0xcf, 0xc2, 0x40, 0x14, 0xa1, 0x69, 0xb5, 0x9c, 0xfc, 0x8d, 0x52, 0xf9,
    0xd0, 0xaf, 0x9b, 0x96, 0x40, 0x8c, 0xcf, 0xaa, 0x89, 0x6f, 0x8c, 0x3c,
    0x0b, 0x81, 0x08, 0x7c, 0x0a, 0x27, 0x83, 0xe8, 0x22, 0x06, 0x7f, 0xfd,
    0xc6, 0xa0, 0x33, 0xe2, 0x03, 0x00, 0x2e, 0x2a, 0x17, 0x03, 0x67, 0x41,
    0x34, 0x75, 0xcb, 0x71, 0x31, 0x13, 0x02, 0x3f, 0x25, 0xc5, 0xd6, 0x55,
    0x00, 0x80, 0xb0, 0x49, 0x60, 0x26, 0x30, 0x28, 0x5b, 0xa5, 0x79, 0xf0,
    0x69, 0x99, 0xa5, 0x47, 0x0f, 0x20, 0x04, 0x97, 0x02, 0xd4, 0xa4, 0x07,
    0xd8, 0xd1, 0x02, 0x29, 0xdc, 0x31, 0x80, 0x93, 0xa4, 0x03, 0xa0, 0x75,
    0xf3, 0xd4, 0x54, 0xca, 0x3e, 0xdb, 0x84, 0x44, 0xc2, 0xe2, 0x7b, 0xbf,
    0x3e, 0xe5, 0x3c, 0xe2, 0x89, 0x8a, 0x81, 0x75, 0x03, 0x69, 0xb3, 0xd6,
    0xec, 0x75, 0x6e, 0x3d, 0x06, 0x51, 0x23, 0x19, 0xb4, 0x22, 0xe2, 0x6a,
    0xf7, 0x97, 0xd6, 0xfe, 0x78, 0x13, 0x1e, 0x3e, 0x09, 0x99, 0xe3, 0x11,
    0x57, 0x94, 0x54, 0xd9, 0x5d, 0x00, 0x31, 0xe8, 0x3b, 0xc2, 0xae, 0xe0,
    0x9b, 0x01, 0x34, 0xd9, 0x6e, 0x09, 0xae, 0x06, 0xd8, 0x1a, 0x38, 0xce,
    0x03, 0x55, 0x21, 0x4e, 0x3d, 0x8a, 0x35, 0x12, 0x2b, 0xb0, 0xa7, 0xc1,
    0xce, 0xfb, 0x33, 0x52, 0x04, 0xdf, 0xa3, 0x22, 0x40, 0x2d, 0x7b, 0xf5,
    0x29, 0x59, 0xa9, 0x48, 0x03, 0x00, 0x9d, 0xeb, 0x61, 0xae, 0x06, 0xe3,
    0x73, 0x8c, 0x4f, 0x49, 0xbd, 0xeb, 0xe0, 0xaf, 0xc3, 0xc2, 0x1f, 0xe7,
    0x7d, 0xaf, 0xa1, 0x03, 0x44, 0xef, 0xba, 0x85, 0x1f, 0xf7, 0x59, 0x05,
    0xc6, 0xe7, 0x08, 0x83, 0x24, 0xb8, 0x00, 0x9f, 0xfa, 0xc3, 0x58, 0x52,
    0xea, 0x07, 0x66, 0x00, 0xe6, 0x6a, 0x30, 0xe2, 0x45, 0x26, 0x68, 0x78,
    0xf8, 0xac, 0x3f, 0x8c, 0x87, 0x5f, 0x5f, 0xbc, 0xbe, 0xa5, 0xfe, 0x08,
    0xb0, 0x25, 0x93, 0x52, 0xe6, 0xf3, 0xf1, 0xf0, 0xe3, 0xd1, 0xbb, 0x6e,
    0x31, 0x2f, 0x8c, 0x53, 0xff, 0x25, 0x47, 0x16, 0x33, 0x49, 0x14, 0xf7,
    0x30, 0xe3, 0xcf, 0x8d, 0x7b, 0xd7, 0x81, 0x30, 0xed, 0xa4, 0x6d, 0x2d,
    0x6c, 0x6b, 0x57, 0x7e, 0xe2, 0x69, 0x61, 0x8e, 0x95, 0xc0, 0xbb, 0x07,
    0x0c, 0x0c, 0x6e, 0xed, 0x2d, 0x5b, 0x89, 0xce, 0x75, 0x59, 0x7f, 0x6e,
    0x6c, 0x5b, 0x9b, 0x9d, 0xff, 0xd5, 0x5a, 0x8a, 0x00, 0x69, 0x37, 0xcf,
    0x9f, 0xb7, 0x7b, 0x1e, 0x62, 0x01, 0x23, 0xcc, 0x1f, 0x9f, 0x79, 0x08,
    0x0e, 0x97, 0xb1, 0xc1, 0x79, 0xae, 0x65, 0x52, 0xaa, 0xc4, 0x11, 0x31,
    0x30, 0xdd, 0x88, 0xc2, 0x9e, 0x48, 0x19, 0xf8, 0x87, 0x57, 0x57, 0x64,
    0x8b, 0xa4, 0xeb, 0xe8, 0xbf, 0xe8, 0x0f, 0xe6, 0x41, 0x04, 0x24, 0x33,
    0x55, 0x86, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
    0x42, 0x60, 0x82
};


/*
 *  Constructs a KIPMsgClickableURLConfigDialogBase 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.
 */
KIPMsgClickableURLConfigDialogBase::KIPMsgClickableURLConfigDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    QImage img;
    img.loadFromData( img0_clickableurlconfigbase, sizeof( img0_clickableurlconfigbase ), "PNG" );
    image0 = img;
    if ( !name )
	setName( "KIPMsgClickableURLConfigDialogBase" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( QSize( 500, 380 ) );
    setMaximumSize( QSize( 500, 380 ) );
    setBaseSize( QSize( 500, 380 ) );
    setIcon( image0 );
    setModal( TRUE );

    groupBox19 = new QGroupBox( this, "groupBox19" );
    groupBox19->setGeometry( QRect( 10, 0, 480, 60 ) );
    groupBox19->setColumnLayout(0, Qt::Vertical );
    groupBox19->layout()->setSpacing( 6 );
    groupBox19->layout()->setMargin( 11 );
    groupBox19Layout = new QHBoxLayout( groupBox19->layout() );
    groupBox19Layout->setAlignment( Qt::AlignTop );

    m_DefaultBrowserCheckbox = new QCheckBox( groupBox19, "m_DefaultBrowserCheckbox" );
    groupBox19Layout->addWidget( m_DefaultBrowserCheckbox );

    groupBox20 = new QGroupBox( this, "groupBox20" );
    groupBox20->setGeometry( QRect( 10, 60, 480, 120 ) );

    m_ProtocolsListbox = new KListBox( groupBox20, "m_ProtocolsListbox" );
    m_ProtocolsListbox->setGeometry( QRect( 10, 20, 112, 90 ) );

    m_BrowseProgramButton = new KPushButton( groupBox20, "m_BrowseProgramButton" );
    m_BrowseProgramButton->setGeometry( QRect( 360, 20, 110, 30 ) );

    m_ProgramNameEditbox = new KLineEdit( groupBox20, "m_ProgramNameEditbox" );
    m_ProgramNameEditbox->setGeometry( QRect( 130, 50, 340, 25 ) );

    textLabel4 = new QLabel( groupBox20, "textLabel4" );
    textLabel4->setGeometry( QRect( 130, 30, 210, 20 ) );

    groupBox4 = new QGroupBox( this, "groupBox4" );
    groupBox4->setGeometry( QRect( 10, 180, 480, 130 ) );

    textLabel1 = new QLabel( groupBox4, "textLabel1" );
    textLabel1->setGeometry( QRect( 10, 20, 460, 100 ) );
    textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );

    frame5 = new QFrame( this, "frame5" );
    frame5->setGeometry( QRect( 0, 320, 490, 50 ) );
    frame5->setFrameShape( QFrame::StyledPanel );
    frame5->setFrameShadow( QFrame::Raised );
    frame5->setLineWidth( 0 );

    m_ApplyButton = new KPushButton( frame5, "m_ApplyButton" );
    m_ApplyButton->setGeometry( QRect( 390, 10, 100, 30 ) );

    m_OKButton = new KPushButton( frame5, "m_OKButton" );
    m_OKButton->setGeometry( QRect( 150, 10, 100, 30 ) );

    m_CancelButton = new KPushButton( frame5, "m_CancelButton" );
    m_CancelButton->setGeometry( QRect( 260, 10, 100, 30 ) );
    languageChange();
    resize( QSize(500, 380).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_ApplyButton, SIGNAL( clicked() ), this, SLOT( slotApplyClicked() ) );
    connect( m_BrowseProgramButton, SIGNAL( clicked() ), this, SLOT( slotBrowseClicked() ) );
    connect( m_CancelButton, SIGNAL( clicked() ), this, SLOT( slotCancelClicked() ) );
    connect( m_OKButton, SIGNAL( clicked() ), this, SLOT( slotOkClicked() ) );
    connect( m_ProtocolsListbox, SIGNAL( clicked(QListBoxItem*) ), this, SLOT( slotProtocolClicked(QListBoxItem*) ) );
    connect( m_ProgramNameEditbox, SIGNAL( textChanged(const QString&) ), this, SLOT( slotProgramNameChanged(const QString&) ) );

    // tab order
    setTabOrder( m_DefaultBrowserCheckbox, m_ProtocolsListbox );
    setTabOrder( m_ProtocolsListbox, m_BrowseProgramButton );
    setTabOrder( m_BrowseProgramButton, m_ProgramNameEditbox );
    setTabOrder( m_ProgramNameEditbox, m_OKButton );
    setTabOrder( m_OKButton, m_CancelButton );
    setTabOrder( m_CancelButton, m_ApplyButton );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KIPMsgClickableURLConfigDialogBase::languageChange()
{
    setCaption( tr2i18n( "KIpMessenger Clickable URL Configuration" ) );
    groupBox19->setTitle( tr2i18n( "Clickable URL - Default configuration" ) );
    m_DefaultBrowserCheckbox->setText( tr2i18n( "&Use default browser(case of no protocol specification)" ) );
    m_DefaultBrowserCheckbox->setAccel( QKeySequence( tr2i18n( "Alt+U" ) ) );
    groupBox20->setTitle( tr2i18n( "Clickable URL - Case of protocol specification" ) );
    m_ProtocolsListbox->clear();
    m_ProtocolsListbox->insertItem( tr2i18n( "HTTP" ) );
    m_ProtocolsListbox->insertItem( tr2i18n( "HTTPS" ) );
    m_ProtocolsListbox->insertItem( tr2i18n( "FTP" ) );
    m_ProtocolsListbox->insertItem( tr2i18n( "FILE" ) );
    m_ProtocolsListbox->insertItem( tr2i18n( "TELNET" ) );
    m_BrowseProgramButton->setText( tr2i18n( "&Browse..." ) );
    m_BrowseProgramButton->setAccel( QKeySequence( tr2i18n( "Alt+B" ) ) );
    textLabel4->setText( tr2i18n( "wakeup program" ) );
    groupBox4->setTitle( tr2i18n( "Caution" ) );
    textLabel1->setText( tr2i18n( "Original IpMessenger for Windows was Clickable URL\n"
"function implemented in DoubleClick.\n"
" But In KIpMessenger,URL was shown by HTML ancher,\n"
"because it is using KHTML.So that function was\n"
"implemented in Single Click." ) );
    m_ApplyButton->setText( tr2i18n( "Appl&y" ) );
    m_ApplyButton->setAccel( QKeySequence( tr2i18n( "Alt+Y" ) ) );
    m_OKButton->setText( tr2i18n( "O&K" ) );
    m_OKButton->setAccel( QKeySequence( tr2i18n( "Alt+K" ) ) );
    m_CancelButton->setText( tr2i18n( "Ca&ncel" ) );
    m_CancelButton->setAccel( QKeySequence( tr2i18n( "Alt+N" ) ) );
}

void KIPMsgClickableURLConfigDialogBase::slotBrowseClicked()
{
    qWarning( "KIPMsgClickableURLConfigDialogBase::slotBrowseClicked(): Not implemented yet" );
}

void KIPMsgClickableURLConfigDialogBase::slotOkClicked()
{
    qWarning( "KIPMsgClickableURLConfigDialogBase::slotOkClicked(): Not implemented yet" );
}

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

void KIPMsgClickableURLConfigDialogBase::slotApplyClicked()
{
    qWarning( "KIPMsgClickableURLConfigDialogBase::slotApplyClicked(): Not implemented yet" );
}

void KIPMsgClickableURLConfigDialogBase::slotProtocolClicked(QListBoxItem*)
{
    qWarning( "KIPMsgClickableURLConfigDialogBase::slotProtocolClicked(QListBoxItem*): Not implemented yet" );
}

void KIPMsgClickableURLConfigDialogBase::slotProgramNameChanged(const QString&)
{
    qWarning( "KIPMsgClickableURLConfigDialogBase::slotProgramNameChanged(const QString&): Not implemented yet" );
}

#include "clickableurlconfigbase.moc"
