diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-17 00:32:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-17 00:32:19 +0000 |
commit | 0d382a262c0638d0f572fc37193ccc5ed3dc895f (patch) | |
tree | 8578dcddfce4191f3f7a142a37769df7add48475 /libk9copy/processList.cpp | |
download | k9copy-0d382a262c0638d0f572fc37193ccc5ed3dc895f.tar.gz k9copy-0d382a262c0638d0f572fc37193ccc5ed3dc895f.zip |
Added old abandoned version of k9copy
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1091546 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libk9copy/processList.cpp')
-rw-r--r-- | libk9copy/processList.cpp | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/libk9copy/processList.cpp b/libk9copy/processList.cpp new file mode 100644 index 0000000..b5aa5e0 --- /dev/null +++ b/libk9copy/processList.cpp @@ -0,0 +1,81 @@ +#include <klocale.h> +/**************************************************************************** +** Form implementation generated from reading ui file './processList.ui' +** +** Created: dim. oct. 26 08:55:59 2008 +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ + +#include "processList.h" + +#include <qvariant.h> +#include <qheader.h> +#include <qlistview.h> +#include <kpushbutton.h> +#include <qlayout.h> +#include <qtooltip.h> +#include <qwhatsthis.h> +#include "kpushbutton.h" + +/* + * Constructs a processList as a child of 'parent', with the + * name 'name' and widget flags set to 'f'. + */ +processList::processList( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + if ( !name ) + setName( "processList" ); + processListLayout = new QGridLayout( this, 1, 1, 11, 6, "processListLayout"); + + lProcess = new QListView( this, "lProcess" ); + lProcess->addColumn( tr2i18n( "Processes" ) ); + lProcess->addColumn( tr2i18n( "Elapsed" ) ); + lProcess->addColumn( tr2i18n( "..." ) ); + + processListLayout->addMultiCellWidget( lProcess, 0, 0, 0, 1 ); + + bCancel = new KPushButton( this, "bCancel" ); + bCancel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bCancel->sizePolicy().hasHeightForWidth() ) ); + bCancel->setProperty( "stdItem", 2 ); + + processListLayout->addWidget( bCancel, 1, 1 ); + spacer1 = new QSpacerItem( 361, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + processListLayout->addItem( spacer1, 1, 0 ); + languageChange(); + resize( QSize(600, 480).expandedTo(minimumSizeHint()) ); + clearWState( WState_Polished ); + + // signals and slots connections + connect( bCancel, SIGNAL( clicked() ), this, SLOT( bCancelClick() ) ); +} + +/* + * Destroys the object and frees any allocated resources + */ +processList::~processList() +{ + // no need to delete child widgets, Qt does it all for us +} + +/* + * Sets the strings of the subwidgets using the current + * language. + */ +void processList::languageChange() +{ + setCaption( tr2i18n( "Process List" ) ); + lProcess->header()->setLabel( 0, tr2i18n( "Processes" ) ); + lProcess->header()->setLabel( 1, tr2i18n( "Elapsed" ) ); + lProcess->header()->setLabel( 2, tr2i18n( "..." ) ); + bCancel->setText( tr2i18n( "&Cancel" ) ); + bCancel->setAccel( QKeySequence( tr2i18n( "Alt+C" ) ) ); +} + +void processList::bCancelClick() +{ + qWarning( "processList::bCancelClick(): Not implemented yet" ); +} + +#include "processList.moc" |