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