kshowmail: kshowmail/EditDlg.cpp Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories

# EditDlg.cpp

    00001 #include <kdialog.h>
    00002 #include <klocale.h>
    00003 /****************************************************************************
    00004 ** Form implementation generated from reading ui file '/home/kuddel/Daten/Documents/programmieren/kshowmail/kshowmail/kshowmail/EditDlg.ui'
    00005 **
    00006 ** Created: Di Mai 15 19:57:53 2007
    00007 **      by: The User Interface Compiler ($Id: EditDlg_8cpp-source.html,v 1.8 2007/05/16 20:11:59 kuddel-fl Exp $)
    00008 **
    00009 ** WARNING! All changes made in this file will be lost!
    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  *  Constructs a EditDlg as a child of 'parent', with the
    00023  *  name 'name' and widget flags set to 'f'.
    00024  *
    00025  *  The dialog will by default be modeless, unless you set 'modal' to
    00026  *  TRUE to construct a modal dialog.
    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     // signals and slots connections
    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     // tab order
    00068     setTabOrder( _buttonOk, m_Edit );
    00069 }
    00070
    00071 /*
    00072  *  Destroys the object and frees any allocated resources
    00073  */
    00074 EditDlg::~EditDlg()
    00075 {
    00076     // no need to delete child widgets, Qt does it all for us
    00077 }
    00078
    00079 /*
    00080  *  Sets the strings of the subwidgets using the current
    00081  *  language.
    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"