Classified ads
profilecommentitemdelegate.h
Go to the documentation of this file.
1 /* -*-C++-*- -*-coding: utf-8-unix;-*-
2  Classified Ads is Copyright (c) Antti Järvinen 2013.
3 
4  This file is part of Classified Ads.
5 
6  Classified Ads is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  Classified Ads is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with Classified Ads; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 #ifndef PROFILECOMMENTITEM_DELEGATE_H
22 #define PROFILECOMMENTITEM_DELEGATE_H
23 
24 #include <QStyledItemDelegate>
25 
27 
31 class ProfileCommentItemDelegate : public QStyledItemDelegate {
32  Q_OBJECT
33 
34 public:
44  const QWidget& aDrawableWidget,
45  QObject* aParent = NULL ) ;
48 protected:
52  void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
56  QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const;
57 private:
59  const QWidget& iDrawableWidget ;
60 };
61 
62 
63 #endif /* PROFILECOMMENTITEM_DELEGATE_H */
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
ProfileCommentListingModel & iListingModel
Definition: profilecommentitemdelegate.h:58
ProfileCommentItemDelegate(ProfileCommentListingModel &aListingModel, const QWidget &aDrawableWidget, QObject *aParent=NULL)
const QWidget & iDrawableWidget
Definition: profilecommentitemdelegate.h:59
class for displaying single profile comment in a list view
Definition: profilecommentitemdelegate.h:31
Model-class for performing search on comments about a profile. This is supposed to act as an underlyi...
Definition: profilecommentlistingmodel.h:36