X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Ftopicwidget.h;h=95ceadfc9b0e9bbe900e654326c995d8ac57c65e;hp=c1bae92172ba9f52137d8dfe2f50bccb10d93c37;hb=1b2d3ea62867220d7bffc3b23dda1dc14d429007;hpb=08cf52eafbd690bbaa3c86e57cb02e7e82dc3159 diff --git a/src/qtui/topicwidget.h b/src/qtui/topicwidget.h index c1bae921..95ceadfc 100644 --- a/src/qtui/topicwidget.h +++ b/src/qtui/topicwidget.h @@ -21,25 +21,28 @@ #ifndef _TOPICWIDGET_H_ #define _TOPICWIDGET_H_ -#include +#include "abstractitemview.h" #include "ui_topicwidget.h" -class TopicWidget : public QWidget { +class TopicWidget : public AbstractItemView { Q_OBJECT - Q_PROPERTY(QString topic READ topic WRITE setTopic STORED false) public: TopicWidget(QWidget *parent = 0); - inline QString topic() const { return ui.topicLineEdit->text(); } void setTopic(const QString &newtopic); + void setTopicForIndex(const QModelIndex &index); virtual bool eventFilter(QObject *obj, QEvent *event); signals: void topicChanged(const QString &text); - + +protected slots: + virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); + virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); + private slots: void on_topicLineEdit_returnPressed(); void on_topicButton_clicked();