diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-06-09 07:51:22 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-06-09 07:51:22 +0000 |
commit | ceddd2f1e87fd884d9a9af59b20e47353085dff5 (patch) | |
tree | 9033568d130dc138cc18bad7907c181a05725acc /utils/themeeditor/projectfiles.cpp | |
parent | 6efc8d5bc16fd2a73731ba17c7f6a03cf2b9b582 (diff) | |
download | rockbox-ceddd2f1e87fd884d9a9af59b20e47353085dff5.tar.gz rockbox-ceddd2f1e87fd884d9a9af59b20e47353085dff5.zip |
Theme Editor: Working on the project viewer infrastructure
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26714 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/projectfiles.cpp')
-rw-r--r-- | utils/themeeditor/projectfiles.cpp | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/utils/themeeditor/projectfiles.cpp b/utils/themeeditor/projectfiles.cpp new file mode 100644 index 0000000000..441ff1169e --- /dev/null +++ b/utils/themeeditor/projectfiles.cpp | |||
@@ -0,0 +1,77 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2010 Robert Bieber | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #include "projectfiles.h" | ||
23 | |||
24 | ProjectFiles::ProjectFiles(ProjectNode* parent): parentLink(parent) | ||
25 | { | ||
26 | } | ||
27 | |||
28 | ProjectFiles::~ProjectFiles() | ||
29 | { | ||
30 | for(int i = 0; i < children.count(); i++) | ||
31 | delete children[i]; | ||
32 | } | ||
33 | |||
34 | ProjectNode* ProjectFiles::parent() const | ||
35 | { | ||
36 | return parentLink; | ||
37 | } | ||
38 | |||
39 | ProjectNode* ProjectFiles::child(int row) const | ||
40 | { | ||
41 | if(row >= 0 && row < children.count()) | ||
42 | return children[row]; | ||
43 | |||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | int ProjectFiles::numChildren() const | ||
48 | { | ||
49 | return children.count(); | ||
50 | } | ||
51 | |||
52 | int ProjectFiles::row() const | ||
53 | { | ||
54 | return parentLink->indexOf(const_cast<ProjectFiles*>(this)); | ||
55 | } | ||
56 | |||
57 | QVariant ProjectFiles::data(int column) const | ||
58 | { | ||
59 | if(column == 0) | ||
60 | return QObject::tr("Project Files"); | ||
61 | else | ||
62 | return QVariant(); | ||
63 | } | ||
64 | |||
65 | Qt::ItemFlags ProjectFiles::flags(int column) const | ||
66 | { | ||
67 | if(column == 0) | ||
68 | return Qt::ItemIsEnabled | Qt::ItemIsSelectable; | ||
69 | else | ||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | void ProjectFiles::activated() | ||
74 | { | ||
75 | |||
76 | } | ||
77 | |||