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

#include "knotifywidgetbase.h"

#include <qvariant.h>
#include <kdialog.h>
#include <klistview.h>
#include <kurlrequester.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kcombobox.h>
#include <qpushbutton.h>
#include <qheader.h>
#include <qgroupbox.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

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

    m_listview = new KListView( this, "m_listview" );
    m_listview->addColumn( QString::null );
    m_listview->header()->setResizeEnabled( FALSE, m_listview->header()->count() - 1 );
    m_listview->addColumn( QString::null );
    m_listview->header()->setResizeEnabled( FALSE, m_listview->header()->count() - 1 );
    m_listview->addColumn( QString::null );
    m_listview->header()->setResizeEnabled( FALSE, m_listview->header()->count() - 1 );
    m_listview->addColumn( QString::null );
    m_listview->header()->setResizeEnabled( FALSE, m_listview->header()->count() - 1 );
    m_listview->addColumn( QString::null );
    m_listview->header()->setResizeEnabled( FALSE, m_listview->header()->count() - 1 );
    m_listview->addColumn( QString::null );
    m_listview->header()->setResizeEnabled( FALSE, m_listview->header()->count() - 1 );
    m_listview->addColumn( tr2i18n( "Events" ) );
    m_listview->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 10, 0, m_listview->sizePolicy().hasHeightForWidth() ) );
    KNotifyWidgetBaseLayout->addWidget( m_listview );

    m_controlsBox = new QGroupBox( this, "m_controlsBox" );
    m_controlsBox->setColumnLayout(0, Qt::Vertical );
    m_controlsBox->layout()->setSpacing( KDialog::spacingHint() );
    m_controlsBox->layout()->setMargin( KDialog::marginHint() );
    m_controlsBoxLayout = new QGridLayout( m_controlsBox->layout() );
    m_controlsBoxLayout->setAlignment( Qt::AlignTop );

    m_affectAllApps = new QCheckBox( m_controlsBox, "m_affectAllApps" );

    m_controlsBoxLayout->addMultiCellWidget( m_affectAllApps, 0, 0, 0, 3 );
    Spacer3_2 = new QSpacerItem( 30, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
    m_controlsBoxLayout->addMultiCell( Spacer3_2, 1, 2, 0, 0 );
    Spacer17 = new QSpacerItem( 318, 16, QSizePolicy::Expanding, QSizePolicy::Minimum );
    m_controlsBoxLayout->addItem( Spacer17, 2, 3 );

    m_buttonDisable = new QPushButton( m_controlsBox, "m_buttonDisable" );

    m_controlsBoxLayout->addWidget( m_buttonDisable, 2, 1 );

    m_buttonEnable = new QPushButton( m_controlsBox, "m_buttonEnable" );

    m_controlsBoxLayout->addWidget( m_buttonEnable, 1, 1 );

    m_comboEnable = new KComboBox( FALSE, m_controlsBox, "m_comboEnable" );

    m_controlsBoxLayout->addWidget( m_comboEnable, 1, 2 );

    m_comboDisable = new KComboBox( FALSE, m_controlsBox, "m_comboDisable" );

    m_controlsBoxLayout->addWidget( m_comboDisable, 2, 2 );
    KNotifyWidgetBaseLayout->addWidget( m_controlsBox );

    m_actionsBox = new QGroupBox( this, "m_actionsBox" );
    m_actionsBox->setColumnLayout(0, Qt::Vertical );
    m_actionsBox->layout()->setSpacing( KDialog::spacingHint() );
    m_actionsBox->layout()->setMargin( KDialog::marginHint() );
    m_actionsBoxLayout = new QGridLayout( m_actionsBox->layout() );
    m_actionsBoxLayout->setAlignment( Qt::AlignTop );

    m_stderr = new QCheckBox( m_actionsBox, "m_stderr" );

    m_actionsBoxLayout->addMultiCellWidget( m_stderr, 5, 5, 0, 2 );

    m_messageBox = new QCheckBox( m_actionsBox, "m_messageBox" );

    m_actionsBoxLayout->addMultiCellWidget( m_messageBox, 3, 3, 0, 2 );

    m_execute = new QCheckBox( m_actionsBox, "m_execute" );

    m_actionsBoxLayout->addMultiCellWidget( m_execute, 2, 2, 0, 1 );

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

    m_playSound = new QCheckBox( m_actionsBox, "m_playSound" );
    Layout25->addWidget( m_playSound );

    m_playButton = new QPushButton( m_actionsBox, "m_playButton" );
    Layout25->addWidget( m_playButton );

    m_actionsBoxLayout->addMultiCellLayout( Layout25, 0, 0, 0, 1 );

    m_taskbar = new QCheckBox( m_actionsBox, "m_taskbar" );

    m_actionsBoxLayout->addMultiCellWidget( m_taskbar, 6, 6, 0, 2 );

    m_logToFile = new QCheckBox( m_actionsBox, "m_logToFile" );

    m_actionsBoxLayout->addMultiCellWidget( m_logToFile, 1, 1, 0, 1 );
    Spacer3 = new QSpacerItem( 30, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
    m_actionsBoxLayout->addItem( Spacer3, 4, 0 );

    m_executePath = new KURLRequester( m_actionsBox, "m_executePath" );
    m_executePath->setEnabled( FALSE );
    m_executePath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 1, 0, m_executePath->sizePolicy().hasHeightForWidth() ) );

    m_actionsBoxLayout->addWidget( m_executePath, 2, 2 );

    m_logfilePath = new KURLRequester( m_actionsBox, "m_logfilePath" );
    m_logfilePath->setEnabled( FALSE );
    m_logfilePath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 1, 0, m_logfilePath->sizePolicy().hasHeightForWidth() ) );

    m_actionsBoxLayout->addWidget( m_logfilePath, 1, 2 );

    m_soundPath = new KURLRequester( m_actionsBox, "m_soundPath" );
    m_soundPath->setEnabled( FALSE );
    m_soundPath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, m_soundPath->sizePolicy().hasHeightForWidth() ) );

    m_actionsBoxLayout->addWidget( m_soundPath, 0, 2 );

    m_passivePopup = new QCheckBox( m_actionsBox, "m_passivePopup" );
    m_passivePopup->setEnabled( FALSE );

    m_actionsBoxLayout->addMultiCellWidget( m_passivePopup, 4, 4, 1, 2 );
    KNotifyWidgetBaseLayout->addWidget( m_actionsBox );

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

    m_extension = new QPushButton( this, "m_extension" );
    m_extension->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)0, 0, 0, m_extension->sizePolicy().hasHeightForWidth() ) );
    m_extension->setToggleButton( FALSE );
    Layout8->addWidget( m_extension );
    Spacer7 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout8->addItem( Spacer7 );

    m_playerButton = new QPushButton( this, "m_playerButton" );
    Layout8->addWidget( m_playerButton );
    KNotifyWidgetBaseLayout->addLayout( Layout8 );
    languageChange();
    resize( QSize(487, 531).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_messageBox, SIGNAL( toggled(bool) ), m_passivePopup, SLOT( setEnabled(bool) ) );
    connect( m_execute, SIGNAL( toggled(bool) ), m_executePath, SLOT( setEnabled(bool) ) );
    connect( m_playSound, SIGNAL( toggled(bool) ), m_soundPath, SLOT( setEnabled(bool) ) );
    connect( m_logToFile, SIGNAL( toggled(bool) ), m_logfilePath, SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( m_listview, m_playSound );
    setTabOrder( m_playSound, m_playButton );
    setTabOrder( m_playButton, m_soundPath );
    setTabOrder( m_soundPath, m_logToFile );
    setTabOrder( m_logToFile, m_logfilePath );
    setTabOrder( m_logfilePath, m_execute );
    setTabOrder( m_execute, m_executePath );
    setTabOrder( m_executePath, m_messageBox );
    setTabOrder( m_messageBox, m_passivePopup );
    setTabOrder( m_passivePopup, m_stderr );
    setTabOrder( m_stderr, m_affectAllApps );
    setTabOrder( m_affectAllApps, m_buttonEnable );
    setTabOrder( m_buttonEnable, m_comboEnable );
    setTabOrder( m_comboEnable, m_buttonDisable );
    setTabOrder( m_buttonDisable, m_comboDisable );
    setTabOrder( m_comboDisable, m_extension );
    setTabOrder( m_extension, m_playerButton );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KNotifyWidgetBase::languageChange()
{
    m_listview->header()->setLabel( 0, QString::null );
    m_listview->header()->setLabel( 1, QString::null );
    m_listview->header()->setLabel( 2, QString::null );
    m_listview->header()->setLabel( 3, QString::null );
    m_listview->header()->setLabel( 4, QString::null );
    m_listview->header()->setLabel( 5, QString::null );
    m_listview->header()->setLabel( 6, tr2i18n( "Events" ) );
    m_controlsBox->setTitle( tr2i18n( "Quick Controls" ) );
    m_affectAllApps->setText( tr2i18n( "Apply to &all applications" ) );
    m_buttonDisable->setText( tr2i18n( "Turn O&ff All" ) );
    QToolTip::add( m_buttonDisable, tr2i18n( "Allows you to change the behavior for all events at once" ) );
    m_buttonEnable->setText( tr2i18n( "Turn O&n All" ) );
    QToolTip::add( m_buttonEnable, tr2i18n( "Allows you to change the behavior for all events at once" ) );
    m_actionsBox->setTitle( tr2i18n( "Actions" ) );
    m_stderr->setText( tr2i18n( "Print a message to standard &error output" ) );
    m_messageBox->setText( tr2i18n( "Show a &message in a pop-up window" ) );
    m_execute->setText( tr2i18n( "E&xecute a program:" ) );
    m_playSound->setText( tr2i18n( "Play a &sound:" ) );
    m_playButton->setText( QString::null );
    QToolTip::add( m_playButton, tr2i18n( "Test the Sound" ) );
    m_taskbar->setText( tr2i18n( "Mark &taskbar entry" ) );
    m_logToFile->setText( tr2i18n( "&Log to a file:" ) );
    m_passivePopup->setText( tr2i18n( "&Use a passive window that does not interrupt other work" ) );
    m_extension->setText( tr2i18n( "Less Options" ) );
    m_playerButton->setText( tr2i18n( "Player Settings" ) );
}

#include "knotifywidgetbase.moc"
