Pressing enter in the topic line now sets the channel topic.
[quassel.git] / src / qtui / topicwidget.h
index c28a2eb..f899a2b 100644 (file)
@@ -29,15 +29,20 @@ class TopicWidget : public QWidget {
   Q_OBJECT
   Q_PROPERTY(QString topic READ topic WRITE setTopic STORED false)
 
   Q_OBJECT
   Q_PROPERTY(QString topic READ topic WRITE setTopic STORED false)
 
-public:
-  TopicWidget(QWidget *parent = 0);
-  virtual ~TopicWidget();
+  public:
+    TopicWidget(QWidget *parent = 0);
 
 
-  QString topic() const;
-  void setTopic(const QString &newtopic);
+    inline QString topic() const { return ui.topicLineEdit->text(); }
+    void setTopic(const QString &newtopic);
+
+  signals:
+    void topicChanged(const QString &text);
+
+  private slots:
+    void on_topicLineEdit_returnPressed();
   
   
-private:
-  Ui::TopicWidget ui;
+  private:
+    Ui::TopicWidget ui;
 };
 
 
 };