# Form implementation generated from reading ui file 'example6.ui'
#
# Created: Thu Aug 2 04:41:29 2001
#      by: The Ruby User Interface Compiler (rbuic)
#
# WARNING! All changes made in this file will be lost!


require 'qt2'
include Qt2


require 'qt2table'
include Qt2table
require 'qt2iconview'
include Qt2iconview


class MyDialog < QDialog
    def initialize(parent=nil,name="",modal=false,f=0)
        super



        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###....',
'......................####......'
]
        image0 = QPixmap.new(image0_data)

        if ( name == "unnamed" )
            setName('MyDialog')
        end
        resize(483,284)
        setProperty('sizePolicy',QSizePolicy.new(5,5,self.sizePolicy().hasHeightForWidth()))
        setProperty('caption',tr("A Dialog"))
        setProperty('sizeGripEnabled',true)
        myDialogLayout = QGridLayout.new(self)
        myDialogLayout.setSpacing(6)
        myDialogLayout.setMargin(11)

        @ButtonGroup1 = QButtonGroup.new(self,'@ButtonGroup1')
        @ButtonGroup1.setProperty('minimumSize',QSize.new(100,0))
        @ButtonGroup1.setProperty('title',tr("&Choose"))

        @radioApple = QRadioButton.new(@ButtonGroup1,'@radioApple')
        @radioApple.setGeometry(QRect.new(10,60,60,20))
        @radioApple.setProperty('text',tr("&Apple"))

        @radioOrange = QRadioButton.new(@ButtonGroup1,'@radioOrange')
        @radioOrange.setGeometry(QRect.new(10,90,70,20))
        @radioOrange.setProperty('text',tr("&Orange"))

        @radioKiwi = QRadioButton.new(@ButtonGroup1,'@radioKiwi')
        @radioKiwi.setGeometry(QRect.new(10,120,60,20))
        @radioKiwi.setProperty('text',tr("&Kiwi"))

        @radioBanana = QRadioButton.new(@ButtonGroup1,'@radioBanana')
        @radioBanana.setGeometry(QRect.new(10,30,70,20))
        @radioBanana.setProperty('text',tr("&Banana"))

        myDialogLayout.addWidget(@ButtonGroup1,0,0)

        layout9 = QHBoxLayout.new()
        layout9.setSpacing(6)
        layout9.setMargin(0)

        @buttonHelp = QPushButton.new(self,'@buttonHelp')
        @buttonHelp.setProperty('text',tr("&Help"))
        @buttonHelp.setProperty('autoDefault',true)
        layout9.addWidget(@buttonHelp)
        spacer = QSpacerItem.new(20,20,QSizePolicy::Expanding,QSizePolicy::Minimum)
        layout9.addItem(spacer)

        @buttonApply = QPushButton.new(self,'@buttonApply')
        @buttonApply.setProperty('text',tr("&Apply"))
        @buttonApply.setProperty('autoDefault',true)
        layout9.addWidget(@buttonApply)

        @buttonOk = QPushButton.new(self,'@buttonOk')
        @buttonOk.setProperty('text',tr("&OK"))
        @buttonOk.setProperty('autoDefault',true)
        @buttonOk.setProperty('default',true)
        layout9.addWidget(@buttonOk)

        @buttonCancel = QPushButton.new(self,'@buttonCancel')
        @buttonCancel.setProperty('text',tr("&Cancel"))
        @buttonCancel.setProperty('autoDefault',true)
        layout9.addWidget(@buttonCancel)

        myDialogLayout.addMultiCellLayout(layout9,1,1,0,1)

        @TabWidget2 = QTabWidget.new(self,'@TabWidget2')
        @TabWidget2.setProperty('sizePolicy',QSizePolicy.new(7,7,@TabWidget2.sizePolicy().hasHeightForWidth()))
        @TabWidget2.setProperty('maximumSize',QSize.new(32767,32767))

        @Widget2 = QWidget.new(@TabWidget2,'@Widget2')
        widget2Layout = QHBoxLayout.new(@Widget2)
        widget2Layout.setSpacing(6)
        widget2Layout.setMargin(11)

        @listEditor = QListView.new(@Widget2,'@listEditor')
        @listEditor.addColumn(tr("Column 1"))
        @listEditor.addColumn(tr("Another Column"))
        item = QListViewItem.new(@listEditor,nil)
        item.setText(0,tr("Item"))
        item.setPixmap(0,image0)

        item_2 = QListViewItem.new(@listEditor,item)
        item_2.setOpen(1)
        item_3 = QListViewItem.new(item_2,item)
        item_3.setOpen(1)
        item = QListViewItem.new(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"))

        item_4 = QListViewItem.new(@listEditor,item_2)
        item_4.setOpen(1)
        item = QListViewItem.new(item_4,item_2)
        item.setText(0,tr("Sub Item"))
        item_4.setOpen(1)
        item = QListViewItem.new(item_4,item)
        item.setText(0,tr("Sub Item"))
        item_4.setText(0,tr("Item"))
        item_4.setText(1,tr("Something"))

        item = QListViewItem.new(@listEditor,item_4)
        item.setText(0,tr("New Item"))

        @listEditor.setProperty('rootIsDecorated',true)
        widget2Layout.addWidget(@listEditor)

        layout4 = QVBoxLayout.new()
        layout4.setSpacing(6)
        layout4.setMargin(0)

        @PushButton7 = QPushButton.new(@Widget2,'@PushButton7')
        @PushButton7.setProperty('maximumSize',QSize.new(32767,32767))
        @PushButton7.setProperty('text',tr("Up"))
        layout4.addWidget(@PushButton7)

        @PushButton8 = QPushButton.new(@Widget2,'@PushButton8')
        @PushButton8.setProperty('text',tr("Down"))
        layout4.addWidget(@PushButton8)
        spacer_2 = QSpacerItem.new(20,20,QSizePolicy::Minimum,QSizePolicy::Expanding)
        layout4.addItem(spacer_2)
        widget2Layout.addLayout(layout4)
        @TabWidget2.insertTab(@Widget2,tr("&Editor"))

        @Widget3 = QWidget.new(@TabWidget2,'@Widget3')
        widget3Layout = QHBoxLayout.new(@Widget3)
        widget3Layout.setSpacing(6)
        widget3Layout.setMargin(11)

        @slider = QSlider.new(@Widget3,'@slider')
        @slider.setProperty('orientation',QSlider::Vertical)
        widget3Layout.addWidget(@slider)

        @lcdnumber = QLCDNumber.new(@Widget3,'@lcdnumber')
        widget3Layout.addWidget(@lcdnumber)
        @TabWidget2.insertTab(@Widget3,tr("A&ppearance"))

        @tabTable = QWidget.new(@TabWidget2,'@tabTable')
        tabTableLayout = QVBoxLayout.new(@tabTable)
        tabTableLayout.setSpacing(6)
        tabTableLayout.setMargin(11)

        @Table1 = QTable.new(@tabTable,'@Table1')
        @Table1.setProperty('numRows',10)
        @Table1.setProperty('numCols',10)
        tabTableLayout.addWidget(@Table1)
        @TabWidget2.insertTab(@tabTable,tr("Table"))

        @tabIconVIew = QWidget.new(@TabWidget2,'@tabIconVIew')
        tabIconVIewLayout = QVBoxLayout.new(@tabIconVIew)
        tabIconVIewLayout.setSpacing(6)
        tabIconVIewLayout.setMargin(11)

        @IconView1 = QIconView.new(@tabIconVIew,'@IconView1')
        QIconViewItem.new(@IconView1,tr("Item1"),image0)
        QIconViewItem.new(@IconView1,tr("Item2"),image0)
        tabIconVIewLayout.addWidget(@IconView1)
        @TabWidget2.insertTab(@tabIconVIew,tr("IconView"))

        @tabMisc = QWidget.new(@TabWidget2,'@tabMisc')

        @LineEdit1 = QLineEdit.new(@tabMisc,'@LineEdit1')
        @LineEdit1.setGeometry(QRect.new(11,11,183,22))

        @SpinBox1 = QSpinBox.new(@tabMisc,'@SpinBox1')
        @SpinBox1.setGeometry(QRect.new(11,39,183,23))

        @MultiLineEdit1 = QMultiLineEdit.new(@tabMisc,'@MultiLineEdit1')
        @MultiLineEdit1.setGeometry(QRect.new(11,68,183,118))

        @Slider5 = QSlider.new(@tabMisc,'@Slider5')
        @Slider5.setGeometry(QRect.new(200,42,144,16))
        @Slider5.setProperty('orientation',QSlider::Horizontal)

        @Dial1 = QDial.new(@tabMisc,'@Dial1')
        @Dial1.setGeometry(QRect.new(201,69,70,50))

        @LCDNumber2 = QLCDNumber.new(@tabMisc,'@LCDNumber2')
        @LCDNumber2.setGeometry(QRect.new(280,70,64,50))

        @ComboBox1 = QComboBox.new(@tabMisc,'@ComboBox1')
        @ComboBox1.setGeometry(QRect.new(200,11,144,22))
        @ComboBox1.setProperty('acceptDrops',true)
        @ComboBox1.setProperty('editable',true)
        @ComboBox1.setProperty('autoCompletion',true)

        @ListBox1 = QListBox.new(@tabMisc,'@ListBox1')
        @ListBox1.insertItem(image0,tr("New Item"))
        @ListBox1.insertItem(tr("New Item"))
        @ListBox1.insertItem(tr("New Item"))
        @ListBox1.setGeometry(QRect.new(200,126,150,60))
        @ListBox1.setProperty('acceptDrops',true)
        @TabWidget2.insertTab(@tabMisc,tr("TabMisc"))

        myDialogLayout.addWidget(@TabWidget2,0,1)

        Qt2::connect(@buttonOk,QSIGNAL('clicked()'),self,QSLOT('accept()'))
        Qt2::connect(@buttonCancel,QSIGNAL('clicked()'),self,QSLOT('reject()'))
        Qt2::connect(@slider,QSIGNAL('valueChanged(int)'),@lcdnumber,QSLOT('display(int)'))
        Qt2::connect(@PushButton7,QSIGNAL('clicked()'),self,'upClicked()')
        Qt2::connect(@PushButton8,QSIGNAL('clicked()'),self,'downClicked()')
        Qt2::connect(@Slider5,QSIGNAL('valueChanged(int)'),@Dial1,QSLOT('setValue(int)'))
        Qt2::connect(@Dial1,QSIGNAL('valueChanged(int)'),@Slider5,QSLOT('setValue(int)'))
        Qt2::connect(@Dial1,QSIGNAL('valueChanged(int)'),@LCDNumber2,QSLOT('display(int)'))
        Qt2::connect(@ListBox1,QSIGNAL('highlighted(const QString&)'),@ComboBox1,QSLOT('setEditText(const QString&)'))

        QWidget::setTabOrder(@radioBanana,@radioApple)
        QWidget::setTabOrder(@radioApple,@radioOrange)
        QWidget::setTabOrder(@radioOrange,@radioKiwi)
        QWidget::setTabOrder(@radioKiwi,@listEditor)
        QWidget::setTabOrder(@listEditor,@TabWidget2)
        QWidget::setTabOrder(@TabWidget2,@PushButton8)
        QWidget::setTabOrder(@PushButton8,@PushButton7)
        QWidget::setTabOrder(@PushButton7,@buttonCancel)
        QWidget::setTabOrder(@buttonCancel,@buttonOk)
        QWidget::setTabOrder(@buttonOk,@buttonApply)
        QWidget::setTabOrder(@buttonApply,@buttonHelp)
        QWidget::setTabOrder(@buttonHelp,@slider)
        QWidget::setTabOrder(@slider,@Table1)
        QWidget::setTabOrder(@Table1,@IconView1)
    end

    def downClicked(dummy=nil) # args are()
        print "MyDialog.downClicked(): not implemented yet
"
    end

    def upClicked(dummy=nil) # args are()
        print "MyDialog.upClicked(): not implemented yet
"
    end
end


# main routine
    a = QApplication.new([$0]+ARGV)
    Qt2::connect(a,QSIGNAL('lastWindowClosed()'),a,QSLOT('quit()'))
    w = MyDialog.new()
    a.setMainWidget(w)
    w.show()
    a.exec()
