summaryrefslogtreecommitdiffstats
path: root/kdat/Node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdat/Node.cpp')
-rw-r--r--kdat/Node.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/kdat/Node.cpp b/kdat/Node.cpp
index 006e978..cfc0610 100644
--- a/kdat/Node.cpp
+++ b/kdat/Node.cpp
@@ -58,7 +58,7 @@ void Node::insertNode( Node* child )
if ( lastParent != this ) {
// Recompute lastDirIndex.
for ( lastDirIndex = 0;
- ( lastDirIndex < childCount() ) && ( ((Node*)tqchildAt( lastDirIndex ))->getType() == TapeDirectoryNodeType );
+ ( lastDirIndex < childCount() ) && ( ((Node*)childAt( lastDirIndex ))->getType() == TapeDirectoryNodeType );
lastDirIndex++ );
lastParent = this;
}
@@ -83,7 +83,7 @@ void Node::insertNode( Node* child )
while ( min < max ) {
mid = ( max - min ) / 2 + min;
//mid = ( min + max ) / 2;
- if ( child->getText().compare( tqchildAt( mid )->getText() ) < 0 ) {
+ if ( child->getText().compare( childAt( mid )->getText() ) < 0 ) {
max = mid - 1;
} else {
min = mid + 1;
@@ -94,8 +94,8 @@ void Node::insertNode( Node* child )
// KLUDGE!
mid -= 5;
if ( mid < smin ) mid = smin;
- if ( ((Node*)tqchildAt( mid ))->getType() != child->getType() ) mid++;
- for ( ; ( mid <= smax ) && ( child->getText().compare( tqchildAt( mid )->getText() ) > 0 ); mid++ );
+ if ( ((Node*)childAt( mid ))->getType() != child->getType() ) mid++;
+ for ( ; ( mid <= smax ) && ( child->getText().compare( childAt( mid )->getText() ) > 0 ); mid++ );
//printf( "index = %d, text = '%s'\n", mid, child->getText().data() );
insertChild( mid, child );
} else {
@@ -181,14 +181,14 @@ bool TapeNode::validate()
// Remove deleted archives.
Archive* a;
for ( uint j = 0; j < childCount(); ) {
- a = ((ArchiveNode*)tqchildAt( j ))->getArchive();
+ a = ((ArchiveNode*)childAt( j ))->getArchive();
for ( i.toFirst(); i.current(); ++i ) {
if ( i.current() == a ) {
break;
}
}
if ( !i.current() ) {
- removeChild( tqchildAt( j ) );
+ removeChild( childAt( j ) );
} else {
j++;
}
@@ -211,7 +211,7 @@ void TapeNode::expanding( bool expand )
expand = TRUE;
if ( childCount() > 0 ) {
- // We already have the tqchildren added
+ // We already have the children added
return;
}
@@ -235,8 +235,8 @@ ArchiveNode* TapeNode::findArchiveNode( Archive* archive )
{
ArchiveNode* n = 0;
for ( uint i = 0; i < childCount(); i++ ) {
- if ( ((ArchiveNode*)tqchildAt( i ))->getArchive() == archive ) {
- n = (ArchiveNode*)tqchildAt( i );
+ if ( ((ArchiveNode*)childAt( i ))->getArchive() == archive ) {
+ n = (ArchiveNode*)childAt( i );
break;
}
}
@@ -280,7 +280,7 @@ void ArchiveNode::expanding( bool expand )
expand = TRUE;
if ( childCount() > 0 ) {
- // We already have the tqchildren added.
+ // We already have the children added.
return;
}
@@ -338,7 +338,7 @@ void TapeDirectoryNode::expanding( bool expand )
expand = TRUE;
if ( childCount() > 0 ) {
- // We already have the tqchildren added.
+ // We already have the children added.
return;
}
@@ -411,7 +411,7 @@ void SelectableNode::doUpdateState()
bool hasSelected = FALSE;
bool allSelected = TRUE;
for ( uint i = 0; i < childCount(); i++ ) {
- switch ( ((SelectableNode*)tqchildAt( i ))->_state ) {
+ switch ( ((SelectableNode*)childAt( i ))->_state ) {
case SelAll:
oneSelected = TRUE;
hasSelected = TRUE;
@@ -443,15 +443,15 @@ void SelectableNode::doUpdateState()
void SelectableNode::doSetSelected( bool select )
{
- // All my tqchildren get the same selection state.
+ // All my children get the same selection state.
for ( uint i = 0; i < childCount(); i++ ) {
if ( select ) {
- if ( !((SelectableNode*)tqchildAt( i ))->isSelected() ) {
- ((SelectableNode*)tqchildAt( i ))->doSetSelected( TRUE );
+ if ( !((SelectableNode*)childAt( i ))->isSelected() ) {
+ ((SelectableNode*)childAt( i ))->doSetSelected( TRUE );
}
} else {
- if ( ((SelectableNode*)tqchildAt( i ))->isSelected() || ((SelectableNode*)tqchildAt( i ))->hasSelectedChildren() ) {
- ((SelectableNode*)tqchildAt( i ))->doSetSelected( FALSE );
+ if ( ((SelectableNode*)childAt( i ))->isSelected() || ((SelectableNode*)childAt( i ))->hasSelectedChildren() ) {
+ ((SelectableNode*)childAt( i ))->doSetSelected( FALSE );
}
}
}
@@ -549,7 +549,7 @@ void SelectableNode::paintText( TQPainter* p, int indent, int cellHeight,
p->fontMetrics().leading()) / 2);
if (highlighted) {
paintHighlight(p, indent, cg, owner->hasFocus(),
- (TQt::GUIStyle)owner->tqstyle().tqstyleHint(TQStyle::SH_GUIStyle)); // TQt3 doesn't make this easy ;)
+ (TQt::GUIStyle)owner->tqstyle().styleHint(TQStyle::SH_GUIStyle)); // TQt3 doesn't make this easy ;)
p->setPen(cg.base());
p->setBackgroundColor(cg.text());
}
@@ -605,7 +605,7 @@ void SelectableNode::setSelected( bool select )
((SelectableNode*)getParent())->doUpdateState();
}
- owner->tqrepaint();
+ owner->repaint();
KDatMainWindow::getInstance()->configureUI( TapeManager::instance()->getMountedTape() );
}
@@ -657,8 +657,8 @@ void MountedArchiveNode::setSelected( bool select )
// Deselect all other archives.
Node* parent = (Node*)getParent();
for ( int i = parent->childCount() - 1; i >= 0; i-- ) {
- if ( parent->tqchildAt( i ) != this ) {
- ((SelectableNode*)parent->tqchildAt( i ))->setSelected( FALSE );
+ if ( parent->childAt( i ) != this ) {
+ ((SelectableNode*)parent->childAt( i ))->setSelected( FALSE );
}
}
}
@@ -680,7 +680,7 @@ void MountedArchiveNode::expanding( bool expand )
expand = TRUE;
if ( childCount() > 0 ) {
- // We already have the tqchildren added.
+ // We already have the children added.
return;
}
@@ -757,8 +757,8 @@ void MountedTapeDirectoryNode::setSelected( bool select )
parent = (Node*)parent->getParent();
}
for ( int i = parent->childCount() - 1; i >= 0; i-- ) {
- if ( parent->tqchildAt( i ) != arcNode ) {
- ((SelectableNode*)parent->tqchildAt( i ))->setSelected( FALSE );
+ if ( parent->childAt( i ) != arcNode ) {
+ ((SelectableNode*)parent->childAt( i ))->setSelected( FALSE );
}
}
}
@@ -780,7 +780,7 @@ void MountedTapeDirectoryNode::expanding( bool expand )
expand = TRUE;
if ( childCount() > 0 ) {
- // We already have the tqchildren added.
+ // We already have the children added.
return;
}
@@ -863,8 +863,8 @@ void MountedTapeFileNode::setSelected( bool select )
parent = (Node*)parent->getParent();
}
for ( int i = parent->childCount() - 1; i >= 0; i-- ) {
- if ( parent->tqchildAt( i ) != arcNode ) {
- ((SelectableNode*)parent->tqchildAt( i ))->setSelected( FALSE );
+ if ( parent->childAt( i ) != arcNode ) {
+ ((SelectableNode*)parent->childAt( i ))->setSelected( FALSE );
}
}
}
@@ -934,7 +934,7 @@ void RootNode::expanding( bool expand )
{
expand = TRUE;
- // If we already have some tqchildren, check to see if the directory has been modified.
+ // If we already have some children, check to see if the directory has been modified.
if ( childCount() > 0 ) {
struct stat statinfo;
if ( stat( "/", &statinfo ) < 0 ) {
@@ -950,7 +950,7 @@ void RootNode::expanding( bool expand )
_mtime = statinfo.st_mtime;
- // Remove all the tqchildren.
+ // Remove all the children.
Node* n;
while ( ( n = (Node*)getChild() ) ) {
removeChild( n );
@@ -975,7 +975,7 @@ void RootNode::expanding( bool expand )
return;
}
- // Fill in the child's tqchildren.
+ // Fill in the child's children.
const TQFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst );
if ( list ) {
TQFileInfoListIterator it( *list );
@@ -1050,7 +1050,7 @@ void DirectoryNode::expanding( bool expand )
}
path.prepend( "/" );
- // If we already have some tqchildren, check to see if the directory has been modified.
+ // If we already have some children, check to see if the directory has been modified.
if ( childCount() > 0 ) {
struct stat statinfo;
if ( stat( TQFile::encodeName(path), &statinfo ) < 0 ) {
@@ -1066,7 +1066,7 @@ void DirectoryNode::expanding( bool expand )
_mtime = statinfo.st_mtime;
- // Remove all the tqchildren.
+ // Remove all the children.
Node* n;
while ( ( n = (Node*)getChild() ) ) {
removeChild( n );
@@ -1091,7 +1091,7 @@ void DirectoryNode::expanding( bool expand )
return;
}
- // Fill in the child's tqchildren.
+ // Fill in the child's children.
const TQFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst );
if ( list ) {
TQFileInfoListIterator it( *list );
@@ -1210,7 +1210,7 @@ void TapeDriveNode::expanding( bool expand )
expand = TRUE;
if ( childCount() > 0 ) {
- // We already have the tqchildren added
+ // We already have the children added
return;
}
@@ -1254,7 +1254,7 @@ void TapeDriveNode::slotTapeUnmounted()
setPixmap( *ImageCache::instance()->getTapeUnmounted() );
setText( i18n( "<no tape>" ) );
- // Remove all the tqchildren.
+ // Remove all the children.
Node* n;
while ( ( n = (Node*)getChild() ) ) {
Node::removeChild( n );
@@ -1304,14 +1304,14 @@ void TapeDriveNode::slotTapeModified( Tape* tape )
// Remove deleted archives.
Archive* a;
for ( uint j = 0; j < childCount(); ) {
- a = ((MountedArchiveNode*)tqchildAt( j ))->getArchive();
+ a = ((MountedArchiveNode*)childAt( j ))->getArchive();
for ( i.toFirst(); i.current(); ++i ) {
if ( i.current() == a ) {
break;
}
}
if ( !i.current() ) {
- Node::removeChild( tqchildAt( j ) );
+ Node::removeChild( childAt( j ) );
} else {
j++;
}
@@ -1322,8 +1322,8 @@ MountedArchiveNode* TapeDriveNode::findArchiveNode( Archive* archive )
{
MountedArchiveNode* n = 0;
for ( uint i = 0; i < childCount(); i++ ) {
- if ( ((MountedArchiveNode*)tqchildAt( i ))->getArchive() == archive ) {
- n = (MountedArchiveNode*)tqchildAt( i );
+ if ( ((MountedArchiveNode*)childAt( i ))->getArchive() == archive ) {
+ n = (MountedArchiveNode*)childAt( i );
break;
}
}
@@ -1417,7 +1417,7 @@ TapeNode* TapeIndexRootNode::findTapeNode( Tape* tape )
{
TapeNode* n = 0;
for ( uint i = 0; i < childCount(); i++ ) {
- n = (TapeNode*)tqchildAt( i );
+ n = (TapeNode*)childAt( i );
if ( n->getTape() == tape ) {
return n;
}
@@ -1575,7 +1575,7 @@ BackupProfileNode* BackupProfileRootNode::findBackupProfileNode( BackupProfile*
{
BackupProfileNode* n = 0;
for ( uint i = 0; i < childCount(); i++ ) {
- n = (BackupProfileNode*)tqchildAt( i );
+ n = (BackupProfileNode*)childAt( i );
if ( n->getBackupProfile() == backupProfile ) {
return n;
}