Added Das Telefonbuch support.
[jenirok] / src / gui / buttonselector.h
index cb05209..d5c6980 100644 (file)
 
 class ButtonSelector : public QMaemo5ValueButton
 {
+
+Q_OBJECT
+
 public:
     ButtonSelector(QString const& text, QWidget* parent = 0);
     void addItem(QString const& text);
     void addItem(QString const& text, QVariant const& value);
     void clear();
-    void setCurrentIndex(int index);
+    void setCurrentIndex(unsigned int index);
+    int indexOfValue(QVariant const& value) const;
+    bool selectByValue(QVariant const& value);
     int currentIndex() const;
+    bool changeItem(unsigned int index, QString const& text);
+    bool changeItem(unsigned int index, QString const& text, QVariant const& value);
+    bool removeItem(unsigned int index);
+    bool setValue(unsigned int index);
     QString text() const;
     QVariant value() const;
 
+signals:
+    void selected(unsigned int index, QString const& text, QVariant const& value);
+
+private slots:
+    void onSelected(QString const& text);
+
 private:
     QMaemo5ListPickSelector* selector_;
     QStandardItemModel* model_;