kget
transferhistoryitemdelegate.cpp
Go to the documentation of this file.
3 Based in the kcategorizeditemsviewdelegate from kdebase/workspace/libs/plasma/appletbrowser by Ivan Cukic
34 TransferHistoryItemDelegate::TransferHistoryItemDelegate(QWidget *parent) : QStyledItemDelegate(),
63 if (!option.state.testFlag(QStyle::State_Selected) && !option.state.testFlag(QStyle::State_MouseOver)) {
95 QString size = KIO::convertSize(model->data(index, TransferHistoryCategorizedDelegate::RoleSize).toInt());
96 QString date = model->data(index, TransferHistoryCategorizedDelegate::RoleDate).toDate().toString("dd.MM.yyyy");
116 QColor subcolor = (option.state.testFlag(QStyle::State_Selected) || (option.state.testFlag(QStyle::State_MouseOver))) ?
152 QSize TransferHistoryItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
187 const QAbstractItemModel *model = static_cast <const QAbstractItemModel *> (m_selectedIndex.model());
189 new KRun(model->data(m_selectedIndex, TransferHistoryCategorizedDelegate::RoleDest).toString(), m_view, true, false);
194 const QAbstractItemModel *model = static_cast <const QAbstractItemModel *> (m_selectedIndex.model());
202 const QAbstractItemModel *model = static_cast <const QAbstractItemModel *> (m_selectedIndex.model());
204 emit deletedTransfer(model->data(m_selectedIndex, TransferHistoryCategorizedDelegate::RoleUrl).toString(), m_selectedIndex);
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index)
Definition: transferhistoryitemdelegate.cpp:160
void deletedTransfer(const QString &url, const QModelIndex &index)
~TransferHistoryItemDelegate()
Definition: transferhistoryitemdelegate.cpp:56
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: transferhistoryitemdelegate.cpp:152
TransferHistoryItemDelegate(QWidget *parent)
Definition: transferhistoryitemdelegate.cpp:34
static void showNewTransferDialog(const KUrl &url=KUrl())
Definition: newtransferdialog.cpp:493
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: transferhistoryitemdelegate.cpp:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.