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

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

#include "nicklistbehavior_preferencesui.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <tdelistview.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );

    NicklistBehavior_ConfigUILayout->addMultiCellWidget( textLabel1_2, 0, 0, 0, 1 );

    kcfg_SortCaseInsensitive = new TQCheckBox( this, "kcfg_SortCaseInsensitive" );

    NicklistBehavior_ConfigUILayout->addMultiCellWidget( kcfg_SortCaseInsensitive, 1, 1, 0, 2 );

    kcfg_SortByActivity = new TQCheckBox( this, "kcfg_SortByActivity" );

    NicklistBehavior_ConfigUILayout->addMultiCellWidget( kcfg_SortByActivity, 2, 2, 0, 2 );

    kcfg_SortByStatus = new TQCheckBox( this, "kcfg_SortByStatus" );
    kcfg_SortByStatus->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)0, 0, 0, kcfg_SortByStatus->sizePolicy().hasHeightForWidth() ) );

    NicklistBehavior_ConfigUILayout->addWidget( kcfg_SortByStatus, 3, 0 );

    sortOrder = new TDEListView( this, "sortOrder" );
    sortOrder->addColumn( tr2i18n( "Mode" ) );
    sortOrder->addColumn( tr2i18n( "Explanation" ) );
    sortOrder->setEnabled( false );
    sortOrder->setAcceptDrops( true );
    sortOrder->setAllColumnsShowFocus( true );
    sortOrder->setFullWidth( true );
    sortOrder->setDragEnabled( true );
    sortOrder->setShadeSortColumn( false );

    NicklistBehavior_ConfigUILayout->addMultiCellWidget( sortOrder, 4, 4, 0, 2 );

    kcfg_ChannelDoubleClickAction = new KLineEdit( this, "kcfg_ChannelDoubleClickAction" );

    NicklistBehavior_ConfigUILayout->addWidget( kcfg_ChannelDoubleClickAction, 0, 2 );

    orderHintLabel = new TQLabel( this, "orderHintLabel" );
    orderHintLabel->setEnabled( false );

    NicklistBehavior_ConfigUILayout->addMultiCellWidget( orderHintLabel, 3, 3, 1, 2 );
    languageChange();
    resize( TQSize(692, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_SortByStatus, TQ_SIGNAL( toggled(bool) ), sortOrder, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_SortByStatus, TQ_SIGNAL( toggled(bool) ), orderHintLabel, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( kcfg_ChannelDoubleClickAction, kcfg_SortCaseInsensitive );
    setTabOrder( kcfg_SortCaseInsensitive, kcfg_SortByStatus );
    setTabOrder( kcfg_SortByStatus, sortOrder );

    // buddies
    textLabel1_2->setBuddy( kcfg_ChannelDoubleClickAction );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void NicklistBehavior_ConfigUI::languageChange()
{
    textLabel1_2->setText( tr2i18n( "&Command to be executed on double click:" ) );
    kcfg_SortCaseInsensitive->setText( tr2i18n( "Sort case &insensitive" ) );
    kcfg_SortByActivity->setText( tr2i18n( "Sort by &activity" ) );
    kcfg_SortByStatus->setText( tr2i18n( "Sort b&y user status" ) );
    sortOrder->header()->setLabel( 0, tr2i18n( "Mode" ) );
    sortOrder->header()->setLabel( 1, tr2i18n( "Explanation" ) );
    orderHintLabel->setText( tr2i18n( "(Reorder nick sorting order by drag and drop)" ) );
}

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

TQMetaObject *NicklistBehavior_ConfigUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_NicklistBehavior_ConfigUI( "NicklistBehavior_ConfigUI", &NicklistBehavior_ConfigUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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