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/newTitle.cpp

159 lines
5.6 KiB

#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './newTitle.ui'
**
** Created: dim. oct. 26 08:56:29 2008
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "newTitle.h"
#include <qvariant.h>
#include <qpushbutton.h>
#include <qbuttongroup.h>
#include <knuminput.h>
#include <ktimewidget.h>
#include <qradiobutton.h>
#include <kpushbutton.h>
#include <qlabel.h>
#include <kurlrequester.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "knuminput.h"
#include "ktimewidget.h"
#include "kpushbutton.h"
#include "kurlrequester.h"
#include "klineedit.h"
/*
* Constructs a newTitle as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
newTitle::newTitle( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "newTitle" );
newTitleLayout = new QGridLayout( this, 1, 1, 11, 6, "newTitleLayout");
buttonGroup1 = new QButtonGroup( this, "buttonGroup1" );
buttonGroup1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, buttonGroup1->sizePolicy().hasHeightForWidth() ) );
buttonGroup1->setColumnLayout(0, Qt::Vertical );
buttonGroup1->layout()->setSpacing( 6 );
buttonGroup1->layout()->setMargin( 11 );
buttonGroup1Layout = new QGridLayout( buttonGroup1->layout() );
buttonGroup1Layout->setAlignment( Qt::AlignTop );
nbChapters = new KIntNumInput( buttonGroup1, "nbChapters" );
nbChapters->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, nbChapters->sizePolicy().hasHeightForWidth() ) );
nbChapters->setMinValue( 1 );
nbChapters->setMaxValue( 99 );
buttonGroup1Layout->addWidget( nbChapters, 0, 1 );
twLength = new KTimeWidget( buttonGroup1, "twLength" );
twLength->setEnabled( FALSE );
twLength->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, twLength->sizePolicy().hasHeightForWidth() ) );
buttonGroup1Layout->addWidget( twLength, 1, 1 );
rbNumber = new QRadioButton( buttonGroup1, "rbNumber" );
rbNumber->setChecked( TRUE );
buttonGroup1Layout->addWidget( rbNumber, 0, 0 );
rbLength = new QRadioButton( buttonGroup1, "rbLength" );
buttonGroup1Layout->addWidget( rbLength, 1, 0 );
spacer1 = new QSpacerItem( 131, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
buttonGroup1Layout->addMultiCell( spacer1, 0, 1, 2, 2 );
newTitleLayout->addMultiCellWidget( buttonGroup1, 1, 1, 0, 1 );
spacer3 = new QSpacerItem( 21, 16, QSizePolicy::Minimum, QSizePolicy::Expanding );
newTitleLayout->addItem( spacer3, 3, 0 );
spacer4 = new QSpacerItem( 16, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
newTitleLayout->addItem( spacer4, 1, 2 );
bAdd = new KPushButton( this, "bAdd" );
bAdd->setEnabled( FALSE );
bAdd->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bAdd->sizePolicy().hasHeightForWidth() ) );
bAdd->setProperty( "stdItem", 27 );
newTitleLayout->addWidget( bAdd, 2, 1 );
spacer2 = new QSpacerItem( 470, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
newTitleLayout->addItem( spacer2, 2, 0 );
layout1 = new QHBoxLayout( 0, 0, 6, "layout1");
textLabel1 = new QLabel( this, "textLabel1" );
textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
layout1->addWidget( textLabel1 );
urFile = new KURLRequester( this, "urFile" );
urFile->setMode( 25 );
layout1->addWidget( urFile );
lTotalTime = new QLabel( this, "lTotalTime" );
lTotalTime->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, lTotalTime->sizePolicy().hasHeightForWidth() ) );
layout1->addWidget( lTotalTime );
newTitleLayout->addMultiCellLayout( layout1, 0, 0, 0, 1 );
languageChange();
resize( QSize(605, 171).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( urFile, SIGNAL( urlSelected(const QString&) ), this, SLOT( fileSelected(const QString&) ) );
connect( rbNumber, SIGNAL( clicked() ), this, SLOT( rbNumberClicked() ) );
connect( rbLength, SIGNAL( clicked() ), this, SLOT( rbLengthClicked() ) );
connect( bAdd, SIGNAL( clicked() ), this, SLOT( bAddClicked() ) );
}
/*
* Destroys the object and frees any allocated resources
*/
newTitle::~newTitle()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void newTitle::languageChange()
{
setCaption( tr2i18n( "Add title" ) );
buttonGroup1->setTitle( QString::null );
rbNumber->setText( tr2i18n( "number of chapters" ) );
rbLength->setText( tr2i18n( "chapter length" ) );
bAdd->setText( tr2i18n( "Add" ) );
bAdd->setAccel( QKeySequence( QString::null ) );
textLabel1->setText( tr2i18n( "Video file" ) );
lTotalTime->setText( tr2i18n( "--:--:--" ) );
}
void newTitle::fileSelected(const QString&)
{
qWarning( "newTitle::fileSelected(const QString&): Not implemented yet" );
}
void newTitle::rbNumberClicked()
{
qWarning( "newTitle::rbNumberClicked(): Not implemented yet" );
}
void newTitle::rbLengthClicked()
{
qWarning( "newTitle::rbLengthClicked(): Not implemented yet" );
}
void newTitle::bAddClicked()
{
qWarning( "newTitle::bAddClicked(): Not implemented yet" );
}
#include "newTitle.moc"