]> cloud.milkyroute.net Git - dolphin.git/blob - src/dolphindetailsview.cpp
if the mouse is above an item and moved very fast outside the widget, no viewportEnte...
[dolphin.git] / src / dolphindetailsview.cpp
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz *
3 * peter.penz@gmx.at *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
20
21 #include "dolphindetailsview.h"
22
23 #include "dolphinmodel.h"
24 #include "dolphincontroller.h"
25 #include "dolphinsettings.h"
26 #include "dolphinsortfilterproxymodel.h"
27 #include "draganddrophelper.h"
28 #include "selectionmanager.h"
29 #include "viewproperties.h"
30
31 #include "dolphin_detailsmodesettings.h"
32 #include "dolphin_generalsettings.h"
33
34 #include <kdirmodel.h>
35 #include <klocale.h>
36 #include <kmenu.h>
37
38 #include <QAbstractProxyModel>
39 #include <QAction>
40 #include <QApplication>
41 #include <QHeaderView>
42 #include <QRubberBand>
43 #include <QPainter>
44 #include <QScrollBar>
45
46 DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* controller) :
47 QTreeView(parent),
48 m_autoResize(true),
49 m_controller(controller),
50 m_font(),
51 m_decorationSize(),
52 m_showElasticBand(false),
53 m_elasticBandOrigin(),
54 m_elasticBandDestination()
55 {
56 const DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings();
57 Q_ASSERT(settings != 0);
58 Q_ASSERT(controller != 0);
59
60 setAcceptDrops(true);
61 setSortingEnabled(true);
62 setUniformRowHeights(true);
63 setSelectionBehavior(SelectItems);
64 setDragDropMode(QAbstractItemView::DragDrop);
65 setDropIndicatorShown(false);
66 setAlternatingRowColors(true);
67 setRootIsDecorated(settings->expandableFolders());
68 setItemsExpandable(settings->expandableFolders());
69 setEditTriggers(QAbstractItemView::NoEditTriggers);
70
71 setMouseTracking(true);
72
73 const ViewProperties props(controller->url());
74 setSortIndicatorSection(props.sorting());
75 setSortIndicatorOrder(props.sortOrder());
76
77 QHeaderView* headerView = header();
78 connect(headerView, SIGNAL(sectionClicked(int)),
79 this, SLOT(synchronizeSortingState(int)));
80 headerView->setContextMenuPolicy(Qt::CustomContextMenu);
81 connect(headerView, SIGNAL(customContextMenuRequested(const QPoint&)),
82 this, SLOT(configureColumns(const QPoint&)));
83 connect(headerView, SIGNAL(sectionResized(int, int, int)),
84 this, SLOT(slotHeaderSectionResized(int, int, int)));
85 connect(headerView, SIGNAL(sectionHandleDoubleClicked(int)),
86 this, SLOT(disableAutoResizing()));
87
88 connect(parent, SIGNAL(sortingChanged(DolphinView::Sorting)),
89 this, SLOT(setSortIndicatorSection(DolphinView::Sorting)));
90 connect(parent, SIGNAL(sortOrderChanged(Qt::SortOrder)),
91 this, SLOT(setSortIndicatorOrder(Qt::SortOrder)));
92
93 // TODO: Connecting to the signal 'activated()' is not possible, as kstyle
94 // does not forward the single vs. doubleclick to it yet (KDE 4.1?). Hence it is
95 // necessary connecting the signal 'singleClick()' or 'doubleClick' and to handle the
96 // RETURN-key in keyPressEvent().
97 if (KGlobalSettings::singleClick()) {
98 connect(this, SIGNAL(clicked(const QModelIndex&)),
99 controller, SLOT(triggerItem(const QModelIndex&)));
100 if (DolphinSettings::instance().generalSettings()->showSelectionToggle()) {
101 SelectionManager* selManager = new SelectionManager(this);
102 connect(selManager, SIGNAL(selectionChanged()),
103 this, SLOT(requestActivation()));
104 connect(m_controller, SIGNAL(urlChanged(const KUrl&)),
105 selManager, SLOT(reset()));
106 }
107 } else {
108 connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
109 controller, SLOT(triggerItem(const QModelIndex&)));
110 }
111 connect(this, SIGNAL(entered(const QModelIndex&)),
112 this, SLOT(slotEntered(const QModelIndex&)));
113 connect(this, SIGNAL(viewportEntered()),
114 controller, SLOT(emitViewportEntered()));
115 connect(controller, SIGNAL(zoomIn()),
116 this, SLOT(zoomIn()));
117 connect(controller, SIGNAL(zoomOut()),
118 this, SLOT(zoomOut()));
119 connect(controller->dolphinView(), SIGNAL(additionalInfoChanged()),
120 this, SLOT(updateColumnVisibility()));
121
122 if (settings->useSystemFont()) {
123 m_font = KGlobalSettings::generalFont();
124 } else {
125 m_font = QFont(settings->fontFamily(),
126 settings->fontSize(),
127 settings->fontWeight(),
128 settings->italicFont());
129 }
130
131 setVerticalScrollMode(QTreeView::ScrollPerPixel);
132 setHorizontalScrollMode(QTreeView::ScrollPerPixel);
133
134 updateDecorationSize();
135
136 setFocus();
137 viewport()->installEventFilter(this);
138
139 connect(KGlobalSettings::self(), SIGNAL(kdisplayFontChanged()),
140 this, SLOT(updateFont()));
141 }
142
143 DolphinDetailsView::~DolphinDetailsView()
144 {
145 }
146
147 bool DolphinDetailsView::event(QEvent* event)
148 {
149 if (event->type() == QEvent::Polish) {
150 QHeaderView* headerView = header();
151 headerView->setResizeMode(QHeaderView::Interactive);
152 headerView->setMovable(false);
153
154 updateColumnVisibility();
155
156 hideColumn(DolphinModel::Rating);
157 hideColumn(DolphinModel::Tags);
158 } else if (event->type() == QEvent::UpdateRequest) {
159 // a wheel movement will scroll 4 items
160 if (model()->rowCount() > 0) {
161 verticalScrollBar()->setSingleStep((sizeHintForRow(0) / 3) * 4);
162 }
163 }
164
165 return QTreeView::event(event);
166 }
167
168 QStyleOptionViewItem DolphinDetailsView::viewOptions() const
169 {
170 QStyleOptionViewItem viewOptions = QTreeView::viewOptions();
171 viewOptions.font = m_font;
172 viewOptions.showDecorationSelected = true;
173 viewOptions.decorationSize = m_decorationSize;
174 return viewOptions;
175 }
176
177 void DolphinDetailsView::contextMenuEvent(QContextMenuEvent* event)
178 {
179 QTreeView::contextMenuEvent(event);
180 m_controller->triggerContextMenuRequest(event->pos());
181 }
182
183 void DolphinDetailsView::mousePressEvent(QMouseEvent* event)
184 {
185 m_controller->requestActivation();
186
187 QTreeView::mousePressEvent(event);
188
189 const QModelIndex index = indexAt(event->pos());
190 if (!index.isValid() || (index.column() != DolphinModel::Name)) {
191 const Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers();
192 if (!(modifier & Qt::ShiftModifier) && !(modifier & Qt::ControlModifier)) {
193 clearSelection();
194 }
195 }
196
197 if (event->button() == Qt::LeftButton) {
198 m_showElasticBand = true;
199
200 const QPoint pos(contentsPos());
201 m_elasticBandOrigin = event->pos();
202 m_elasticBandOrigin.setX(m_elasticBandOrigin.x() + pos.x());
203 m_elasticBandOrigin.setY(m_elasticBandOrigin.y() + pos.y());
204 m_elasticBandDestination = event->pos();
205 }
206 }
207
208 void DolphinDetailsView::mouseMoveEvent(QMouseEvent* event)
209 {
210 if (m_showElasticBand) {
211 const QPoint mousePos = event->pos();
212 const QModelIndex index = indexAt(mousePos);
213 if (!index.isValid()) {
214 // the destination of the selection rectangle is above the viewport. In this
215 // case QTreeView does no selection at all, which is not the wanted behavior
216 // in Dolphin -> select all items within the elastic band rectangle
217 clearSelection();
218
219 const int nameColumnWidth = header()->sectionSize(DolphinModel::Name);
220 QRect selRect = QRect(m_elasticBandOrigin, m_elasticBandDestination).normalized();
221 const QRect nameColumnsRect(0, 0, nameColumnWidth, viewport()->height());
222 selRect = nameColumnsRect.intersected(selRect);
223
224 setSelection(selRect, QItemSelectionModel::Select);
225 }
226
227 // TODO: enable QTreeView::mouseMoveEvent(event) again, as soon
228 // as the Qt-issue #199631 has been fixed.
229 // QTreeView::mouseMoveEvent(event);
230 QAbstractItemView::mouseMoveEvent(event);
231 updateElasticBand();
232 } else {
233 // TODO: enable QTreeView::mouseMoveEvent(event) again, as soon
234 // as the Qt-issue #199631 has been fixed.
235 // QTreeView::mouseMoveEvent(event);
236 QAbstractItemView::mouseMoveEvent(event);
237 }
238 }
239
240 void DolphinDetailsView::mouseReleaseEvent(QMouseEvent* event)
241 {
242 QTreeView::mouseReleaseEvent(event);
243 if (m_showElasticBand) {
244 updateElasticBand();
245 m_showElasticBand = false;
246 }
247 }
248
249 void DolphinDetailsView::startDrag(Qt::DropActions supportedActions)
250 {
251 DragAndDropHelper::startDrag(this, supportedActions);
252 }
253
254 void DolphinDetailsView::dragEnterEvent(QDragEnterEvent* event)
255 {
256 if (event->mimeData()->hasUrls()) {
257 event->acceptProposedAction();
258 }
259
260 if (m_showElasticBand) {
261 updateElasticBand();
262 m_showElasticBand = false;
263 }
264 }
265
266 void DolphinDetailsView::dragLeaveEvent(QDragLeaveEvent* event)
267 {
268 QTreeView::dragLeaveEvent(event);
269 setDirtyRegion(m_dropRect);
270 }
271
272 void DolphinDetailsView::dragMoveEvent(QDragMoveEvent* event)
273 {
274 QTreeView::dragMoveEvent(event);
275
276 // TODO: remove this code when the issue #160611 is solved in Qt 4.4
277 setDirtyRegion(m_dropRect);
278 const QModelIndex index = indexAt(event->pos());
279 if (index.isValid() && (index.column() == DolphinModel::Name)) {
280 const KFileItem item = m_controller->itemForIndex(index);
281 if (!item.isNull() && item.isDir()) {
282 m_dropRect = visualRect(index);
283 } else {
284 m_dropRect.setSize(QSize()); // set as invalid
285 }
286 setDirtyRegion(m_dropRect);
287 }
288
289 if (event->mimeData()->hasUrls()) {
290 // accept url drops, independently from the destination item
291 event->acceptProposedAction();
292 }
293 }
294
295 void DolphinDetailsView::dropEvent(QDropEvent* event)
296 {
297 const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
298 if (!urls.isEmpty()) {
299 event->acceptProposedAction();
300 const QModelIndex index = indexAt(event->pos());
301 KFileItem item;
302 if (index.isValid() && (index.column() == DolphinModel::Name)) {
303 item = m_controller->itemForIndex(index);
304 }
305 m_controller->indicateDroppedUrls(urls,
306 m_controller->url(),
307 item);
308 }
309 QTreeView::dropEvent(event);
310 }
311
312 void DolphinDetailsView::paintEvent(QPaintEvent* event)
313 {
314 QTreeView::paintEvent(event);
315 if (m_showElasticBand) {
316 // The following code has been taken from QListView
317 // and adapted to DolphinDetailsView.
318 // (C) 1992-2007 Trolltech ASA
319 QStyleOptionRubberBand opt;
320 opt.initFrom(this);
321 opt.shape = QRubberBand::Rectangle;
322 opt.opaque = false;
323 opt.rect = elasticBandRect();
324
325 QPainter painter(viewport());
326 painter.save();
327 style()->drawControl(QStyle::CE_RubberBand, &opt, &painter);
328 painter.restore();
329 }
330 }
331
332 void DolphinDetailsView::keyPressEvent(QKeyEvent* event)
333 {
334 QTreeView::keyPressEvent(event);
335 m_controller->handleKeyPressEvent(event);
336 }
337
338 void DolphinDetailsView::resizeEvent(QResizeEvent* event)
339 {
340 if (m_autoResize) {
341 resizeColumns();
342 }
343 QTreeView::resizeEvent(event);
344 }
345
346 void DolphinDetailsView::wheelEvent(QWheelEvent* event)
347 {
348 // let Ctrl+wheel events propagate to the DolphinView for icon zooming
349 if (event->modifiers() & Qt::ControlModifier) {
350 event->ignore();
351 return;
352 }
353 QTreeView::wheelEvent(event);
354 }
355
356 void DolphinDetailsView::currentChanged(const QModelIndex& current, const QModelIndex& previous)
357 {
358 QTreeView::currentChanged(current, previous);
359
360 // Stay consistent with QListView: When changing the current index by key presses,
361 // also change the selection.
362 if (QApplication::mouseButtons() == Qt::NoButton) {
363 selectionModel()->select(current, QItemSelectionModel::ClearAndSelect);
364 }
365 }
366
367 bool DolphinDetailsView::eventFilter(QObject* watched, QEvent* event)
368 {
369 if ((watched == viewport()) && (event->type() == QEvent::Leave)) {
370 // if the mouse is above an item and moved very fast outside the widget,
371 // no viewportEntered() signal might be emitted although the mouse has been moved
372 // above the viewport
373 m_controller->emitViewportEntered();
374 }
375
376 return QTreeView::eventFilter(watched, event);
377 }
378
379 void DolphinDetailsView::setSortIndicatorSection(DolphinView::Sorting sorting)
380 {
381 QHeaderView* headerView = header();
382 headerView->setSortIndicator(sorting, headerView->sortIndicatorOrder());
383 }
384
385 void DolphinDetailsView::setSortIndicatorOrder(Qt::SortOrder sortOrder)
386 {
387 QHeaderView* headerView = header();
388 headerView->setSortIndicator(headerView->sortIndicatorSection(), sortOrder);
389 }
390
391 void DolphinDetailsView::synchronizeSortingState(int column)
392 {
393 // The sorting has already been changed in QTreeView if this slot is
394 // invoked, but Dolphin is not informed about this.
395 DolphinView::Sorting sorting = DolphinSortFilterProxyModel::sortingForColumn(column);
396 const Qt::SortOrder sortOrder = header()->sortIndicatorOrder();
397 m_controller->indicateSortingChange(sorting);
398 m_controller->indicateSortOrderChange(sortOrder);
399 }
400
401 void DolphinDetailsView::slotEntered(const QModelIndex& index)
402 {
403 const QPoint pos = viewport()->mapFromGlobal(QCursor::pos());
404 const int nameColumnWidth = header()->sectionSize(DolphinModel::Name);
405 if (pos.x() < nameColumnWidth) {
406 m_controller->emitItemEntered(index);
407 }
408 else {
409 m_controller->emitViewportEntered();
410 }
411 }
412
413 void DolphinDetailsView::updateElasticBand()
414 {
415 if (m_showElasticBand) {
416 QRect dirtyRegion(elasticBandRect());
417 m_elasticBandDestination = viewport()->mapFromGlobal(QCursor::pos());
418 dirtyRegion = dirtyRegion.united(elasticBandRect());
419 setDirtyRegion(dirtyRegion);
420 }
421 }
422
423 QRect DolphinDetailsView::elasticBandRect() const
424 {
425 const QPoint pos(contentsPos());
426 const QPoint topLeft(m_elasticBandOrigin.x() - pos.x(), m_elasticBandOrigin.y() - pos.y());
427 return QRect(topLeft, m_elasticBandDestination).normalized();
428 }
429
430 void DolphinDetailsView::zoomIn()
431 {
432 if (isZoomInPossible()) {
433 DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings();
434 switch (settings->iconSize()) {
435 case KIconLoader::SizeSmall: settings->setIconSize(KIconLoader::SizeMedium); break;
436 case KIconLoader::SizeMedium: settings->setIconSize(KIconLoader::SizeLarge); break;
437 default: Q_ASSERT(false); break;
438 }
439 updateDecorationSize();
440 }
441 }
442
443 void DolphinDetailsView::zoomOut()
444 {
445 if (isZoomOutPossible()) {
446 DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings();
447 switch (settings->iconSize()) {
448 case KIconLoader::SizeLarge: settings->setIconSize(KIconLoader::SizeMedium); break;
449 case KIconLoader::SizeMedium: settings->setIconSize(KIconLoader::SizeSmall); break;
450 default: Q_ASSERT(false); break;
451 }
452 updateDecorationSize();
453 }
454 }
455
456 void DolphinDetailsView::configureColumns(const QPoint& pos)
457 {
458 KMenu popup(this);
459 popup.addTitle(i18nc("@title:menu", "Columns"));
460
461 QHeaderView* headerView = header();
462 for (int i = DolphinModel::Size; i <= DolphinModel::Type; ++i) {
463 const int logicalIndex = headerView->logicalIndex(i);
464 const QString text = model()->headerData(i, Qt::Horizontal).toString();
465 QAction* action = popup.addAction(text);
466 action->setCheckable(true);
467 action->setChecked(!headerView->isSectionHidden(logicalIndex));
468 action->setData(i);
469 }
470
471 QAction* activatedAction = popup.exec(header()->mapToGlobal(pos));
472 if (activatedAction != 0) {
473 const bool show = activatedAction->isChecked();
474 const int columnIndex = activatedAction->data().toInt();
475
476 KFileItemDelegate::InformationList list = m_controller->dolphinView()->additionalInfo();
477 const KFileItemDelegate::Information info = infoForColumn(columnIndex);
478 if (show) {
479 Q_ASSERT(!list.contains(info));
480 list.append(info);
481 } else {
482 Q_ASSERT(list.contains(info));
483 const int index = list.indexOf(info);
484 list.removeAt(index);
485 }
486
487 m_controller->indicateAdditionalInfoChange(list);
488 setColumnHidden(columnIndex, !show);
489 }
490 }
491
492 void DolphinDetailsView::updateColumnVisibility()
493 {
494 const KFileItemDelegate::InformationList list = m_controller->dolphinView()->additionalInfo();
495 for (int i = DolphinModel::Size; i <= DolphinModel::Type; ++i) {
496 const KFileItemDelegate::Information info = infoForColumn(i);
497 const bool hide = !list.contains(info);
498 if (isColumnHidden(i) != hide) {
499 setColumnHidden(i, hide);
500 }
501 }
502
503 resizeColumns();
504 }
505
506 void DolphinDetailsView::slotHeaderSectionResized(int logicalIndex, int oldSize, int newSize)
507 {
508 Q_UNUSED(logicalIndex);
509 Q_UNUSED(oldSize);
510 Q_UNUSED(newSize);
511 if (QApplication::mouseButtons() & Qt::LeftButton) {
512 disableAutoResizing();
513 }
514 }
515
516 void DolphinDetailsView::disableAutoResizing()
517 {
518 m_autoResize = false;
519 }
520
521 void DolphinDetailsView::requestActivation()
522 {
523 m_controller->requestActivation();
524 }
525
526 void DolphinDetailsView::updateFont()
527 {
528 const DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings();
529 Q_ASSERT(settings != 0);
530
531 if (settings->useSystemFont()) {
532 m_font = KGlobalSettings::generalFont();
533 }
534 }
535
536 bool DolphinDetailsView::isZoomInPossible() const
537 {
538 DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings();
539 return settings->iconSize() < KIconLoader::SizeLarge;
540 }
541
542 bool DolphinDetailsView::isZoomOutPossible() const
543 {
544 DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings();
545 return settings->iconSize() > KIconLoader::SizeSmall;
546 }
547
548 void DolphinDetailsView::updateDecorationSize()
549 {
550 DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings();
551 const int iconSize = settings->iconSize();
552 setIconSize(QSize(iconSize, iconSize));
553 m_decorationSize = QSize(iconSize, iconSize);
554
555 m_controller->setZoomInPossible(isZoomInPossible());
556 m_controller->setZoomOutPossible(isZoomOutPossible());
557
558 doItemsLayout();
559 }
560
561 QPoint DolphinDetailsView::contentsPos() const
562 {
563 // implementation note: the horizonal position is ignored currently, as no
564 // horizontal scrolling is done anyway during a selection
565 const QScrollBar* scrollbar = verticalScrollBar();
566 Q_ASSERT(scrollbar != 0);
567
568 const int maxHeight = maximumViewportSize().height();
569 const int height = scrollbar->maximum() - scrollbar->minimum() + 1;
570 const int visibleHeight = model()->rowCount() + 1 - height;
571 if (visibleHeight <= 0) {
572 return QPoint(0, 0);
573 }
574
575 const int y = scrollbar->sliderPosition() * maxHeight / visibleHeight;
576 return QPoint(0, y);
577 }
578
579 KFileItemDelegate::Information DolphinDetailsView::infoForColumn(int columnIndex) const
580 {
581 KFileItemDelegate::Information info = KFileItemDelegate::NoInformation;
582
583 switch (columnIndex) {
584 case DolphinModel::Size: info = KFileItemDelegate::Size; break;
585 case DolphinModel::ModifiedTime: info = KFileItemDelegate::ModificationTime; break;
586 case DolphinModel::Permissions: info = KFileItemDelegate::Permissions; break;
587 case DolphinModel::Owner: info = KFileItemDelegate::Owner; break;
588 case DolphinModel::Group: info = KFileItemDelegate::OwnerAndGroup; break;
589 case DolphinModel::Type: info = KFileItemDelegate::FriendlyMimeType; break;
590 default: break;
591 }
592
593 return info;
594 }
595
596 void DolphinDetailsView::resizeColumns()
597 {
598 // Using the resize mode QHeaderView::ResizeToContents is too slow (it takes
599 // around 3 seconds for each (!) resize operation when having > 10000 items).
600 // This gets a problem especially when opening large directories, where several
601 // resize operations are received for showing the currently available items during
602 // loading (the application hangs around 20 seconds when loading > 10000 items).
603
604 QHeaderView* headerView = header();
605 QFontMetrics fontMetrics(viewport()->font());
606
607 int columnWidth[KDirModel::ColumnCount];
608 columnWidth[KDirModel::Size] = fontMetrics.width("00000 Items");
609 columnWidth[KDirModel::ModifiedTime] = fontMetrics.width("0000-00-00 00:00");
610 columnWidth[KDirModel::Permissions] = fontMetrics.width("xxxxxxxxxx");
611 columnWidth[KDirModel::Owner] = fontMetrics.width("xxxxxxxxxx");
612 columnWidth[KDirModel::Group] = fontMetrics.width("xxxxxxxxxx");
613 columnWidth[KDirModel::Type] = fontMetrics.width("XXXX Xxxxxxx");
614
615 int requiredWidth = 0;
616 for (int i = KDirModel::Size; i <= KDirModel::Type; ++i) {
617 if (!isColumnHidden(i)) {
618 columnWidth[i] += 20; // provide a default gap
619 requiredWidth += columnWidth[i];
620 headerView->resizeSection(i, columnWidth[i]);
621 }
622 }
623
624 // resize the name column in a way that the whole available width is used
625 columnWidth[KDirModel::Name] = viewport()->width() - requiredWidth;
626 if (columnWidth[KDirModel::Name] < 120) {
627 columnWidth[KDirModel::Name] = 120;
628 }
629 headerView->resizeSection(KDirModel::Name, columnWidth[KDirModel::Name]);
630 }
631
632 #include "dolphindetailsview.moc"