#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/usr/src/ports/kdebase3/kdebase3-3.5.10-11.i686/src/kdebase-3.5.10/kcontrol/kio/kcookiesmanagementdlg_ui.ui'
**
** Created by User Interface Compiler
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "kcookiesmanagementdlg_ui.h"

#include <qvariant.h>
#include <kdialog.h>
#include <qpushbutton.h>
#include <qheader.h>
#include <klistview.h>
#include <qtoolbutton.h>
#include <qlabel.h>
#include <klistviewsearchline.h>
#include <qgroupbox.h>
#include <klineedit.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "klistviewsearchline.h"

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

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

    lvCookies = new KListView( 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 QVBoxLayout( 0, 0, KDialog::spacingHint(), "layout4"); 

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

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

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

    pbReload = new QPushButton( this, "pbReload" );
    layout4->addWidget( pbReload );
    spacer3 = new QSpacerItem( 21, 62, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding );
    layout4->addItem( spacer3 );

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

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

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

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

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

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

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

    gbDetails = new QGroupBox( this, "gbDetails" );
    gbDetails->setColumnLayout(0, Qt::Vertical );
    gbDetails->layout()->setSpacing( KDialog::spacingHint() );
    gbDetails->layout()->setMargin( KDialog::marginHint() );
    gbDetailsLayout = new QGridLayout( gbDetails->layout() );
    gbDetailsLayout->setAlignment( Qt::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 QLabel( gbDetails, "lbName" );

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

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

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

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

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

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

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

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

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

    lbSecure = new QLabel( 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( QSize(294, 432).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( tbClearSearchLine, SIGNAL( clicked() ), kListViewSearchLine, 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, Qt 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:" ) );
    QToolTip::add( kListViewSearchLine, tr2i18n( "Search interactively for domains and hosts" ) );
    QWhatsThis::add( kListViewSearchLine, QString::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:" ) );
}

#include "kcookiesmanagementdlg_ui.moc"
