summaryrefslogtreecommitdiffstats
path: root/kmymoney2/widgets/kaccounttemplateselectordecl.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 22:38:03 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 22:38:03 +0000
commitdadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (patch)
tree99e72842fe687baea16376a147619b6048d7e441 /kmymoney2/widgets/kaccounttemplateselectordecl.cpp
downloadkmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.tar.gz
kmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.zip
Added kmymoney
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239792 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/widgets/kaccounttemplateselectordecl.cpp')
-rw-r--r--kmymoney2/widgets/kaccounttemplateselectordecl.cpp111
1 files changed, 111 insertions, 0 deletions
diff --git a/kmymoney2/widgets/kaccounttemplateselectordecl.cpp b/kmymoney2/widgets/kaccounttemplateselectordecl.cpp
new file mode 100644
index 0000000..8fed754
--- /dev/null
+++ b/kmymoney2/widgets/kaccounttemplateselectordecl.cpp
@@ -0,0 +1,111 @@
+#include <kdialog.h>
+#include <klocale.h>
+#ifndef KMM_I18N
+#define KMM_I18N
+inline QString kmm_i18n(const char* msg, const char* ctx) { return i18n(ctx, msg); }
+inline QString 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 <qvariant.h>
+#include <qpushbutton.h>
+#include <qheader.h>
+#include <klistview.h>
+#include <qgroupbox.h>
+#include <ktextedit.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/*
+ * Constructs a KAccountTemplateSelectorDecl as a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'.
+ */
+KAccountTemplateSelectorDecl::KAccountTemplateSelectorDecl( QWidget* parent, const char* name, WFlags fl )
+ : QWidget( parent, name, fl )
+{
+ if ( !name )
+ setName( "KAccountTemplateSelectorDecl" );
+ KAccountTemplateSelectorDeclLayout = new QVBoxLayout( 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->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, m_groupList->sizePolicy().hasHeightForWidth() ) );
+ m_groupList->setMinimumSize( QSize( 0, 150 ) );
+ m_groupList->setProperty( "selectionMode", "Extended" );
+ m_groupList->setAllColumnsShowFocus( TRUE );
+ m_groupList->setRootIsDecorated( TRUE );
+ m_groupList->setFullWidth( TRUE );
+ KAccountTemplateSelectorDeclLayout->addWidget( m_groupList );
+
+ layout3 = new QHBoxLayout( 0, 0, 6, "layout3");
+
+ groupBox1 = new QGroupBox( this, "groupBox1" );
+ groupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 2, groupBox1->sizePolicy().hasHeightForWidth() ) );
+ groupBox1->setColumnLayout(0, Qt::Vertical );
+ groupBox1->layout()->setSpacing( 6 );
+ groupBox1->layout()->setMargin( 11 );
+ groupBox1Layout = new QVBoxLayout( groupBox1->layout() );
+ groupBox1Layout->setAlignment( Qt::AlignTop );
+
+ m_description = new KTextEdit( groupBox1, "m_description" );
+ m_description->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 3, m_description->sizePolicy().hasHeightForWidth() ) );
+ m_description->setReadOnly( TRUE );
+ groupBox1Layout->addWidget( m_description );
+ layout3->addWidget( groupBox1 );
+
+ groupBox2 = new QGroupBox( this, "groupBox2" );
+ groupBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 1, 2, groupBox2->sizePolicy().hasHeightForWidth() ) );
+ groupBox2->setColumnLayout(0, Qt::Vertical );
+ groupBox2->layout()->setSpacing( 6 );
+ groupBox2->layout()->setMargin( 11 );
+ groupBox2Layout = new QVBoxLayout( groupBox2->layout() );
+ groupBox2Layout->setAlignment( Qt::AlignTop );
+
+ m_accountList = new KListView( groupBox2, "m_accountList" );
+ m_accountList->addColumn( kmm_i18n( "Name" ) );
+ m_accountList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 3, m_accountList->sizePolicy().hasHeightForWidth() ) );
+ m_accountList->setMinimumSize( QSize( 0, 150 ) );
+ m_accountList->setProperty( "selectionMode", "NoSelection" );
+ m_accountList->setAllColumnsShowFocus( TRUE );
+ m_accountList->setRootIsDecorated( TRUE );
+ m_accountList->setFullWidth( TRUE );
+ groupBox2Layout->addWidget( m_accountList );
+ layout3->addWidget( groupBox2 );
+ KAccountTemplateSelectorDeclLayout->addLayout( layout3 );
+ languageChange();
+ resize( QSize(546, 346).expandedTo(minimumSizeHint()) );
+ clearWState( WState_Polished );
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+KAccountTemplateSelectorDecl::~KAccountTemplateSelectorDecl()
+{
+ // no need to delete child widgets, Qt 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"