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

#include "settingsdialog.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqwidget.h>
#include <ntqcombobox.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqtoolbutton.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a SettingsDialogBase 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.
 */
SettingsDialogBase::SettingsDialogBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "SettingsDialogBase" );
    setSizeGripEnabled( true );
    SettingsDialogBaseLayout = new TQVBoxLayout( this, 11, 6, "SettingsDialogBaseLayout"); 

    settingsTab = new TQTabWidget( this, "settingsTab" );
    settingsTab->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, settingsTab->sizePolicy().hasHeightForWidth() ) );

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

    Layout2 = new TQGridLayout( 0, 1, 1, 0, 6, "Layout2"); 

    fixedfontCombo = new TQComboBox( false, tab, "fixedfontCombo" );
    fixedfontCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, fixedfontCombo->sizePolicy().hasHeightForWidth() ) );
    fixedfontCombo->setEditable( true );

    Layout2->addWidget( fixedfontCombo, 1, 1 );

    TextLabel1 = new TQLabel( tab, "TextLabel1" );

    Layout2->addWidget( TextLabel1, 1, 0 );

    TextLabel2 = new TQLabel( tab, "TextLabel2" );

    Layout2->addWidget( TextLabel2, 2, 0 );

    fontCombo = new TQComboBox( false, tab, "fontCombo" );
    fontCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, fontCombo->sizePolicy().hasHeightForWidth() ) );
    fontCombo->setEditable( true );

    Layout2->addWidget( fontCombo, 0, 1 );

    fontLabel = new TQLabel( tab, "fontLabel" );

    Layout2->addWidget( fontLabel, 0, 0 );

    linkUnderlineCB = new TQCheckBox( tab, "linkUnderlineCB" );
    linkUnderlineCB->setChecked( true );

    Layout2->addWidget( linkUnderlineCB, 3, 0 );

    colorButton = new TQToolButton( tab, "colorButton" );
    colorButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, colorButton->sizePolicy().hasHeightForWidth() ) );
    colorButton->setMinimumSize( TQSize( 40, 20 ) );
    colorButton->setPaletteBackgroundColor( TQColor( 255, 0, 0 ) );
    colorButton->setFocusPolicy( TQToolButton::TabFocus );

    Layout2->addWidget( colorButton, 2, 1 );
    tabLayout->addLayout( Layout2 );
    settingsTab->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( settingsTab, "tab_2" );
    tabLayout_2 = new TQGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2"); 
    Spacer11 = new TQSpacerItem( 20, 30, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout_2->addItem( Spacer11, 4, 0 );

    TextLabel1_3 = new TQLabel( tab_2, "TextLabel1_3" );

    tabLayout_2->addWidget( TextLabel1_3, 0, 0 );

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

    browserApp = new TQLineEdit( tab_2, "browserApp" );
    Layout9->addWidget( browserApp );

    buttonBrowse = new TQPushButton( tab_2, "buttonBrowse" );
    buttonBrowse->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, buttonBrowse->sizePolicy().hasHeightForWidth() ) );
    buttonBrowse->setMaximumSize( TQSize( 30, 32767 ) );
    Layout9->addWidget( buttonBrowse );

    tabLayout_2->addLayout( Layout9, 1, 0 );

    TextLabel1_3_3 = new TQLabel( tab_2, "TextLabel1_3_3" );

    tabLayout_2->addWidget( TextLabel1_3_3, 2, 0 );

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

    homePage = new TQLineEdit( tab_2, "homePage" );
    layout8->addWidget( homePage );

    buttonHome = new TQPushButton( tab_2, "buttonHome" );
    buttonHome->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, buttonHome->sizePolicy().hasHeightForWidth() ) );
    buttonHome->setMaximumSize( TQSize( 30, 32767 ) );
    layout8->addWidget( buttonHome );

    tabLayout_2->addLayout( layout8, 3, 0 );
    settingsTab->insertTab( tab_2, TQString::fromLatin1("") );

    pdfTab = new TQWidget( settingsTab, "pdfTab" );
    pdfTabLayout = new TQGridLayout( pdfTab, 1, 1, 11, 6, "pdfTabLayout"); 

    TextLabel1_3_2 = new TQLabel( pdfTab, "TextLabel1_3_2" );

    pdfTabLayout->addWidget( TextLabel1_3_2, 0, 0 );
    spacer10 = new TQSpacerItem( 20, 81, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    pdfTabLayout->addItem( spacer10, 2, 0 );

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

    pdfApp = new TQLineEdit( pdfTab, "pdfApp" );
    layout9->addWidget( pdfApp );

    buttonPDF = new TQPushButton( pdfTab, "buttonPDF" );
    buttonPDF->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, buttonPDF->sizePolicy().hasHeightForWidth() ) );
    buttonPDF->setMaximumSize( TQSize( 30, 32767 ) );
    layout9->addWidget( buttonPDF );

    pdfTabLayout->addLayout( layout9, 1, 0 );
    settingsTab->insertTab( pdfTab, TQString::fromLatin1("") );
    SettingsDialogBaseLayout->addWidget( settingsTab );

    Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1"); 
    Horizontal_Spacing2 = new TQSpacerItem( 0, 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 );
    SettingsDialogBaseLayout->addLayout( Layout1 );
    languageChange();
    resize( TQSize(389, 253).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( colorButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( selectColor() ) );
    connect( buttonBrowse, TQ_SIGNAL( clicked() ), this, TQ_SLOT( browseWebApp() ) );
    connect( buttonHome, TQ_SIGNAL( clicked() ), this, TQ_SLOT( browseHomepage() ) );
    connect( buttonPDF, TQ_SIGNAL( clicked() ), this, TQ_SLOT( browsePDFApplication() ) );

    // tab order
    setTabOrder( settingsTab, fontCombo );
    setTabOrder( fontCombo, fixedfontCombo );
    setTabOrder( fixedfontCombo, colorButton );
    setTabOrder( colorButton, linkUnderlineCB );
    setTabOrder( linkUnderlineCB, browserApp );
    setTabOrder( browserApp, buttonBrowse );
    setTabOrder( buttonBrowse, homePage );
    setTabOrder( homePage, buttonHome );
    setTabOrder( buttonHome, pdfApp );
    setTabOrder( pdfApp, buttonPDF );
    setTabOrder( buttonPDF, buttonOk );
    setTabOrder( buttonOk, buttonCancel );

    // buddies
    TextLabel1->setBuddy( fixedfontCombo );
    fontLabel->setBuddy( fontCombo );
    TextLabel1_3->setBuddy( browserApp );
    TextLabel1_3_3->setBuddy( homePage );
    TextLabel1_3_2->setBuddy( pdfApp );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SettingsDialogBase::languageChange()
{
    setCaption( tr( "TQt Assistant - Settings" ) );
    TextLabel1->setText( tr( "Fix&ed font:" ) );
    TextLabel2->setText( tr( "Link color:" ) );
    fontLabel->setText( tr( "&Font:" ) );
    linkUnderlineCB->setText( tr( "&Underline links" ) );
    colorButton->setText( TQString::null );
    settingsTab->changeTab( tab, tr( "&General" ) );
    TextLabel1_3->setText( tr( "Web &Browser Application:" ) );
    buttonBrowse->setText( tr( "..." ) );
    TextLabel1_3_3->setText( tr( "&Home page" ) );
    buttonHome->setText( tr( "..." ) );
    settingsTab->changeTab( tab_2, tr( "&Web" ) );
    TextLabel1_3_2->setText( tr( "PDF &Application" ) );
    buttonPDF->setText( tr( "..." ) );
    settingsTab->changeTab( pdfTab, tr( "&PDF" ) );
    buttonOk->setText( tr( "&OK" ) );
    buttonCancel->setText( tr( "&Cancel" ) );
}

void SettingsDialogBase::selectColor()
{
    tqWarning( "SettingsDialogBase::selectColor(): Not implemented yet" );
}

void SettingsDialogBase::browseWebApp()
{
    tqWarning( "SettingsDialogBase::browseWebApp(): Not implemented yet" );
}

void SettingsDialogBase::browsePDFApplication()
{
    tqWarning( "SettingsDialogBase::browsePDFApplication(): Not implemented yet" );
}

void SettingsDialogBase::browseHomepage()
{
    tqWarning( "SettingsDialogBase::browseHomepage(): Not implemented yet" );
}

