/**************************************************************************** ** Form implementation generated from reading ui file 'tobrowserindexui.ui' ** ** Created: Mon Feb 20 12:46:38 2006 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.4 edited Nov 24 2003 $) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ #include "tobrowserindexui.h" #include #include #include #include #include #include #include #include #include #include #include #include "toresultcols.h" #include "totableselect.h" static const char* const image0_data[] = { "16 16 3 1", ". c None", "# c #000000", "a c #00ff00", "..........###...", "..........#a#...", "..........#a#...", ".......####a####", ".......#aaaaaaa#", ".......####a####", "..........#a#...", "..........#a#...", "..........###...", "................", "................", "................", "................", "................", "................", "................"}; static const char* const image1_data[] = { "16 16 3 1", ". c None", "# c #000000", "a c #ff0000", "................", "................", "................", ".......#########", ".......#aaaaaaa#", ".......#########", "................", "................", "................", "................", "................", "................", "................", "................", "................", "................"}; static const char* const image2_data[] = { "16 16 14 1", ". c None", "# c #000000", "i c #181841", "e c #20205a", "k c #202462", "c c #292873", "l c #292c7b", "h c #313083", "b c #393cac", "d c #4140b4", "f c #4a4ccd", "j c #5a59f6", "g c #5a5df6", "a c #5a5dff", "................", ".###..###..##...", "#..#.#..#..#....", "##...#...#.#....", "..#..#####.#....", "...#.#aab#.#....", "#..##cdaef##..#.", ".##.#ghiha#####.", "....#aajkl#.....", ".....#aaa#......", "......#####.....", ".........###....", "..........###...", "...........##...", "................", "................"}; /* * Constructs a toBrowserIndexUI as 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. */ toBrowserIndexUI::toBrowserIndexUI( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ), image0( (const char **) image0_data ), image1( (const char **) image1_data ), image2( (const char **) image2_data ) { if ( !name ) setName( "toBrowserIndexUI" ); toBrowserIndexUILayout = new QGridLayout( this, 1, 1, 11, 6, "toBrowserIndexUILayout"); layout1 = new QHBoxLayout( 0, 0, 6, "layout1"); TextLabel1 = new QLabel( this, "TextLabel1" ); TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); layout1->addWidget( TextLabel1 ); toolButton2 = new QToolButton( this, "toolButton2" ); toolButton2->setPixmap( image0 ); layout1->addWidget( toolButton2 ); toolButton3 = new QToolButton( this, "toolButton3" ); toolButton3->setPixmap( image1 ); layout1->addWidget( toolButton3 ); toBrowserIndexUILayout->addMultiCellLayout( layout1, 1, 1, 0, 3 ); Cols = new QLineEdit( this, "Cols" ); toBrowserIndexUILayout->addMultiCellWidget( Cols, 6, 6, 0, 3 ); ToolButton1 = new QToolButton( this, "ToolButton1" ); ToolButton1->setFocusPolicy( QToolButton::StrongFocus ); ToolButton1->setPixmap( image2 ); toBrowserIndexUILayout->addWidget( ToolButton1, 8, 0 ); Name = new QComboBox( FALSE, this, "Name" ); toBrowserIndexUILayout->addMultiCellWidget( Name, 2, 2, 0, 3 ); Type = new QComboBox( FALSE, this, "Type" ); toBrowserIndexUILayout->addMultiCellWidget( Type, 4, 4, 0, 3 ); TextLabel2 = new QLabel( this, "TextLabel2" ); toBrowserIndexUILayout->addMultiCellWidget( TextLabel2, 5, 5, 0, 3 ); textLabel1 = new QLabel( this, "textLabel1" ); toBrowserIndexUILayout->addMultiCellWidget( textLabel1, 3, 3, 0, 3 ); ColList = new toResultCols( this, "ColList" ); ColList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, ColList->sizePolicy().hasHeightForWidth() ) ); ColList->setFocusPolicy( toResultCols::StrongFocus ); toBrowserIndexUILayout->addMultiCellWidget( ColList, 7, 7, 0, 3 ); PushButton2 = new QPushButton( this, "PushButton2" ); toBrowserIndexUILayout->addWidget( PushButton2, 8, 3 ); Spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); toBrowserIndexUILayout->addItem( Spacer2, 8, 1 ); PushButton1 = new QPushButton( this, "PushButton1" ); PushButton1->setDefault( TRUE ); toBrowserIndexUILayout->addWidget( PushButton1, 8, 2 ); TableSelect = new toTableSelect( this, "TableSelect" ); toBrowserIndexUILayout->addMultiCellWidget( TableSelect, 0, 0, 0, 3 ); languageChange(); resize( QSize(588, 628).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( PushButton1, SIGNAL( clicked() ), this, SLOT( accept() ) ); connect( PushButton2, SIGNAL( clicked() ), this, SLOT( reject() ) ); connect( ToolButton1, SIGNAL( clicked() ), this, SLOT( displaySQL() ) ); connect( toolButton2, SIGNAL( clicked() ), this, SLOT( addIndex() ) ); connect( toolButton3, SIGNAL( clicked() ), this, SLOT( delIndex() ) ); connect( Name, SIGNAL( activated(int) ), this, SLOT( changeIndex() ) ); // tab order setTabOrder( Name, Type ); setTabOrder( Type, Cols ); setTabOrder( Cols, ColList ); setTabOrder( ColList, ToolButton1 ); setTabOrder( ToolButton1, PushButton1 ); setTabOrder( PushButton1, PushButton2 ); // buddies TextLabel1->setBuddy( Name ); TextLabel2->setBuddy( Cols ); } /* * Destroys the object and frees any allocated resources */ toBrowserIndexUI::~toBrowserIndexUI() { // no need to delete child widgets, Qt does it all for us } /* * Sets the strings of the subwidgets using the current * language. */ void toBrowserIndexUI::languageChange() { setCaption( tr( "Index name" ) ); TextLabel1->setText( tr( "&Name" ) ); toolButton2->setText( QString::null ); toolButton3->setText( QString::null ); ToolButton1->setText( QString::null ); QToolTip::add( ToolButton1, tr( "Display SQL to create this constraint" ) ); Type->clear(); Type->insertItem( tr( "Normal Index" ) ); Type->insertItem( tr( "Unique Index" ) ); TextLabel2->setText( tr( "&Columns" ) ); textLabel1->setText( tr( "Type" ) ); PushButton2->setText( tr( "Cancel" ) ); PushButton1->setText( tr( "&Ok" ) ); } void toBrowserIndexUI::displaySQL() { qWarning( "toBrowserIndexUI::displaySQL(): Not implemented yet" ); } void toBrowserIndexUI::addIndex() { qWarning( "toBrowserIndexUI::addIndex(): Not implemented yet" ); } void toBrowserIndexUI::delIndex() { qWarning( "toBrowserIndexUI::delIndex(): Not implemented yet" ); } void toBrowserIndexUI::changeIndex() { qWarning( "toBrowserIndexUI::changeIndex(): Not implemented yet" ); }