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
|
#ifndef LISTBOXLINK_H
#define LISTBOXLINK_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <tqlistbox.h>
class KListBox;
class TQPainter;
class TQPixmap;
class TQStringList;
class KURL;
class ListBoxLink : public TQListBoxPixmap
{
friend class DnDListBox;
public:
ListBoxLink(const TQString & icon, uint size, const TQString & title, const TQString & url);
ListBoxLink(const TQPixmap & pixmap, const TQString & title, const TQString & url);
ListBoxLink(ListBoxLink & link);
~ListBoxLink();
TQString & URL(){return url_;}
void setURL(const TQString & url);
TQString & icon(){return icon_;}
void setIcon(const TQString & icon);
int height ( const TQListBox * lb ) const;
private:
TQString url_; //TODO: make this KURL?!
TQString icon_;
};
class ListBoxDevice : public ListBoxLink
{
friend class MediaListBox;
public:
ListBoxDevice(const TQString & icon, uint size, const TQString & title, const TQString & url, const TQString & name, const TQString & mountPoint, bool mounted, bool ejectable = FALSE, bool removable = FALSE, int id = 0);
ListBoxDevice(const TQPixmap & pixmap, const TQString & title, const TQString & url, const TQString & name, const TQString & mountPoint, bool mounted, bool ejectable = FALSE, bool removable = FALSE, int id = 0);
~ListBoxDevice(){};
TQString & name(){return name_;}
bool mounted(){return mounted_;}
bool ejectable(){return ejectable_;}
bool removable(){return removable_;}
TQString & mountPoint(){return mountPoint_;}
int id(){return id_;}
int width ( const TQListBox * lb ) const;
protected:
void paint( TQPainter * p );
private:
TQString name_;
TQString mountPoint_;
bool mounted_;
bool ejectable_;
bool removable_;
int id_;
};
#endif
|