#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/policydlg_ui.ui'
**
** Created by User Interface Compiler
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "policydlg_ui.h"

#include <qvariant.h>
#include <kdialog.h>
#include <qlabel.h>
#include <klineedit.h>
#include <kcombobox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

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

    lbDomain = new QLabel( this, "lbDomain" );
    PolicyDlgUILayout->addWidget( lbDomain );

    leDomain = new KLineEdit( this, "leDomain" );
    PolicyDlgUILayout->addWidget( leDomain );

    lbPolicy = new QLabel( this, "lbPolicy" );
    PolicyDlgUILayout->addWidget( lbPolicy );

    cbPolicy = new KComboBox( FALSE, this, "cbPolicy" );
    PolicyDlgUILayout->addWidget( cbPolicy );
    languageChange();
    resize( QSize(291, 120).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    lbDomain->setBuddy( leDomain );
    lbPolicy->setBuddy( cbPolicy );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PolicyDlgUI::languageChange()
{
    lbDomain->setText( tr2i18n( "&Domain name:" ) );
    QWhatsThis::add( lbDomain, tr2i18n( "<qt>\n"
"Enter the host or domain to which this policy applies, e.g. <b>www.kde.org</b> or <b>.kde.org</b>.\n"
"</qt>" ) );
    QWhatsThis::add( leDomain, tr2i18n( "<qt>\n"
"Enter the host or domain to which this policy applies, e.g. <b>www.kde.org</b> or <b>.kde.org</b>.\n"
"</qt>" ) );
    lbPolicy->setText( tr2i18n( "&Policy:" ) );
    QWhatsThis::add( lbPolicy, tr2i18n( "<qt>\n"
"Select the desired policy:\n"
"<ul>\n"
"<li><b>Accept</b> - Allows this site to set cookies</li>\n"
"<li><b>Reject</b> - Refuse all cookies sent from this site</li>\n"
"<li><b>Ask</b> - Prompt when cookies are received from this site</li>\n"
"</ul>\n"
"</qt>" ) );
    cbPolicy->clear();
    cbPolicy->insertItem( tr2i18n( "Accept" ) );
    cbPolicy->insertItem( tr2i18n( "Reject" ) );
    cbPolicy->insertItem( tr2i18n( "Ask" ) );
    QWhatsThis::add( cbPolicy, tr2i18n( "<qt>\n"
"Select the desired policy:\n"
"<ul>\n"
"<li><b>Accept</b> - Allows this site to set cookies</li>\n"
"<li><b>Reject</b> - Refuse all cookies sent from this site</li>\n"
"<li><b>Ask</b> - Prompt when cookies are received from this site</li>\n"
"</ul>\n"
"</qt>" ) );
}

#include "policydlg_ui.moc"
