00001 #ifndef FAITH__LISTBOX_H
00002 #define FAITH__LISTBOX_H
00003
00004 #include <faith/listview.h>
00005 #include <faith/ui.h>
00006
00007 namespace Faith
00008 {
00009
00010
00011 class FAITH_UI_EXPORT ListBox : public Faith::ListView<>
00012 {
00013 Q_OBJECT
00014 struct ListBoxPrivate;
00015 ListBoxPrivate *d;
00016
00017 public:
00018 ListBox(Faith::Widget *parent, const char *name=0);
00019 ListBox(const Faith::String &s, Faith::Widget *parent, const char *name=0);
00020 ListBox(const std::list<Faith::String> &s, Faith::Widget *parent, const char *name=0);
00021
00022 ~ListBox();
00023
00024 String currentText() const;
00025
00029 int current() const;
00030
00034 void setText(int item, const String &str);
00035
00039 String text(int item) const;
00040
00045 void insertItem(int at, const String &str);
00046
00050 void addItem(const String &str);
00051
00055 void addItems(const std::list<String> &str);
00056
00057 signals:
00058 void currentChanged(int index);
00059 void currentChanged(const Faith::String&);
00060 void currentChanged();
00061
00062 private slots:
00063 void listviewSelectionChanged();
00064 };
00065
00066
00067 }
00068
00069 #endif