00001 #include <kdialog.h>
00002 #include <tdelocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "EditDlg.h"
00013
00014 #include <ntqvariant.h>
00015 #include <ktextbrowser.h>
00016 #include <ntqpushbutton.h>
00017 #include <ntqlayout.h>
00018 #include <ntqtooltip.h>
00019 #include <ntqwhatsthis.h>
00020
00021
00022
00023
00024
00025
00026
00027
00028 EditDlg::EditDlg( TQWidget* parent, const char* name, bool modal, WFlags fl )
00029 : TQDialog( parent, name, modal, fl )
00030 {
00031 if ( !name )
00032 setName( "EditDlg" );
00033 EditDlgLayout = new TQVBoxLayout( this, 11, 6, "EditDlgLayout");
00034
00035 headerlayout = new TQGridLayout( 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 TQHBoxLayout( 0, 0, 6, "layout3");
00046
00047 _buttonReply = new TQPushButton( this, "_buttonReply" );
00048 layout3->addWidget( _buttonReply );
00049 Spacer15 = new TQSpacerItem( 120, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
00050 layout3->addItem( Spacer15 );
00051
00052 _buttonOk = new TQPushButton( this, "_buttonOk" );
00053 layout3->addWidget( _buttonOk );
00054
00055 _buttonCancel = new TQPushButton( this, "_buttonCancel" );
00056 layout3->addWidget( _buttonCancel );
00057 EditDlgLayout->addLayout( layout3 );
00058 languageChange();
00059 resize( TQSize(444, 447).expandedTo(minimumSizeHint()) );
00060 clearWState( WState_Polished );
00061
00062
00063 connect( _buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
00064 connect( _buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
00065 connect( _buttonReply, TQ_SIGNAL( clicked() ), this, TQ_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 TQToolTip::add( _buttonReply, tr2i18n( "Send reply mail" ) );
00088 _buttonOk->setText( tr2i18n( "OK" ) );
00089 _buttonCancel->setText( tr2i18n( "Cancel" ) );
00090 }
00091
00092 void EditDlg::slotReplyClicked()
00093 {
00094 tqWarning( "EditDlg::slotReplyClicked(): Not implemented yet" );
00095 }
00096
00097 #include "EditDlg.moc"