author | mickeyl <mickeyl> | 2003-03-30 02:59:54 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-03-30 02:59:54 (UTC) |
commit | e1c4cb3364f8f7ff68da88b5ec26053ee561c8a1 (patch) (side-by-side diff) | |
tree | a7688f2a87c3aa29e7672c9d865d3a953f15ff87 /libopie2/opieui | |
parent | 15ee85466704072173296ff4f0f446cd8fe81d1e (diff) | |
download | opie-e1c4cb3364f8f7ff68da88b5ec26053ee561c8a1.zip opie-e1c4cb3364f8f7ff68da88b5ec26053ee561c8a1.tar.gz opie-e1c4cb3364f8f7ff68da88b5ec26053ee561c8a1.tar.bz2 |
convert my beloved "not" to "!" to make ancient compilers happy, but not me...
-rw-r--r-- | libopie2/opieui/oversatileview.cpp | 152 | ||||
-rw-r--r-- | libopie2/opieui/oversatileviewitem.cpp | 2 |
2 files changed, 77 insertions, 77 deletions
diff --git a/libopie2/opieui/oversatileview.cpp b/libopie2/opieui/oversatileview.cpp index 32855be..6808539 100644 --- a/libopie2/opieui/oversatileview.cpp +++ b/libopie2/opieui/oversatileview.cpp @@ -254,13 +254,13 @@ void OVersatileView::contextMenuRequested( QIconViewItem* item, const QPoint& po // see above popupContextMenu( static_cast<OVersatileViewItem*>( item ), pos, -1 ); } void OVersatileView::popupContextMenu( OVersatileViewItem* item, const QPoint& pos, int col ) { - if ( not item ) + if ( !item ) _contextmenu->exec( pos ); else emit( contextMenuRequested( item, pos, col ) ); } void OVersatileView::setSynchronization( bool sync ) @@ -446,181 +446,181 @@ void OVersatileView::onItem( QIconViewItem * item ) emit( onItem( static_cast<OVersatileViewItem*>( item ) ) ); } void OVersatileView::expanded( QListViewItem *item ) // QListView { //qDebug( "OVersatileView::expanded(): opening tree..." ); - if ( not _treeopened.isNull() ) + if ( !_treeopened.isNull() ) item->setPixmap( 0, _treeopened ); emit( expanded( static_cast<OVersatileViewItem*>( item ) ) ); } void OVersatileView::collapsed( QListViewItem *item ) // QListView { - if ( not _treeclosed.isNull() ) + if ( !_treeclosed.isNull() ) item->setPixmap( 0, _treeclosed ); emit( collapsed( static_cast<OVersatileViewItem*>( item ) ) ); } //=============================================================================================// // OVersatileView Case I - API only existing in QListView or QIconView but not in both! //==============================================================================================// int OVersatileView::treeStepSize() const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return -1; } return _listview->treeStepSize(); } void OVersatileView::setTreeStepSize( int size ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return; } _listview->setTreeStepSize( size ); } QHeader * OVersatileView::header() const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return 0; } return _listview->header(); } int OVersatileView::addColumn( const QString &label, int size ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return -1; } return _listview->addColumn( label, size ); } - + int OVersatileView::addColumn( const QIconSet& iconset, const QString &label, int size ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return -1; } return _listview->addColumn( iconset, label, size ); } void OVersatileView::removeColumn( int index ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return; } _listview->removeColumn( index ); } void OVersatileView::setColumnText( int column, const QString &label ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return; } _listview->setColumnText( column, label ); } void OVersatileView::setColumnText( int column, const QIconSet& iconset, const QString &label ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return; } _listview->setColumnText( column, iconset, label ); } QString OVersatileView::columnText( int column ) const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return QString::null; } return _listview->columnText( column ); } void OVersatileView::setColumnWidth( int column, int width ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return; } _listview->setColumnWidth( column, width ); } int OVersatileView::columnWidth( int column ) const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return -1; } return _listview->columnWidth( column ); } void OVersatileView::setColumnWidthMode( int column, WidthMode mode ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return; } _listview->setColumnWidth( column, mode ); } int OVersatileView::columns() const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return -1; } return _listview->columns(); } void OVersatileView::setColumnAlignment( int column, int align ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return; } _listview->setColumnAlignment( column, align ); } int OVersatileView::columnAlignment( int column ) const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return -1; } return _listview->columnAlignment( column ); } OVersatileViewItem * OVersatileView::itemAt( const QPoint & screenPos ) const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return 0; } return static_cast<OVersatileViewItem*>( _listview->itemAt( screenPos ) ); } QRect OVersatileView::itemRect( const OVersatileViewItem * item ) const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return QRect( -1, -1, -1, -1 ); } return _listview->itemRect( item ); } int OVersatileView::itemPos( const OVersatileViewItem * item ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return -1; } return _listview->itemPos( item ); } bool OVersatileView::isSelected( const OVersatileViewItem * item ) const // QListView // also in QIconViewItem but !in QIconView *shrug* { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return false; } return _listview->isSelected( item ); } @@ -632,448 +632,448 @@ bool OVersatileView::isMultiSelection() const { return _listview->isMultiSelection(); } OVersatileViewItem * OVersatileView::selectedItem() const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return 0; } return static_cast<OVersatileViewItem*>( _listview->selectedItem() ); } void OVersatileView::setOpen( OVersatileViewItem * item, bool open ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return; } _listview->setOpen( item, open ); } bool OVersatileView::isOpen( const OVersatileViewItem * item ) const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return false; } return _listview->isOpen( item ); } OVersatileViewItem * OVersatileView::firstChild() const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return 0; } return static_cast<OVersatileViewItem*>( _listview->firstChild() ); } int OVersatileView::childCount() const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return -1; } return _listview->childCount(); } void OVersatileView::setAllColumnsShowFocus( bool focus ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return; } _listview->setAllColumnsShowFocus( focus ); } bool OVersatileView::allColumnsShowFocus() const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return false; } return _listview->allColumnsShowFocus(); } void OVersatileView::setItemMargin( int margin ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return; } _listview->setItemMargin( margin ); } int OVersatileView::itemMargin() const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return -1; } return _listview->itemMargin(); } void OVersatileView::setRootIsDecorated( bool decorate ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return; } _listview->setRootIsDecorated( decorate ); } bool OVersatileView::rootIsDecorated() const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return false; } return _listview->rootIsDecorated(); } void OVersatileView::setShowSortIndicator( bool show ) // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return; } _listview->setShowSortIndicator( show ); } bool OVersatileView::showSortIndicator() const // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return false; } return _listview->showSortIndicator(); } void OVersatileView::triggerUpdate() // QListView { - if ( not isValidViewMode( Tree ) ) + if ( !isValidViewMode( Tree ) ) { return; } _listview->triggerUpdate(); } // // only in QIconView // uint OVersatileView::count() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return 0; } return _iconview->count(); } int OVersatileView::index( const OVersatileViewItem *item ) const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return -1; } return _iconview->index( item ); } OVersatileViewItem* OVersatileView::firstItem() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return 0; } return static_cast<OVersatileViewItem*>( _iconview->firstItem() ); } OVersatileViewItem* OVersatileView::lastItem() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return 0; } return static_cast<OVersatileViewItem*>( _iconview->lastItem() ); } OVersatileViewItem* OVersatileView::findItem( const QPoint &pos ) const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return 0; } return static_cast<OVersatileViewItem*>( _iconview->findItem( pos ) ); } OVersatileViewItem* OVersatileView::findItem( const QString &text ) const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return 0; } return static_cast<OVersatileViewItem*>( _iconview->findItem( text ) ); } OVersatileViewItem* OVersatileView::findFirstVisibleItem( const QRect &r ) const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return 0; } return static_cast<OVersatileViewItem*>( _iconview->findFirstVisibleItem( r ) ); } OVersatileViewItem* OVersatileView::findLastVisibleItem( const QRect &r ) const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return 0; } return static_cast<OVersatileViewItem*>( _iconview->findLastVisibleItem( r ) ); } void OVersatileView::setGridX( int rx ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->setGridX( rx ); } void OVersatileView::setGridY( int ry ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->setGridY( ry ); } int OVersatileView::gridX() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return -1; } return _iconview->gridX(); } int OVersatileView::gridY() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return -1; } return _iconview->gridY(); } void OVersatileView::setSpacing( int sp ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->setSpacing( sp ); } int OVersatileView::spacing() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return -1; } return _iconview->spacing(); } void OVersatileView::setItemTextPos( QIconView::ItemTextPos pos ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->setItemTextPos( pos ); } QIconView::ItemTextPos OVersatileView::itemTextPos() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return (QIconView::ItemTextPos) -1; } return _iconview->itemTextPos(); } void OVersatileView::setItemTextBackground( const QBrush &b ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->setItemTextBackground( b ); } QBrush OVersatileView::itemTextBackground() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return QBrush(); } return _iconview->itemTextBackground(); } void OVersatileView::setArrangement( QIconView::Arrangement am ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->setArrangement( am ); } QIconView::Arrangement OVersatileView::arrangement() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return (QIconView::Arrangement) -1; } return _iconview->arrangement(); } void OVersatileView::setResizeMode( QIconView::ResizeMode am ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->setResizeMode( am ); } QIconView::ResizeMode OVersatileView::resizeMode() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return (QIconView::ResizeMode) -1; } return _iconview->resizeMode(); } void OVersatileView::setMaxItemWidth( int w ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->setMaxItemWidth( w ); } int OVersatileView::maxItemWidth() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return -1; } return _iconview->maxItemWidth(); } void OVersatileView::setMaxItemTextLength( int w ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->setMaxItemTextLength( w ); } int OVersatileView::maxItemTextLength() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return -1; } return _iconview->maxItemTextLength(); } void OVersatileView::setAutoArrange( bool b ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->setAutoArrange( b ); } bool OVersatileView::autoArrange() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return false; } return _iconview->autoArrange(); } void OVersatileView::setShowToolTips( bool b ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->setShowToolTips( b ); } bool OVersatileView::showToolTips() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return false; } return _iconview->showToolTips(); } bool OVersatileView::sorting() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return false; } return _iconview->sorting(); } bool OVersatileView::sortDirection() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return false; } return _iconview->sortDirection(); } void OVersatileView::setItemsMovable( bool b ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->setItemsMovable( b ); } bool OVersatileView::itemsMovable() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return false; } return _iconview->itemsMovable(); } void OVersatileView::setWordWrapIconText( bool b ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->setWordWrapIconText( b ); } bool OVersatileView::wordWrapIconText() const // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return false; } return _iconview->wordWrapIconText(); } void OVersatileView::arrangeItemsInGrid( const QSize &grid, bool update ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->arrangeItemsInGrid( grid, update ); } void OVersatileView::arrangeItemsInGrid( bool update ) // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->arrangeItemsInGrid( update ); } void OVersatileView::updateContents() // QIconView { - if ( not isValidViewMode( Icons ) ) + if ( !isValidViewMode( Icons ) ) { return; } _iconview->updateContents(); } diff --git a/libopie2/opieui/oversatileviewitem.cpp b/libopie2/opieui/oversatileviewitem.cpp index 379ce24..66de8eb 100644 --- a/libopie2/opieui/oversatileviewitem.cpp +++ b/libopie2/opieui/oversatileviewitem.cpp @@ -93,13 +93,13 @@ OVersatileView* OVersatileViewItem::versatileView() const { return _versatileview; } void OVersatileViewItem::init() { - if ( not firstChild() ) + if ( !firstChild() ) { // I'm a sweet yellow and browne autumn leaf OListViewItem::setPixmap( 0, _versatileview->_treeleaf ); QIconViewItem::setPixmap( _versatileview->_iconleaf ); } |