00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
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 "kactivelabel.h"
00025 #include "templatesinsertcommand.h"
00026
00027
00028
00029
00030
00031 TemplatesConfigurationBase::TemplatesConfigurationBase( QWidget* parent, const char* name, WFlags fl )
00032 : QWidget( parent, name, fl )
00033 {
00034 if ( !name )
00035 setName( "TemplatesConfigurationBase" );
00036 setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 3, 3, sizePolicy().hasHeightForWidth() ) );
00037 setMinimumSize( QSize( 400, 300 ) );
00038 TemplatesConfigurationBaseLayout = new QVBoxLayout( this, 11, 6, "TemplatesConfigurationBaseLayout");
00039
00040 toolBox1 = new QToolBox( this, "toolBox1" );
00041 toolBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 3, 3, toolBox1->sizePolicy().hasHeightForWidth() ) );
00042 toolBox1->setMinimumSize( QSize( 0, 0 ) );
00043 toolBox1->setFrameShape( QToolBox::Panel );
00044 toolBox1->setFrameShadow( QToolBox::Sunken );
00045 toolBox1->setCurrentIndex( 3 );
00046
00047 page_new = new QWidget( toolBox1, "page_new" );
00048 page_new->setBackgroundMode( QWidget::PaletteBackground );
00049 page_newLayout = new QHBoxLayout( page_new, 11, 6, "page_newLayout");
00050
00051 textEdit_new = new QTextEdit( page_new, "textEdit_new" );
00052 textEdit_new->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 3, 3, textEdit_new->sizePolicy().hasHeightForWidth() ) );
00053 textEdit_new->setMinimumSize( QSize( 0, 0 ) );
00054 QFont textEdit_new_font( textEdit_new->font() );
00055 textEdit_new_font.setFamily( "Monospace" );
00056 textEdit_new->setFont( textEdit_new_font );
00057 textEdit_new->setResizePolicy( QTextEdit::Manual );
00058 textEdit_new->setVScrollBarMode( QTextEdit::Auto );
00059 textEdit_new->setHScrollBarMode( QTextEdit::Auto );
00060 textEdit_new->setTextFormat( QTextEdit::PlainText );
00061 textEdit_new->setWordWrap( QTextEdit::NoWrap );
00062 textEdit_new->setAutoFormatting( int( QTextEdit::AutoNone ) );
00063 page_newLayout->addWidget( textEdit_new );
00064 toolBox1->addItem( page_new, QString::fromLatin1("") );
00065
00066 page_reply = new QWidget( toolBox1, "page_reply" );
00067 page_reply->setBackgroundMode( QWidget::PaletteBackground );
00068 page_replyLayout = new QHBoxLayout( page_reply, 11, 6, "page_replyLayout");
00069
00070 textEdit_reply = new QTextEdit( page_reply, "textEdit_reply" );
00071 textEdit_reply->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, textEdit_reply->sizePolicy().hasHeightForWidth() ) );
00072 QFont textEdit_reply_font( textEdit_reply->font() );
00073 textEdit_reply_font.setFamily( "Monospace" );
00074 textEdit_reply->setFont( textEdit_reply_font );
00075 textEdit_reply->setTextFormat( QTextEdit::PlainText );
00076 textEdit_reply->setWordWrap( QTextEdit::NoWrap );
00077 textEdit_reply->setAutoFormatting( int( QTextEdit::AutoNone ) );
00078 page_replyLayout->addWidget( textEdit_reply );
00079 toolBox1->addItem( page_reply, QString::fromLatin1("") );
00080
00081 page_reply_all = new QWidget( toolBox1, "page_reply_all" );
00082 page_reply_all->setBackgroundMode( QWidget::PaletteBackground );
00083 page_reply_allLayout = new QHBoxLayout( page_reply_all, 11, 6, "page_reply_allLayout");
00084
00085 textEdit_reply_all = new QTextEdit( page_reply_all, "textEdit_reply_all" );
00086 textEdit_reply_all->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, textEdit_reply_all->sizePolicy().hasHeightForWidth() ) );
00087 QFont textEdit_reply_all_font( textEdit_reply_all->font() );
00088 textEdit_reply_all_font.setFamily( "Monospace" );
00089 textEdit_reply_all->setFont( textEdit_reply_all_font );
00090 textEdit_reply_all->setTextFormat( QTextEdit::PlainText );
00091 textEdit_reply_all->setWordWrap( QTextEdit::NoWrap );
00092 textEdit_reply_all->setAutoFormatting( int( QTextEdit::AutoNone ) );
00093 page_reply_allLayout->addWidget( textEdit_reply_all );
00094 toolBox1->addItem( page_reply_all, QString::fromLatin1("") );
00095
00096 page_forward = new QWidget( toolBox1, "page_forward" );
00097 page_forward->setBackgroundMode( QWidget::PaletteBackground );
00098 page_forwardLayout = new QHBoxLayout( page_forward, 11, 6, "page_forwardLayout");
00099
00100 textEdit_forward = new QTextEdit( page_forward, "textEdit_forward" );
00101 textEdit_forward->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, textEdit_forward->sizePolicy().hasHeightForWidth() ) );
00102 QFont textEdit_forward_font( textEdit_forward->font() );
00103 textEdit_forward_font.setFamily( "Monospace" );
00104 textEdit_forward->setFont( textEdit_forward_font );
00105 textEdit_forward->setTextFormat( QTextEdit::PlainText );
00106 textEdit_forward->setWordWrap( QTextEdit::NoWrap );
00107 textEdit_forward->setAutoFormatting( int( QTextEdit::AutoNone ) );
00108 page_forwardLayout->addWidget( textEdit_forward );
00109 toolBox1->addItem( page_forward, QString::fromLatin1("") );
00110 TemplatesConfigurationBaseLayout->addWidget( toolBox1 );
00111
00112 mHelp = new KActiveLabel( this, "mHelp" );
00113 TemplatesConfigurationBaseLayout->addWidget( mHelp );
00114
00115 layout5 = new QHBoxLayout( 0, 0, 6, "layout5");
00116
00117 mInsertCommand = new TemplatesInsertCommand( this, "mInsertCommand" );
00118 layout5->addWidget( mInsertCommand );
00119
00120 textLabel1 = new QLabel( this, "textLabel1" );
00121 textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 2, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
00122 textLabel1->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
00123 layout5->addWidget( textLabel1 );
00124
00125 lineEdit_quote = new QLineEdit( this, "lineEdit_quote" );
00126 layout5->addWidget( lineEdit_quote );
00127 TemplatesConfigurationBaseLayout->addLayout( layout5 );
00128 languageChange();
00129 resize( QSize(400, 316).expandedTo(minimumSizeHint()) );
00130 clearWState( WState_Polished );
00131
00132
00133 textLabel1->setBuddy( lineEdit_quote );
00134 }
00135
00136
00137
00138
00139 TemplatesConfigurationBase::~TemplatesConfigurationBase()
00140 {
00141
00142 }
00143
00144
00145
00146
00147
00148 void TemplatesConfigurationBase::languageChange()
00149 {
00150 setCaption( tr2i18n( "TemplatesConfiguration" ) );
00151 toolBox1->setItemLabel( toolBox1->indexOf(page_new), tr2i18n( "New Message" ) );
00152 toolBox1->setItemLabel( toolBox1->indexOf(page_reply), tr2i18n( "Reply to Sender" ) );
00153 toolBox1->setItemLabel( toolBox1->indexOf(page_reply_all), tr2i18n( "Reply to All / Reply to List" ) );
00154 toolBox1->setItemLabel( toolBox1->indexOf(page_forward), tr2i18n( "Forward Message" ) );
00155 mHelp->setText( tr2i18n( "How does this work?" ) );
00156 textLabel1->setText( tr2i18n( "&Quote indicator:" ) );
00157 }
00158
00159 #include "templatesconfiguration_base.moc"