diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
commit | b0e912c8b3d02a518fedda28c3180eb4794a7520 (patch) | |
tree | 07d344862562fab58cbe2df39d13d16f2e4d2bea /src/k9mainw.cpp | |
parent | 4d695ec81fe4d4335ee82c7a9346ad9c9e144ecc (diff) | |
download | k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.tar.gz k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.zip |
TQt4 convert k9copy
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1233843 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/k9mainw.cpp')
-rw-r--r-- | src/k9mainw.cpp | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/src/k9mainw.cpp b/src/k9mainw.cpp index 27eb9ac..f2e685c 100644 --- a/src/k9mainw.cpp +++ b/src/k9mainw.cpp @@ -9,131 +9,131 @@ #include "k9mainw.h" -#include <qvariant.h> -#include <qpushbutton.h> -#include <qlabel.h> +#include <tqvariant.h> +#include <tqpushbutton.h> +#include <tqlabel.h> #include <kselect.h> -#include <qheader.h> -#include <qlistview.h> +#include <tqheader.h> +#include <tqlistview.h> #include <kcombobox.h> -#include <qcombobox.h> +#include <tqcombobox.h> #include <kpushbutton.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include "kselect.h" #include "kcombobox.h" #include "klineedit.h" #include "kpushbutton.h" /* - * Constructs a MainDlg as a child of 'parent', with the + * Constructs a MainDlg as a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. */ -MainDlg::MainDlg( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) +MainDlg::MainDlg( TQWidget* tqparent, const char* name, WFlags fl ) + : TQWidget( tqparent, name, fl ) { if ( !name ) setName( "MainDlg" ); - setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) ); - setMinimumSize( QSize( 0, 200 ) ); - MainDlgLayout = new QGridLayout( this, 1, 1, 2, 6, "MainDlgLayout"); + tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) ); + setMinimumSize( TQSize( 0, 200 ) ); + MainDlgLayout = new TQGridLayout( this, 1, 1, 2, 6, "MainDlgLayout"); - lblInput_2 = new QLabel( this, "lblInput_2" ); - lblInput_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, lblInput_2->sizePolicy().hasHeightForWidth() ) ); + lblInput_2 = new TQLabel( this, "lblInput_2" ); + lblInput_2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, lblInput_2->sizePolicy().hasHeightForWidth() ) ); MainDlgLayout->addWidget( lblInput_2, 1, 0 ); - lblInput = new QLabel( this, "lblInput" ); - lblInput->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, lblInput->sizePolicy().hasHeightForWidth() ) ); + lblInput = new TQLabel( this, "lblInput" ); + lblInput->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, lblInput->sizePolicy().hasHeightForWidth() ) ); MainDlgLayout->addWidget( lblInput, 0, 0 ); - tab = new QWidget( this, "tab" ); - tabLayout = new QGridLayout( tab, 1, 1, 1, 0, "tabLayout"); + tab = new TQWidget( this, "tab" ); + tabLayout = new TQGridLayout( tab, 1, 1, 1, 0, "tabLayout"); factor = new KGradientSelector( tab, "factor" ); factor->setEnabled( FALSE ); - factor->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)4, 0, 0, factor->sizePolicy().hasHeightForWidth() ) ); - factor->setMinimumSize( QSize( 0, 15 ) ); + factor->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, factor->sizePolicy().hasHeightForWidth() ) ); + factor->setMinimumSize( TQSize( 0, 15 ) ); factor->setValue( 0 ); factor->setMinValue( 0 ); factor->setMaxValue( 100 ); - factor->setFirstColor( QColor( 170, 0, 0 ) ); - factor->setSecondColor( QColor( 0, 255, 0 ) ); + factor->setFirstColor( TQColor( 170, 0, 0 ) ); + factor->setSecondColor( TQColor( 0, 255, 0 ) ); tabLayout->addWidget( factor, 1, 0 ); - listView1 = new QListView( tab, "listView1" ); + listView1 = new TQListView( tab, "listView1" ); listView1->addColumn( tr2i18n( "Title" ) ); listView1->addColumn( tr2i18n( "Size" ) ); listView1->header()->setResizeEnabled( FALSE, listView1->header()->count() - 1 ); listView1->addColumn( tr2i18n( "Content" ) ); - listView1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, listView1->sizePolicy().hasHeightForWidth() ) ); - listView1->setMinimumSize( QSize( 0, 200 ) ); + listView1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, listView1->sizePolicy().hasHeightForWidth() ) ); + listView1->setMinimumSize( TQSize( 0, 200 ) ); listView1->setShowSortIndicator( TRUE ); tabLayout->addWidget( listView1, 0, 0 ); MainDlgLayout->addMultiCellWidget( tab, 2, 2, 0, 4 ); - textLabel2_2 = new QLabel( this, "textLabel2_2" ); - textLabel2_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, textLabel2_2->sizePolicy().hasHeightForWidth() ) ); + textLabel2_2 = new TQLabel( this, "textLabel2_2" ); + textLabel2_2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel2_2->sizePolicy().hasHeightForWidth() ) ); MainDlgLayout->addWidget( textLabel2_2, 1, 4 ); cbBurnSpeed = new KComboBox( FALSE, this, "cbBurnSpeed" ); - cbBurnSpeed->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, cbBurnSpeed->sizePolicy().hasHeightForWidth() ) ); + cbBurnSpeed->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, cbBurnSpeed->sizePolicy().hasHeightForWidth() ) ); cbBurnSpeed->setEditable( TRUE ); MainDlgLayout->addWidget( cbBurnSpeed, 1, 3 ); - textLabel1_3 = new QLabel( this, "textLabel1_3" ); - textLabel1_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, textLabel1_3->sizePolicy().hasHeightForWidth() ) ); + textLabel1_3 = new TQLabel( this, "textLabel1_3" ); + textLabel1_3->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel1_3->sizePolicy().hasHeightForWidth() ) ); MainDlgLayout->addWidget( textLabel1_3, 1, 2 ); - cbInputDev = new QComboBox( FALSE, this, "cbInputDev" ); - cbInputDev->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, cbInputDev->sizePolicy().hasHeightForWidth() ) ); + cbInputDev = new TQComboBox( FALSE, this, "cbInputDev" ); + cbInputDev->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, cbInputDev->sizePolicy().hasHeightForWidth() ) ); cbInputDev->setEditable( TRUE ); cbInputDev->setAutoCompletion( TRUE ); MainDlgLayout->addWidget( cbInputDev, 0, 1 ); - layout2 = new QHBoxLayout( 0, 0, 6, "layout2"); + tqlayout2 = new TQHBoxLayout( 0, 0, 6, "tqlayout2"); bInputOpenDir = new KPushButton( this, "bInputOpenDir" ); - bInputOpenDir->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, bInputOpenDir->sizePolicy().hasHeightForWidth() ) ); - bInputOpenDir->setMinimumSize( QSize( 22, 22 ) ); - bInputOpenDir->setMaximumSize( QSize( 22, 22 ) ); - layout2->addWidget( bInputOpenDir ); + bInputOpenDir->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, bInputOpenDir->sizePolicy().hasHeightForWidth() ) ); + bInputOpenDir->setMinimumSize( TQSize( 22, 22 ) ); + bInputOpenDir->setMaximumSize( TQSize( 22, 22 ) ); + tqlayout2->addWidget( bInputOpenDir ); bInputOpen = new KPushButton( this, "bInputOpen" ); - bInputOpen->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, bInputOpen->sizePolicy().hasHeightForWidth() ) ); - bInputOpen->setMinimumSize( QSize( 22, 22 ) ); - bInputOpen->setMaximumSize( QSize( 22, 22 ) ); - layout2->addWidget( bInputOpen ); - spacer5_2 = new QSpacerItem( 50, 21, QSizePolicy::Expanding, QSizePolicy::Minimum ); - layout2->addItem( spacer5_2 ); + bInputOpen->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, bInputOpen->sizePolicy().hasHeightForWidth() ) ); + bInputOpen->setMinimumSize( TQSize( 22, 22 ) ); + bInputOpen->setMaximumSize( TQSize( 22, 22 ) ); + tqlayout2->addWidget( bInputOpen ); + spacer5_2 = new TQSpacerItem( 50, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); + tqlayout2->addItem( spacer5_2 ); - MainDlgLayout->addMultiCellLayout( layout2, 0, 0, 2, 4 ); + MainDlgLayout->addMultiCellLayout( tqlayout2, 0, 0, 2, 4 ); - cbOutputDev = new QComboBox( FALSE, this, "cbOutputDev" ); - cbOutputDev->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, cbOutputDev->sizePolicy().hasHeightForWidth() ) ); + cbOutputDev = new TQComboBox( FALSE, this, "cbOutputDev" ); + cbOutputDev->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, cbOutputDev->sizePolicy().hasHeightForWidth() ) ); cbOutputDev->setEditable( FALSE ); cbOutputDev->setAutoCompletion( TRUE ); MainDlgLayout->addWidget( cbOutputDev, 1, 1 ); languageChange(); - resize( QSize(743, 585).expandedTo(minimumSizeHint()) ); + resize( TQSize(743, 585).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections - connect( listView1, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( listView1CurrentChanged(QListViewItem*) ) ); - connect( cbOutputDev, SIGNAL( activated(int) ), this, SLOT( cbOutputDevActivated(int) ) ); - connect( bInputOpen, SIGNAL( clicked() ), this, SLOT( bInputOpenClick() ) ); - connect( bInputOpenDir, SIGNAL( clicked() ), this, SLOT( bInputOpenDirClick() ) ); - connect( listView1, SIGNAL( itemRenamed(QListViewItem*,int) ), this, SLOT( itemRenamed(QListViewItem*,int) ) ); + connect( listView1, TQT_SIGNAL( currentChanged(TQListViewItem*) ), this, TQT_SLOT( listView1CurrentChanged(TQListViewItem*) ) ); + connect( cbOutputDev, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( cbOutputDevActivated(int) ) ); + connect( bInputOpen, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bInputOpenClick() ) ); + connect( bInputOpenDir, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bInputOpenDirClick() ) ); + connect( listView1, TQT_SIGNAL( itemRenamed(TQListViewItem*,int) ), this, TQT_SLOT( itemRenamed(TQListViewItem*,int) ) ); // tab order setTabOrder( cbInputDev, cbOutputDev ); @@ -148,7 +148,7 @@ MainDlg::MainDlg( QWidget* parent, const char* name, WFlags fl ) */ MainDlg::~MainDlg() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } /* @@ -167,10 +167,10 @@ void MainDlg::languageChange() cbBurnSpeed->clear(); cbBurnSpeed->insertItem( tr2i18n( "default" ) ); textLabel1_3->setText( tr2i18n( "@" ) ); - bInputOpenDir->setText( QString::null ); - QToolTip::add( bInputOpenDir, tr2i18n( "Open a folder" ) ); - bInputOpen->setText( QString::null ); - QToolTip::add( bInputOpen, tr2i18n( "Open an iso image" ) ); + bInputOpenDir->setText( TQString() ); + TQToolTip::add( bInputOpenDir, tr2i18n( "Open a folder" ) ); + bInputOpen->setText( TQString() ); + TQToolTip::add( bInputOpen, tr2i18n( "Open an iso image" ) ); } void MainDlg::bSaveClick() @@ -183,9 +183,9 @@ void MainDlg::bDevicesClick() qWarning( "MainDlg::bDevicesClick(): Not implemented yet" ); } -void MainDlg::listView1CurrentChanged(QListViewItem*) +void MainDlg::listView1CurrentChanged(TQListViewItem*) { - qWarning( "MainDlg::listView1CurrentChanged(QListViewItem*): Not implemented yet" ); + qWarning( "MainDlg::listView1CurrentChanged(TQListViewItem*): Not implemented yet" ); } void MainDlg::cbOutputDevActivated(int) @@ -208,9 +208,9 @@ void MainDlg::ckMp4AspectRatioClick() qWarning( "MainDlg::ckMp4AspectRatioClick(): Not implemented yet" ); } -void MainDlg::itemRenamed(QListViewItem*,int) +void MainDlg::itemRenamed(TQListViewItem*,int) { - qWarning( "MainDlg::itemRenamed(QListViewItem*,int): Not implemented yet" ); + qWarning( "MainDlg::itemRenamed(TQListViewItem*,int): Not implemented yet" ); } #include "k9mainw.moc" |