/****************************************************************************
** Form implementation generated from reading ui file 'fileview.ui'
**
** Created: Sat Mar 9 00:44:14 2002
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "fileviewwidget.h"

#include <klocale.h>
#include <qgroupbox.h>
#include <qheader.h>
#include <qlistview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

static const char* const image0_data[] = { 
"16 16 102 2",
"Qt c None",
".h c #000000",
".d c #000400",
"#b c #00c2c5",
".2 c #00ffff",
"## c #080408",
".L c #080808",
".D c #100c10",
".b c #101010",
"#l c #181c18",
"#C c #202420",
".E c #292429",
".# c #292829",
".U c #313031",
".3 c #393c39",
".c c #393c41",
".i c #413c41",
".a c #414041",
"#o c #41404a",
".Z c #41aebd",
".S c #41b2bd",
".R c #5acede",
".I c #62c2d5",
".X c #6ac6cd",
".Y c #6acad5",
"#m c #737173",
"#c c #73717b",
".u c #73c6d5",
".H c #73d6e6",
".0 c #7bc6cd",
".W c #7bcede",
".Q c #7bdae6",
".p c #838583",
".j c #83858b",
".J c #83ced5",
".B c #83cede",
".1 c #8bcad5",
".O c #8bdae6",
".t c #94dae6",
".P c #94deee",
".A c #94e2ee",
"#a c #9c857b",
".G c #9ce2ee",
".M c #acd2d5",
".7 c #acd6de",
".n c #ace2ee",
".4 c #b4b2b4",
".T c #b4d6de",
".N c #b4e2ee",
".o c #b4e6ee",
".z c #b4eaf6",
"#k c #bda194",
"#j c #bda59c",
"#i c #bdaea4",
"#. c #bdbebd",
".5 c #bddade",
".w c #bddae6",
".C c #bddee6",
".v c #bdeeee",
".V c #bdeef6",
"#h c #c5beb4",
"#n c #c5c2c5",
"#d c #c5c6c5",
".g c #c5d6d5",
".F c #c5eaee",
".m c #c5eaf6",
".s c #c5eef6",
"#J c #cda183",
"#B c #cdaa8b",
"#u c #cdae94",
"#H c #cdb29c",
".9 c #cdcacd",
".8 c #cdcecd",
".e c #cddade",
".6 c #cdeef6",
"#I c #d5aa94",
"#G c #d5baac",
"#F c #d5c2b4",
".K c #d5eef6",
".y c #d5f6ff",
"#E c #decac5",
"#D c #ded2cd",
".f c #dee6ee",
".r c #def6f6",
".x c #def6ff",
"#t c #e6cab4",
"#e c #e6dee6",
"#v c #e6e2e6",
".k c #e6f6f6",
".l c #e6f6ff",
"#A c #eec6ac",
"#s c #eed2c5",
"#g c #eeeaee",
".q c #eeffff",
"#z c #f6d6c5",
"#y c #f6e2d5",
"#r c #f6e2de",
"#f c #f6f2f6",
"#x c #ffeeee",
"#q c #fff6f6",
"#w c #fffaf6",
"#p c #ffffff",
"QtQtQtQt.#.a.bQtQtQtQtQtQtQtQtQt",
"QtQt.c.d.e.f.g.h.iQtQtQtQtQtQtQt",
"Qt.a.j.k.l.m.n.o.p.aQtQtQtQtQtQt",
"Qt.h.k.q.r.s.t.u.v.hQtQtQtQtQtQt",
".b.w.x.l.y.z.A.u.B.C.DQtQtQtQtQt",
".E.f.F.s.z.G.H.I.J.K.LQtQtQtQtQt",
".D.M.N.O.P.Q.R.S.J.T.hQtQtQtQtQt",
".U.h.V.W.X.Y.S.Z.V.hQtQtQtQtQtQt",
".i.a.p.s.t.0.1.s.j.h.2QtQtQtQtQt",
".3.4.c.h.5.6.7.h.i.2.h.hQtQtQtQt",
".a.8.9#..d.L###a#b.h#c#d.hQtQtQt",
".a#e#f#g#h#i#j#k#l.h.a#m#n.hQtQt",
"#o#e#p#q#r#s#t#u.EQt.h.a#c#d.hQt",
".a#v#w#x#y#z#A#B#CQtQt.h.a#m#n.h",
".a#D#E#F#G#H#I#J.#QtQtQt.h.a#c.h",
".a.#.E.##C.#.E.##CQtQtQtQt.h.hQt"};


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

    GroupBox1 = new QGroupBox( this, "GroupBox1" );
    GroupBox1->setGeometry( QRect( 0, 0, 455, 330 ) ); 
    GroupBox1->setMinimumSize( QSize( 455, 330 ) );
    GroupBox1->setTitle( i18n( "Files" ) );

    QWidget* privateLayoutWidget = new QWidget( GroupBox1, "Layout3" );
    privateLayoutWidget->setGeometry( QRect( 340, 15, 110, 305 ) ); 
    Layout3 = new QVBoxLayout( privateLayoutWidget ); 
    Layout3->setSpacing( 6 );
    Layout3->setMargin( 0 );

    GroupBox4 = new QGroupBox( privateLayoutWidget, "GroupBox4" );
    GroupBox4->setTitle( i18n( "Files" ) );

    PushButton13 = new QPushButton( GroupBox4, "PushButton13" );
    PushButton13->setGeometry( QRect( 5, 20, 100, 32 ) ); 
    PushButton13->setText( i18n( "&Add" ) );
    QToolTip::add(  PushButton13, i18n( "Add files to the list" ) );

    PushButton14 = new QPushButton( GroupBox4, "PushButton14" );
    PushButton14->setGeometry( QRect( 5, 60, 100, 32 ) ); 
    PushButton14->setText( i18n( "&Remove" ) );
    QToolTip::add(  PushButton14, i18n( "Remove files from the list" ) );
    Layout3->addWidget( GroupBox4 );

    GroupBox5 = new QGroupBox( privateLayoutWidget, "GroupBox5" );
    GroupBox5->setTitle( i18n( "RPM" ) );

    PushButton1 = new QPushButton( GroupBox5, "PushButton1" );
    PushButton1->setGeometry( QRect( 5, 20, 100, 32 ) ); 
    PushButton1->setText( i18n( "&Create Spec" ) );
    QToolTip::add(  PushButton1, i18n( "Create the Spec file<br><b>Info:</b><br>Save this file in your SPECS directory<br><i><b>Example:</b><br>/usr/src/packages/SPECS</i>" ) );

    PushButton2 = new QPushButton( GroupBox5, "PushButton2" );
    PushButton2->setGeometry( QRect( 5, 60, 100, 32 ) ); 
    PushButton2->setText( i18n( "&Execute" ) );
    QToolTip::add(  PushButton2, i18n( "Execute rpm" ) );
    Layout3->addWidget( GroupBox5 );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    Layout3->addItem( spacer );

    ListView1 = new QListView( GroupBox1, "ListView1" );
    ListView1->addColumn( i18n( "File" ) );
    ListView1->header()->setLabel( ListView1->header()->count() - 1, image0, i18n( "File" ) );
    ListView1->setGeometry( QRect( 5, 20, 330, 300 ) ); 
    ListView1->setSelectionMode( QListView::Extended );
    ListView1->setShowSortIndicator( TRUE );

    // signals and slots connections
    connect( PushButton13, SIGNAL( clicked() ), this, SLOT( slotAddFiles() ) );
    connect( PushButton14, SIGNAL( clicked() ), this, SLOT( slotRemoveFiles() ) );
    connect( PushButton2, SIGNAL( clicked() ), this, SLOT( slotExecuteRpm() ) );
    connect( PushButton1, SIGNAL( clicked() ), this, SLOT( slotCreateSpec() ) );

    // tab order
    setTabOrder( ListView1, PushButton13 );
    setTabOrder( PushButton13, PushButton14 );
    setTabOrder( PushButton14, PushButton1 );
    setTabOrder( PushButton1, PushButton2 );
}

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

void FileView::slotAddFiles()
{
    qWarning( "FileView::slotAddFiles(): Not implemented yet!" );
}

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

void FileView::slotExecuteRpm()
{
    qWarning( "FileView::slotExecuteRpm(): Not implemented yet!" );
}

void FileView::slotRemoveFiles()
{
    qWarning( "FileView::slotRemoveFiles(): Not implemented yet!" );
}

