KDevelop API Documentation

closer_dialog.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 './closer_dialog.ui'
00005 **
00006 ** Created: Tue Feb 22 08:54:09 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 "closer_dialog.h"
00013 
00014 #include <qvariant.h>
00015 #include <kdialog.h>
00016 #include <qpushbutton.h>
00017 #include <qgroupbox.h>
00018 #include <qheader.h>
00019 #include <qlistview.h>
00020 #include <qcheckbox.h>
00021 #include <qlayout.h>
00022 #include <qtooltip.h>
00023 #include <qwhatsthis.h>
00024 
00025 /*
00026  *  Constructs a CloserDialog as a child of 'parent', with the
00027  *  name 'name' and widget flags set to 'f'.
00028  *
00029  *  The dialog will by default be modeless, unless you set 'modal' to
00030  *  TRUE to construct a modal dialog.
00031  */
00032 CloserDialog::CloserDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
00033     : QDialog( parent, name, modal, fl )
00034 {
00035     if ( !name )
00036     setName( "CloserDialog" );
00037     CloserDialogLayout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint(), "CloserDialogLayout"); 
00038 
00039     groupBox1 = new QGroupBox( this, "groupBox1" );
00040     groupBox1->setColumnLayout(0, Qt::Vertical );
00041     groupBox1->layout()->setSpacing( KDialog::spacingHint() );
00042     groupBox1->layout()->setMargin( KDialog::marginHint() );
00043     groupBox1Layout = new QVBoxLayout( groupBox1->layout() );
00044     groupBox1Layout->setAlignment( Qt::AlignTop );
00045 
00046     files_listview = new QListView( groupBox1, "files_listview" );
00047     files_listview->setResizeMode( QListView::LastColumn );
00048     groupBox1Layout->addWidget( files_listview );
00049     CloserDialogLayout->addWidget( groupBox1 );
00050 
00051     path_check = new QCheckBox( this, "path_check" );
00052     CloserDialogLayout->addWidget( path_check );
00053 
00054     layout1 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "layout1"); 
00055     spacer1 = new QSpacerItem( 91, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00056     layout1->addItem( spacer1 );
00057 
00058     ok_button = new QPushButton( this, "ok_button" );
00059     ok_button->setDefault( TRUE );
00060     layout1->addWidget( ok_button );
00061 
00062     cancel_button = new QPushButton( this, "cancel_button" );
00063     layout1->addWidget( cancel_button );
00064     CloserDialogLayout->addLayout( layout1 );
00065     languageChange();
00066     resize( QSize(403, 571).expandedTo(minimumSizeHint()) );
00067     clearWState( WState_Polished );
00068 
00069     // signals and slots connections
00070     connect( ok_button, SIGNAL( clicked() ), this, SLOT( accept() ) );
00071     connect( cancel_button, SIGNAL( clicked() ), this, SLOT( reject() ) );
00072 }
00073 
00074 /*
00075  *  Destroys the object and frees any allocated resources
00076  */
00077 CloserDialog::~CloserDialog()
00078 {
00079     // no need to delete child widgets, Qt does it all for us
00080 }
00081 
00082 /*
00083  *  Sets the strings of the subwidgets using the current
00084  *  language.
00085  */
00086 void CloserDialog::languageChange()
00087 {
00088     setCaption( tr2i18n( "Close Editor Windows" ) );
00089     groupBox1->setTitle( tr2i18n( "Checked &Files Will be Closed" ) );
00090     QToolTip::add( files_listview, QString::null );
00091     path_check->setText( tr2i18n( "Show full &paths" ) );
00092     ok_button->setText( tr2i18n( "&OK" ) );
00093     QToolTip::add( ok_button, QString::null );
00094     cancel_button->setText( tr2i18n( "&Cancel" ) );
00095 }
00096 
00097 #include "closer_dialog.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:38 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003