fixed focus when switching to plain topic view
[quassel.git] / src / qtui / topicwidget.h
index 29e45c6..c390549 100644 (file)
@@ -31,10 +31,15 @@ class TopicWidget : public AbstractItemView {
 public:
   TopicWidget(QWidget *parent = 0);
 
-  void setTopic(const QString &newtopic);
+  void setTopic(const QModelIndex& index);
   void setCustomFont(const QFont &);
+  void setReadOnly(const bool &readonly);
 
   virtual bool eventFilter(QObject *obj, QEvent *event);
+  inline bool isReadOnly() const { return _readonly; }
+
+  signals:
+    void switchedPlain();
 
 protected slots:
   virtual void currentChanged(const QModelIndex &current, const QModelIndex &previous);
@@ -54,6 +59,9 @@ private:
   Ui::TopicWidget ui;
 
   QString _topic;
+  bool _mouseEntered;
+  bool _readonly;
+
 };