|
|
@ -41,9 +41,9 @@
|
|
|
|
#include "dolphinstatusbar.h"
|
|
|
|
#include "dolphinstatusbar.h"
|
|
|
|
#include "dolphindetailsviewsettings.h"
|
|
|
|
#include "dolphindetailsviewsettings.h"
|
|
|
|
|
|
|
|
|
|
|
|
DolphinDetailsView::DolphinDetailsView(DolphinView* tqparent) :
|
|
|
|
DolphinDetailsView::DolphinDetailsView(DolphinView* parent) :
|
|
|
|
KFileDetailView(tqparent, 0),
|
|
|
|
KFileDetailView(parent, 0),
|
|
|
|
m_dolphinView(tqparent),
|
|
|
|
m_dolphinView(parent),
|
|
|
|
m_resizeTimer(0),
|
|
|
|
m_resizeTimer(0),
|
|
|
|
m_scrollTimer(0),
|
|
|
|
m_scrollTimer(0),
|
|
|
|
m_rubber(0)
|
|
|
|
m_rubber(0)
|
|
|
@ -76,7 +76,7 @@ DolphinDetailsView::DolphinDetailsView(DolphinView* tqparent) :
|
|
|
|
connect(this, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString&, int)),
|
|
|
|
connect(this, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString&, int)),
|
|
|
|
this, TQT_SLOT(slotItemRenamed(TQListViewItem*, const TQString&, int)));
|
|
|
|
this, TQT_SLOT(slotItemRenamed(TQListViewItem*, const TQString&, int)));
|
|
|
|
connect(this, TQT_SIGNAL(dropped(TQDropEvent*, const KURL::List&, const KURL&)),
|
|
|
|
connect(this, TQT_SIGNAL(dropped(TQDropEvent*, const KURL::List&, const KURL&)),
|
|
|
|
tqparent, TQT_SLOT(slotURLListDropped(TQDropEvent*, const KURL::List&, const KURL&)));
|
|
|
|
parent, TQT_SLOT(slotURLListDropped(TQDropEvent*, const KURL::List&, const KURL&)));
|
|
|
|
|
|
|
|
|
|
|
|
TQClipboard* clipboard = TQApplication::tqclipboard();
|
|
|
|
TQClipboard* clipboard = TQApplication::tqclipboard();
|
|
|
|
connect(clipboard, TQT_SIGNAL(dataChanged()),
|
|
|
|
connect(clipboard, TQT_SIGNAL(dataChanged()),
|
|
|
@ -667,9 +667,9 @@ void DolphinDetailsView::slotHeaderClicked(int /* section */)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DolphinDetailsView::DolphinListViewItem::DolphinListViewItem(TQListView* tqparent,
|
|
|
|
DolphinDetailsView::DolphinListViewItem::DolphinListViewItem(TQListView* parent,
|
|
|
|
KFileItem* fileItem) :
|
|
|
|
KFileItem* fileItem) :
|
|
|
|
KFileListViewItem(tqparent, fileItem)
|
|
|
|
KFileListViewItem(parent, fileItem)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const int iconSize = DolphinSettings::instance().detailsView()->iconSize();
|
|
|
|
const int iconSize = DolphinSettings::instance().detailsView()->iconSize();
|
|
|
|
KFileItem* info = fileInfo();
|
|
|
|
KFileItem* info = fileInfo();
|
|
|
@ -716,7 +716,7 @@ void DolphinDetailsView::DolphinListViewItem::paintCell(TQPainter* painter,
|
|
|
|
int tqalignment)
|
|
|
|
int tqalignment)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const TQListView* view = listView();
|
|
|
|
const TQListView* view = listView();
|
|
|
|
const bool isActive = TQT_BASE_OBJECT(view->tqparent()) == TQT_BASE_OBJECT(Dolphin::mainWin().activeView());
|
|
|
|
const bool isActive = TQT_BASE_OBJECT(view->parent()) == TQT_BASE_OBJECT(Dolphin::mainWin().activeView());
|
|
|
|
if (isSelected()) {
|
|
|
|
if (isSelected()) {
|
|
|
|
// Per default the selection is drawn above the whole width of the item. As a consistent
|
|
|
|
// Per default the selection is drawn above the whole width of the item. As a consistent
|
|
|
|
// behavior with the icon view is wanted, only the the column containing the file name
|
|
|
|
// behavior with the icon view is wanted, only the the column containing the file name
|
|
|
@ -729,8 +729,8 @@ void DolphinDetailsView::DolphinListViewItem::paintCell(TQPainter* painter,
|
|
|
|
|
|
|
|
|
|
|
|
if (column == 0) {
|
|
|
|
if (column == 0) {
|
|
|
|
// draw the selection only on the first column
|
|
|
|
// draw the selection only on the first column
|
|
|
|
TQListView* tqparent = listView();
|
|
|
|
TQListView* parent = listView();
|
|
|
|
const int itemWidth = width(tqparent->fontMetrics(), tqparent, 0);
|
|
|
|
const int itemWidth = width(parent->fontMetrics(), parent, 0);
|
|
|
|
if (isActive) {
|
|
|
|
if (isActive) {
|
|
|
|
KFileListViewItem::paintCell(painter, tqcolorGroup, column, itemWidth, tqalignment);
|
|
|
|
KFileListViewItem::paintCell(painter, tqcolorGroup, column, itemWidth, tqalignment);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -761,9 +761,9 @@ void DolphinDetailsView::DolphinListViewItem::paintFocus(TQPainter* painter,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// draw the focus consistently with the selection (see implementation notes
|
|
|
|
// draw the focus consistently with the selection (see implementation notes
|
|
|
|
// in DolphinListViewItem::paintCell)
|
|
|
|
// in DolphinListViewItem::paintCell)
|
|
|
|
TQListView* tqparent = listView();
|
|
|
|
TQListView* parent = listView();
|
|
|
|
int visibleWidth = width(tqparent->fontMetrics(), tqparent, 0);
|
|
|
|
int visibleWidth = width(parent->fontMetrics(), parent, 0);
|
|
|
|
const int colWidth = tqparent->columnWidth(0);
|
|
|
|
const int colWidth = parent->columnWidth(0);
|
|
|
|
if (visibleWidth > colWidth) {
|
|
|
|
if (visibleWidth > colWidth) {
|
|
|
|
visibleWidth = colWidth;
|
|
|
|
visibleWidth = colWidth;
|
|
|
|
}
|
|
|
|
}
|
|
|
|