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

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

#include "starterconfig.h"

#include <ntqvariant.h>
#include <kurlrequester.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kkeybutton.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqbuttongroup.h>
#include <ntqcheckbox.h>
#include <ntqspinbox.h>
#include <ntqradiobutton.h>
#include <ntqframe.h>
#include <ntqcombobox.h>
#include <ntqlistbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a StarterConfig as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
StarterConfig::StarterConfig( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "StarterConfig" );
    setSizeGripEnabled( true );
    StarterConfigLayout = new TQGridLayout( this, 1, 1, 11, 6, "StarterConfigLayout"); 

    groupBox5 = new TQGroupBox( this, "groupBox5" );
    groupBox5->setColumnLayout(0, TQt::Vertical );
    groupBox5->layout()->setSpacing( 6 );
    groupBox5->layout()->setMargin( 11 );
    groupBox5Layout = new TQGridLayout( groupBox5->layout() );
    groupBox5Layout->setAlignment( TQt::AlignTop );

    BaseURL = new KURLRequester( groupBox5, "BaseURL" );

    groupBox5Layout->addWidget( BaseURL, 0, 1 );

    textLabel2_3 = new TQLabel( groupBox5, "textLabel2_3" );

    groupBox5Layout->addWidget( textLabel2_3, 1, 0 );

    HoverURL = new KURLRequester( groupBox5, "HoverURL" );

    groupBox5Layout->addWidget( HoverURL, 1, 1 );

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

    groupBox5Layout->addWidget( textLabel1_2, 0, 0 );

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

    groupBox5Layout->addWidget( textLabel3, 2, 0 );

    DownURL = new KURLRequester( groupBox5, "DownURL" );

    groupBox5Layout->addWidget( DownURL, 2, 1 );

    StarterConfigLayout->addWidget( groupBox5, 0, 0 );

    Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1"); 

    buttonHelp = new TQPushButton( this, "buttonHelp" );
    buttonHelp->setAutoDefault( true );
    Layout1->addWidget( buttonHelp );
    Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Horizontal_Spacing2 );

    buttonOk = new TQPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    Layout1->addWidget( buttonOk );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    Layout1->addWidget( buttonCancel );

    StarterConfigLayout->addMultiCellLayout( Layout1, 4, 4, 0, 1 );

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new TQGridLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    layout10 = new TQHBoxLayout( 0, 0, 6, "layout10"); 

    customDialogSize = new TQCheckBox( buttonGroup1, "customDialogSize" );
    customDialogSize->setEnabled( true );
    layout10->addWidget( customDialogSize );

    dialogW = new TQSpinBox( buttonGroup1, "dialogW" );
    dialogW->setEnabled( false );
    dialogW->setMaxValue( 3000 );
    layout10->addWidget( dialogW );

    textLabel2 = new TQLabel( buttonGroup1, "textLabel2" );
    layout10->addWidget( textLabel2 );

    dialogH = new TQSpinBox( buttonGroup1, "dialogH" );
    dialogH->setEnabled( false );
    dialogH->setMaxValue( 2000 );
    layout10->addWidget( dialogH );
    spacer4 = new TQSpacerItem( 111, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout10->addItem( spacer4 );

    buttonGroup1Layout->addLayout( layout10, 0, 0 );

    dialogFollowMouse = new TQRadioButton( buttonGroup1, "dialogFollowMouse" );
    dialogFollowMouse->setEnabled( false );

    buttonGroup1Layout->addWidget( dialogFollowMouse, 4, 0 );

    layout12 = new TQHBoxLayout( 0, 0, 6, "layout12"); 

    fixedDialogPos = new TQRadioButton( buttonGroup1, "fixedDialogPos" );
    fixedDialogPos->setEnabled( false );
    layout12->addWidget( fixedDialogPos );

    dialogX = new TQSpinBox( buttonGroup1, "dialogX" );
    dialogX->setEnabled( false );
    layout12->addWidget( dialogX );

    textLabel2_2 = new TQLabel( buttonGroup1, "textLabel2_2" );
    layout12->addWidget( textLabel2_2 );

    dialogY = new TQSpinBox( buttonGroup1, "dialogY" );
    dialogY->setEnabled( false );
    layout12->addWidget( dialogY );
    spacer5 = new TQSpacerItem( 80, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout12->addItem( spacer5 );

    buttonGroup1Layout->addLayout( layout12, 3, 0 );

    customDialogPos = new TQCheckBox( buttonGroup1, "customDialogPos" );

    buttonGroup1Layout->addWidget( customDialogPos, 2, 0 );

    line1 = new TQFrame( buttonGroup1, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );

    buttonGroup1Layout->addWidget( line1, 1, 0 );

    showDialogTitlebar = new TQCheckBox( buttonGroup1, "showDialogTitlebar" );

    buttonGroup1Layout->addWidget( showDialogTitlebar, 8, 0 );

    line2 = new TQFrame( buttonGroup1, "line2" );
    line2->setFrameShape( TQFrame::HLine );
    line2->setFrameShadow( TQFrame::Sunken );
    line2->setFrameShape( TQFrame::HLine );

    buttonGroup1Layout->addWidget( line2, 7, 0 );

    line2_3 = new TQFrame( buttonGroup1, "line2_3" );
    line2_3->setFrameShape( TQFrame::HLine );
    line2_3->setFrameShadow( TQFrame::Sunken );
    line2_3->setFrameShape( TQFrame::HLine );

    buttonGroup1Layout->addWidget( line2_3, 5, 0 );

    layout6 = new TQHBoxLayout( 0, 0, 6, "layout6"); 

    textLabel1_3 = new TQLabel( buttonGroup1, "textLabel1_3" );
    textLabel1_3->setEnabled( true );
    layout6->addWidget( textLabel1_3 );

    dialogPanelPos = new TQComboBox( false, buttonGroup1, "dialogPanelPos" );
    dialogPanelPos->setEnabled( true );
    layout6->addWidget( dialogPanelPos );

    buttonGroup1Layout->addLayout( layout6, 6, 0 );

    StarterConfigLayout->addWidget( buttonGroup1, 3, 0 );

    groupBox6 = new TQGroupBox( this, "groupBox6" );
    groupBox6->setColumnLayout(0, TQt::Vertical );
    groupBox6->layout()->setSpacing( 6 );
    groupBox6->layout()->setMargin( 11 );
    groupBox6Layout = new TQGridLayout( groupBox6->layout() );
    groupBox6Layout->setAlignment( TQt::AlignTop );

    layout11 = new TQHBoxLayout( 0, 0, 6, "layout11"); 

    customPopupSize = new TQCheckBox( groupBox6, "customPopupSize" );
    customPopupSize->setEnabled( true );
    layout11->addWidget( customPopupSize );

    popupW = new TQSpinBox( groupBox6, "popupW" );
    popupW->setEnabled( false );
    popupW->setMaxValue( 3000 );
    layout11->addWidget( popupW );

    textLabel1 = new TQLabel( groupBox6, "textLabel1" );
    layout11->addWidget( textLabel1 );

    popupH = new TQSpinBox( groupBox6, "popupH" );
    popupH->setEnabled( false );
    popupH->setMaxValue( 2000 );
    layout11->addWidget( popupH );
    spacer3 = new TQSpacerItem( 141, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout11->addItem( spacer3 );

    groupBox6Layout->addLayout( layout11, 0, 0 );

    centerPopup = new TQCheckBox( groupBox6, "centerPopup" );
    centerPopup->setEnabled( true );

    groupBox6Layout->addWidget( centerPopup, 1, 0 );

    line2_2 = new TQFrame( groupBox6, "line2_2" );
    line2_2->setFrameShape( TQFrame::HLine );
    line2_2->setFrameShadow( TQFrame::Sunken );
    line2_2->setFrameShape( TQFrame::HLine );

    groupBox6Layout->addWidget( line2_2, 2, 0 );

    layout6_2 = new TQHBoxLayout( 0, 0, 6, "layout6_2"); 

    textLabel1_3_2 = new TQLabel( groupBox6, "textLabel1_3_2" );
    textLabel1_3_2->setEnabled( true );
    layout6_2->addWidget( textLabel1_3_2 );

    popupPanelPos = new TQComboBox( false, groupBox6, "popupPanelPos" );
    popupPanelPos->setEnabled( true );
    layout6_2->addWidget( popupPanelPos );

    groupBox6Layout->addLayout( layout6_2, 3, 0 );

    StarterConfigLayout->addWidget( groupBox6, 2, 0 );

    groupBox4 = new TQGroupBox( this, "groupBox4" );
    groupBox4->setColumnLayout(0, TQt::Vertical );
    groupBox4->layout()->setSpacing( 6 );
    groupBox4->layout()->setMargin( 11 );
    groupBox4Layout = new TQGridLayout( groupBox4->layout() );
    groupBox4Layout->setAlignment( TQt::AlignTop );

    layout9 = new TQHBoxLayout( 0, 0, 6, "layout9"); 

    textLabel2_4 = new TQLabel( groupBox4, "textLabel2_4" );
    layout9->addWidget( textLabel2_4 );

    favItemAmount = new TQSpinBox( groupBox4, "favItemAmount" );
    favItemAmount->setValue( 10 );
    layout9->addWidget( favItemAmount );
    spacer7 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer7 );

    groupBox4Layout->addLayout( layout9, 2, 0 );

    line1_2 = new TQFrame( groupBox4, "line1_2" );
    line1_2->setFrameShape( TQFrame::HLine );
    line1_2->setFrameShadow( TQFrame::Sunken );
    line1_2->setFrameShape( TQFrame::HLine );

    groupBox4Layout->addWidget( line1_2, 1, 0 );

    useKTTS = new TQCheckBox( groupBox4, "useKTTS" );

    groupBox4Layout->addWidget( useKTTS, 0, 0 );

    layout9_2 = new TQHBoxLayout( 0, 0, 6, "layout9_2"); 

    textLabel1_4 = new TQLabel( groupBox4, "textLabel1_4" );
    layout9_2->addWidget( textLabel1_4 );

    iconSize = new TQComboBox( false, groupBox4, "iconSize" );
    layout9_2->addWidget( iconSize );

    groupBox4Layout->addLayout( layout9_2, 3, 0 );

    StarterConfigLayout->addWidget( groupBox4, 1, 0 );

    groupBox7 = new TQGroupBox( this, "groupBox7" );
    groupBox7->setColumnLayout(0, TQt::Vertical );
    groupBox7->layout()->setSpacing( 6 );
    groupBox7->layout()->setMargin( 11 );
    groupBox7Layout = new TQGridLayout( groupBox7->layout() );
    groupBox7Layout->setAlignment( TQt::AlignTop );

    categoryList = new TQListBox( groupBox7, "categoryList" );
    categoryList->setHScrollBarMode( TQListBox::AlwaysOff );

    groupBox7Layout->addWidget( categoryList, 0, 0 );

    layout18 = new TQHBoxLayout( 0, 0, 6, "layout18"); 
    spacer14 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout18->addItem( spacer14 );

    buttonShortcut = new KKeyButton( groupBox7, "buttonShortcut" );
    layout18->addWidget( buttonShortcut );
    spacer15 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout18->addItem( spacer15 );

    groupBox7Layout->addLayout( layout18, 1, 0 );

    StarterConfigLayout->addMultiCellWidget( groupBox7, 0, 3, 1, 1 );
    languageChange();
    resize( TQSize(492, 674).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( customPopupSize, TQ_SIGNAL( toggled(bool) ), popupW, TQ_SLOT( setEnabled(bool) ) );
    connect( customPopupSize, TQ_SIGNAL( toggled(bool) ), popupH, TQ_SLOT( setEnabled(bool) ) );
    connect( buttonCancel, TQ_SIGNAL( toggled(bool) ), dialogX, TQ_SLOT( setEnabled(bool) ) );
    connect( customDialogSize, TQ_SIGNAL( toggled(bool) ), dialogW, TQ_SLOT( setEnabled(bool) ) );
    connect( customDialogSize, TQ_SIGNAL( toggled(bool) ), dialogH, TQ_SLOT( setEnabled(bool) ) );
    connect( customDialogPos, TQ_SIGNAL( toggled(bool) ), fixedDialogPos, TQ_SLOT( setEnabled(bool) ) );
    connect( customDialogPos, TQ_SIGNAL( toggled(bool) ), dialogFollowMouse, TQ_SLOT( setEnabled(bool) ) );
    connect( fixedDialogPos, TQ_SIGNAL( toggled(bool) ), dialogX, TQ_SLOT( setEnabled(bool) ) );
    connect( fixedDialogPos, TQ_SIGNAL( toggled(bool) ), dialogY, TQ_SLOT( setEnabled(bool) ) );
    connect( customDialogPos, TQ_SIGNAL( toggled(bool) ), fixedDialogPos, TQ_SLOT( setChecked(bool) ) );
    connect( customDialogPos, TQ_SIGNAL( toggled(bool) ), dialogFollowMouse, TQ_SLOT( setChecked(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void StarterConfig::languageChange()
{
    setCaption( tr2i18n( "Baghira Starter Config" ) );
    groupBox5->setTitle( tr2i18n( "Startbutton images" ) );
    textLabel2_3->setText( tr2i18n( "<b>Hover</b>" ) );
    textLabel1_2->setText( tr2i18n( "<b>Base</b>" ) );
    textLabel3->setText( tr2i18n( "<b>Down</b>" ) );
    buttonHelp->setText( tr2i18n( "&Help" ) );
    buttonHelp->setAccel( TQKeySequence( tr2i18n( "F1" ) ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
    buttonGroup1->setTitle( tr2i18n( "Dialog options" ) );
    customDialogSize->setText( tr2i18n( "Custom dialog size" ) );
    textLabel2->setText( tr2i18n( "x" ) );
    dialogFollowMouse->setText( tr2i18n( "Show dialog under mouse" ) );
    fixedDialogPos->setText( tr2i18n( "Fixed" ) );
    textLabel2_2->setText( tr2i18n( ":" ) );
    customDialogPos->setText( tr2i18n( "Custom dialog position" ) );
    showDialogTitlebar->setText( tr2i18n( "Show titlebar for dialog" ) );
    textLabel1_3->setText( tr2i18n( "Panel Position" ) );
    dialogPanelPos->clear();
    dialogPanelPos->insertItem( tr2i18n( "North" ) );
    dialogPanelPos->insertItem( tr2i18n( "South" ) );
    dialogPanelPos->insertItem( tr2i18n( "West" ) );
    dialogPanelPos->insertItem( tr2i18n( "East" ) );
    dialogPanelPos->insertItem( tr2i18n( "Nowhere" ) );
    dialogPanelPos->setCurrentItem( 1 );
    groupBox6->setTitle( tr2i18n( "Popup options" ) );
    customPopupSize->setText( tr2i18n( "Custom popup size" ) );
    textLabel1->setText( tr2i18n( "x" ) );
    centerPopup->setText( tr2i18n( "Center popup" ) );
    textLabel1_3_2->setText( tr2i18n( "Panel Position" ) );
    popupPanelPos->clear();
    popupPanelPos->insertItem( tr2i18n( "North" ) );
    popupPanelPos->insertItem( tr2i18n( "South" ) );
    popupPanelPos->insertItem( tr2i18n( "West" ) );
    popupPanelPos->insertItem( tr2i18n( "East" ) );
    popupPanelPos->insertItem( tr2i18n( "Nowhere" ) );
    popupPanelPos->setCurrentItem( 2 );
    groupBox4->setTitle( TQString::null );
    textLabel2_4->setText( tr2i18n( "Items in favorite list" ) );
    useKTTS->setText( tr2i18n( "Talk to me (via KTTS)" ) );
    textLabel1_4->setText( tr2i18n( "Icon Size" ) );
    iconSize->clear();
    iconSize->insertItem( tr2i18n( "16/22" ) );
    iconSize->insertItem( tr2i18n( "22/32" ) );
    iconSize->insertItem( tr2i18n( "32/48" ) );
    iconSize->insertItem( tr2i18n( "48/64" ) );
    iconSize->insertItem( tr2i18n( "64/128" ) );
    groupBox7->setTitle( tr2i18n( "Shortcuts" ) );
    buttonShortcut->setText( tr2i18n( "None" ) );
}

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

TQMetaObject *StarterConfig::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_StarterConfig( "StarterConfig", &StarterConfig::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* StarterConfig::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 = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"StarterConfig", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_StarterConfig.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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