/****************************************************************************
** Form implementation generated from reading ui file 'example6.ui'
**
** Created: Thu Aug 2 12:19:02 2001
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "ex6.h"

#include <qbuttongroup.h>
#include <qcombobox.h>
#include <qdial.h>
#include <qheader.h>
#include <qiconview.h>
#include <qlcdnumber.h>
#include <qlineedit.h>
#include <qlistbox.h>
#include <qlistview.h>
#include <qmultilineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qslider.h>
#include <qspinbox.h>
#include <qtable.h>
#include <qtabwidget.h>
#include <qwidget.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[] = { 
"32 32 10 1",
". c None",
"# c #000000",
"b c #00c200",
"e c #313031",
"h c #410000",
"d c #5a595a",
"g c #a4a1a4",
"f c #c5c2c5",
"a c #c5ffc5",
"c c #ffffff",
"...###..........................",
"...#aa##........................",
".###baaa##......................",
".#cd##baaa##....................",
".#cccd##baaa##..##e.............",
".#cccccd##baaa##aaa##...........",
".#cccccccd##baaaaaaaa##.........",
".#cccccccccd##baaaaaaa#.........",
".#cccccfcffgg#bbbbaaaaa#........",
".#ccccccfcfffd#bbbbbbaa#........",
".#cccfcfcfcffgd##bh#bbba#.......",
".#ccccfcfffffffgd#dd##ba#.......",
".#cfcfcfcfffffffffgfgd#bb#......",
".#ccfcfffffffffgfgfgfgd#b#......",
".#cfcfcfffffffffgfgfggd#b#......",
".#fcfffffffffgfgfgggggd#b#......",
".#cfcfffffffffgfgfggggd#b#......",
".#fffffffffgfgfgggggggdhb#......",
".#ffffffffffgfgfggggggd#b#......",
".#ggfffffgfgfgggggggggd#b#......",
".#ddggffffgfgfggggggggd#b#......",
"..##ddggfgfgggggggggggd#b#......",
"....##ddgggfggggggggggd#b#......",
"......##ddggggggggggggd#b#......",
"........##ddggggggggggd#b#......",
"..........##ddggggggggd#b#......",
"............##ddggggggd#b###....",
"..............##ddggggd#b#####..",
"................##ddggd#b######.",
"..................##ddd#b#####..",
"....................##d#b###....",
"......................####......"};


/* 
 *  Constructs a MyDialog 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.
 */
MyDialog::MyDialog( QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    QPixmap image0( ( const char** ) image0_data );
    if ( !name )
	setName( "MyDialog" );
    resize( 483, 284 ); 
    setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, sizePolicy().hasHeightForWidth() ) );
    setProperty( "caption", tr( "A Dialog" ) );
    setProperty( "sizeGripEnabled", QVariant( TRUE, 0 ) );
    MyDialogLayout = new QGridLayout( this ); 
    MyDialogLayout->setSpacing( 6 );
    MyDialogLayout->setMargin( 11 );

    ButtonGroup1 = new QButtonGroup( this, "ButtonGroup1" );
    ButtonGroup1->setProperty( "minimumSize", QSize( 100, 0 ) );
    ButtonGroup1->setProperty( "title", tr( "&Choose" ) );

    radioApple = new QRadioButton( ButtonGroup1, "radioApple" );
    radioApple->setGeometry( QRect( 10, 60, 60, 20 ) ); 
    radioApple->setProperty( "text", tr( "&Apple" ) );

    radioOrange = new QRadioButton( ButtonGroup1, "radioOrange" );
    radioOrange->setGeometry( QRect( 10, 90, 70, 20 ) ); 
    radioOrange->setProperty( "text", tr( "&Orange" ) );

    radioKiwi = new QRadioButton( ButtonGroup1, "radioKiwi" );
    radioKiwi->setGeometry( QRect( 10, 120, 60, 20 ) ); 
    radioKiwi->setProperty( "text", tr( "&Kiwi" ) );

    radioBanana = new QRadioButton( ButtonGroup1, "radioBanana" );
    radioBanana->setGeometry( QRect( 10, 30, 70, 20 ) ); 
    radioBanana->setProperty( "text", tr( "&Banana" ) );

    MyDialogLayout->addWidget( ButtonGroup1, 0, 0 );

    Layout9 = new QHBoxLayout; 
    Layout9->setSpacing( 6 );
    Layout9->setMargin( 0 );

    buttonHelp = new QPushButton( this, "buttonHelp" );
    buttonHelp->setProperty( "text", tr( "&Help" ) );
    buttonHelp->setProperty( "autoDefault", QVariant( TRUE, 0 ) );
    Layout9->addWidget( buttonHelp );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout9->addItem( spacer );

    buttonApply = new QPushButton( this, "buttonApply" );
    buttonApply->setProperty( "text", tr( "&Apply" ) );
    buttonApply->setProperty( "autoDefault", QVariant( TRUE, 0 ) );
    Layout9->addWidget( buttonApply );

    buttonOk = new QPushButton( this, "buttonOk" );
    buttonOk->setProperty( "text", tr( "&OK" ) );
    buttonOk->setProperty( "autoDefault", QVariant( TRUE, 0 ) );
    buttonOk->setProperty( "default", QVariant( TRUE, 0 ) );
    Layout9->addWidget( buttonOk );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setProperty( "text", tr( "&Cancel" ) );
    buttonCancel->setProperty( "autoDefault", QVariant( TRUE, 0 ) );
    Layout9->addWidget( buttonCancel );

    MyDialogLayout->addMultiCellLayout( Layout9, 1, 1, 0, 1 );

    TabWidget2 = new QTabWidget( this, "TabWidget2" );
    TabWidget2->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, TabWidget2->sizePolicy().hasHeightForWidth() ) );
    TabWidget2->setProperty( "maximumSize", QSize( 32767, 32767 ) );

    Widget2 = new QWidget( TabWidget2, "Widget2" );
    Widget2Layout = new QHBoxLayout( Widget2 ); 
    Widget2Layout->setSpacing( 6 );
    Widget2Layout->setMargin( 11 );

    listEditor = new QListView( Widget2, "listEditor" );
    listEditor->addColumn( tr( "Column 1" ) );
    listEditor->addColumn( tr( "Another Column" ) );
    QListViewItem * item = new QListViewItem( listEditor, 0 );
    item->setText( 0, tr( "Item" ) );
    item->setPixmap( 0, image0 );

    QListViewItem * item_2 = new QListViewItem( listEditor, item );
    item_2->setOpen( TRUE );
    QListViewItem * item_3 = new QListViewItem( item_2, item );
    item_3->setOpen( TRUE );
    item = new QListViewItem( item_3, item );
    item->setText( 0, tr( "Sub Item" ) );
    item_3->setText( 0, tr( "Sub Item" ) );
    item_3->setText( 1, tr( "Another cell" ) );
    item_2->setText( 0, tr( "Item" ) );

    QListViewItem * item_4 = new QListViewItem( listEditor, item_2 );
    item_4->setOpen( TRUE );
    item = new QListViewItem( item_4, item_2 );
    item->setText( 0, tr( "Sub Item" ) );
    item_4->setOpen( TRUE );
    item = new QListViewItem( item_4, item );
    item->setText( 0, tr( "Sub Item" ) );
    item_4->setText( 0, tr( "Item" ) );
    item_4->setText( 1, tr( "Something" ) );

    item = new QListViewItem( listEditor, item_4 );
    item->setText( 0, tr( "New Item" ) );

    listEditor->setProperty( "rootIsDecorated", QVariant( TRUE, 0 ) );
    Widget2Layout->addWidget( listEditor );

    Layout4 = new QVBoxLayout; 
    Layout4->setSpacing( 6 );
    Layout4->setMargin( 0 );

    PushButton7 = new QPushButton( Widget2, "PushButton7" );
    PushButton7->setProperty( "maximumSize", QSize( 32767, 32767 ) );
    PushButton7->setProperty( "text", tr( "Up" ) );
    Layout4->addWidget( PushButton7 );

    PushButton8 = new QPushButton( Widget2, "PushButton8" );
    PushButton8->setProperty( "text", tr( "Down" ) );
    Layout4->addWidget( PushButton8 );
    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    Layout4->addItem( spacer_2 );
    Widget2Layout->addLayout( Layout4 );
    TabWidget2->insertTab( Widget2, tr( "&Editor" ) );

    Widget3 = new QWidget( TabWidget2, "Widget3" );
    Widget3Layout = new QHBoxLayout( Widget3 ); 
    Widget3Layout->setSpacing( 6 );
    Widget3Layout->setMargin( 11 );

    slider = new QSlider( Widget3, "slider" );
    slider->setProperty( "orientation", (int)QSlider::Vertical );
    Widget3Layout->addWidget( slider );

    lcdnumber = new QLCDNumber( Widget3, "lcdnumber" );
    Widget3Layout->addWidget( lcdnumber );
    TabWidget2->insertTab( Widget3, tr( "A&ppearance" ) );

    tabTable = new QWidget( TabWidget2, "tabTable" );
    tabTableLayout = new QVBoxLayout( tabTable ); 
    tabTableLayout->setSpacing( 6 );
    tabTableLayout->setMargin( 11 );

    Table1 = new QTable( tabTable, "Table1" );
    Table1->setProperty( "numRows", 10 );
    Table1->setProperty( "numCols", 10 );
    tabTableLayout->addWidget( Table1 );
    TabWidget2->insertTab( tabTable, tr( "Table" ) );

    tabIconVIew = new QWidget( TabWidget2, "tabIconVIew" );
    tabIconVIewLayout = new QVBoxLayout( tabIconVIew ); 
    tabIconVIewLayout->setSpacing( 6 );
    tabIconVIewLayout->setMargin( 11 );

    IconView1 = new QIconView( tabIconVIew, "IconView1" );
    (void) new QIconViewItem( IconView1, tr( "Item1" ), image0 );
    (void) new QIconViewItem( IconView1, tr( "Item2" ), image0 );
    tabIconVIewLayout->addWidget( IconView1 );
    TabWidget2->insertTab( tabIconVIew, tr( "IconView" ) );

    tabMisc = new QWidget( TabWidget2, "tabMisc" );

    LineEdit1 = new QLineEdit( tabMisc, "LineEdit1" );
    LineEdit1->setGeometry( QRect( 11, 11, 183, 22 ) ); 

    SpinBox1 = new QSpinBox( tabMisc, "SpinBox1" );
    SpinBox1->setGeometry( QRect( 11, 39, 183, 23 ) ); 

    MultiLineEdit1 = new QMultiLineEdit( tabMisc, "MultiLineEdit1" );
    MultiLineEdit1->setGeometry( QRect( 11, 68, 183, 118 ) ); 

    Slider5 = new QSlider( tabMisc, "Slider5" );
    Slider5->setGeometry( QRect( 200, 42, 144, 16 ) ); 
    Slider5->setProperty( "orientation", (int)QSlider::Horizontal );

    Dial1 = new QDial( tabMisc, "Dial1" );
    Dial1->setGeometry( QRect( 201, 69, 70, 50 ) ); 

    LCDNumber2 = new QLCDNumber( tabMisc, "LCDNumber2" );
    LCDNumber2->setGeometry( QRect( 280, 70, 64, 50 ) ); 

    ComboBox1 = new QComboBox( FALSE, tabMisc, "ComboBox1" );
    ComboBox1->setGeometry( QRect( 200, 11, 144, 22 ) ); 
    ComboBox1->setProperty( "acceptDrops", QVariant( TRUE, 0 ) );
    ComboBox1->setProperty( "editable", QVariant( TRUE, 0 ) );
    ComboBox1->setProperty( "autoCompletion", QVariant( TRUE, 0 ) );

    ListBox1 = new QListBox( tabMisc, "ListBox1" );
    ListBox1->insertItem( image0, tr( "New Item" ) );
    ListBox1->insertItem( tr( "New Item" ) );
    ListBox1->insertItem( tr( "New Item" ) );
    ListBox1->setGeometry( QRect( 200, 126, 150, 60 ) ); 
    ListBox1->setProperty( "acceptDrops", QVariant( TRUE, 0 ) );
    TabWidget2->insertTab( tabMisc, tr( "TabMisc" ) );

    MyDialogLayout->addWidget( TabWidget2, 0, 1 );

    // signals and slots connections
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
    connect( slider, SIGNAL( valueChanged(int) ), lcdnumber, SLOT( display(int) ) );
    connect( PushButton7, SIGNAL( clicked() ), this, SLOT( upClicked() ) );
    connect( PushButton8, SIGNAL( clicked() ), this, SLOT( downClicked() ) );
    connect( Slider5, SIGNAL( valueChanged(int) ), Dial1, SLOT( setValue(int) ) );
    connect( Dial1, SIGNAL( valueChanged(int) ), Slider5, SLOT( setValue(int) ) );
    connect( Dial1, SIGNAL( valueChanged(int) ), LCDNumber2, SLOT( display(int) ) );
    connect( ListBox1, SIGNAL( highlighted(const QString&) ), ComboBox1, SLOT( setEditText(const QString&) ) );

    // tab order
    setTabOrder( radioBanana, radioApple );
    setTabOrder( radioApple, radioOrange );
    setTabOrder( radioOrange, radioKiwi );
    setTabOrder( radioKiwi, listEditor );
    setTabOrder( listEditor, TabWidget2 );
    setTabOrder( TabWidget2, PushButton8 );
    setTabOrder( PushButton8, PushButton7 );
    setTabOrder( PushButton7, buttonCancel );
    setTabOrder( buttonCancel, buttonOk );
    setTabOrder( buttonOk, buttonApply );
    setTabOrder( buttonApply, buttonHelp );
    setTabOrder( buttonHelp, slider );
    setTabOrder( slider, Table1 );
    setTabOrder( Table1, IconView1 );
}

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

void MyDialog::downClicked()
{
    qWarning( "MyDialog::downClicked(): Not implemented yet!" );
}

void MyDialog::upClicked()
{
    qWarning( "MyDialog::upClicked(): Not implemented yet!" );
}

