#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './kbloggereditorblank.ui'
**
** Created: Fri Jan 30 08:24:32 2009
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "kbloggereditorblank.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <klineedit.h>
#include <kcombobox.h>
#include <qcheckbox.h>
#include <kpushbutton.h>
#include <kdatetimewidget.h>
#include <ktextedit.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

#include "klineedit.h"
#include "kcombobox.h"
#include "kpushbutton.h"
#include "kdatetimewidget.h"
#include "kdatewidget.h"
#include "ktimewidget.h"
#include "ktextedit.h"
#include "./kbloggereditorblank.ui.h"
/*
 *  Constructs a KBloggerEditorBlank as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KBloggerEditorBlank::KBloggerEditorBlank( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "KBloggerEditorBlank" );
    KBloggerEditorBlankLayout = new QGridLayout( this, 1, 1, 11, 6, "KBloggerEditorBlankLayout"); 

    TitleLayout = new QHBoxLayout( 0, 0, 6, "TitleLayout"); 

    TitleLabel = new QLabel( this, "TitleLabel" );
    TitleLayout->addWidget( TitleLabel );

    TitleLineEdit = new KLineEdit( this, "TitleLineEdit" );
    TitleLineEdit->setReadOnly( TRUE );
    TitleLayout->addWidget( TitleLineEdit );

    KBloggerEditorBlankLayout->addLayout( TitleLayout, 0, 0 );

    CategoryLayout = new QHBoxLayout( 0, 0, 6, "CategoryLayout"); 

    CategoriesLabel = new QLabel( this, "CategoriesLabel" );
    CategoryLayout->addWidget( CategoriesLabel );
    CategorySpring = new QSpacerItem( 408, 22, QSizePolicy::Expanding, QSizePolicy::Minimum );
    CategoryLayout->addItem( CategorySpring );

    CategoryComboBox = new KComboBox( FALSE, this, "CategoryComboBox" );
    CategoryComboBox->setMinimumSize( QSize( 150, 0 ) );
    CategoryLayout->addWidget( CategoryComboBox );

    KBloggerEditorBlankLayout->addLayout( CategoryLayout, 1, 0 );

    layout7 = new QHBoxLayout( 0, 0, 6, "layout7"); 

    PublishCheckbox = new QCheckBox( this, "PublishCheckbox" );
    PublishCheckbox->setChecked( TRUE );
    layout7->addWidget( PublishCheckbox );
    SendSpacer = new QSpacerItem( 135, 24, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout7->addItem( SendSpacer );

    SendButton = new KPushButton( this, "SendButton" );
    SendButton->setEnabled( TRUE );
    layout7->addWidget( SendButton );

    KBloggerEditorBlankLayout->addLayout( layout7, 5, 0 );

    layout14 = new QHBoxLayout( 0, 0, 6, "layout14"); 

    TimeStampCheckBox = new QCheckBox( this, "TimeStampCheckBox" );
    TimeStampCheckBox->setEnabled( FALSE );
    layout14->addWidget( TimeStampCheckBox );
    SendSpacer_2 = new QSpacerItem( 53, 24, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout14->addItem( SendSpacer_2 );

    TimeStampKDateTime = new KDateTimeWidget( this, "TimeStampKDateTime" );
    TimeStampKDateTime->setEnabled( FALSE );
    layout14->addWidget( TimeStampKDateTime );

    KBloggerEditorBlankLayout->addLayout( layout14, 4, 0 );

    ContentTextEditor = new KTextEdit( this, "ContentTextEditor" );
    ContentTextEditor->setTextFormat( KTextEdit::RichText );

    KBloggerEditorBlankLayout->addWidget( ContentTextEditor, 3, 0 );

    layout15 = new QHBoxLayout( 0, 0, 6, "layout15"); 

    BoldButton = new KPushButton( this, "BoldButton" );
    layout15->addWidget( BoldButton );

    ItalicButton = new KPushButton( this, "ItalicButton" );
    layout15->addWidget( ItalicButton );

    LinkButton = new KPushButton( this, "LinkButton" );
    layout15->addWidget( LinkButton );

    HtmlButton = new KPushButton( this, "HtmlButton" );
    layout15->addWidget( HtmlButton );
    ToolbarSpacer = new QSpacerItem( 350, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout15->addItem( ToolbarSpacer );

    KBloggerEditorBlankLayout->addLayout( layout15, 2, 0 );
    languageChange();
    resize( QSize(511, 349).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( SendButton, SIGNAL( clicked() ), this, SLOT( sendSlot() ) );
    connect( TimeStampCheckBox, SIGNAL( toggled(bool) ), TimeStampKDateTime, SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( TitleLineEdit, CategoryComboBox );
    setTabOrder( CategoryComboBox, ContentTextEditor );
    setTabOrder( ContentTextEditor, PublishCheckbox );
    setTabOrder( PublishCheckbox, SendButton );
}

/*
 *  Destroys the object and frees any allocated resources
 */
KBloggerEditorBlank::~KBloggerEditorBlank()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KBloggerEditorBlank::languageChange()
{
    setCaption( tr2i18n( "Blog it!" ) );
    TitleLabel->setText( tr2i18n( "Title:" ) );
    CategoriesLabel->setText( tr2i18n( "Category:" ) );
    PublishCheckbox->setText( tr2i18n( "Pub&lish" ) );
    PublishCheckbox->setAccel( QKeySequence( tr2i18n( "Alt+L" ) ) );
    SendButton->setText( tr2i18n( "&Send" ) );
    SendButton->setAccel( QKeySequence( tr2i18n( "Alt+S" ) ) );
    TimeStampCheckBox->setText( tr2i18n( "Edit TimeStamp:" ) );
    ContentTextEditor->setText( QString::null );
    BoldButton->setText( QString::null );
    BoldButton->setAccel( QKeySequence( QString::null ) );
    ItalicButton->setText( QString::null );
    ItalicButton->setAccel( QKeySequence( QString::null ) );
    LinkButton->setText( tr2i18n( "Li&nk" ) );
    LinkButton->setAccel( QKeySequence( tr2i18n( "Alt+N" ) ) );
    HtmlButton->setText( tr2i18n( "Html" ) );
    HtmlButton->setAccel( QKeySequence( tr2i18n( "Alt+H" ) ) );
}

#include "kbloggereditorblank.moc"
