Update SequenceDescription to have signal/slots
[mussa.git] / qui / seqbrowser / SequenceDescription.hpp
index f8a16782a34c226bcc58097598f7cefff76715d6..ff449ee1240c931552e0a989433133735b954ca0 100644 (file)
@@ -13,17 +13,26 @@ class SequenceDescription : public QFrame
 
 public:
   SequenceDescription(QWidget *parent=0);
-  SequenceDescription(std::string& name, float length, QWidget *parent=0);
+  SequenceDescription(std::string name, int length, QWidget *parent=0);
 
-  void setName(const std::string& name) { name_label.setText(name.c_str()); }
-  void setLength(float length);
-  void setPosition(int pos) { QString s; position_label.setText(s.setNum(pos));}
+public slots:
+  void setName(std::string name);
+  void setLength(int length);
+  void setPosition(int pos);
+
+signals:
+  void nameChanged(std::string name);
+  void lengthChanged(float length);
+  void positionChanged(int pos);
 
 private:
   QLabel name_label;
   QLabel length_label;
   QLabel position_label;
 
+  int length;
+  int pos;
+
   void createWidget();
 };
 #endif