/****************************************************************************
** Form implementation generated from reading ui file 'totoolsettingui.ui'
**
** Created: Tue Sep 18 08:21:30 2007
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "totoolsettingui.h"

#include <qvariant.h>
#include <qheader.h>
#include <qlistview.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a toToolSettingUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
toToolSettingUI::toToolSettingUI( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "toToolSettingUI" );
    toToolSettingUILayout = new QGridLayout( this, 1, 1, 0, 6, "toToolSettingUILayout"); 

    Enabled = new QListView( this, "Enabled" );
    Enabled->addColumn( tr( "Tool" ) );
    Enabled->setSelectionMode( QListView::Multi );

    toToolSettingUILayout->addWidget( Enabled, 2, 0 );

    DefaultTool = new QComboBox( FALSE, this, "DefaultTool" );

    toToolSettingUILayout->addWidget( DefaultTool, 4, 0 );

    TextLabel2 = new QLabel( this, "TextLabel2" );

    toToolSettingUILayout->addWidget( TextLabel2, 3, 0 );

    TextLabel1 = new QLabel( this, "TextLabel1" );

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

    TextLabel3 = new QLabel( this, "TextLabel3" );
    QFont TextLabel3_font(  TextLabel3->font() );
    TextLabel3_font.setBold( TRUE );
    TextLabel3->setFont( TextLabel3_font ); 
    TextLabel3->setAlignment( int( QLabel::AlignCenter ) );

    toToolSettingUILayout->addWidget( TextLabel3, 0, 0 );
    languageChange();
    resize( QSize(592, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( Enabled, SIGNAL( selectionChanged() ), this, SLOT( changeEnable() ) );

    // tab order
    setTabOrder( Enabled, DefaultTool );

    // buddies
    TextLabel2->setBuddy( DefaultTool );
    TextLabel1->setBuddy( Enabled );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toToolSettingUI::languageChange()
{
    setCaption( tr( "Form1" ) );
    Enabled->header()->setLabel( 0, tr( "Tool" ) );
    TextLabel2->setText( tr( "&Default tool" ) );
    QToolTip::add( TextLabel2, tr( "Select the default tool to pop up when opening a new connection." ) );
    TextLabel1->setText( tr( "&Enabled tools" ) );
    QToolTip::add( TextLabel1, tr( "Select which tools should show up in the menu and toolbar." ) );
    TextLabel3->setText( tr( "You must restart for any of these changes to have effect." ) );
}

void toToolSettingUI::changeEnable()
{
    qWarning( "toToolSettingUI::changeEnable(): Not implemented yet" );
}

