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

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

#include "nowlisteningprefs.h"

#include <ntqvariant.h>
#include <tdelistbox.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqframe.h>
#include <ntqtabwidget.h>
#include <ntqlineedit.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    advertiseNewMediaToBuddiesLabel = new TQLabel( this, "advertiseNewMediaToBuddiesLabel" );
    advertiseNewMediaToBuddiesLabel->setAlignment( int( TQLabel::AlignVCenter ) );

    NowListeningPrefsUILayout->addWidget( advertiseNewMediaToBuddiesLabel, 0, 0 );

    advertiseNewMediaToBuddiesHLine = new TQFrame( this, "advertiseNewMediaToBuddiesHLine" );
    advertiseNewMediaToBuddiesHLine->setFrameShape( TQFrame::HLine );
    advertiseNewMediaToBuddiesHLine->setFrameShadow( TQFrame::Sunken );

    NowListeningPrefsUILayout->addWidget( advertiseNewMediaToBuddiesHLine, 1, 0 );

    tabWidget2 = new TQTabWidget( this, "tabWidget2" );

    TabPage = new TQWidget( tabWidget2, "TabPage" );
    TabPageLayout = new TQVBoxLayout( TabPage, 11, 6, "TabPageLayout"); 

    layout4 = new TQVBoxLayout( 0, 0, 6, "layout4"); 

    useThisMessageLabel = new TQLabel( TabPage, "useThisMessageLabel" );
    layout4->addWidget( useThisMessageLabel );

    helperLabel = new TQLabel( TabPage, "helperLabel" );
    helperLabel->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    layout4->addWidget( helperLabel );

    layout2 = new TQVBoxLayout( 0, 0, 6, "layout2"); 

    m_headerLabel = new TQLabel( TabPage, "m_headerLabel" );
    m_headerLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignLeft ) );
    layout2->addWidget( m_headerLabel );

    kcfg_Header = new TQLineEdit( TabPage, "kcfg_Header" );
    layout2->addWidget( kcfg_Header );

    m_perTrackLabel = new TQLabel( TabPage, "m_perTrackLabel" );
    m_perTrackLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignLeft ) );
    layout2->addWidget( m_perTrackLabel );

    kcfg_PerTrack = new TQLineEdit( TabPage, "kcfg_PerTrack" );
    layout2->addWidget( kcfg_PerTrack );

    m_conjunctionLabel = new TQLabel( TabPage, "m_conjunctionLabel" );
    m_conjunctionLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignLeft ) );
    layout2->addWidget( m_conjunctionLabel );

    kcfg_Conjunction = new TQLineEdit( TabPage, "kcfg_Conjunction" );
    layout2->addWidget( kcfg_Conjunction );
    layout4->addLayout( layout2 );
    TabPageLayout->addLayout( layout4 );
    spacer4 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    TabPageLayout->addItem( spacer4 );
    tabWidget2->insertTab( TabPage, TQString::fromLatin1("") );

    tab = new TQWidget( tabWidget2, "tab" );
    tabLayout = new TQVBoxLayout( tab, 11, 6, "tabLayout"); 

    buttonGroup2 = new TQButtonGroup( tab, "buttonGroup2" );
    buttonGroup2->setFrameShape( TQButtonGroup::NoFrame );
    buttonGroup2->setColumnLayout(0, TQt::Vertical );
    buttonGroup2->layout()->setSpacing( 6 );
    buttonGroup2->layout()->setMargin( 11 );
    buttonGroup2Layout = new TQVBoxLayout( buttonGroup2->layout() );
    buttonGroup2Layout->setAlignment( TQt::AlignTop );

    kcfg_ExplicitAdvertising = new TQRadioButton( buttonGroup2, "kcfg_ExplicitAdvertising" );
    buttonGroup2Layout->addWidget( kcfg_ExplicitAdvertising );

    kcfg_ChatAdvertising = new TQRadioButton( buttonGroup2, "kcfg_ChatAdvertising" );
    buttonGroup2Layout->addWidget( kcfg_ChatAdvertising );

    kcfg_StatusAdvertising = new TQRadioButton( buttonGroup2, "kcfg_StatusAdvertising" );
    buttonGroup2Layout->addWidget( kcfg_StatusAdvertising );

    kcfg_AppendStatusAdvertising = new TQRadioButton( buttonGroup2, "kcfg_AppendStatusAdvertising" );
    buttonGroup2Layout->addWidget( kcfg_AppendStatusAdvertising );
    tabLayout->addWidget( buttonGroup2 );
    spacer3 = new TQSpacerItem( 20, 80, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout->addItem( spacer3 );
    tabWidget2->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( tabWidget2, "tab_2" );
    tabLayout_2 = new TQVBoxLayout( tab_2, 11, 6, "tabLayout_2"); 

    layout2_2 = new TQVBoxLayout( 0, 0, 6, "layout2_2"); 

    kcfg_UseSpecifiedMediaPlayer = new TQCheckBox( tab_2, "kcfg_UseSpecifiedMediaPlayer" );
    layout2_2->addWidget( kcfg_UseSpecifiedMediaPlayer );

    kcfg_SelectedMediaPlayer = new TDEListBox( tab_2, "kcfg_SelectedMediaPlayer" );
    kcfg_SelectedMediaPlayer->setEnabled( false );
    kcfg_SelectedMediaPlayer->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, kcfg_SelectedMediaPlayer->sizePolicy().hasHeightForWidth() ) );
    kcfg_SelectedMediaPlayer->setColumnMode( TDEListBox::FixedNumber );
    kcfg_SelectedMediaPlayer->setRowMode( TDEListBox::Variable );
    kcfg_SelectedMediaPlayer->setVariableHeight( false );
    layout2_2->addWidget( kcfg_SelectedMediaPlayer );
    tabLayout_2->addLayout( layout2_2 );
    spacer5 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout_2->addItem( spacer5 );
    tabWidget2->insertTab( tab_2, TQString::fromLatin1("") );

    NowListeningPrefsUILayout->addWidget( tabWidget2, 2, 0 );
    spacer6 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    NowListeningPrefsUILayout->addItem( spacer6, 3, 0 );
    languageChange();
    resize( TQSize(391, 370).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_UseSpecifiedMediaPlayer, TQ_SIGNAL( toggled(bool) ), kcfg_SelectedMediaPlayer, TQ_SLOT( setEnabled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void NowListeningPrefsUI::languageChange()
{
    setCaption( tr2i18n( "Now Listening" ) );
    advertiseNewMediaToBuddiesLabel->setText( tr2i18n( "<b>Share Your Musical Taste</b>" ) );
    useThisMessageLabel->setText( tr2i18n( "Use this message when advertising:" ) );
    helperLabel->setText( tr2i18n( "%track, %artist, %album, %player will be substituted if known.\n"
"Expressions in brackets depend on a substitution being made." ) );
    m_headerLabel->setText( tr2i18n( "Start with:" ) );
    kcfg_Header->setText( tr2i18n( "Now Listening To: " ) );
    m_perTrackLabel->setText( tr2i18n( "For each track:" ) );
    kcfg_PerTrack->setText( tr2i18n( "%track (by %artist)(on %album)" ) );
    m_conjunctionLabel->setText( tr2i18n( "Conjunction (if >1 track):" ) );
    kcfg_Conjunction->setText( tr2i18n( ", and " ) );
    tabWidget2->changeTab( TabPage, tr2i18n( "Messa&ge" ) );
    buttonGroup2->setTitle( TQString::null );
    kcfg_ExplicitAdvertising->setText( tr2i18n( "Explicit &via \"Tools->Send Media Info\",\n"
"or by typing \"/media\" in the chat\n"
"window edit area." ) );
    kcfg_ChatAdvertising->setText( tr2i18n( "&Show in chat window (automatic)" ) );
    kcfg_StatusAdvertising->setText( tr2i18n( "Show &the music you are listening to \n"
"in place of your status message." ) );
    kcfg_AppendStatusAdvertising->setText( tr2i18n( "Appe&nd to your status message" ) );
    tabWidget2->changeTab( tab, tr2i18n( "A&dvertising Mode" ) );
    kcfg_UseSpecifiedMediaPlayer->setText( tr2i18n( "Use &specified media player" ) );
    tabWidget2->changeTab( tab_2, tr2i18n( "Media Pla&yer" ) );
}

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

TQMetaObject *NowListeningPrefsUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_NowListeningPrefsUI( "NowListeningPrefsUI", &NowListeningPrefsUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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