~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to projectmanagers/cmake/settings/cmakecachedelegate.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* KDevelop CMake Support
 
2
 *
 
3
 * Copyright 2008 Aleix Pol <aleixpol@gmail.com>
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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
 
18
 * 02110-1301, USA.
 
19
 */
 
20
 
 
21
#ifndef CMAKECACHEDELEGATE_H
 
22
#define CMAKECACHEDELEGATE_H
 
23
 
 
24
#include <QItemDelegate>
 
25
#include <QWidget>
 
26
class KUrlRequester;
 
27
 
 
28
class CMakeCacheDelegate : public QItemDelegate
 
29
{
 
30
    Q_OBJECT
 
31
    public:
 
32
        CMakeCacheDelegate(QObject* parent);
 
33
        virtual ~CMakeCacheDelegate();
 
34
        virtual QWidget * createEditor(QWidget * parent, const QStyleOptionViewItem & option,
 
35
                                         const QModelIndex & index ) const;
 
36
        
 
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;
 
41
 
 
42
    private slots:
 
43
        void closingEditor(QWidget * editor, QAbstractItemDelegate::EndEditHint hint = NoHint);
 
44
 
 
45
    private:
 
46
        KUrlRequester *m_sample;
 
47
};
 
48
 
 
49
#endif