00001
#include <kdialog.h>
00002
#include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
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
00027
00028
00029
00030
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
00070 connect(
ok_button, SIGNAL( clicked() ),
this, SLOT( accept() ) );
00071 connect(
cancel_button, SIGNAL( clicked() ),
this, SLOT( reject() ) );
00072 }
00073
00074
00075
00076
00077 CloserDialog::~CloserDialog()
00078 {
00079
00080 }
00081
00082
00083
00084
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"