~ubuntu-branches/ubuntu/intrepid/kid3/intrepid

« back to all changes in this revision

Viewing changes to kid3/filelistitem.h

  • Committer: Bazaar Package Importer
  • Author(s): Michele Angrisano
  • Date: 2008-01-09 23:20:54 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080109232054-gtcjxz4ahdnzbt01
Tags: 0.10-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/rules:
    + Use dh_icons instead dh_iconcache.
  - debian/control:
    + Update maintainer field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 * \b Project: Kid3
6
6
 * \author Urs Fleisch
7
7
 * \date 02 Oct 2006
 
8
 *
 
9
 * Copyright (C) 2006-2007  Urs Fleisch
 
10
 *
 
11
 * This file is part of Kid3.
 
12
 *
 
13
 * Kid3 is free software; you can redistribute it and/or modify
 
14
 * it under the terms of the GNU General Public License as published by
 
15
 * the Free Software Foundation; either version 2 of the License, or
 
16
 * (at your option) any later version.
 
17
 *
 
18
 * Kid3 is distributed in the hope that it will be useful,
 
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
21
 * GNU General Public License for more details.
 
22
 *
 
23
 * You should have received a copy of the GNU General Public License
 
24
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
8
25
 */
9
26
 
10
27
#ifndef FILELISTITEM_H
13
30
#include <qpixmap.h>
14
31
#include "qtcompatmac.h"
15
32
#if QT_VERSION >= 0x040000
16
 
#include <Q3ListView>
 
33
#include <QTreeWidget>
17
34
#else
18
35
#include <qlistview.h>
19
36
#endif
24
41
class FileList;
25
42
 
26
43
/** List box item containing tagged file */
27
 
class FileListItem : public Q3ListViewItem {
 
44
class FileListItem : public
 
45
#if QT_VERSION >= 0x040000
 
46
QTreeWidgetItem
 
47
#else
 
48
QListViewItem
 
49
#endif
 
50
{
28
51
public:
29
52
        /**
30
53
         * Constructor.
49
72
         */
50
73
        virtual ~FileListItem();
51
74
 
 
75
#if QT_VERSION < 0x040000
52
76
        /**
53
77
         * Paints the contents of one column of an item.
54
78
         *
62
86
                                                                                                 int column, int width, int align);
63
87
 
64
88
        /**
 
89
         * Called before showing the item.
 
90
         */
 
91
        virtual void setup();
 
92
#endif
 
93
 
 
94
        /**
65
95
         * Opens or closes an item.
66
96
         *
67
97
         * @param o true to open
69
99
        virtual void setOpen(bool o);
70
100
 
71
101
        /**
72
 
         * Called before showing the item.
73
 
         */
74
 
        void setup();
75
 
 
76
 
        /**
77
102
         * Get tagged file.
78
103
         * @return tagged file.
79
104
         */
138
163
         */
139
164
        bool isInSelection() { return m_selected; }
140
165
 
 
166
#if QT_VERSION >= 0x040000
 
167
        /**
 
168
         * Check if QTreeWidgetItem is selected.
 
169
         *
 
170
         * @return true if selected.
 
171
         */
 
172
        bool isSelected() const;
 
173
 
 
174
        /**
 
175
         * Check if directory is open.
 
176
         * @return true if open.
 
177
         */
 
178
        bool isOpen() const { return m_isOpen; }
 
179
#endif
 
180
 
141
181
private:
142
182
        FileListItem(const FileListItem&);
143
183
        FileListItem& operator=(const FileListItem&);
148
188
         */
149
189
        void init();
150
190
 
 
191
#if QT_VERSION >= 0x040000
 
192
        /** true if directory open. */
 
193
        bool m_isOpen;
 
194
#endif
 
195
 
151
196
        /** the tagged file represented by this item */
152
197
        TaggedFile* m_file;
153
198