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