ruphy / raptor

menu for KDE 4

This URL has Read+Write access

Bruno Abinader (author)
Wed Apr 22 06:36:10 -0700 2009
ruphy (committer)
Sun Apr 26 10:35:37 -0700 2009
raptor / view / breadcrumbitem.h
100644 76 lines (54 sloc) 1.473 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* This file is part of the KDE project
 
Copyright (C) 2009 Alessandro Diaferia <alediaferia@gmail.com>
Copyright (C) 2009 Lukas Appelhans <l.appelhans@gmx.de>
 
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
*/
#ifndef BREADCRUMBITEM_H
#define BREADCRUMBITEM_H
 
#include <QModelIndex>
#include <QRectF>
 
class Breadcrumb;
class QString;
class QTimeLine;
 
namespace Plasma {
    class Svg;
};
 
class BreadcrumbItem
{
public:
    /**
* Passing no index will make the item be an arrow.
*/
    BreadcrumbItem(const QModelIndex &index = QModelIndex());
    ~BreadcrumbItem();
 
    bool isArrow();
 
    bool isMainMenu();
    void setIsMainMenu(bool set);
 
    /**
* @Returns the icon of the item or an arrow icon if the
* item is an arrow.
*/
    QPixmap icon(int size) const;
 
    QString name() const;
 
    void setRect(const QRectF &);
    QRectF rect() const;
 
    void setTextRect(const QRectF &);
    QRectF textRect() const;
 
    bool showingText();
    void setShowingText(bool);
 
    int textWidth();
 
    QModelIndex index() const;
 
private:
    QModelIndex m_index;
    bool m_arrow;
    bool m_mainMenu;
 
    QRectF m_rect;
    QRectF m_textRect;
 
    int m_textWidth;
    bool m_showingText;
 
    Plasma::Svg *m_svg;
};
 
#endif