summaryrefslogtreecommitdiffstats
path: root/kdat/TapeInfoWidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
commitaa3a1ca934bc541bddd3fa136a85f106f7da266e (patch)
tree9ad0b795aed8fa4ac30c2fe0fd1aacb8175714c0 /kdat/TapeInfoWidget.cpp
parentb10cf7066791a2f362495890cd50c984e8025412 (diff)
downloadtdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.tar.gz
tdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1157635 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdat/TapeInfoWidget.cpp')
-rw-r--r--kdat/TapeInfoWidget.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/kdat/TapeInfoWidget.cpp b/kdat/TapeInfoWidget.cpp
index 8a22656..1455743 100644
--- a/kdat/TapeInfoWidget.cpp
+++ b/kdat/TapeInfoWidget.cpp
@@ -19,10 +19,10 @@
#include <stdlib.h>
#include <time.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -37,17 +37,17 @@
#include "TapeInfoWidget.moc"
-TapeInfoWidget::TapeInfoWidget( QWidget* parent, const char* name )
- : QWidget( parent, name ),
+TapeInfoWidget::TapeInfoWidget( TQWidget* parent, const char* name )
+ : TQWidget( parent, name ),
_tape( 0 )
{
- QLabel* lbl1 = new QLabel( i18n( "Tape name:" ), this );
- QLabel* lbl2 = new QLabel( i18n( "Tape size:" ), this );
- QLabel* lbl3 = new QLabel( i18n( "Tape ID:" ), this );
- QLabel* lbl4 = new QLabel( i18n( "Created on:" ), this );
- QLabel* lbl5 = new QLabel( i18n( "Last modified:" ), this );
- QLabel* lbl6 = new QLabel( i18n( "Archive count:" ), this );
- QLabel* lbl7 = new QLabel( i18n( "Space used:" ), this );
+ TQLabel* lbl1 = new TQLabel( i18n( "Tape name:" ), this );
+ TQLabel* lbl2 = new TQLabel( i18n( "Tape size:" ), this );
+ TQLabel* lbl3 = new TQLabel( i18n( "Tape ID:" ), this );
+ TQLabel* lbl4 = new TQLabel( i18n( "Created on:" ), this );
+ TQLabel* lbl5 = new TQLabel( i18n( "Last modified:" ), this );
+ TQLabel* lbl6 = new TQLabel( i18n( "Archive count:" ), this );
+ TQLabel* lbl7 = new TQLabel( i18n( "Space used:" ), this );
int max = lbl1->sizeHint().width();
if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width();
@@ -65,86 +65,86 @@ TapeInfoWidget::TapeInfoWidget( QWidget* parent, const char* name )
lbl6->setFixedSize( max, lbl6->sizeHint().height() );
lbl7->setFixedSize( max, lbl7->sizeHint().height() );
- _tapeName = new QLineEdit( this );
+ _tapeName = new TQLineEdit( this );
_tapeName->setFixedHeight( _tapeName->sizeHint().height() );
- _tapeSize = new QLineEdit( this );
+ _tapeSize = new TQLineEdit( this );
_tapeSize->setFixedSize( 48, _tapeSize->sizeHint().height() );
- _tapeSizeUnits = new QComboBox( this );
+ _tapeSizeUnits = new TQComboBox( this );
_tapeSizeUnits->setFixedSize( 48, _tapeSizeUnits->sizeHint().height() );
_tapeSizeUnits->insertItem( "MB" );
_tapeSizeUnits->insertItem( "GB" );
- _tapeID = new QLabel( "???", this );
+ _tapeID = new TQLabel( "???", this );
_tapeID->setFixedHeight( _tapeID->sizeHint().height() );
- _ctime = new QLabel( "???", this );
+ _ctime = new TQLabel( "???", this );
_ctime->setFixedHeight( _ctime->sizeHint().height() );
- _mtime = new QLabel( "???", this );
+ _mtime = new TQLabel( "???", this );
_mtime->setFixedHeight( _mtime->sizeHint().height() );
- _archiveCount = new QLabel( "???", this );
+ _archiveCount = new TQLabel( "???", this );
_archiveCount->setFixedHeight( _archiveCount->sizeHint().height() );
- _spaceUsed = new QLabel( "???", this );
+ _spaceUsed = new TQLabel( "???", this );
_spaceUsed->setFixedHeight( _spaceUsed->sizeHint().height() );
_apply = new KPushButton( KStdGuiItem::apply(), this );
_apply->setFixedSize( 80, _apply->sizeHint().height() );
_apply->setEnabled( FALSE );
- QVBoxLayout* l1 = new QVBoxLayout( this, 4, 4 );
+ TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 );
- QHBoxLayout* l1_1 = new QHBoxLayout();
+ TQHBoxLayout* l1_1 = new TQHBoxLayout();
l1->addLayout( l1_1 );
l1_1->addWidget( lbl1 );
l1_1->addWidget( _tapeName, 1 );
- QHBoxLayout* l1_2 = new QHBoxLayout();
+ TQHBoxLayout* l1_2 = new TQHBoxLayout();
l1->addLayout( l1_2 );
l1_2->addWidget( lbl2 );
l1_2->addWidget( _tapeSize );
l1_2->addWidget( _tapeSizeUnits );
l1_2->addStretch( 1 );
- QHBoxLayout* l1_3 = new QHBoxLayout();
+ TQHBoxLayout* l1_3 = new TQHBoxLayout();
l1->addLayout( l1_3 );
l1_3->addWidget( lbl3 );
l1_3->addWidget( _tapeID );
- QHBoxLayout* l1_4 = new QHBoxLayout();
+ TQHBoxLayout* l1_4 = new TQHBoxLayout();
l1->addLayout( l1_4 );
l1_4->addWidget( lbl4 );
l1_4->addWidget( _ctime );
- QHBoxLayout* l1_5 = new QHBoxLayout();
+ TQHBoxLayout* l1_5 = new TQHBoxLayout();
l1->addLayout( l1_5 );
l1_5->addWidget( lbl5 );
l1_5->addWidget( _mtime );
- QHBoxLayout* l1_6 = new QHBoxLayout();
+ TQHBoxLayout* l1_6 = new TQHBoxLayout();
l1->addLayout( l1_6 );
l1_6->addWidget( lbl6 );
l1_6->addWidget( _archiveCount );
- QHBoxLayout* l1_7 = new QHBoxLayout();
+ TQHBoxLayout* l1_7 = new TQHBoxLayout();
l1->addLayout( l1_7 );
l1_7->addWidget( lbl7 );
l1_7->addWidget( _spaceUsed );
l1->addStretch( 1 );
- QHBoxLayout* l1_8 = new QHBoxLayout();
+ TQHBoxLayout* l1_8 = new TQHBoxLayout();
l1->addLayout( l1_8 );
l1_8->addStretch( 1 );
l1_8->addWidget( _apply );
- connect( _tapeName , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) );
- connect( _tapeSize , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) );
- connect( _tapeSizeUnits, SIGNAL( activated( int ) ) , this, SLOT( slotActivated( int ) ) );
- connect( _apply , SIGNAL( clicked() ) , this, SLOT( slotApply() ) );
+ connect( _tapeName , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) );
+ connect( _tapeSize , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) );
+ connect( _tapeSizeUnits, TQT_SIGNAL( activated( int ) ) , this, TQT_SLOT( slotActivated( int ) ) );
+ connect( _apply , TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotApply() ) );
}
TapeInfoWidget::~TapeInfoWidget()
@@ -171,7 +171,7 @@ void TapeInfoWidget::setTape( Tape* tape )
size /= 1024;
_tapeSizeUnits->setCurrentItem( 0 );
}
- QString tmp;
+ TQString tmp;
tmp.setNum( size );
_tapeSize->setText( tmp );
@@ -190,7 +190,7 @@ void TapeInfoWidget::setTape( Tape* tape )
tmp.setNum( _tape->getChildren().count() );
_archiveCount->setText( tmp );
- QPtrListIterator<Archive> i( _tape->getChildren() );
+ TQPtrListIterator<Archive> i( _tape->getChildren() );
int used = 1;
for ( ; i.current(); ++i ) {
used += i.current()->getEndBlock();
@@ -202,7 +202,7 @@ void TapeInfoWidget::setTape( Tape* tape )
used *= blockSize / 1024;
}
if ( _tape->getSize() > 0 ) {
- tmp = QString::fromLatin1( "%1 / %2 (%3%)")
+ tmp = TQString::fromLatin1( "%1 / %2 (%3%)")
.arg(Util::kbytesToString( used ))
.arg(Util::kbytesToString( _tape->getSize() ))
.arg(used * 100 / _tape->getSize() );
@@ -230,7 +230,7 @@ bool TapeInfoWidget::isModified()
return _tape->getSize() != size;
}
-void TapeInfoWidget::slotTextChanged( const QString & )
+void TapeInfoWidget::slotTextChanged( const TQString & )
{
if ( !_tape ) {
return;