/**************************************************************************** ** Form implementation generated from reading ui file 'tosyntaxsetupui.ui' ** ** Created: Mon Feb 20 12:46:41 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 "tosyntaxsetupui.h" #include #include #include #include #include #include #include #include #include #include #include #include "tohighlightedtext.h" /* * Constructs a toSyntaxSetupUI as a child of 'parent', with the * name 'name' and widget flags set to 'f'. */ toSyntaxSetupUI::toSyntaxSetupUI( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { if ( !name ) setName( "toSyntaxSetupUI" ); toSyntaxSetupUILayout = new QGridLayout( this, 1, 1, 0, 6, "toSyntaxSetupUILayout"); Options = new QGroupBox( this, "Options" ); Options->setColumnLayout(0, Qt::Vertical ); Options->layout()->setSpacing( 6 ); Options->layout()->setMargin( 11 ); OptionsLayout = new QGridLayout( Options->layout() ); OptionsLayout->setAlignment( Qt::AlignTop ); KeywordUpper = new QCheckBox( Options, "KeywordUpper" ); OptionsLayout->addMultiCellWidget( KeywordUpper, 1, 1, 0, 2 ); CodeCompletion = new QCheckBox( Options, "CodeCompletion" ); OptionsLayout->addMultiCellWidget( CodeCompletion, 2, 2, 0, 2 ); CompletionSort = new QCheckBox( Options, "CompletionSort" ); CompletionSort->setEnabled( FALSE ); CompletionSort->setChecked( TRUE ); OptionsLayout->addMultiCellWidget( CompletionSort, 3, 3, 0, 2 ); SyntaxHighlighting = new QCheckBox( Options, "SyntaxHighlighting" ); OptionsLayout->addMultiCellWidget( SyntaxHighlighting, 0, 0, 0, 2 ); AutoIndent = new QCheckBox( Options, "AutoIndent" ); OptionsLayout->addMultiCellWidget( AutoIndent, 4, 4, 0, 2 ); PushButton1 = new QPushButton( Options, "PushButton1" ); OptionsLayout->addWidget( PushButton1, 7, 2 ); ResultExample = new QLabel( Options, "ResultExample" ); OptionsLayout->addWidget( ResultExample, 7, 0 ); CodeExample = new QLabel( Options, "CodeExample" ); OptionsLayout->addWidget( CodeExample, 6, 0 ); PushButton1_2 = new QPushButton( Options, "PushButton1_2" ); OptionsLayout->addWidget( PushButton1_2, 6, 2 ); PushButton1_2_2 = new QPushButton( Options, "PushButton1_2_2" ); OptionsLayout->addWidget( PushButton1_2_2, 5, 2 ); TextExample = new QLabel( Options, "TextExample" ); OptionsLayout->addWidget( TextExample, 5, 0 ); Extensions = new QLineEdit( Options, "Extensions" ); OptionsLayout->addMultiCellWidget( Extensions, 8, 8, 1, 2 ); TextLabel1 = new QLabel( Options, "TextLabel1" ); OptionsLayout->addWidget( TextLabel1, 8, 0 ); Spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); OptionsLayout->addItem( Spacer1, 10, 1 ); TabStop = new QSpinBox( Options, "TabStop" ); TabStop->setMinValue( 1 ); OptionsLayout->addWidget( TabStop, 9, 2 ); TextLabel1_2 = new QLabel( Options, "TextLabel1_2" ); OptionsLayout->addMultiCellWidget( TextLabel1_2, 9, 9, 0, 1 ); toSyntaxSetupUILayout->addWidget( Options, 0, 1 ); Example = new toHighlightedText( this, "Example" ); toSyntaxSetupUILayout->addMultiCellWidget( Example, 1, 1, 0, 1 ); GroupBox2 = new QGroupBox( this, "GroupBox2" ); GroupBox2->setColumnLayout(0, Qt::Vertical ); GroupBox2->layout()->setSpacing( 6 ); GroupBox2->layout()->setMargin( 11 ); GroupBox2Layout = new QGridLayout( GroupBox2->layout() ); GroupBox2Layout->setAlignment( Qt::AlignTop ); ExampleColor = new QLabel( GroupBox2, "ExampleColor" ); GroupBox2Layout->addWidget( ExampleColor, 1, 0 ); PushButton3 = new QPushButton( GroupBox2, "PushButton3" ); PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) ); GroupBox2Layout->addWidget( PushButton3, 1, 1 ); SyntaxComponent = new QListBox( GroupBox2, "SyntaxComponent" ); GroupBox2Layout->addMultiCellWidget( SyntaxComponent, 0, 0, 0, 1 ); toSyntaxSetupUILayout->addWidget( GroupBox2, 0, 0 ); languageChange(); resize( QSize(548, 527).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( PushButton1, SIGNAL( clicked() ), this, SLOT( selectResultFont(void) ) ); connect( PushButton1_2, SIGNAL( clicked() ), this, SLOT( selectFont(void) ) ); connect( SyntaxHighlighting, SIGNAL( toggled(bool) ), this, SLOT( changeHighlight(bool) ) ); connect( KeywordUpper, SIGNAL( toggled(bool) ), this, SLOT( changeUpper(bool) ) ); connect( PushButton3, SIGNAL( clicked() ), this, SLOT( selectColor(void) ) ); connect( SyntaxComponent, SIGNAL( selectionChanged(QListBoxItem*) ), this, SLOT( changeLine(QListBoxItem *) ) ); connect( CodeCompletion, SIGNAL( toggled(bool) ), CompletionSort, SLOT( setEnabled(bool) ) ); connect( SyntaxHighlighting, SIGNAL( toggled(bool) ), CodeCompletion, SLOT( setEnabled(bool) ) ); connect( PushButton1_2_2, SIGNAL( clicked() ), this, SLOT( selectText(void) ) ); // tab order setTabOrder( SyntaxComponent, PushButton3 ); setTabOrder( PushButton3, SyntaxHighlighting ); setTabOrder( SyntaxHighlighting, KeywordUpper ); setTabOrder( KeywordUpper, CodeCompletion ); setTabOrder( CodeCompletion, AutoIndent ); setTabOrder( AutoIndent, PushButton1_2_2 ); setTabOrder( PushButton1_2_2, PushButton1_2 ); setTabOrder( PushButton1_2, PushButton1 ); setTabOrder( PushButton1, Extensions ); setTabOrder( Extensions, TabStop ); setTabOrder( TabStop, Example ); setTabOrder( Example, CompletionSort ); // buddies TextLabel1_2->setBuddy( TabStop ); } /* * Destroys the object and frees any allocated resources */ toSyntaxSetupUI::~toSyntaxSetupUI() { // no need to delete child widgets, Qt does it all for us } /* * Sets the strings of the subwidgets using the current * language. */ void toSyntaxSetupUI::languageChange() { setCaption( tr( "Form1" ) ); QToolTip::add( this, QString::null ); Options->setTitle( tr( "Options" ) ); KeywordUpper->setText( tr( "&Keyword upper" ) ); QToolTip::add( KeywordUpper, tr( "Convert all keywords to uppercase when displayingsyntaxhighlighted text. Only available for monospaced fonts." ) ); CodeCompletion->setText( tr( "&Code completion" ) ); QToolTip::add( CodeCompletion, tr( "Activate code completion in SQL editors. Not recommended on slow connections." ) ); CompletionSort->setText( tr( "&Sort completion rows" ) ); QToolTip::add( CompletionSort, tr( "Sort the available completion rows alphabetically or in the order the are." ) ); SyntaxHighlighting->setText( tr( "S&yntax highlighting" ) ); QToolTip::add( SyntaxHighlighting, tr( "Enable syntax highlighting, or use simple text editor" ) ); AutoIndent->setText( tr( "&Indent same as previous line" ) ); QToolTip::add( AutoIndent, tr( "Indent a new line in an editor to the same column as the previous line" ) ); PushButton1->setText( tr( "Choose" ) ); ResultExample->setText( tr( "List example" ) ); CodeExample->setText( tr( "Code example" ) ); PushButton1_2->setText( tr( "Choose" ) ); PushButton1_2_2->setText( tr( "Choose" ) ); TextExample->setText( tr( "Text example" ) ); TextLabel1->setText( tr( "Filename extensions" ) ); TextLabel1_2->setText( tr( "Tab stop width" ) ); QToolTip::add( TextLabel1_2, tr( "Number of character width of tabstops" ) ); QWhatsThis::add( TextLabel1_2, tr( "Number of character width of tabstops" ) ); GroupBox2->setTitle( tr( "Sy&ntax components" ) ); ExampleColor->setText( QString::null ); PushButton3->setText( tr( "&Pick" ) ); } void toSyntaxSetupUI::changeHighlight(bool) { qWarning( "toSyntaxSetupUI::changeHighlight(bool): Not implemented yet" ); } void toSyntaxSetupUI::changeLine(QListBoxItem*) { qWarning( "toSyntaxSetupUI::changeLine(QListBoxItem*): Not implemented yet" ); } void toSyntaxSetupUI::changeUpper(bool) { qWarning( "toSyntaxSetupUI::changeUpper(bool): Not implemented yet" ); } void toSyntaxSetupUI::selectText() { qWarning( "toSyntaxSetupUI::selectText(): Not implemented yet" ); } void toSyntaxSetupUI::selectColor() { qWarning( "toSyntaxSetupUI::selectColor(): Not implemented yet" ); } void toSyntaxSetupUI::selectFont() { qWarning( "toSyntaxSetupUI::selectFont(): Not implemented yet" ); } void toSyntaxSetupUI::selectResultFont() { qWarning( "toSyntaxSetupUI::selectResultFont(): Not implemented yet" ); }