kmail

templatesconfiguration_base.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './templatesconfiguration_base.ui'
00005 **
00006 ** Created: Mon Jun 14 10:24:37 2010
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "templatesconfiguration_base.h"
00012 
00013 #include <qvariant.h>
00014 #include <qpushbutton.h>
00015 #include <qtoolbox.h>
00016 #include <qtextedit.h>
00017 #include <kactivelabel.h>
00018 #include <qlabel.h>
00019 #include <qlineedit.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023 #include "templatesinsertcommand.h"
00024 
00025 /*
00026  *  Constructs a TemplatesConfigurationBase as a child of 'parent', with the
00027  *  name 'name' and widget flags set to 'f'.
00028  */
00029 TemplatesConfigurationBase::TemplatesConfigurationBase( QWidget* parent, const char* name, WFlags fl )
00030     : QWidget( parent, name, fl )
00031 {
00032     if ( !name )
00033     setName( "TemplatesConfigurationBase" );
00034     setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 3, 3, sizePolicy().hasHeightForWidth() ) );
00035     setMinimumSize( QSize( 400, 300 ) );
00036     TemplatesConfigurationBaseLayout = new QVBoxLayout( this, 11, 6, "TemplatesConfigurationBaseLayout"); 
00037 
00038     toolBox1 = new QToolBox( this, "toolBox1" );
00039     toolBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 3, 3, toolBox1->sizePolicy().hasHeightForWidth() ) );
00040     toolBox1->setMinimumSize( QSize( 0, 0 ) );
00041     toolBox1->setFrameShape( QToolBox::Panel );
00042     toolBox1->setFrameShadow( QToolBox::Sunken );
00043     toolBox1->setCurrentIndex( 3 );
00044 
00045     page_new = new QWidget( toolBox1, "page_new" );
00046     page_new->setBackgroundMode( QWidget::PaletteBackground );
00047     page_newLayout = new QHBoxLayout( page_new, 11, 6, "page_newLayout"); 
00048 
00049     textEdit_new = new QTextEdit( page_new, "textEdit_new" );
00050     textEdit_new->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 3, 3, textEdit_new->sizePolicy().hasHeightForWidth() ) );
00051     textEdit_new->setMinimumSize( QSize( 0, 0 ) );
00052     QFont textEdit_new_font(  textEdit_new->font() );
00053     textEdit_new_font.setFamily( "Monospace" );
00054     textEdit_new->setFont( textEdit_new_font ); 
00055     textEdit_new->setResizePolicy( QTextEdit::Manual );
00056     textEdit_new->setVScrollBarMode( QTextEdit::Auto );
00057     textEdit_new->setHScrollBarMode( QTextEdit::Auto );
00058     textEdit_new->setTextFormat( QTextEdit::PlainText );
00059     textEdit_new->setWordWrap( QTextEdit::NoWrap );
00060     textEdit_new->setAutoFormatting( int( QTextEdit::AutoNone ) );
00061     page_newLayout->addWidget( textEdit_new );
00062     toolBox1->addItem( page_new, QString::fromLatin1("") );
00063 
00064     page_reply = new QWidget( toolBox1, "page_reply" );
00065     page_reply->setBackgroundMode( QWidget::PaletteBackground );
00066     page_replyLayout = new QHBoxLayout( page_reply, 11, 6, "page_replyLayout"); 
00067 
00068     textEdit_reply = new QTextEdit( page_reply, "textEdit_reply" );
00069     textEdit_reply->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, textEdit_reply->sizePolicy().hasHeightForWidth() ) );
00070     QFont textEdit_reply_font(  textEdit_reply->font() );
00071     textEdit_reply_font.setFamily( "Monospace" );
00072     textEdit_reply->setFont( textEdit_reply_font ); 
00073     textEdit_reply->setTextFormat( QTextEdit::PlainText );
00074     textEdit_reply->setWordWrap( QTextEdit::NoWrap );
00075     textEdit_reply->setAutoFormatting( int( QTextEdit::AutoNone ) );
00076     page_replyLayout->addWidget( textEdit_reply );
00077     toolBox1->addItem( page_reply, QString::fromLatin1("") );
00078 
00079     page_reply_all = new QWidget( toolBox1, "page_reply_all" );
00080     page_reply_all->setBackgroundMode( QWidget::PaletteBackground );
00081     page_reply_allLayout = new QHBoxLayout( page_reply_all, 11, 6, "page_reply_allLayout"); 
00082 
00083     textEdit_reply_all = new QTextEdit( page_reply_all, "textEdit_reply_all" );
00084     textEdit_reply_all->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, textEdit_reply_all->sizePolicy().hasHeightForWidth() ) );
00085     QFont textEdit_reply_all_font(  textEdit_reply_all->font() );
00086     textEdit_reply_all_font.setFamily( "Monospace" );
00087     textEdit_reply_all->setFont( textEdit_reply_all_font ); 
00088     textEdit_reply_all->setTextFormat( QTextEdit::PlainText );
00089     textEdit_reply_all->setWordWrap( QTextEdit::NoWrap );
00090     textEdit_reply_all->setAutoFormatting( int( QTextEdit::AutoNone ) );
00091     page_reply_allLayout->addWidget( textEdit_reply_all );
00092     toolBox1->addItem( page_reply_all, QString::fromLatin1("") );
00093 
00094     page_forward = new QWidget( toolBox1, "page_forward" );
00095     page_forward->setBackgroundMode( QWidget::PaletteBackground );
00096     page_forwardLayout = new QHBoxLayout( page_forward, 11, 6, "page_forwardLayout"); 
00097 
00098     textEdit_forward = new QTextEdit( page_forward, "textEdit_forward" );
00099     textEdit_forward->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, textEdit_forward->sizePolicy().hasHeightForWidth() ) );
00100     QFont textEdit_forward_font(  textEdit_forward->font() );
00101     textEdit_forward_font.setFamily( "Monospace" );
00102     textEdit_forward->setFont( textEdit_forward_font ); 
00103     textEdit_forward->setTextFormat( QTextEdit::PlainText );
00104     textEdit_forward->setWordWrap( QTextEdit::NoWrap );
00105     textEdit_forward->setAutoFormatting( int( QTextEdit::AutoNone ) );
00106     page_forwardLayout->addWidget( textEdit_forward );
00107     toolBox1->addItem( page_forward, QString::fromLatin1("") );
00108     TemplatesConfigurationBaseLayout->addWidget( toolBox1 );
00109 
00110     mHelp = new KActiveLabel( this, "mHelp" );
00111     TemplatesConfigurationBaseLayout->addWidget( mHelp );
00112 
00113     layout5 = new QHBoxLayout( 0, 0, 6, "layout5"); 
00114 
00115     mInsertCommand = new TemplatesInsertCommand( this, "mInsertCommand" );
00116     layout5->addWidget( mInsertCommand );
00117 
00118     textLabel1 = new QLabel( this, "textLabel1" );
00119     textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 2, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
00120     textLabel1->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
00121     layout5->addWidget( textLabel1 );
00122 
00123     lineEdit_quote = new QLineEdit( this, "lineEdit_quote" );
00124     layout5->addWidget( lineEdit_quote );
00125     TemplatesConfigurationBaseLayout->addLayout( layout5 );
00126     languageChange();
00127     resize( QSize(400, 316).expandedTo(minimumSizeHint()) );
00128     clearWState( WState_Polished );
00129 
00130     // buddies
00131     textLabel1->setBuddy( lineEdit_quote );
00132 }
00133 
00134 /*
00135  *  Destroys the object and frees any allocated resources
00136  */
00137 TemplatesConfigurationBase::~TemplatesConfigurationBase()
00138 {
00139     // no need to delete child widgets, Qt does it all for us
00140 }
00141 
00142 /*
00143  *  Sets the strings of the subwidgets using the current
00144  *  language.
00145  */
00146 void TemplatesConfigurationBase::languageChange()
00147 {
00148     setCaption( tr2i18n( "TemplatesConfiguration" ) );
00149     toolBox1->setItemLabel( toolBox1->indexOf(page_new), tr2i18n( "New Message" ) );
00150     toolBox1->setItemLabel( toolBox1->indexOf(page_reply), tr2i18n( "Reply to Sender" ) );
00151     toolBox1->setItemLabel( toolBox1->indexOf(page_reply_all), tr2i18n( "Reply to All / Reply to List" ) );
00152     toolBox1->setItemLabel( toolBox1->indexOf(page_forward), tr2i18n( "Forward Message" ) );
00153     mHelp->setText( tr2i18n( "How does this work?" ) );
00154     textLabel1->setText( tr2i18n( "&Quote indicator:" ) );
00155 }
00156 
00157 #include "templatesconfiguration_base.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys