summaryrefslogtreecommitdiffabout
path: root/microkde
Side-by-side diff
Diffstat (limited to 'microkde') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdeui/klistview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp
index f7d2187..60f3084 100644
--- a/microkde/kdeui/klistview.cpp
+++ b/microkde/kdeui/klistview.cpp
@@ -435,97 +435,97 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse
}
*/
slotSettingsChanged(1); //US do this to initialize the connections
connect(&d->autoSelect, SIGNAL( timeout() ),
this, SLOT( slotAutoSelect() ) );
connect(&d->dragExpand, SIGNAL( timeout() ),
this, SLOT( slotDragExpand() ) );
// context menu handling
if (d->showContextMenusOnPress)
{
connect (this, SIGNAL (rightButtonPressed (QListViewItem*, const QPoint&, int)),
this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
}
else
{
connect (this, SIGNAL (rightButtonClicked (QListViewItem*, const QPoint&, int)),
this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
}
connect (this, SIGNAL (menuShortCutPressed (KListView*, QListViewItem*)),
this, SLOT (emitContextMenu (KListView*, QListViewItem*)));
//qDebug("KListView::KListView make alternate color configurable");
d->alternateBackground = KGlobalSettings::alternateBackgroundColor();
}
KListView::~KListView()
{
delete d;
}
bool KListView::isExecuteArea( const QPoint& point )
{
if ( itemAt( point ) )
return isExecuteArea( point.x() );
return false;
}
QSize KListView::sizeHint() const
{
//qDebug("KListView::QSize sizeHint() ");
#ifdef DESKTOP_VERSION
- QListView::sizeHint();
+ return QListView::sizeHint();
#else
return QSize ( 40, 40 );
#endif
}
bool KListView::isExecuteArea( int x )
{
if( allColumnsShowFocus() )
return true;
else {
int offset = 0;
int width = columnWidth( 0 );
int pos = header()->mapToIndex( 0 );
for ( int index = 0; index < pos; index++ )
offset += columnWidth( header()->mapToSection( index ) );
x += contentsX(); // in case of a horizontal scrollbar
return ( x > offset && x < ( offset + width ) );
}
}
void KListView::slotOnItem( QListViewItem *item )
{
QPoint vp = viewport()->mapFromGlobal( QCursor::pos() );
if ( item && isExecuteArea( vp.x() ) && (d->autoSelectDelay > -1) && d->bUseSingle ) {
d->autoSelect.start( d->autoSelectDelay, true );
d->pCurrentItem = item;
}
}
void KListView::slotOnViewport()
{
if ( d->bChangeCursorOverItem )
viewport()->unsetCursor();
d->autoSelect.stop();
d->pCurrentItem = 0L;
}
void KListView::slotSettingsChanged(int category)
{
//qDebug("KListView::slotSettingsChanged has to be verified");
switch (category)
{
//US I create my private category (=1) to set the settings