/****************************************************************************
** Form implementation generated from reading ui file 'logwidget.ui'
**
** Created: Mon Mar 18 01:45:12 2002
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "logview.h"

#include <klocale.h>
#include <qcombobox.h>
#include <qframe.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qmultilineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/* 
 *  Constructs a LogView which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 */
LogView::LogView( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "LogView" );
    resize( 576, 409 ); 
    setCaption( i18n( "LogView" ) );

    GroupBox2 = new QGroupBox( this, "GroupBox2" );
    GroupBox2->setGeometry( QRect( 0, 5, 455, 330 ) ); 
    GroupBox2->setTitle( i18n( "RPM - Build" ) );

    CreateButton = new QPushButton( GroupBox2, "CreateButton" );
    CreateButton->setGeometry( QRect( 5, 295, 108, 32 ) ); 
    CreateButton->setText( i18n( "&Create Spec" ) );

    strArch = new QComboBox( FALSE, GroupBox2, "strArch" );
    strArch->setGeometry( QRect( 345, 300, 100, 22 ) ); 

    strText = new QMultiLineEdit( GroupBox2, "strText" );
    strText->setGeometry( QRect( 5, 15, 440, 275 ) ); 
    QFont strText_font(  strText->font() );
    strText_font.setPointSize( 8 );
    strText->setFont( strText_font ); 
    strText->setHMargin( 1 );
    strText->setUndoEnabled( FALSE );
    strText->setUndoDepth( 0 );
    strText->setReadOnly( TRUE );

    TextLabel1 = new QLabel( GroupBox2, "TextLabel1" );
    TextLabel1->setGeometry( QRect( 265, 300, 75, 22 ) ); 
    TextLabel1->setText( i18n( "Architecture:" ) );

    StopButton = new QPushButton( GroupBox2, "StopButton" );
    StopButton->setEnabled( FALSE );
    StopButton->setGeometry( QRect( 135, 295, 108, 32 ) ); 
    StopButton->setText( i18n( "&Stop" ) );

    Line3 = new QFrame( GroupBox2, "Line3" );
    Line3->setGeometry( QRect( 250, 300, 10, 22 ) ); 
    Line3->setFrameStyle( QFrame::VLine | QFrame::Sunken );

    ExecuteButton = new QPushButton( GroupBox2, "ExecuteButton" );
    ExecuteButton->setGeometry( QRect( 135, 295, 108, 32 ) ); 
    ExecuteButton->setText( i18n( "&Execute" ) );

    // signals and slots connections
    connect( CreateButton, SIGNAL( clicked() ), this, SLOT( slotCreateSpec() ) );
    connect( ExecuteButton, SIGNAL( clicked() ), this, SLOT( slotRunRPM() ) );
    connect( StopButton, SIGNAL( clicked() ), this, SLOT( slotStopRPM() ) );

    // tab order
    setTabOrder( strText, CreateButton );
    setTabOrder( CreateButton, ExecuteButton );
    setTabOrder( ExecuteButton, StopButton );
}

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

/*  
 *  Main event handler. Reimplemented to handle application
 *  font changes
 */
bool LogView::event( QEvent* ev )
{
    bool ret = QWidget::event( ev ); 
    if ( ev->type() == QEvent::ApplicationFontChange ) {
	QFont strText_font(  strText->font() );
	strText_font.setPointSize( 8 );
	strText->setFont( strText_font ); 
    }
    return ret;
}

void LogView::slotCreateSpec()
{
    qWarning( "LogView::slotCreateSpec(): Not implemented yet!" );
}

void LogView::slotRunRPM()
{
    qWarning( "LogView::slotRunRPM(): Not implemented yet!" );
}

void LogView::slotStopRPM()
{
    qWarning( "LogView::slotStopRPM(): Not implemented yet!" );
}

