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.
112 lines
4.7 KiB
112 lines
4.7 KiB
#include <kdialog.h>
|
|
#include <klocale.h>
|
|
#ifndef KMM_I18N
|
|
#define KMM_I18N
|
|
inline TQString kmm_i18n(const char* msg, const char* ctx) { return i18n(ctx, msg); }
|
|
inline TQString kmm_i18n(const char* msg) { return i18n(msg); }
|
|
#endif
|
|
/****************************************************************************
|
|
** Form implementation generated from reading ui file '../../../kmymoney2/widgets/kaccounttemplateselectordecl.ui'
|
|
**
|
|
** Created: Fri Feb 12 15:05:39 2010
|
|
**
|
|
** WARNING! All changes made in this file will be lost!
|
|
****************************************************************************/
|
|
|
|
#include "kaccounttemplateselectordecl.h"
|
|
|
|
#include <tqvariant.h>
|
|
#include <tqpushbutton.h>
|
|
#include <tqheader.h>
|
|
#include <klistview.h>
|
|
#include <tqgroupbox.h>
|
|
#include <ktextedit.h>
|
|
#include <tqlayout.h>
|
|
#include <tqtooltip.h>
|
|
#include <tqwhatsthis.h>
|
|
|
|
/*
|
|
* Constructs a KAccountTemplateSelectorDecl as a child of 'tqparent', with the
|
|
* name 'name' and widget flags set to 'f'.
|
|
*/
|
|
KAccountTemplateSelectorDecl::KAccountTemplateSelectorDecl( TQWidget* tqparent, const char* name, WFlags fl )
|
|
: TQWidget( tqparent, name, fl )
|
|
{
|
|
if ( !name )
|
|
setName( "KAccountTemplateSelectorDecl" );
|
|
KAccountTemplateSelectorDeclLayout = new TQVBoxLayout( this, 0, 6, "KAccountTemplateSelectorDeclLayout");
|
|
|
|
m_groupList = new KListView( this, "m_groupList" );
|
|
m_groupList->addColumn( kmm_i18n( "Account Types" ) );
|
|
m_groupList->addColumn( kmm_i18n( "Description" ) );
|
|
m_groupList->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, m_groupList->sizePolicy().hasHeightForWidth() ) );
|
|
m_groupList->setMinimumSize( TQSize( 0, 150 ) );
|
|
m_groupList->setProperty( "selectionMode", "Extended" );
|
|
m_groupList->setAllColumnsShowFocus( TRUE );
|
|
m_groupList->setRootIsDecorated( TRUE );
|
|
m_groupList->setFullWidth( TRUE );
|
|
KAccountTemplateSelectorDeclLayout->addWidget( m_groupList );
|
|
|
|
tqlayout3 = new TQHBoxLayout( 0, 0, 6, "tqlayout3");
|
|
|
|
groupBox1 = new TQGroupBox( this, "groupBox1" );
|
|
groupBox1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 2, groupBox1->sizePolicy().hasHeightForWidth() ) );
|
|
groupBox1->setColumnLayout(0, Qt::Vertical );
|
|
groupBox1->tqlayout()->setSpacing( 6 );
|
|
groupBox1->tqlayout()->setMargin( 11 );
|
|
groupBox1Layout = new TQVBoxLayout( groupBox1->tqlayout() );
|
|
groupBox1Layout->tqsetAlignment( TQt::AlignTop );
|
|
|
|
m_description = new KTextEdit( groupBox1, "m_description" );
|
|
m_description->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 3, m_description->sizePolicy().hasHeightForWidth() ) );
|
|
m_description->setReadOnly( TRUE );
|
|
groupBox1Layout->addWidget( m_description );
|
|
tqlayout3->addWidget( groupBox1 );
|
|
|
|
groupBox2 = new TQGroupBox( this, "groupBox2" );
|
|
groupBox2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 2, groupBox2->sizePolicy().hasHeightForWidth() ) );
|
|
groupBox2->setColumnLayout(0, Qt::Vertical );
|
|
groupBox2->tqlayout()->setSpacing( 6 );
|
|
groupBox2->tqlayout()->setMargin( 11 );
|
|
groupBox2Layout = new TQVBoxLayout( groupBox2->tqlayout() );
|
|
groupBox2Layout->tqsetAlignment( TQt::AlignTop );
|
|
|
|
m_accountList = new KListView( groupBox2, "m_accountList" );
|
|
m_accountList->addColumn( kmm_i18n( "Name" ) );
|
|
m_accountList->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 3, m_accountList->sizePolicy().hasHeightForWidth() ) );
|
|
m_accountList->setMinimumSize( TQSize( 0, 150 ) );
|
|
m_accountList->setProperty( "selectionMode", "NoSelection" );
|
|
m_accountList->setAllColumnsShowFocus( TRUE );
|
|
m_accountList->setRootIsDecorated( TRUE );
|
|
m_accountList->setFullWidth( TRUE );
|
|
groupBox2Layout->addWidget( m_accountList );
|
|
tqlayout3->addWidget( groupBox2 );
|
|
KAccountTemplateSelectorDeclLayout->addLayout( tqlayout3 );
|
|
languageChange();
|
|
resize( TQSize(546, 346).expandedTo(tqminimumSizeHint()) );
|
|
clearWState( WState_Polished );
|
|
}
|
|
|
|
/*
|
|
* Destroys the object and frees any allocated resources
|
|
*/
|
|
KAccountTemplateSelectorDecl::~KAccountTemplateSelectorDecl()
|
|
{
|
|
// no need to delete child widgets, TQt does it all for us
|
|
}
|
|
|
|
/*
|
|
* Sets the strings of the subwidgets using the current
|
|
* language.
|
|
*/
|
|
void KAccountTemplateSelectorDecl::languageChange()
|
|
{
|
|
m_groupList->header()->setLabel( 0, kmm_i18n( "Account Types" ) );
|
|
m_groupList->header()->setLabel( 1, kmm_i18n( "Description" ) );
|
|
groupBox1->setTitle( kmm_i18n( "Detailed description" ) );
|
|
groupBox2->setTitle( kmm_i18n( "Accounts" ) );
|
|
m_accountList->header()->setLabel( 0, kmm_i18n( "Name" ) );
|
|
}
|
|
|
|
#include "kaccounttemplateselectordecl.moc"
|