00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "EditDlg.h"
00013
00014 #include <qvariant.h>
00015 #include <ktextbrowser.h>
00016 #include <qpushbutton.h>
00017 #include <qlayout.h>
00018 #include <qtooltip.h>
00019 #include <qwhatsthis.h>
00020
00021
00022
00023
00024
00025
00026
00027
00028 EditDlg::EditDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
00029 : QDialog( parent, name, modal, fl )
00030 {
00031 if ( !name )
00032 setName( "EditDlg" );
00033 EditDlgLayout = new QVBoxLayout( this, 11, 6, "EditDlgLayout");
00034
00035 headerlayout = new QGridLayout( 0, 1, 1, 0, 6, "headerlayout");
00036 EditDlgLayout->addLayout( headerlayout );
00037
00038 m_Edit = new KTextBrowser( this, "m_Edit" );
00039 m_Edit->setFocusPolicy( KTextBrowser::TabFocus );
00040 m_Edit->setTextFormat( KTextBrowser::AutoText );
00041 m_Edit->setReadOnly( TRUE );
00042 m_Edit->setUndoRedoEnabled( FALSE );
00043 EditDlgLayout->addWidget( m_Edit );
00044
00045 layout3 = new QHBoxLayout( 0, 0, 6, "layout3");
00046
00047 _buttonReply = new QPushButton( this, "_buttonReply" );
00048 layout3->addWidget( _buttonReply );
00049 Spacer15 = new QSpacerItem( 120, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00050 layout3->addItem( Spacer15 );
00051
00052 _buttonOk = new QPushButton( this, "_buttonOk" );
00053 layout3->addWidget( _buttonOk );
00054
00055 _buttonCancel = new QPushButton( this, "_buttonCancel" );
00056 layout3->addWidget( _buttonCancel );
00057 EditDlgLayout->addLayout( layout3 );
00058 languageChange();
00059 resize( QSize(444, 447).expandedTo(minimumSizeHint()) );
00060 clearWState( WState_Polished );
00061
00062
00063 connect( _buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
00064 connect( _buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00065 connect( _buttonReply, SIGNAL( clicked() ), this, SLOT( slotReplyClicked() ) );
00066
00067
00068 setTabOrder( _buttonOk, m_Edit );
00069 }
00070
00071
00072
00073
00074 EditDlg::~EditDlg()
00075 {
00076
00077 }
00078
00079
00080
00081
00082
00083 void EditDlg::languageChange()
00084 {
00085 setCaption( tr2i18n( "Message" ) );
00086 _buttonReply->setText( tr2i18n( "Reply" ) );
00087 QToolTip::add( _buttonReply, tr2i18n( "Send reply mail" ) );
00088 _buttonOk->setText( tr2i18n( "OK" ) );
00089 _buttonCancel->setText( tr2i18n( "Cancel" ) );
00090 }
00091
00092 void EditDlg::slotReplyClicked()
00093 {
00094 qWarning( "EditDlg::slotReplyClicked(): Not implemented yet" );
00095 }
00096
00097 #include "EditDlg.moc"