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

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

#include "generalbehavior_preferences.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    kcfg_ShowTrayIcon = new TQGroupBox( this, "kcfg_ShowTrayIcon" );
    kcfg_ShowTrayIcon->setCheckable( true );
    kcfg_ShowTrayIcon->setChecked( false );
    kcfg_ShowTrayIcon->setColumnLayout(0, TQt::Vertical );
    kcfg_ShowTrayIcon->layout()->setSpacing( KDialog::spacingHint() );
    kcfg_ShowTrayIcon->layout()->setMargin( KDialog::marginHint() );
    kcfg_ShowTrayIconLayout = new TQGridLayout( kcfg_ShowTrayIcon->layout() );
    kcfg_ShowTrayIconLayout->setAlignment( TQt::AlignTop );

    kcfg_TrayNotify = new TQCheckBox( kcfg_ShowTrayIcon, "kcfg_TrayNotify" );

    kcfg_ShowTrayIconLayout->addMultiCellWidget( kcfg_TrayNotify, 0, 0, 0, 1 );
    spacer51 = new TQSpacerItem( 31, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    kcfg_ShowTrayIconLayout->addItem( spacer51, 1, 0 );

    kcfg_TrayNotifyOnlyOwnNick = new TQCheckBox( kcfg_ShowTrayIcon, "kcfg_TrayNotifyOnlyOwnNick" );
    kcfg_TrayNotifyOnlyOwnNick->setEnabled( false );

    kcfg_ShowTrayIconLayout->addWidget( kcfg_TrayNotifyOnlyOwnNick, 1, 1 );
    spacer51_2 = new TQSpacerItem( 31, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    kcfg_ShowTrayIconLayout->addItem( spacer51_2, 2, 0 );

    kcfg_TrayNotifyBlink = new TQCheckBox( kcfg_ShowTrayIcon, "kcfg_TrayNotifyBlink" );

    kcfg_ShowTrayIconLayout->addWidget( kcfg_TrayNotifyBlink, 2, 1 );

    kcfg_HideToTrayOnStartup = new TQCheckBox( kcfg_ShowTrayIcon, "kcfg_HideToTrayOnStartup" );

    kcfg_ShowTrayIconLayout->addMultiCellWidget( kcfg_HideToTrayOnStartup, 3, 3, 0, 1 );
    GeneralBehavior_ConfigLayout->addWidget( kcfg_ShowTrayIcon );

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

    modeLbl = new TQLabel( middleLabel, "modeLbl" );

    middleLabelLayout->addWidget( modeLbl, 0, 0 );

    kcfg_NickCompletionMode = new TQComboBox( false, middleLabel, "kcfg_NickCompletionMode" );

    middleLabelLayout->addMultiCellWidget( kcfg_NickCompletionMode, 0, 0, 1, 3 );

    kcfg_NickCompleteSuffixStart = new KLineEdit( middleLabel, "kcfg_NickCompleteSuffixStart" );

    middleLabelLayout->addWidget( kcfg_NickCompleteSuffixStart, 1, 1 );

    startOfLineLabel = new TQLabel( middleLabel, "startOfLineLabel" );

    middleLabelLayout->addWidget( startOfLineLabel, 1, 0 );

    kcfg_NickCompleteSuffixMiddle = new KLineEdit( middleLabel, "kcfg_NickCompleteSuffixMiddle" );

    middleLabelLayout->addWidget( kcfg_NickCompleteSuffixMiddle, 1, 3 );

    textLabel3 = new TQLabel( middleLabel, "textLabel3" );

    middleLabelLayout->addWidget( textLabel3, 1, 2 );

    kcfg_NickCompletionCaseSensitive = new TQCheckBox( middleLabel, "kcfg_NickCompletionCaseSensitive" );

    middleLabelLayout->addWidget( kcfg_NickCompletionCaseSensitive, 2, 0 );
    GeneralBehavior_ConfigLayout->addWidget( middleLabel );

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

    kcfg_DisableNotifyWhileAway = new TQCheckBox( miscGBox, "kcfg_DisableNotifyWhileAway" );

    miscGBoxLayout->addMultiCellWidget( kcfg_DisableNotifyWhileAway, 0, 0, 0, 1 );

    kcfg_CustomVersionReplyEnabled = new TQCheckBox( miscGBox, "kcfg_CustomVersionReplyEnabled" );

    miscGBoxLayout->addWidget( kcfg_CustomVersionReplyEnabled, 5, 0 );

    kcfg_CustomVersionReply = new KLineEdit( miscGBox, "kcfg_CustomVersionReply" );
    kcfg_CustomVersionReply->setEnabled( false );

    miscGBoxLayout->addWidget( kcfg_CustomVersionReply, 5, 1 );

    kcfg_CommandChar = new KLineEdit( miscGBox, "kcfg_CommandChar" );
    kcfg_CommandChar->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, kcfg_CommandChar->sizePolicy().hasHeightForWidth() ) );
    kcfg_CommandChar->setMaxLength( 1 );

    miscGBoxLayout->addWidget( kcfg_CommandChar, 4, 1 );

    kcfg_UseMultiRowInputBox = new TQCheckBox( miscGBox, "kcfg_UseMultiRowInputBox" );

    miscGBoxLayout->addMultiCellWidget( kcfg_UseMultiRowInputBox, 6, 6, 0, 1 );

    kcfg_WebBrowserCmd = new KLineEdit( miscGBox, "kcfg_WebBrowserCmd" );
    kcfg_WebBrowserCmd->setEnabled( false );

    miscGBoxLayout->addWidget( kcfg_WebBrowserCmd, 3, 1 );

    commandCharLabel = new TQLabel( miscGBox, "commandCharLabel" );

    miscGBoxLayout->addWidget( commandCharLabel, 4, 0 );

    kcfg_UseCustomBrowser = new TQCheckBox( miscGBox, "kcfg_UseCustomBrowser" );

    miscGBoxLayout->addWidget( kcfg_UseCustomBrowser, 3, 0 );
    GeneralBehavior_ConfigLayout->addWidget( miscGBox );
    spacer52 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    GeneralBehavior_ConfigLayout->addItem( spacer52 );
    languageChange();
    resize( TQSize(448, 477).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_TrayNotify, TQ_SIGNAL( toggled(bool) ), kcfg_TrayNotifyOnlyOwnNick, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_UseCustomBrowser, TQ_SIGNAL( toggled(bool) ), kcfg_WebBrowserCmd, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_CustomVersionReplyEnabled, TQ_SIGNAL( toggled(bool) ), kcfg_CustomVersionReply, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( kcfg_ShowTrayIcon, kcfg_TrayNotify );
    setTabOrder( kcfg_TrayNotify, kcfg_TrayNotifyOnlyOwnNick );
    setTabOrder( kcfg_TrayNotifyOnlyOwnNick, kcfg_NickCompletionMode );
    setTabOrder( kcfg_NickCompletionMode, kcfg_NickCompleteSuffixStart );
    setTabOrder( kcfg_NickCompleteSuffixStart, kcfg_NickCompleteSuffixMiddle );
    setTabOrder( kcfg_NickCompleteSuffixMiddle, kcfg_NickCompletionCaseSensitive );
    setTabOrder( kcfg_NickCompletionCaseSensitive, kcfg_DisableNotifyWhileAway );
    setTabOrder( kcfg_DisableNotifyWhileAway, kcfg_UseCustomBrowser );
    setTabOrder( kcfg_UseCustomBrowser, kcfg_WebBrowserCmd );
    setTabOrder( kcfg_WebBrowserCmd, kcfg_CommandChar );
    setTabOrder( kcfg_CommandChar, kcfg_CustomVersionReplyEnabled );
    setTabOrder( kcfg_CustomVersionReplyEnabled, kcfg_CustomVersionReply );
    setTabOrder( kcfg_CustomVersionReply, kcfg_UseMultiRowInputBox );

    // buddies
    modeLbl->setBuddy( kcfg_NickCompletionMode );
    startOfLineLabel->setBuddy( kcfg_NickCompleteSuffixStart );
    textLabel3->setBuddy( kcfg_NickCompleteSuffixMiddle );
    commandCharLabel->setBuddy( kcfg_CommandChar );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void GeneralBehavior_Config::languageChange()
{
    kcfg_ShowTrayIcon->setTitle( tr2i18n( "Enable System Tray" ) );
    kcfg_TrayNotify->setText( tr2i18n( "&Use system tray for new message notification" ) );
    kcfg_TrayNotifyOnlyOwnNick->setText( tr2i18n( "Only &notify when a highlight is triggered or your current nick is used" ) );
    kcfg_TrayNotifyBlink->setText( tr2i18n( "Blin&k the icon" ) );
    kcfg_HideToTrayOnStartup->setText( tr2i18n( "Hide window on startup" ) );
    middleLabel->setTitle( tr2i18n( "Nickname Completion" ) );
    modeLbl->setText( tr2i18n( "Completion &mode:" ) );
    kcfg_NickCompletionMode->clear();
    kcfg_NickCompletionMode->insertItem( tr2i18n( "Cycle NickList" ) );
    kcfg_NickCompletionMode->insertItem( tr2i18n( "Shell-Like" ) );
    kcfg_NickCompletionMode->insertItem( tr2i18n( "Shell-Like with Completion Box" ) );
    startOfLineLabel->setText( tr2i18n( "Suffi&x at start of line:" ) );
    textLabel3->setText( tr2i18n( "&Elsewhere:" ) );
    kcfg_NickCompletionCaseSensitive->setText( tr2i18n( "Case sensitive" ) );
    miscGBox->setTitle( tr2i18n( "Miscellaneous" ) );
    kcfg_DisableNotifyWhileAway->setText( tr2i18n( "Disable notifications while &away" ) );
    kcfg_CustomVersionReplyEnabled->setText( tr2i18n( "Use custom &version reply:" ) );
    TQWhatsThis::add( kcfg_CustomVersionReply, tr2i18n( "<qt>Here you can set a custom reply for <b>CTCP <i>VERSION</i></b> requests.</qt>" ) );
    kcfg_UseMultiRowInputBox->setText( tr2i18n( "Input box expands with text" ) );
    commandCharLabel->setText( tr2i18n( "Comman&d char:" ) );
    kcfg_UseCustomBrowser->setText( tr2i18n( "Use custom web &browser:" ) );
}

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

TQMetaObject *GeneralBehavior_Config::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_GeneralBehavior_Config( "GeneralBehavior_Config", &GeneralBehavior_Config::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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