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.7 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 <tqvariant.h>
#include <tqpushbutton.h>
#include <tqbuttongroup.h>
#include <knuminput.h>
#include <ktimewidget.h>
#include <tqradiobutton.h>
#include <kpushbutton.h>
#include <tqlabel.h>
#include <kurlrequester.h>
#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.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( TQWidget* parent, const char* name, WFlags fl )
: TQWidget( parent, name, fl )
{
if ( !name )
setName( "newTitle" );
newTitleLayout = new TQGridLayout( this, 1, 1, 11, 6, "newTitleLayout");
buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
buttonGroup1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, buttonGroup1->sizePolicy().hasHeightForWidth() ) );
buttonGroup1->setColumnLayout(0, Qt::Vertical );
buttonGroup1->layout()->setSpacing( 6 );
buttonGroup1->layout()->setMargin( 11 );
buttonGroup1Layout = new TQGridLayout( buttonGroup1->layout() );
buttonGroup1Layout->setAlignment( TQt::AlignTop );
nbChapters = new KIntNumInput( buttonGroup1, "nbChapters" );
nbChapters->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::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( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, twLength->sizePolicy().hasHeightForWidth() ) );
buttonGroup1Layout->addWidget( twLength, 1, 1 );
rbNumber = new TQRadioButton( buttonGroup1, "rbNumber" );
rbNumber->setChecked( TRUE );
buttonGroup1Layout->addWidget( rbNumber, 0, 0 );
rbLength = new TQRadioButton( buttonGroup1, "rbLength" );
buttonGroup1Layout->addWidget( rbLength, 1, 0 );
spacer1 = new TQSpacerItem( 131, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
buttonGroup1Layout->addMultiCell( spacer1, 0, 1, 2, 2 );
newTitleLayout->addMultiCellWidget( buttonGroup1, 1, 1, 0, 1 );
spacer3 = new TQSpacerItem( 21, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
newTitleLayout->addItem( spacer3, 3, 0 );
spacer4 = new TQSpacerItem( 16, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
newTitleLayout->addItem( spacer4, 1, 2 );
bAdd = new KPushButton( this, "bAdd" );
bAdd->setEnabled( FALSE );
bAdd->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, bAdd->sizePolicy().hasHeightForWidth() ) );
bAdd->setProperty( "stdItem", 27 );
newTitleLayout->addWidget( bAdd, 2, 1 );
spacer2 = new TQSpacerItem( 470, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
newTitleLayout->addItem( spacer2, 2, 0 );
layout1 = new TQHBoxLayout( 0, 0, 6, "layout1");
textLabel1 = new TQLabel( this, "textLabel1" );
textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
layout1->addWidget( textLabel1 );
urFile = new KURLRequester( this, "urFile" );
urFile->setMode( 25 );
layout1->addWidget( urFile );
lTotalTime = new TQLabel( this, "lTotalTime" );
lTotalTime->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, lTotalTime->sizePolicy().hasHeightForWidth() ) );
layout1->addWidget( lTotalTime );
newTitleLayout->addMultiCellLayout( layout1, 0, 0, 0, 1 );
languageChange();
resize( TQSize(605, 171).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( urFile, TQT_SIGNAL( urlSelected(const TQString&) ), this, TQT_SLOT( fileSelected(const TQString&) ) );
connect( rbNumber, TQT_SIGNAL( clicked() ), this, TQT_SLOT( rbNumberClicked() ) );
connect( rbLength, TQT_SIGNAL( clicked() ), this, TQT_SLOT( rbLengthClicked() ) );
connect( bAdd, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bAddClicked() ) );
}
/*
* Destroys the object and frees any allocated resources
*/
newTitle::~newTitle()
{
// no need to delete child widgets, TQt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void newTitle::languageChange()
{
setCaption( tr2i18n( "Add title" ) );
buttonGroup1->setTitle( TQString() );
rbNumber->setText( tr2i18n( "number of chapters" ) );
rbLength->setText( tr2i18n( "chapter length" ) );
bAdd->setText( tr2i18n( "Add" ) );
bAdd->setAccel( TQKeySequence( TQString() ) );
textLabel1->setText( tr2i18n( "Video file" ) );
lTotalTime->setText( tr2i18n( "--:--:--" ) );
}
void newTitle::fileSelected(const TQString&)
{
tqWarning( "newTitle::fileSelected(const TQString&): Not implemented yet" );
}
void newTitle::rbNumberClicked()
{
tqWarning( "newTitle::rbNumberClicked(): Not implemented yet" );
}
void newTitle::rbLengthClicked()
{
tqWarning( "newTitle::rbLengthClicked(): Not implemented yet" );
}
void newTitle::bAddClicked()
{
tqWarning( "newTitle::bAddClicked(): Not implemented yet" );
}
#include "newTitle.moc"