X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fbufferview.h;h=a06c1f083e9545d036beac1aaeb9367ebb80647d;hb=2fd8e1c1d5a04b167ffa73e9c011fd34faebe1fc;hp=aaafd615517cbbd556909751995a306295f24bcd;hpb=4c0c5a52458009b578a23d4abb4e726a13550c12;p=quassel.git diff --git a/src/uisupport/bufferview.h b/src/uisupport/bufferview.h index aaafd615..a06c1f08 100644 --- a/src/uisupport/bufferview.h +++ b/src/uisupport/bufferview.h @@ -26,18 +26,18 @@ #include #include #include -#include #include #include "actioncollection.h" #include "bufferviewconfig.h" #include "networkmodel.h" +#include "treeviewtouch.h" #include "types.h" /***************************************** * The TreeView showing the Buffers *****************************************/ -class BufferView : public QTreeView +class BufferView : public TreeViewTouch { Q_OBJECT @@ -66,6 +66,7 @@ public slots: void nextBuffer(); void previousBuffer(); void hideCurrentBuffer(); + void filterTextChanged(QString filterString); signals: void removeBuffer(const QModelIndex &); @@ -79,9 +80,6 @@ protected: virtual QSize sizeHint() const; virtual void focusInEvent(QFocusEvent *event) { QAbstractScrollArea::focusInEvent(event); } virtual void contextMenuEvent(QContextMenuEvent *event); - virtual bool event(QEvent *event); - virtual void mouseMoveEvent(QMouseEvent *event); - virtual void mousePressEvent(QMouseEvent *event); #if QT_VERSION < 0x050000 virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); @@ -103,8 +101,6 @@ private slots: private: QPointer _config; - qint64 _lastTouchStart = 0; - bool _touchScrollInProgress = false; enum ExpandedState { WasExpanded = 0x01, @@ -146,6 +142,8 @@ public : BufferViewConfig *config() const; inline BufferView *bufferView() const { return qobject_cast(widget()); } inline bool isActive() const { return _active; } + void setWidget(QWidget *newWidget); + QWidget *widget() const { return _childWidget; } public slots: void setActive(bool active = true); @@ -155,7 +153,9 @@ private slots: void updateTitle(); private: - + QWidget *_childWidget; + QWidget *_widget; + QLineEdit *_filterEdit; bool _active; QString _title; };