-rw-r--r-- | microkde/kdeui/klistview.cpp | 5 | ||||
-rw-r--r-- | microkde/kdeui/klistview.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp index 154cd02..31e2053 100644 --- a/microkde/kdeui/klistview.cpp +++ b/microkde/kdeui/klistview.cpp | |||
@@ -384,54 +384,55 @@ void KListViewLineEdit::focusOutEvent(QFocusEvent *ev) | |||
384 | } | 384 | } |
385 | 385 | ||
386 | void KListViewLineEdit::paintEvent( QPaintEvent *e ) | 386 | void KListViewLineEdit::paintEvent( QPaintEvent *e ) |
387 | { | 387 | { |
388 | KLineEdit::paintEvent( e ); | 388 | KLineEdit::paintEvent( e ); |
389 | 389 | ||
390 | if ( !frame() ) { | 390 | if ( !frame() ) { |
391 | QPainter p( this ); | 391 | QPainter p( this ); |
392 | p.setClipRegion( e->region() ); | 392 | p.setClipRegion( e->region() ); |
393 | p.drawRect( rect() ); | 393 | p.drawRect( rect() ); |
394 | } | 394 | } |
395 | } | 395 | } |
396 | 396 | ||
397 | // selection changed -> terminate. As our "item" can be already deleted, | 397 | // selection changed -> terminate. As our "item" can be already deleted, |
398 | // we can't call terminate(false), because that would emit done() with | 398 | // we can't call terminate(false), because that would emit done() with |
399 | // a dangling pointer to "item". | 399 | // a dangling pointer to "item". |
400 | void KListViewLineEdit::slotSelectionChanged() | 400 | void KListViewLineEdit::slotSelectionChanged() |
401 | { | 401 | { |
402 | item = 0; | 402 | item = 0; |
403 | col = 0; | 403 | col = 0; |
404 | hide(); | 404 | hide(); |
405 | } | 405 | } |
406 | */ | 406 | */ |
407 | 407 | ||
408 | KListView::KListView( QWidget *parent, const char *name ) | 408 | KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse ) |
409 | : QListView( parent, name ), | 409 | : QListView( parent, name ), |
410 | d (new KListViewPrivate (this)) | 410 | d (new KListViewPrivate (this)) |
411 | { | 411 | { |
412 | #ifndef DESKTOP_VERSION | 412 | #ifndef DESKTOP_VERSION |
413 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); | 413 | if ( emulateRightMouse ) |
414 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); | ||
414 | #endif | 415 | #endif |
415 | //US setDragAutoScroll(true); | 416 | //US setDragAutoScroll(true); |
416 | 417 | ||
417 | connect( this, SIGNAL( onViewport() ), | 418 | connect( this, SIGNAL( onViewport() ), |
418 | this, SLOT( slotOnViewport() ) ); | 419 | this, SLOT( slotOnViewport() ) ); |
419 | connect( this, SIGNAL( onItem( QListViewItem * ) ), | 420 | connect( this, SIGNAL( onItem( QListViewItem * ) ), |
420 | this, SLOT( slotOnItem( QListViewItem * ) ) ); | 421 | this, SLOT( slotOnItem( QListViewItem * ) ) ); |
421 | 422 | ||
422 | connect (this, SIGNAL(contentsMoving(int,int)), | 423 | connect (this, SIGNAL(contentsMoving(int,int)), |
423 | this, SLOT(cleanDropVisualizer())); | 424 | this, SLOT(cleanDropVisualizer())); |
424 | connect (this, SIGNAL(contentsMoving(int,int)), | 425 | connect (this, SIGNAL(contentsMoving(int,int)), |
425 | this, SLOT(cleanItemHighlighter())); | 426 | this, SLOT(cleanItemHighlighter())); |
426 | 427 | ||
427 | /*US | 428 | /*US |
428 | slotSettingsChanged(KApplication::SETTINGS_MOUSE); | 429 | slotSettingsChanged(KApplication::SETTINGS_MOUSE); |
429 | 430 | ||
430 | if (kapp) | 431 | if (kapp) |
431 | { | 432 | { |
432 | connect( kapp, SIGNAL( settingsChanged(int) ), SLOT( slotSettingsChanged(int) ) ); | 433 | connect( kapp, SIGNAL( settingsChanged(int) ), SLOT( slotSettingsChanged(int) ) ); |
433 | kapp->addKipcEventMask( KIPC::SettingsChanged ); | 434 | kapp->addKipcEventMask( KIPC::SettingsChanged ); |
434 | } | 435 | } |
435 | */ | 436 | */ |
436 | slotSettingsChanged(1); //US do this to initialize the connections | 437 | slotSettingsChanged(1); //US do this to initialize the connections |
437 | 438 | ||
diff --git a/microkde/kdeui/klistview.h b/microkde/kdeui/klistview.h index d559ce7..0058416 100644 --- a/microkde/kdeui/klistview.h +++ b/microkde/kdeui/klistview.h | |||
@@ -102,49 +102,49 @@ public: | |||
102 | * | 102 | * |
103 | * Additionally the current item is always selected automatically when | 103 | * Additionally the current item is always selected automatically when |
104 | * navigating using the keyboard, except other items were selected explicitely. | 104 | * navigating using the keyboard, except other items were selected explicitely. |
105 | * | 105 | * |
106 | * This way e.g. SHIFT+up/PgUp then SHIFT+down/PgDn leaves no item selected | 106 | * This way e.g. SHIFT+up/PgUp then SHIFT+down/PgDn leaves no item selected |
107 | */ | 107 | */ |
108 | enum SelectionModeExt { | 108 | enum SelectionModeExt { |
109 | Single = QListView::Single, | 109 | Single = QListView::Single, |
110 | Multi = QListView::Multi, | 110 | Multi = QListView::Multi, |
111 | Extended = QListView::Extended, | 111 | Extended = QListView::Extended, |
112 | NoSelection = QListView::NoSelection, | 112 | NoSelection = QListView::NoSelection, |
113 | FileManager | 113 | FileManager |
114 | }; | 114 | }; |
115 | void repaintContents( bool erase = true ) | 115 | void repaintContents( bool erase = true ) |
116 | { | 116 | { |
117 | QScrollView::repaintContents( contentsX(), contentsY(), | 117 | QScrollView::repaintContents( contentsX(), contentsY(), |
118 | visibleWidth(), visibleHeight(), erase ); | 118 | visibleWidth(), visibleHeight(), erase ); |
119 | }; | 119 | }; |
120 | /** | 120 | /** |
121 | * Constructor. | 121 | * Constructor. |
122 | * | 122 | * |
123 | * The parameters @p parent and @p name are handled by | 123 | * The parameters @p parent and @p name are handled by |
124 | * @ref QListView, as usual. | 124 | * @ref QListView, as usual. |
125 | */ | 125 | */ |
126 | KListView (QWidget *parent = 0, const char *name = 0); | 126 | KListView (QWidget *parent = 0, const char *name = 0, bool emulateRightMouse = true ); |
127 | 127 | ||
128 | /** | 128 | /** |
129 | * Destructor. | 129 | * Destructor. |
130 | */ | 130 | */ |
131 | virtual ~KListView(); | 131 | virtual ~KListView(); |
132 | 132 | ||
133 | /** | 133 | /** |
134 | * Reimplemented for internal reasons. | 134 | * Reimplemented for internal reasons. |
135 | * Further reimplementations should call this function or else | 135 | * Further reimplementations should call this function or else |
136 | * some features may not work correctly. | 136 | * some features may not work correctly. |
137 | * | 137 | * |
138 | * The API is unaffected. | 138 | * The API is unaffected. |
139 | */ | 139 | */ |
140 | virtual void setAcceptDrops (bool); | 140 | virtual void setAcceptDrops (bool); |
141 | 141 | ||
142 | /** | 142 | /** |
143 | * This function determines whether the given coordinates are within the | 143 | * This function determines whether the given coordinates are within the |
144 | * execute area. The execute area is the part of a @ref QListViewItem where mouse | 144 | * execute area. The execute area is the part of a @ref QListViewItem where mouse |
145 | * clicks or double clicks respectively generate a @ref #executed() signal. | 145 | * clicks or double clicks respectively generate a @ref #executed() signal. |
146 | * Depending on @ref QListView::allColumnsShowFocus() this is either the | 146 | * Depending on @ref QListView::allColumnsShowFocus() this is either the |
147 | * whole item or only the first column. | 147 | * whole item or only the first column. |
148 | * @return true if point is inside execute area of an item, false in all | 148 | * @return true if point is inside execute area of an item, false in all |
149 | * other cases including the case that it is over the viewport. | 149 | * other cases including the case that it is over the viewport. |
150 | */ | 150 | */ |