+class BufferViewDelegate : public QStyledItemDelegate
+{
+ Q_OBJECT
+
+public:
+ BufferViewDelegate(QObject *parent = 0);
+ bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index);
+
+protected:
+ virtual void customEvent(QEvent *event);
+};
+
+
+// ==============================
+// BufferView Dock
+// ==============================
+class BufferViewDock : public QDockWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(bool active READ isActive WRITE setActive STORED true)
+
+public :
+ BufferViewDock(BufferViewConfig *config, QWidget *parent);
+
+ int bufferViewId() const;
+ BufferViewConfig *config() const;
+ inline BufferView *bufferView() const { return qobject_cast<BufferView *>(widget()); }
+ inline bool isActive() const { return _active; }
+
+public slots:
+ void setActive(bool active = true);
+
+private slots:
+ void bufferViewRenamed(const QString &newName);
+ void updateTitle();
+
+private:
+
+ bool _active;
+ QString _title;
+};
+
+
+#endif