KDevelop API Documentation

editchooser.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 './editchooser.ui'
00005 **
00006 ** Created: Tue Feb 22 09:14:32 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 "editchooser.h"
00013 
00014 #include <qvariant.h>
00015 #include <kdialog.h>
00016 #include <qpushbutton.h>
00017 #include <qgroupbox.h>
00018 #include <qcombobox.h>
00019 #include <qlabel.h>
00020 #include <qbuttongroup.h>
00021 #include <qradiobutton.h>
00022 #include <qlayout.h>
00023 #include <qtooltip.h>
00024 #include <qwhatsthis.h>
00025 
00026 /*
00027  *  Constructs a EditChooser as a child of 'parent', with the
00028  *  name 'name' and widget flags set to 'f'.
00029  */
00030 EditChooser::EditChooser( QWidget* parent, const char* name, WFlags fl )
00031     : QWidget( parent, name, fl )
00032 {
00033     if ( !name )
00034     setName( "EditChooser" );
00035     EditChooserLayout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint(), "EditChooserLayout"); 
00036 
00037     GroupBox1 = new QGroupBox( this, "GroupBox1" );
00038     GroupBox1->setColumnLayout(0, Qt::Vertical );
00039     GroupBox1->layout()->setSpacing( KDialog::spacingHint() );
00040     GroupBox1->layout()->setMargin( KDialog::marginHint() );
00041     GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
00042     GroupBox1Layout->setAlignment( Qt::AlignTop );
00043 
00044     EditorPart = new QComboBox( FALSE, GroupBox1, "EditorPart" );
00045 
00046     GroupBox1Layout->addWidget( EditorPart, 0, 0 );
00047 
00048     TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
00049 
00050     GroupBox1Layout->addWidget( TextLabel1, 1, 0 );
00051     EditChooserLayout->addWidget( GroupBox1 );
00052 
00053     external_changes_group = new QButtonGroup( this, "external_changes_group" );
00054     external_changes_group->setColumnLayout(0, Qt::Vertical );
00055     external_changes_group->layout()->setSpacing( KDialog::spacingHint() );
00056     external_changes_group->layout()->setMargin( KDialog::marginHint() );
00057     external_changes_groupLayout = new QVBoxLayout( external_changes_group->layout() );
00058     external_changes_groupLayout->setAlignment( Qt::AlignTop );
00059 
00060     nothing = new QRadioButton( external_changes_group, "nothing" );
00061     nothing->setChecked( TRUE );
00062     external_changes_groupLayout->addWidget( nothing );
00063 
00064     alert = new QRadioButton( external_changes_group, "alert" );
00065     external_changes_groupLayout->addWidget( alert );
00066 
00067     reload = new QRadioButton( external_changes_group, "reload" );
00068     external_changes_groupLayout->addWidget( reload );
00069     EditChooserLayout->addWidget( external_changes_group );
00070     spacer2 = new QSpacerItem( 20, 31, QSizePolicy::Minimum, QSizePolicy::Expanding );
00071     EditChooserLayout->addItem( spacer2 );
00072     languageChange();
00073     resize( QSize(514, 383).expandedTo(minimumSizeHint()) );
00074     clearWState( WState_Polished );
00075 
00076     // signals and slots connections
00077     connect( EditorPart, SIGNAL( activated(const QString&) ), this, SLOT( slotEditPartChanged(const QString&) ) );
00078 }
00079 
00080 /*
00081  *  Destroys the object and frees any allocated resources
00082  */
00083 EditChooser::~EditChooser()
00084 {
00085     // no need to delete child widgets, Qt does it all for us
00086 }
00087 
00088 /*
00089  *  Sets the strings of the subwidgets using the current
00090  *  language.
00091  */
00092 void EditChooser::languageChange()
00093 {
00094     GroupBox1->setTitle( tr2i18n( "&Embedded Editor" ) );
00095     TextLabel1->setText( tr2i18n( "<i>Note:</i> Changing the preferred editor will not affect\n"
00096 "already open files." ) );
00097     external_changes_group->setTitle( tr2i18n( "On External Changes" ) );
00098     QWhatsThis::add( external_changes_group, tr2i18n( "<p><b>Action to take when an open file is changed on disk</b></p>\n"
00099 "<p><b>Do nothing</b> - The file will be marked as externally changed and the user will be asked to verify any attempt to overwrite it </p>\n"
00100 "<p><b>Alert the user</b> - A dialog will alert the user that a file has changed and offer the user to reload the file</p>\n"
00101 "<p><b>Automatically reload</b> - Any files that are not modified in memory are reloaded, and an alert is shown for any conflicts</p>" ) );
00102     nothing->setText( tr2i18n( "Do nothing" ) );
00103     alert->setText( tr2i18n( "Alert the user" ) );
00104     reload->setText( tr2i18n( "Automatically reload the file if safe, alert the user if not" ) );
00105 }
00106 
00107 void EditChooser::slotEditPartChanged(const QString&)
00108 {
00109     qWarning( "EditChooser::slotEditPartChanged(const QString&): Not implemented yet" );
00110 }
00111 
00112 #include "editchooser.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