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

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

#include "knotifywidgetbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <tdelistview.h>
#include <kurlrequester.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kcombobox.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    m_listview = new TDEListView( this, "m_listview" );
    m_listview->addColumn( TQString::null );
    m_listview->header()->setResizeEnabled( false, m_listview->header()->count() - 1 );
    m_listview->addColumn( TQString::null );
    m_listview->header()->setResizeEnabled( false, m_listview->header()->count() - 1 );
    m_listview->addColumn( TQString::null );
    m_listview->header()->setResizeEnabled( false, m_listview->header()->count() - 1 );
    m_listview->addColumn( TQString::null );
    m_listview->header()->setResizeEnabled( false, m_listview->header()->count() - 1 );
    m_listview->addColumn( TQString::null );
    m_listview->header()->setResizeEnabled( false, m_listview->header()->count() - 1 );
    m_listview->addColumn( TQString::null );
    m_listview->header()->setResizeEnabled( false, m_listview->header()->count() - 1 );
    m_listview->addColumn( tr2i18n( "Events" ) );
    m_listview->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 10, 0, m_listview->sizePolicy().hasHeightForWidth() ) );
    KNotifyWidgetBaseLayout->addWidget( m_listview );

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

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

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

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

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

    m_buttonEnable = new TQPushButton( 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 TQGroupBox( this, "m_actionsBox" );
    m_actionsBox->setColumnLayout(0, TQt::Vertical );
    m_actionsBox->layout()->setSpacing( KDialog::spacingHint() );
    m_actionsBox->layout()->setMargin( KDialog::marginHint() );
    m_actionsBoxLayout = new TQGridLayout( m_actionsBox->layout() );
    m_actionsBoxLayout->setAlignment( TQt::AlignTop );

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    m_executePath = new KURLRequester( m_actionsBox, "m_executePath" );
    m_executePath->setEnabled( false );
    m_executePath->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::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( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::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( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_soundPath->sizePolicy().hasHeightForWidth() ) );

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

    m_passivePopup = new TQCheckBox( m_actionsBox, "m_passivePopup" );
    m_passivePopup->setEnabled( false );

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

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

    m_extension = new TQPushButton( this, "m_extension" );
    m_extension->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)0, 0, 0, m_extension->sizePolicy().hasHeightForWidth() ) );
    m_extension->setToggleButton( false );
    Layout8->addWidget( m_extension );
    Spacer7 = new TQSpacerItem( 20, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout8->addItem( Spacer7 );

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

    // signals and slots connections
    connect( m_messageBox, TQ_SIGNAL( toggled(bool) ), m_passivePopup, TQ_SLOT( setEnabled(bool) ) );
    connect( m_execute, TQ_SIGNAL( toggled(bool) ), m_executePath, TQ_SLOT( setEnabled(bool) ) );
    connect( m_playSound, TQ_SIGNAL( toggled(bool) ), m_soundPath, TQ_SLOT( setEnabled(bool) ) );
    connect( m_logToFile, TQ_SIGNAL( toggled(bool) ), m_logfilePath, TQ_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, TQt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KNotifyWidgetBase::languageChange()
{
    m_listview->header()->setLabel( 0, TQString::null );
    m_listview->header()->setLabel( 1, TQString::null );
    m_listview->header()->setLabel( 2, TQString::null );
    m_listview->header()->setLabel( 3, TQString::null );
    m_listview->header()->setLabel( 4, TQString::null );
    m_listview->header()->setLabel( 5, TQString::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" ) );
    TQToolTip::add( m_buttonDisable, tr2i18n( "Allows you to change the behavior for all events at once" ) );
    m_buttonEnable->setText( tr2i18n( "Turn O&n All" ) );
    TQToolTip::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( TQString::null );
    TQToolTip::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" ) );
}

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

TQMetaObject *KNotifyWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KNotifyWidgetBase( "KNotifyWidgetBase", &KNotifyWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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