1
/* KDevelop CMake Support
3
* Copyright 2008 Aleix Pol <aleixpol@gmail.com>
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21
#ifndef CMAKECACHEDELEGATE_H
22
#define CMAKECACHEDELEGATE_H
24
#include <QItemDelegate>
28
class CMakeCacheDelegate : public QItemDelegate
32
CMakeCacheDelegate(QObject* parent);
33
virtual ~CMakeCacheDelegate();
34
virtual QWidget * createEditor(QWidget * parent, const QStyleOptionViewItem & option,
35
const QModelIndex & index ) const;
37
virtual void setEditorData ( QWidget * editor, const QModelIndex & index ) const;
38
virtual void setModelData ( QWidget * editor, QAbstractItemModel * model, const QModelIndex & index ) const;
39
virtual void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
40
virtual QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index ) const;
43
void closingEditor(QWidget * editor, QAbstractItemDelegate::EndEditHint hint = NoHint);
46
KUrlRequester *m_sample;