kget
transfersviewdelegate.cpp
Go to the documentation of this file.
274 QWidget *BasicTransfersViewDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
278 connect(qroupStatusEditor, SIGNAL(changedStatus(GroupStatusEditor*)), this, SLOT(slotGroupStatusChanged(GroupStatusEditor*)));
294 groupEditor->setRunning(KGet::model()->itemFromIndex(index)->asGroup()->groupHandler()->status() == JobQueue::Running);
300 void BasicTransfersViewDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
304 TransferGroupHandler *groupHandler = KGet::model()->itemFromIndex(index)->asGroup()->groupHandler();
324 void TransfersViewDelegate::paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const
368 painter->fillRect(option.rect, QApplication::palette().color(option.state & QStyle::State_Active ?
374 if (index.column() == 3 && !isExtended(transferTreeModel->index(index.row(), 0, index.parent()))) { // the percent column
377 // following progressbar code has mostly been taken from Qt4 examples/network/torrent/mainview.cpp
410 // kDebug(5001) << "paint!!! " << i++ << " " << index.internalPointer() << " " << index.column();
416 void TransfersViewDelegate::drawFocus(QPainter * painter, const QStyleOptionViewItem & option, const
424 QSize TransfersViewDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const
447 bool TransfersViewDelegate::editorEvent(QEvent * event, QAbstractItemModel * model, const QStyleOptionViewItem & option, const QModelIndex & index)
469 popup = ContextMenu::createTransferGroupContextMenu(transferGroupHandler, qobject_cast<QWidget*>(this));
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: transfersviewdelegate.cpp:324
Definition: transfertreemodel.h:120
Definition: transfergrouphandler.h:30
KMenu * createTransferGroupContextMenu(TransferGroupHandler *handler, QWidget *parent)
Definition: contextmenu.cpp:124
Definition: jobqueue.h:36
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const
Definition: transfersviewdelegate.cpp:290
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: transfersviewdelegate.cpp:424
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: transfersviewdelegate.cpp:274
void changedStatus(GroupStatusEditor *editor)
Definition: transfertreemodel.h:108
Definition: transfersviewdelegate.h:28
ModelItem * itemFromIndex(const QModelIndex &index) const
Definition: transfertreemodel.cpp:391
The BasicTransfersViewDelegate handles the setting of the status of a group.
Definition: transfersviewdelegate.h:81
Definition: transfersviewdelegate.h:52
void paintEvent(QPaintEvent *event)
Definition: transfersviewdelegate.cpp:100
TransfersViewDelegate(QAbstractItemView *parent)
Definition: transfersviewdelegate.cpp:316
TransferGroupHandler * groupHandler()
Definition: transfertreemodel.cpp:178
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index)
Definition: transfersviewdelegate.cpp:447
GroupStatusEditor(const QModelIndex &index, QWidget *parent)
Definition: transfersviewdelegate.cpp:208
KMenu * createTransferContextMenu(QList< TransferHandler * > transfer, QWidget *parent)
Definition: contextmenu.cpp:32
Definition: transfertreemodel.h:59
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Definition: transfersviewdelegate.cpp:300
BasicTransfersViewDelegate(QAbstractItemView *parent)
Definition: transfersviewdelegate.cpp:269
GroupStatusButton(const QModelIndex &index, QWidget *parent)
Definition: transfersviewdelegate.cpp:40
void drawFocus(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect) const
Definition: transfersviewdelegate.cpp:416
TransferHandler * transferHandler()
Definition: transfertreemodel.cpp:138
void timerEvent(QTimerEvent *event)
Definition: transfersviewdelegate.cpp:148
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:18 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:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.