/****************************************************************************
** Form implementation generated from reading ui file 'HistoryDialog.ui'
**
** Created: Fri Sep 15 16:56:04 2000
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "HistoryDialogData.h"

#include <qlabel.h>
#include <qlineedit.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/* 
 *  Constructs a HistoryDialogData which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
HistoryDialogData::HistoryDialogData( QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "HistoryDialogData" );
    resize( 290, 328 ); 
    setCaption( tr( "History"  ) );

    historyListBox = new QListBox( this, "historyListBox" );
    historyListBox->setGeometry( QRect( 0, 0, 290, 240 ) ); 

    deleteButton = new QPushButton( this, "deleteButton" );
    deleteButton->setGeometry( QRect( 150, 250, 61, 21 ) ); 
    deleteButton->setText( tr( "Delete"  ) );
    deleteButton->setAutoDefault( TRUE );

    clearButton = new QPushButton( this, "clearButton" );
    clearButton->setGeometry( QRect( 220, 250, 61, 21 ) ); 
    clearButton->setText( tr( "Clear"  ) );

    nextButton = new QPushButton( this, "nextButton" );
    nextButton->setGeometry( QRect( 160, 280, 91, 31 ) ); 
    nextButton->setText( tr( "Next"  ) );

    maxItemsLabel = new QLabel( this, "maxItemsLabel" );
    maxItemsLabel->setGeometry( QRect( 10, 250, 80, 20 ) ); 
    maxItemsLabel->setText( tr( "Max. entries:"  ) );

    sizeLineEdit = new QLineEdit( this, "sizeLineEdit" );
    sizeLineEdit->setGeometry( QRect( 90, 250, 51, 22 ) ); 
    sizeLineEdit->setMaxLength( 6 );

    prevButton = new QPushButton( this, "prevButton" );
    prevButton->setGeometry( QRect( 40, 280, 101, 31 ) ); 
    prevButton->setText( tr( "Previous"  ) );
    prevButton->setDefault( TRUE );

    // signals and slots connections
    connect( historyListBox, SIGNAL( highlighted(int) ), this, SLOT( historyItemHighlighted(int) ) );
    connect( sizeLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( historySizeChanged() ) );
    connect( prevButton, SIGNAL( clicked() ), this, SLOT( prevButtonClicked() ) );
    connect( nextButton, SIGNAL( clicked() ), this, SLOT( nextButtonClicked() ) );
    connect( deleteButton, SIGNAL( clicked() ), this, SLOT( deleteButtonClicked() ) );
    connect( clearButton, SIGNAL( clicked() ), this, SLOT( clearButtonClicked() ) );

    // tab order
    setTabOrder( prevButton, nextButton );
    setTabOrder( nextButton, historyListBox );
    setTabOrder( historyListBox, deleteButton );
    setTabOrder( deleteButton, clearButton );
    setTabOrder( clearButton, sizeLineEdit );
}

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

void HistoryDialogData::clearButtonClicked()
{
    qWarning( "HistoryDialogData::clearButtonClicked(): Not implemented yet!" );
}

void HistoryDialogData::historyItemHighlighted(int)
{
    qWarning( "HistoryDialogData::historyItemHighlighted(int): Not implemented yet!" );
}

void HistoryDialogData::historySizeChanged()
{
    qWarning( "HistoryDialogData::historySizeChanged(): Not implemented yet!" );
}

void HistoryDialogData::deleteButtonClicked()
{
    qWarning( "HistoryDialogData::deleteButtonClicked(): Not implemented yet!" );
}

void HistoryDialogData::nextButtonClicked()
{
    qWarning( "HistoryDialogData::nextButtonClicked(): Not implemented yet!" );
}

void HistoryDialogData::prevButtonClicked()
{
    qWarning( "HistoryDialogData::prevButtonClicked(): Not implemented yet!" );
}

