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

#include "actioneditor.h"

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

#include "actionlistview.h"
/*
 *  Constructs a ActionEditorBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
ActionEditorBase::ActionEditorBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "ActionEditorBase" );
    ActionEditorBaseLayout = new TQVBoxLayout( this, 4, 6, "ActionEditorBaseLayout"); 

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

    buttonNewAction = new TQToolButton( this, "buttonNewAction" );
    buttonNewAction->setPixmap( TQPixmap::fromMimeSource( "designer_filenew.png" ) );
    buttonNewAction->setAutoRaise( true );
    Layout2->addWidget( buttonNewAction );

    buttonDeleteAction = new TQToolButton( this, "buttonDeleteAction" );
    buttonDeleteAction->setPixmap( TQPixmap::fromMimeSource( "designer_s_editcut.png" ) );
    buttonDeleteAction->setAutoRaise( true );
    Layout2->addWidget( buttonDeleteAction );

    buttonConnect = new TQToolButton( this, "buttonConnect" );
    buttonConnect->setPixmap( TQPixmap::fromMimeSource( "designer_connecttool.png" ) );
    buttonConnect->setAutoRaise( true );
    Layout2->addWidget( buttonConnect );
    Spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout2->addItem( Spacer1 );
    ActionEditorBaseLayout->addLayout( Layout2 );

    listActions = new ActionListView( this, "listActions" );
    ActionEditorBaseLayout->addWidget( listActions );
    languageChange();
    resize( TQSize(206, 227).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( listActions, TQ_SIGNAL( currentChanged( TQListViewItem * ) ), this, TQ_SLOT( currentActionChanged(TQListViewItem*) ) );
    connect( listActions, TQ_SIGNAL( clicked( TQListViewItem * ) ), this, TQ_SLOT( currentActionChanged(TQListViewItem*) ) );
    connect( listActions, TQ_SIGNAL( selectionChanged( TQListViewItem * ) ), this, TQ_SLOT( currentActionChanged(TQListViewItem*) ) );
    connect( buttonNewAction, TQ_SIGNAL( clicked() ), this, TQ_SLOT( newAction() ) );
    connect( buttonConnect, TQ_SIGNAL( clicked() ), this, TQ_SLOT( connectionsClicked() ) );
    connect( buttonDeleteAction, TQ_SIGNAL( clicked() ), this, TQ_SLOT( deleteAction() ) );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ActionEditorBase::languageChange()
{
    setCaption( tr( "Edit Actions" ) );
    buttonNewAction->setText( TQString::null );
    TQToolTip::add( buttonNewAction, tr( "Create new Action" ) );
    buttonDeleteAction->setText( TQString::null );
    TQToolTip::add( buttonDeleteAction, tr( "Delete current Action" ) );
    buttonConnect->setText( TQString::null );
    TQToolTip::add( buttonConnect, tr( "Connect current Action" ) );
}

void ActionEditorBase::init()
{
}

void ActionEditorBase::destroy()
{
}

void ActionEditorBase::connectionsClicked()
{
    tqWarning( "ActionEditorBase::connectionsClicked(): Not implemented yet" );
}

void ActionEditorBase::currentActionChanged(TQListViewItem*)
{
    tqWarning( "ActionEditorBase::currentActionChanged(TQListViewItem*): Not implemented yet" );
}

void ActionEditorBase::deleteAction()
{
    tqWarning( "ActionEditorBase::deleteAction(): Not implemented yet" );
}

void ActionEditorBase::newAction()
{
    tqWarning( "ActionEditorBase::newAction(): Not implemented yet" );
}

