Show invite menu in wlm chat window immediately
[kdenetwork.git] / kopete / plugins / pipes / pipesdelegate.h
blob17a17544d9c71b56726b881f521bd7bb568946cb
1 /*
2 pipesdelegate.h
4 Copyright (c) 2007 by Charles Connell <charles@connells.org>
6 Kopete (c) 2007 by the Kopete developers <kopete-devel@kde.org>
8 *************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 *************************************************************************
17 #ifndef PIPESDELEGATE_H
18 #define PIPESDELEGATE_H
20 #include <QItemDelegate>
22 class QSize;
24 /**
25 * Delegate that allows options for pipes to be edited in place
26 * @author Charles Connell <charles@connells.org>
29 class PipesDelegate : public QItemDelegate
31 Q_OBJECT
33 public:
34 enum PipesColumns { EnabledColumn = 0, DirectionColumn = 1, ContentsColumn = 2, PathColumn = 3 };
36 enum { TotalColumns = 4 };
38 public:
39 PipesDelegate ( QObject *parent = 0 );
41 QWidget *createEditor ( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const;
42 void setEditorData ( QWidget *editor, const QModelIndex &index ) const;
43 void setModelData ( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const;
44 void updateEditorGeometry ( QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index ) const;
45 void paint ( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const;
48 #endif