~ubuntu-branches/ubuntu/saucy/kate/saucy

« back to all changes in this revision

Viewing changes to kate/plugins/project/kateprojectitem.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell, Rohan Garg, Jonathan Riddell
  • Date: 2013-06-21 00:48:29 UTC
  • mfrom: (1.1.28)
  • Revision ID: package-import@ubuntu.com-20130621004829-y2ui02eg0j47h94y
Tags: 4:4.10.80-0ubuntu1
[ Rohan Garg ]
* New upstream release
  - Update and sort install files
  - Drop kubuntu_pate_find_python.diff, kubuntu_kate_initial_preference.patch,
    kubuntu_find_python.diff from debian/patches , not required

[ Jonathan Riddell ]
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  This file is part of the Kate project.
2
 
 *
3
 
 *  Copyright (C) 2010 Christoph Cullmann <cullmann@kde.org>
4
 
 *
5
 
 *  This library is free software; you can redistribute it and/or
6
 
 *  modify it under the terms of the GNU Library General Public
7
 
 *  License as published by the Free Software Foundation; either
8
 
 *  version 2 of the License, or (at your option) any later version.
9
 
 *
10
 
 *  This library 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 GNU
13
 
 *  Library General Public License for more details.
14
 
 *
15
 
 *  You should have received a copy of the GNU Library General Public License
16
 
 *  along with this library; see the file COPYING.LIB.  If not, write to
17
 
 *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
 
 *  Boston, MA 02110-1301, USA.
19
 
 */
20
 
 
21
 
#ifndef KATE_PROJECT_ITEM_H
22
 
#define KATE_PROJECT_ITEM_H
23
 
 
24
 
#include <QStandardItem>
25
 
 
26
 
/**
27
 
 * Class representing a item inside a project.
28
 
 * Items can be: projects, directories, files
29
 
 */
30
 
class KateProjectItem : public QStandardItem
31
 
{
32
 
  public:
33
 
    /**
34
 
     * Possible Types
35
 
     */
36
 
    enum Type {
37
 
        Project
38
 
      , Directory
39
 
      , File
40
 
    };
41
 
 
42
 
    /**
43
 
     * construct new item with given text
44
 
     * @param type type for this item
45
 
     * @param text text for this item
46
 
     */
47
 
    KateProjectItem (Type type, const QString &text);
48
 
 
49
 
    /**
50
 
     * deconstruct project
51
 
     */
52
 
    ~KateProjectItem ();
53
 
 
54
 
    /**
55
 
     * Overwritten data methode for on-demand icon creation and co.
56
 
     * @param role role to get data for
57
 
     * @return data for role
58
 
     */
59
 
    QVariant data (int role = Qt::UserRole + 1) const;
60
 
 
61
 
  private:
62
 
    /**
63
 
     * type
64
 
     */
65
 
    const Type m_type;
66
 
 
67
 
    /**
68
 
     * cached icon
69
 
     */
70
 
    mutable QIcon *m_icon;
71
 
};
72
 
 
73
 
#endif
74
 
 
75
 
// kate: space-indent on; indent-width 2; replace-tabs on;