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

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

#include "kcookiesmanagementdlg_ui.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <tdelistview.h>
#include <tdelistviewsearchline.h>
#include <ntqpushbutton.h>
#include <ntqtoolbutton.h>
#include <ntqlabel.h>
#include <ntqgroupbox.h>
#include <klineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KCookiesManagementDlgUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KCookiesManagementDlgUI::KCookiesManagementDlgUI( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KCookiesManagementDlgUI" );
    KCookiesManagementDlgUILayout = new TQGridLayout( this, 1, 1, 0, KDialog::spacingHint(), "KCookiesManagementDlgUILayout"); 

    layout6 = new TQGridLayout( 0, 1, 1, 0, KDialog::spacingHint(), "layout6"); 

    lvCookies = new TDEListView( this, "lvCookies" );
    lvCookies->addColumn( tr2i18n( "Domain [Group]" ) );
    lvCookies->addColumn( tr2i18n( "Host [Set By]" ) );
    lvCookies->setProperty( "selectionMode", "Single" );
    lvCookies->setAllColumnsShowFocus( true );
    lvCookies->setShowSortIndicator( true );
    lvCookies->setRootIsDecorated( true );
    lvCookies->setTreeStepSize( 15 );

    layout6->addWidget( lvCookies, 1, 0 );

    layout4 = new TQVBoxLayout( 0, 0, KDialog::spacingHint(), "layout4"); 

    pbDelete = new TQPushButton( this, "pbDelete" );
    layout4->addWidget( pbDelete );

    pbDeleteAll = new TQPushButton( this, "pbDeleteAll" );
    layout4->addWidget( pbDeleteAll );

    pbPolicy = new TQPushButton( this, "pbPolicy" );
    layout4->addWidget( pbPolicy );

    pbReload = new TQPushButton( this, "pbReload" );
    layout4->addWidget( pbReload );
    spacer3 = new TQSpacerItem( 21, 62, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding );
    layout4->addItem( spacer3 );

    layout6->addMultiCellLayout( layout4, 0, 1, 1, 1 );

    layout3 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout3"); 

    tbClearSearchLine = new TQToolButton( this, "tbClearSearchLine" );
    layout3->addWidget( tbClearSearchLine );

    textLabel1 = new TQLabel( this, "textLabel1" );
    layout3->addWidget( textLabel1 );

    kListViewSearchLine = new TDEListViewSearchLine( this, "kListViewSearchLine" );
    layout3->addWidget( kListViewSearchLine );

    layout6->addLayout( layout3, 0, 0 );

    KCookiesManagementDlgUILayout->addLayout( layout6, 0, 0 );

    gbDetails = new TQGroupBox( this, "gbDetails" );
    gbDetails->setColumnLayout(0, TQt::Vertical );
    gbDetails->layout()->setSpacing( KDialog::spacingHint() );
    gbDetails->layout()->setMargin( KDialog::marginHint() );
    gbDetailsLayout = new TQGridLayout( gbDetails->layout() );
    gbDetailsLayout->setAlignment( TQt::AlignTop );

    leDomain = new KLineEdit( gbDetails, "leDomain" );
    leDomain->setReadOnly( true );

    gbDetailsLayout->addWidget( leDomain, 2, 1 );

    lePath = new KLineEdit( gbDetails, "lePath" );
    lePath->setReadOnly( true );

    gbDetailsLayout->addWidget( lePath, 3, 1 );

    leSecure = new KLineEdit( gbDetails, "leSecure" );
    leSecure->setReadOnly( true );

    gbDetailsLayout->addWidget( leSecure, 5, 1 );

    lbName = new TQLabel( gbDetails, "lbName" );

    gbDetailsLayout->addWidget( lbName, 0, 0 );

    lbValue = new TQLabel( gbDetails, "lbValue" );

    gbDetailsLayout->addWidget( lbValue, 1, 0 );

    lbDomain = new TQLabel( gbDetails, "lbDomain" );

    gbDetailsLayout->addWidget( lbDomain, 2, 0 );

    lbPath = new TQLabel( gbDetails, "lbPath" );

    gbDetailsLayout->addWidget( lbPath, 3, 0 );

    lbExpires = new TQLabel( gbDetails, "lbExpires" );

    gbDetailsLayout->addWidget( lbExpires, 4, 0 );

    lbSecure = new TQLabel( gbDetails, "lbSecure" );

    gbDetailsLayout->addWidget( lbSecure, 5, 0 );

    leValue = new KLineEdit( gbDetails, "leValue" );
    leValue->setReadOnly( true );

    gbDetailsLayout->addWidget( leValue, 1, 1 );

    leExpires = new KLineEdit( gbDetails, "leExpires" );
    leExpires->setReadOnly( true );

    gbDetailsLayout->addWidget( leExpires, 4, 1 );

    leName = new KLineEdit( gbDetails, "leName" );
    leName->setReadOnly( true );

    gbDetailsLayout->addWidget( leName, 0, 1 );

    KCookiesManagementDlgUILayout->addWidget( gbDetails, 1, 0 );
    languageChange();
    resize( TQSize(294, 432).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( tbClearSearchLine, TQ_SIGNAL( clicked() ), kListViewSearchLine, TQ_SLOT( clear() ) );

    // buddies
    textLabel1->setBuddy( kListViewSearchLine );
    lbName->setBuddy( leName );
    lbValue->setBuddy( leValue );
    lbDomain->setBuddy( leDomain );
    lbPath->setBuddy( lePath );
    lbExpires->setBuddy( leExpires );
    lbSecure->setBuddy( leSecure );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KCookiesManagementDlgUI::languageChange()
{
    lvCookies->header()->setLabel( 0, tr2i18n( "Domain [Group]" ) );
    lvCookies->header()->setLabel( 1, tr2i18n( "Host [Set By]" ) );
    pbDelete->setText( tr2i18n( "D&elete" ) );
    pbDeleteAll->setText( tr2i18n( "Delete A&ll" ) );
    pbPolicy->setText( tr2i18n( "Change &Policy..." ) );
    pbReload->setText( tr2i18n( "&Reload List" ) );
    tbClearSearchLine->setText( tr2i18n( "..." ) );
    tbClearSearchLine->setTextLabel( tr2i18n( "Clear Search" ) );
    textLabel1->setText( tr2i18n( "&Search:" ) );
    TQToolTip::add( kListViewSearchLine, tr2i18n( "Search interactively for domains and hosts" ) );
    TQWhatsThis::add( kListViewSearchLine, TQString::null );
    gbDetails->setTitle( tr2i18n( "Details" ) );
    lbName->setText( tr2i18n( "Name:" ) );
    lbValue->setText( tr2i18n( "Value:" ) );
    lbDomain->setText( tr2i18n( "Domain:" ) );
    lbPath->setText( tr2i18n( "Path:" ) );
    lbExpires->setText( tr2i18n( "Expires:" ) );
    lbSecure->setText( tr2i18n( "Secure:" ) );
}

/****************************************************************************
** KCookiesManagementDlgUI meta object code from reading C++ file 'kcookiesmanagementdlg_ui.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 "kcookiesmanagementdlg_ui.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 *KCookiesManagementDlgUI::className() const
{
    return "KCookiesManagementDlgUI";
}

TQMetaObject *KCookiesManagementDlgUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KCookiesManagementDlgUI( "KCookiesManagementDlgUI", &KCookiesManagementDlgUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KCookiesManagementDlgUI::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(
	"KCookiesManagementDlgUI", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KCookiesManagementDlgUI.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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