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.
212 lines
7.4 KiB
212 lines
7.4 KiB
15 years ago
|
#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 <qvariant.h>
|
||
|
#include <qlabel.h>
|
||
|
#include <kurlrequester.h>
|
||
|
#include <kcolorbutton.h>
|
||
|
#include <kpushbutton.h>
|
||
|
#include <qcombobox.h>
|
||
|
#include <qlineedit.h>
|
||
|
#include <qframe.h>
|
||
|
#include <qlayout.h>
|
||
|
#include <qtooltip.h>
|
||
|
#include <qwhatsthis.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( QWidget* parent, const char* name, WFlags fl )
|
||
|
: QWidget( parent, name, fl )
|
||
|
{
|
||
|
if ( !name )
|
||
|
setName( "menuEdit" );
|
||
|
menuEditLayout = new QGridLayout( this, 1, 1, 2, 6, "menuEditLayout");
|
||
|
|
||
|
textLabel2 = new QLabel( this, "textLabel2" );
|
||
|
textLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );
|
||
|
|
||
|
menuEditLayout->addMultiCellWidget( textLabel2, 5, 6, 0, 0 );
|
||
|
|
||
|
textLabel1 = new QLabel( this, "textLabel1" );
|
||
|
textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::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->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, cbColor->sizePolicy().hasHeightForWidth() ) );
|
||
|
|
||
|
menuEditLayout->addWidget( cbColor, 6, 1 );
|
||
|
|
||
|
bFont = new KPushButton( this, "bFont" );
|
||
|
bFont->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bFont->sizePolicy().hasHeightForWidth() ) );
|
||
|
|
||
|
menuEditLayout->addWidget( bFont, 6, 2 );
|
||
|
|
||
|
cbPosTitle = new QComboBox( FALSE, this, "cbPosTitle" );
|
||
|
cbPosTitle->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, cbPosTitle->sizePolicy().hasHeightForWidth() ) );
|
||
|
|
||
|
menuEditLayout->addWidget( cbPosTitle, 6, 3 );
|
||
|
spacer1 = new QSpacerItem( 51, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
|
||
|
menuEditLayout->addMultiCell( spacer1, 6, 6, 4, 5 );
|
||
|
|
||
|
leTitle = new QLineEdit( this, "leTitle" );
|
||
|
|
||
|
menuEditLayout->addMultiCellWidget( leTitle, 5, 5, 1, 4 );
|
||
|
|
||
|
bAddText = new KPushButton( this, "bAddText" );
|
||
|
bAddText->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)4, 0, 0, bAddText->sizePolicy().hasHeightForWidth() ) );
|
||
|
bAddText->setMinimumSize( QSize( 24, 24 ) );
|
||
|
bAddText->setMaximumSize( QSize( 24, 24 ) );
|
||
|
|
||
|
menuEditLayout->addWidget( bAddText, 5, 5 );
|
||
|
|
||
|
lTitle = new QLabel( this, "lTitle" );
|
||
|
lTitle->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, lTitle->sizePolicy().hasHeightForWidth() ) );
|
||
|
QFont lTitle_font( lTitle->font() );
|
||
|
lTitle_font.setBold( TRUE );
|
||
|
lTitle->setFont( lTitle_font );
|
||
|
|
||
|
menuEditLayout->addMultiCellWidget( lTitle, 0, 0, 0, 5 );
|
||
|
|
||
|
textLabel1_2 = new QLabel( this, "textLabel1_2" );
|
||
|
|
||
|
menuEditLayout->addWidget( textLabel1_2, 2, 0 );
|
||
|
|
||
|
cbStart = new QComboBox( FALSE, this, "cbStart" );
|
||
|
|
||
|
menuEditLayout->addMultiCellWidget( cbStart, 2, 2, 1, 5 );
|
||
|
|
||
|
textLabel1_2_2 = new QLabel( this, "textLabel1_2_2" );
|
||
|
|
||
|
menuEditLayout->addWidget( textLabel1_2_2, 3, 0 );
|
||
|
|
||
|
cbEnd = new QComboBox( FALSE, this, "cbEnd" );
|
||
|
|
||
|
menuEditLayout->addMultiCellWidget( cbEnd, 3, 3, 1, 5 );
|
||
|
|
||
|
frame = new QFrame( this, "frame" );
|
||
|
frame->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, frame->sizePolicy().hasHeightForWidth() ) );
|
||
|
frame->setFrameShape( QFrame::StyledPanel );
|
||
|
frame->setFrameShadow( QFrame::Raised );
|
||
|
|
||
|
menuEditLayout->addMultiCellWidget( frame, 1, 1, 0, 5 );
|
||
|
languageChange();
|
||
|
resize( QSize(576, 682).expandedTo(minimumSizeHint()) );
|
||
|
clearWState( WState_Polished );
|
||
|
|
||
|
// signals and slots connections
|
||
|
connect( bFont, SIGNAL( clicked() ), this, SLOT( bFontClick() ) );
|
||
|
connect( urBackground, SIGNAL( urlSelected(const QString&) ), this, SLOT( urBackgroundSelected(const QString&) ) );
|
||
|
connect( cbColor, SIGNAL( changed(const QColor&) ), this, SLOT( cbColorChanged(const QColor&) ) );
|
||
|
connect( leTitle, SIGNAL( textChanged(const QString&) ), this, SLOT( leTitleChanged(const QString&) ) );
|
||
|
connect( cbPosTitle, SIGNAL( activated(int) ), this, SLOT( cbPosTitleActivated(int) ) );
|
||
|
connect( bAddText, SIGNAL( clicked() ), this, SLOT( bAddTextClick() ) );
|
||
|
connect( cbStart, SIGNAL( activated(int) ), this, SLOT( cbStartActivated(int) ) );
|
||
|
connect( cbEnd, SIGNAL( activated(int) ), this, 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, Qt 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( QString::null );
|
||
|
bFont->setText( tr2i18n( "Font" ) );
|
||
|
cbPosTitle->clear();
|
||
|
cbPosTitle->insertItem( tr2i18n( "Bottom" ) );
|
||
|
cbPosTitle->insertItem( tr2i18n( "Right" ) );
|
||
|
bAddText->setText( QString::null );
|
||
|
bAddText->setAccel( QKeySequence( QString::null ) );
|
||
|
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 QString&)
|
||
|
{
|
||
|
qWarning( "menuEdit::urBackgroundSelected(const QString&): Not implemented yet" );
|
||
|
}
|
||
|
|
||
|
void menuEdit::cbColorChanged(const QColor&)
|
||
|
{
|
||
|
qWarning( "menuEdit::cbColorChanged(const QColor&): Not implemented yet" );
|
||
|
}
|
||
|
|
||
|
void menuEdit::leTitleChanged(const QString&)
|
||
|
{
|
||
|
qWarning( "menuEdit::leTitleChanged(const QString&): 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"
|