#include <kdialog.h>
#include <tdelocale.h>

/****************************************************************************
** Form implementation generated from reading ui file 'ksettingsonlinequotesdecl.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "ksettingsonlinequotesdecl.h"

#include <ntqvariant.h>
#include <tdelistview.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <klineedit.h>
#include <ntqcheckbox.h>
#include <kpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KSettingsOnlineQuotesDecl as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KSettingsOnlineQuotesDecl::KSettingsOnlineQuotesDecl( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KSettingsOnlineQuotesDecl" );
    setMinimumSize( TQSize( 0, 0 ) );
    KSettingsOnlineQuotesDeclLayout = new TQVBoxLayout( this, 11, 6, "KSettingsOnlineQuotesDeclLayout"); 

    m_quoteSourceList = new TDEListView( this, "m_quoteSourceList" );
    m_quoteSourceList->addColumn( tr2i18n( "Name" ) );
    m_quoteSourceList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)3, 0, 0, m_quoteSourceList->sizePolicy().hasHeightForWidth() ) );
    m_quoteSourceList->setAllColumnsShowFocus( true );
    m_quoteSourceList->setDefaultRenameAction( TDEListView::Accept );
    m_quoteSourceList->setItemsRenameable( true );
    KSettingsOnlineQuotesDeclLayout->addWidget( m_quoteSourceList );

    groupParsing = new TQGroupBox( this, "groupParsing" );
    groupParsing->setColumnLayout(0, TQt::Vertical );
    groupParsing->layout()->setSpacing( 6 );
    groupParsing->layout()->setMargin( 11 );
    groupParsingLayout = new TQGridLayout( groupParsing->layout() );
    groupParsingLayout->setAlignment( TQt::AlignTop );

    textLabel4 = new TQLabel( groupParsing, "textLabel4" );

    groupParsingLayout->addWidget( textLabel4, 3, 0 );

    textLabel2 = new TQLabel( groupParsing, "textLabel2" );

    groupParsingLayout->addWidget( textLabel2, 1, 0 );

    m_editSymbol = new KLineEdit( groupParsing, "m_editSymbol" );

    groupParsingLayout->addMultiCellWidget( m_editSymbol, 1, 1, 1, 2 );

    m_editPrice = new KLineEdit( groupParsing, "m_editPrice" );

    groupParsingLayout->addMultiCellWidget( m_editPrice, 2, 2, 1, 2 );

    m_editURL = new KLineEdit( groupParsing, "m_editURL" );

    groupParsingLayout->addMultiCellWidget( m_editURL, 0, 0, 1, 2 );

    textLabel3 = new TQLabel( groupParsing, "textLabel3" );

    groupParsingLayout->addWidget( textLabel3, 2, 0 );

    m_editDate = new KLineEdit( groupParsing, "m_editDate" );

    groupParsingLayout->addMultiCellWidget( m_editDate, 3, 3, 1, 2 );

    textLabel4_2 = new TQLabel( groupParsing, "textLabel4_2" );

    groupParsingLayout->addWidget( textLabel4_2, 4, 0 );

    textLabel1 = new TQLabel( groupParsing, "textLabel1" );

    groupParsingLayout->addWidget( textLabel1, 0, 0 );

    m_editDateFormat = new KLineEdit( groupParsing, "m_editDateFormat" );

    groupParsingLayout->addWidget( m_editDateFormat, 4, 1 );

    m_skipStripping = new TQCheckBox( groupParsing, "m_skipStripping" );

    groupParsingLayout->addWidget( m_skipStripping, 4, 2 );
    KSettingsOnlineQuotesDeclLayout->addWidget( groupParsing );

    layout15 = new TQHBoxLayout( 0, 0, 6, "layout15"); 

    m_newButton = new KPushButton( this, "m_newButton" );
    layout15->addWidget( m_newButton );

    m_deleteButton = new KPushButton( this, "m_deleteButton" );
    layout15->addWidget( m_deleteButton );
    spacer6 = new TQSpacerItem( 240, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout15->addItem( spacer6 );

    m_updateButton = new KPushButton( this, "m_updateButton" );
    layout15->addWidget( m_updateButton );
    KSettingsOnlineQuotesDeclLayout->addLayout( layout15 );
    languageChange();
    resize( TQSize(512, 442).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KSettingsOnlineQuotesDecl::languageChange()
{
    setCaption( tr2i18n( "Online Quotes" ) );
    m_quoteSourceList->header()->setLabel( 0, tr2i18n( "Name" ) );
    groupParsing->setTitle( tr2i18n( "Details" ) );
    TQWhatsThis::add( groupParsing, tr2i18n( "<i>Enter regular expressions which can be used to parse the data returned from the URL entered above.  The symbol, price, and date must be found in the quote data to be usable. You may also try the KMyMoney user's mailinglist at <a href=\"mailto:kmymoney2-user@lists.sourceforge.net\">kmymoney2-user@lists.sourceforge.net</a> to find what settings work for other users in your country.</i>" ) );
    textLabel4->setText( tr2i18n( "Date" ) );
    textLabel2->setText( tr2i18n( "Symbol" ) );
    TQToolTip::add( m_editSymbol, tr2i18n( "Regular Expression to extract the symbol from the downloaded data" ) );
    TQToolTip::add( m_editPrice, tr2i18n( "Regular Expression to extract the price from the downloaded data" ) );
    TQToolTip::add( m_editURL, tr2i18n( "URL to be used to download the quote" ) );
    TQWhatsThis::add( m_editURL, tr2i18n( "Enter the URL from which stock quotes will be fetched.  <b>%1</b> will be replaced with the symbol for the security being quoted. For currency conversions, <b>%2</b> will be replaced with the currency to be quoted and <b>%1</b> with the currency the quote is based on." ) );
    textLabel3->setText( tr2i18n( "Price" ) );
    TQToolTip::add( m_editDate, tr2i18n( "Regular Expression to extract the date from the downloaded data" ) );
    textLabel4_2->setText( tr2i18n( "Date Format" ) );
    textLabel1->setText( tr2i18n( "URL" ) );
    TQToolTip::add( m_editDateFormat, tr2i18n( "Regular Expression to extract the date from the downloaded data" ) );
    m_skipStripping->setText( tr2i18n( "Skip HTML stripping" ) );
    TQWhatsThis::add( m_skipStripping, tr2i18n( "<p>For easier processing of the data returned by the online source, KMyMoney usually strips unused parts before it is parsed with the regular expressions. If matching of the fields relies on those items, then use this option to turn stripping off.</p>\n"
"\n"
"<p>The following items are usually removed by stripping:\n"
"\n"
"<ul>\n"
"<li>HTML tags such as <b>&lt;tag&gt;</b></li>\n"
"<li>& encoded characters such as <b>&amp;nbsp;</b></li>\n"
"<li>duplicate whitespace</li>\n"
"</ul>\n"
"</p>" ) );
    m_newButton->setText( tr2i18n( "New" ) );
    m_deleteButton->setText( tr2i18n( "Delete" ) );
    m_updateButton->setText( tr2i18n( "Update" ) );
}

/****************************************************************************
** KSettingsOnlineQuotesDecl meta object code from reading C++ file 'ksettingsonlinequotesdecl.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "ksettingsonlinequotesdecl.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *KSettingsOnlineQuotesDecl::className() const
{
    return "KSettingsOnlineQuotesDecl";
}

TQMetaObject *KSettingsOnlineQuotesDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KSettingsOnlineQuotesDecl( "KSettingsOnlineQuotesDecl", &KSettingsOnlineQuotesDecl::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString KSettingsOnlineQuotesDecl::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "KSettingsOnlineQuotesDecl", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString KSettingsOnlineQuotesDecl::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "KSettingsOnlineQuotesDecl", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* KSettingsOnlineQuotesDecl::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQWidget::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KSettingsOnlineQuotesDecl", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KSettingsOnlineQuotesDecl.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* KSettingsOnlineQuotesDecl::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "KSettingsOnlineQuotesDecl" ) )
	return this;
    return TQWidget::tqt_cast( clname );
}

bool KSettingsOnlineQuotesDecl::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool KSettingsOnlineQuotesDecl::tqt_emit( int _id, TQUObject* _o )
{
    return TQWidget::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

bool KSettingsOnlineQuotesDecl::tqt_property( int id, int f, TQVariant* v)
{
    return TQWidget::tqt_property( id, f, v);
}

bool KSettingsOnlineQuotesDecl::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
