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

#include "configtoolboxdialog.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqtoolbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include <ntqimage.h>
#include <ntqpixmap.h>

#include "configtoolboxdialog.ui.h"
/*
 *  Constructs a ConfigToolboxDialog 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.
 */
ConfigToolboxDialog::ConfigToolboxDialog( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "ConfigToolboxDialog" );
    ConfigToolboxDialogLayout = new TQGridLayout( this, 1, 1, 11, 6, "ConfigToolboxDialogLayout"); 

    Layout2 = new TQHBoxLayout( 0, 0, 6, "Layout2"); 
    Spacer2 = new TQSpacerItem( 342, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout2->addItem( Spacer2 );

    PushButton3 = new TQPushButton( this, "PushButton3" );
    PushButton3->setDefault( true );
    Layout2->addWidget( PushButton3 );

    PushButton4 = new TQPushButton( this, "PushButton4" );
    Layout2->addWidget( PushButton4 );

    ConfigToolboxDialogLayout->addMultiCellLayout( Layout2, 1, 1, 0, 1 );

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

    buttonAdd = new TQPushButton( this, "buttonAdd" );
    buttonAdd->setEnabled( false );

    Layout4->addWidget( buttonAdd, 1, 1 );
    Spacer3 = new TQSpacerItem( 111, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout4->addItem( Spacer3, 1, 0 );

    listViewTools = new TQListView( this, "listViewTools" );
    listViewTools->addColumn( tr( "Available Tools" ) );
    listViewTools->setSelectionMode( TQListView::Extended );
    listViewTools->setResizeMode( TQListView::LastColumn );

    Layout4->addMultiCellWidget( listViewTools, 0, 0, 0, 1 );

    ConfigToolboxDialogLayout->addLayout( Layout4, 0, 0 );

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

    buttonRemove = new TQPushButton( this, "buttonRemove" );
    buttonRemove->setEnabled( false );

    Layout5->addWidget( buttonRemove, 1, 0 );

    listViewCommon = new TQListView( this, "listViewCommon" );
    listViewCommon->addColumn( tr( "Common Widgets Page" ) );
    listViewCommon->setSelectionMode( TQListView::Extended );
    listViewCommon->setResizeMode( TQListView::LastColumn );

    Layout5->addMultiCellWidget( listViewCommon, 0, 0, 0, 3 );

    buttonDown = new TQToolButton( this, "buttonDown" );
    buttonDown->setEnabled( false );
    buttonDown->setPixmap( TQPixmap::fromMimeSource( "designer_s_down.png" ) );

    Layout5->addWidget( buttonDown, 1, 3 );
    Spacer4 = new TQSpacerItem( 41, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout5->addItem( Spacer4, 1, 1 );

    buttonUp = new TQToolButton( this, "buttonUp" );
    buttonUp->setEnabled( false );
    buttonUp->setPixmap( TQPixmap::fromMimeSource( "designer_s_up.png" ) );

    Layout5->addWidget( buttonUp, 1, 2 );

    ConfigToolboxDialogLayout->addLayout( Layout5, 0, 1 );
    languageChange();
    resize( TQSize(403, 467).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonAdd, TQ_SIGNAL( clicked() ), this, TQ_SLOT( addTool() ) );
    connect( buttonRemove, TQ_SIGNAL( clicked() ), this, TQ_SLOT( removeTool() ) );
    connect( buttonUp, TQ_SIGNAL( clicked() ), this, TQ_SLOT( moveToolUp() ) );
    connect( buttonDown, TQ_SIGNAL( clicked() ), this, TQ_SLOT( moveToolDown() ) );
    connect( listViewTools, TQ_SIGNAL( clicked(TQListViewItem*) ), this, TQ_SLOT( currentToolChanged(TQListViewItem*) ) );
    connect( listViewCommon, TQ_SIGNAL( clicked(TQListViewItem*) ), this, TQ_SLOT( currentCommonToolChanged(TQListViewItem*) ) );
    connect( PushButton3, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( PushButton4, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( PushButton3, TQ_SIGNAL( clicked() ), this, TQ_SLOT( ok() ) );
    connect( listViewTools, TQ_SIGNAL( doubleClicked(TQListViewItem*) ), this, TQ_SLOT( addTool() ) );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ConfigToolboxDialog::languageChange()
{
    setCaption( tr( "Configure Toolbox" ) );
    PushButton3->setText( tr( "OK" ) );
    PushButton4->setText( tr( "Cancel" ) );
    buttonAdd->setText( tr( "&Add" ) );
    listViewTools->header()->setLabel( 0, tr( "Available Tools" ) );
    buttonRemove->setText( tr( "&Remove" ) );
    listViewCommon->header()->setLabel( 0, tr( "Common Widgets Page" ) );
    buttonDown->setText( TQString::null );
    buttonUp->setText( TQString::null );
}

