You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
k9copy/k9author/menuEdit.cpp

212 lines
7.5 KiB

#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './menuEdit.ui'
**
** Created: dim. oct. 26 08:56:28 2008
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "menuEdit.h"
#include <tqvariant.h>
#include <tqlabel.h>
#include <kurlrequester.h>
#include <kcolorbutton.h>
#include <kpushbutton.h>
#include <tqcombobox.h>
#include <tqlineedit.h>
#include <tqframe.h>
#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
#include "kurlrequester.h"
#include "klineedit.h"
#include "kpushbutton.h"
#include "kcolorbutton.h"
/*
* Constructs a menuEdit as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
menuEdit::menuEdit( TQWidget* parent, const char* name, WFlags fl )
: TQWidget( parent, name, fl )
{
if ( !name )
setName( "menuEdit" );
menuEditLayout = new TQGridLayout( this, 1, 1, 2, 6, "menuEditLayout");
textLabel2 = new TQLabel( this, "textLabel2" );
textLabel2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addMultiCellWidget( textLabel2, 5, 6, 0, 0 );
textLabel1 = new TQLabel( this, "textLabel1" );
textLabel1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addWidget( textLabel1, 4, 0 );
urBackground = new KURLRequester( this, "urBackground" );
menuEditLayout->addMultiCellWidget( urBackground, 4, 4, 1, 5 );
cbColor = new KColorButton( this, "cbColor" );
cbColor->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, cbColor->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addWidget( cbColor, 6, 1 );
bFont = new KPushButton( this, "bFont" );
bFont->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, bFont->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addWidget( bFont, 6, 2 );
cbPosTitle = new TQComboBox( FALSE, this, "cbPosTitle" );
cbPosTitle->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, cbPosTitle->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addWidget( cbPosTitle, 6, 3 );
spacer1 = new TQSpacerItem( 51, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
menuEditLayout->addMultiCell( spacer1, 6, 6, 4, 5 );
leTitle = new TQLineEdit( this, "leTitle" );
menuEditLayout->addMultiCellWidget( leTitle, 5, 5, 1, 4 );
bAddText = new KPushButton( this, "bAddText" );
bAddText->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)4, 0, 0, bAddText->sizePolicy().hasHeightForWidth() ) );
bAddText->setMinimumSize( TQSize( 24, 24 ) );
bAddText->setMaximumSize( TQSize( 24, 24 ) );
menuEditLayout->addWidget( bAddText, 5, 5 );
lTitle = new TQLabel( this, "lTitle" );
lTitle->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, lTitle->sizePolicy().hasHeightForWidth() ) );
TQFont lTitle_font( lTitle->font() );
lTitle_font.setBold( TRUE );
lTitle->setFont( lTitle_font );
menuEditLayout->addMultiCellWidget( lTitle, 0, 0, 0, 5 );
textLabel1_2 = new TQLabel( this, "textLabel1_2" );
menuEditLayout->addWidget( textLabel1_2, 2, 0 );
cbStart = new TQComboBox( FALSE, this, "cbStart" );
menuEditLayout->addMultiCellWidget( cbStart, 2, 2, 1, 5 );
textLabel1_2_2 = new TQLabel( this, "textLabel1_2_2" );
menuEditLayout->addWidget( textLabel1_2_2, 3, 0 );
cbEnd = new TQComboBox( FALSE, this, "cbEnd" );
menuEditLayout->addMultiCellWidget( cbEnd, 3, 3, 1, 5 );
frame = new TQFrame( this, "frame" );
frame->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 0, frame->sizePolicy().hasHeightForWidth() ) );
frame->setFrameShape( TQFrame::StyledPanel );
frame->setFrameShadow( TQFrame::Raised );
menuEditLayout->addMultiCellWidget( frame, 1, 1, 0, 5 );
languageChange();
resize( TQSize(576, 682).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( bFont, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bFontClick() ) );
connect( urBackground, TQT_SIGNAL( urlSelected(const TQString&) ), this, TQT_SLOT( urBackgroundSelected(const TQString&) ) );
connect( cbColor, TQT_SIGNAL( changed(const TQColor&) ), this, TQT_SLOT( cbColorChanged(const TQColor&) ) );
connect( leTitle, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( leTitleChanged(const TQString&) ) );
connect( cbPosTitle, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( cbPosTitleActivated(int) ) );
connect( bAddText, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bAddTextClick() ) );
connect( cbStart, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( cbStartActivated(int) ) );
connect( cbEnd, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( cbEndActivated(int) ) );
// tab order
setTabOrder( cbStart, cbEnd );
setTabOrder( cbEnd, urBackground );
setTabOrder( urBackground, leTitle );
setTabOrder( leTitle, bAddText );
setTabOrder( bAddText, cbColor );
setTabOrder( cbColor, bFont );
setTabOrder( bFont, cbPosTitle );
}
/*
* Destroys the object and frees any allocated resources
*/
menuEdit::~menuEdit()
{
// no need to delete child widgets, TQt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void menuEdit::languageChange()
{
setCaption( tr2i18n( "Edit Menu" ) );
textLabel2->setText( tr2i18n( "Text" ) );
textLabel1->setText( tr2i18n( "Background picture" ) );
cbColor->setText( TQString() );
bFont->setText( tr2i18n( "Font" ) );
cbPosTitle->clear();
cbPosTitle->insertItem( tr2i18n( "Bottom" ) );
cbPosTitle->insertItem( tr2i18n( "Right" ) );
bAddText->setText( TQString() );
bAddText->setAccel( TQKeySequence( TQString() ) );
lTitle->setText( tr2i18n( "Root Menu" ) );
textLabel1_2->setText( tr2i18n( "At start" ) );
cbStart->clear();
cbStart->insertItem( tr2i18n( "Play menu" ) );
cbStart->insertItem( tr2i18n( "Play title 1" ) );
textLabel1_2_2->setText( tr2i18n( "At End" ) );
cbEnd->clear();
cbEnd->insertItem( tr2i18n( "Play root menu" ) );
cbEnd->insertItem( tr2i18n( "Play title menu" ) );
cbEnd->insertItem( tr2i18n( "Play title 1" ) );
}
void menuEdit::bFontClick()
{
qWarning( "menuEdit::bFontClick(): Not implemented yet" );
}
void menuEdit::urBackgroundSelected(const TQString&)
{
qWarning( "menuEdit::urBackgroundSelected(const TQString&): Not implemented yet" );
}
void menuEdit::cbColorChanged(const TQColor&)
{
qWarning( "menuEdit::cbColorChanged(const TQColor&): Not implemented yet" );
}
void menuEdit::leTitleChanged(const TQString&)
{
qWarning( "menuEdit::leTitleChanged(const TQString&): Not implemented yet" );
}
void menuEdit::cbPosTitleActivated(int)
{
qWarning( "menuEdit::cbPosTitleActivated(int): Not implemented yet" );
}
void menuEdit::bAddTextClick()
{
qWarning( "menuEdit::bAddTextClick(): Not implemented yet" );
}
void menuEdit::cbStartActivated(int)
{
qWarning( "menuEdit::cbStartActivated(int): Not implemented yet" );
}
void menuEdit::cbEndActivated(int)
{
qWarning( "menuEdit::cbEndActivated(int): Not implemented yet" );
}
#include "menuEdit.moc"