KDevelop API Documentation

highlightingconfigpage.cpp

Go to the documentation of this file.
00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './highlightingconfigpage.ui'
00005 **
00006 ** Created: Tue Feb 22 09:15:30 2005
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "highlightingconfigpage.h"
00013 
00014 #include <qvariant.h>
00015 #include <kfontcombo.h>
00016 #include <kcolorbutton.h>
00017 #include <kdialog.h>
00018 #include <qpushbutton.h>
00019 #include <qlistbox.h>
00020 #include <qlabel.h>
00021 #include <qlineedit.h>
00022 #include <qcheckbox.h>
00023 #include <qspinbox.h>
00024 #include <qlayout.h>
00025 #include <qtooltip.h>
00026 #include <qwhatsthis.h>
00027 #include "./highlightingconfigpage.ui.h"
00028 
00029 /*
00030  *  Constructs a HighlightingConfigPage as a child of 'parent', with the
00031  *  name 'name' and widget flags set to 'f'.
00032  */
00033 HighlightingConfigPage::HighlightingConfigPage( QWidget* parent, const char* name, WFlags fl )
00034     : QWidget( parent, name, fl )
00035 {
00036     if ( !name )
00037     setName( "HighlightingConfigPage" );
00038     HighlightingConfigPageLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "HighlightingConfigPageLayout"); 
00039 
00040     listElements = new QListBox( this, "listElements" );
00041     listElements->setFrameShape( QListBox::StyledPanel );
00042     listElements->setFrameShadow( QListBox::Sunken );
00043 
00044     HighlightingConfigPageLayout->addMultiCellWidget( listElements, 1, 1, 0, 1 );
00045 
00046     TextLabel1_2 = new QLabel( this, "TextLabel1_2" );
00047     TextLabel1_2->setFrameShape( QLabel::NoFrame );
00048     TextLabel1_2->setFrameShadow( QLabel::Plain );
00049 
00050     HighlightingConfigPageLayout->addMultiCellWidget( TextLabel1_2, 0, 0, 0, 1 );
00051 
00052     TextLabel6 = new QLabel( this, "TextLabel6" );
00053 
00054     HighlightingConfigPageLayout->addWidget( TextLabel6, 2, 0 );
00055 
00056     editPreview = new QLineEdit( this, "editPreview" );
00057     editPreview->setFrameShape( QLineEdit::LineEditPanel );
00058     editPreview->setFrameShadow( QLineEdit::Sunken );
00059 
00060     HighlightingConfigPageLayout->addMultiCellWidget( editPreview, 3, 3, 0, 2 );
00061 
00062     layout6 = new QGridLayout( 0, 1, 1, 0, KDialog::spacingHint(), "layout6"); 
00063 
00064     buttonColor = new KColorButton( this, "buttonColor" );
00065 
00066     layout6->addMultiCellWidget( buttonColor, 5, 5, 1, 3 );
00067 
00068     TextLabel3_2 = new QLabel( this, "TextLabel3_2" );
00069 
00070     layout6->addWidget( TextLabel3_2, 1, 0 );
00071     spacer4 = new QSpacerItem( 51, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00072     layout6->addItem( spacer4, 3, 2 );
00073 
00074     comboFontFamily = new KFontCombo( this, "comboFontFamily" );
00075 
00076     layout6->addMultiCellWidget( comboFontFamily, 0, 0, 1, 3 );
00077 
00078     checkBold = new QCheckBox( this, "checkBold" );
00079 
00080     layout6->addMultiCellWidget( checkBold, 2, 2, 0, 2 );
00081 
00082     TextLabel4 = new QLabel( this, "TextLabel4" );
00083 
00084     layout6->addWidget( TextLabel4, 5, 0 );
00085 
00086     adjustAllButton = new QPushButton( this, "adjustAllButton" );
00087 
00088     layout6->addWidget( adjustAllButton, 3, 3 );
00089 
00090     checkItalic = new QCheckBox( this, "checkItalic" );
00091 
00092     layout6->addMultiCellWidget( checkItalic, 3, 3, 0, 1 );
00093 
00094     spinFontSize = new QSpinBox( this, "spinFontSize" );
00095     spinFontSize->setMinValue( 0 );
00096     spinFontSize->setValue( 10 );
00097 
00098     layout6->addMultiCellWidget( spinFontSize, 1, 1, 1, 3 );
00099 
00100     checkUnderline = new QCheckBox( this, "checkUnderline" );
00101 
00102     layout6->addMultiCellWidget( checkUnderline, 4, 4, 0, 2 );
00103     spacer3 = new QSpacerItem( 121, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00104     layout6->addItem( spacer3, 4, 3 );
00105     spacer2 = new QSpacerItem( 111, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00106     layout6->addItem( spacer2, 2, 3 );
00107 
00108     TextLabel2_2 = new QLabel( this, "TextLabel2_2" );
00109 
00110     layout6->addWidget( TextLabel2_2, 0, 0 );
00111 
00112     HighlightingConfigPageLayout->addMultiCellLayout( layout6, 0, 1, 2, 2 );
00113     languageChange();
00114     resize( QSize(553, 309).expandedTo(minimumSizeHint()) );
00115     clearWState( WState_Polished );
00116 
00117     // signals and slots connections
00118     connect( listElements, SIGNAL( selectionChanged() ), this, SLOT( slotSelectionChanged() ) );
00119     connect( comboFontFamily, SIGNAL( activated(int) ), this, SLOT( slotUpdatePreview() ) );
00120     connect( spinFontSize, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdatePreview() ) );
00121     connect( checkBold, SIGNAL( toggled(bool) ), this, SLOT( slotUpdatePreview() ) );
00122     connect( checkItalic, SIGNAL( toggled(bool) ), this, SLOT( slotUpdatePreview() ) );
00123     connect( checkUnderline, SIGNAL( toggled(bool) ), this, SLOT( slotUpdatePreview() ) );
00124     connect( buttonColor, SIGNAL( changed(const QColor&) ), this, SLOT( slotUpdatePreview() ) );
00125     connect( adjustAllButton, SIGNAL( clicked() ), this, SLOT( slotAdjustAllElements() ) );
00126     init();
00127 }
00128 
00129 /*
00130  *  Destroys the object and frees any allocated resources
00131  */
00132 HighlightingConfigPage::~HighlightingConfigPage()
00133 {
00134     destroy();
00135     // no need to delete child widgets, Qt does it all for us
00136 }
00137 
00138 /*
00139  *  Sets the strings of the subwidgets using the current
00140  *  language.
00141  */
00142 void HighlightingConfigPage::languageChange()
00143 {
00144     TextLabel1_2->setText( tr2i18n( "Element:" ) );
00145     TextLabel6->setText( tr2i18n( "Preview:" ) );
00146     editPreview->setText( tr2i18n( "preview" ) );
00147     buttonColor->setText( QString::null );
00148     TextLabel3_2->setText( tr2i18n( "Size:" ) );
00149     checkBold->setText( tr2i18n( "&Bold" ) );
00150     TextLabel4->setText( tr2i18n( "Color:" ) );
00151     adjustAllButton->setText( tr2i18n( "Adjust All..." ) );
00152     checkItalic->setText( tr2i18n( "&Italic" ) );
00153     checkUnderline->setText( tr2i18n( "&Underline" ) );
00154     TextLabel2_2->setText( tr2i18n( "Font:" ) );
00155 }
00156 
00157 #include "highlightingconfigpage.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:22:23 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003