• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kget

  • sources
  • kde-4.12
  • kdenetwork
  • kget
  • ui
  • history
transferhistoryitemdelegate.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2 
3  Based in the kcategorizeditemsviewdelegate from kdebase/workspace/libs/plasma/appletbrowser by Ivan Cukic
4  Copyright (C) 2008 Javier Goday <jgoday@gmail.com>
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 */
11 #ifndef TRANSFERHISTORYITEMDELEGATE_H
12 #define TRANSFERHISTORYITEMDELEGATE_H
13 
14 #include <QStyledItemDelegate>
15 #include <QObject>
16 
17 #define ICON_SIZE 40
18 #define PADDING 5
19 
20 class QAction;
21 class QModelIndex;
22 
23 class TransferHistoryItemDelegate : public QStyledItemDelegate
24 {
25 Q_OBJECT
26 public:
27  TransferHistoryItemDelegate(QWidget *parent);
28  ~TransferHistoryItemDelegate();
29 
30  void paint(QPainter *painter, const QStyleOptionViewItem &option,
31  const QModelIndex &index) const;
32  QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
33  bool editorEvent(QEvent * event, QAbstractItemModel * model,
34  const QStyleOptionViewItem & option, const QModelIndex & index);
35 
36 signals:
37  void deletedTransfer(const QString &url, const QModelIndex &index);
38 
39 private slots:
40  void slotOpenFile();
41  void slotDownload();
42  void slotDeleteTransfer();
43 
44 private:
45  QWidget *m_view;
46  QAction *m_actionDelete_Selected;
47  QAction *m_actionDownload;
48  QAction *m_openFile;
49 
50  QModelIndex m_selectedIndex;
51 };
52 #endif
TransferHistoryItemDelegate::editorEvent
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index)
Definition: transferhistoryitemdelegate.cpp:160
TransferHistoryItemDelegate::deletedTransfer
void deletedTransfer(const QString &url, const QModelIndex &index)
QWidget
TransferHistoryItemDelegate::~TransferHistoryItemDelegate
~TransferHistoryItemDelegate()
Definition: transferhistoryitemdelegate.cpp:56
TransferHistoryItemDelegate
Definition: transferhistoryitemdelegate.h:23
QStyledItemDelegate
TransferHistoryItemDelegate::sizeHint
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: transferhistoryitemdelegate.cpp:152
QAbstractItemModel
TransferHistoryItemDelegate::TransferHistoryItemDelegate
TransferHistoryItemDelegate(QWidget *parent)
Definition: transferhistoryitemdelegate.cpp:34
TransferHistoryItemDelegate::paint
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

KDE's Doxygen guidelines are available online.

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal