Changeset View
Changeset View
Standalone View
Standalone View
krusader/Panel/krviewitemdelegate.h
- This file was moved from krusader/Panel/krinterviewitemdelegate.h.
Show All 10 Lines | |||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
12 | * GNU General Public License for more details. * | 12 | * GNU General Public License for more details. * | ||
13 | * * | 13 | * * | ||
14 | * You should have received a copy of the GNU General Public License * | 14 | * You should have received a copy of the GNU General Public License * | ||
15 | * along with this package; if not, write to the Free Software * | 15 | * along with this package; if not, write to the Free Software * | ||
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * | 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * | ||
17 | *****************************************************************************/ | 17 | *****************************************************************************/ | ||
18 | 18 | | |||
19 | #ifndef KRINTERVIEWITEMDELEGATE_H | 19 | #ifndef KRVIEWITEMDELEGATE_H | ||
20 | #define KRINTERVIEWITEMDELEGATE_H | 20 | #define KRVIEWITEMDELEGATE_H | ||
21 | 21 | | |||
22 | // QtWidgets | 22 | // QtWidgets | ||
23 | #include <QItemDelegate> | 23 | #include <QItemDelegate> | ||
24 | 24 | | |||
25 | class KrInterViewItemDelegate : public QItemDelegate | 25 | class KrViewItemDelegate : public QItemDelegate | ||
26 | { | 26 | { | ||
27 | public: | 27 | public: | ||
28 | KrInterViewItemDelegate(QObject *parent = 0); | 28 | KrViewItemDelegate(QObject *parent = 0); | ||
29 | 29 | | |||
30 | void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; | 30 | void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; | ||
31 | void drawDisplay(QPainter * painter, const QStyleOptionViewItem & option, const QRect & rect, const QString & text) const; | 31 | void drawDisplay(QPainter * painter, const QStyleOptionViewItem & option, const QRect & rect, const QString & text) const; | ||
32 | QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &sovi, const QModelIndex &index) const; | 32 | QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &sovi, const QModelIndex &index) const; | ||
33 | void setEditorData(QWidget *editor, const QModelIndex &index) const; | 33 | void setEditorData(QWidget *editor, const QModelIndex &index) const; | ||
34 | QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const; | 34 | QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const; | ||
35 | bool eventFilter(QObject *object, QEvent *event); | 35 | bool eventFilter(QObject *object, QEvent *event); | ||
36 | 36 | | |||
37 | private: | 37 | private: | ||
38 | mutable int _currentlyEdited; | 38 | mutable int _currentlyEdited; | ||
39 | mutable bool _dontDraw; | 39 | mutable bool _dontDraw; | ||
40 | }; | 40 | }; | ||
41 | 41 | | |||
42 | #endif | 42 | #endif |