X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fnickview.h;h=a95798cbade3841f6c20a690717baac069f00c5e;hb=82936b9c45a2dbf0c1742654f71c6c7e73d2f724;hp=09751a7714d11b6ca8b029e89908208e58fc4469;hpb=ef48d209f03f02debf369ff689002f1b32165100;p=quassel.git diff --git a/src/uisupport/nickview.h b/src/uisupport/nickview.h index 09751a77..a95798cb 100644 --- a/src/uisupport/nickview.h +++ b/src/uisupport/nickview.h @@ -33,7 +33,11 @@ public: protected: virtual void rowsInserted(const QModelIndex &parent, int start, int end); - virtual void customEvent(QEvent *event); + + //! This reimplementation ensures that the current index is first in list + virtual QModelIndexList selectedIndexes() const; + + void unanimatedExpandAll(); public slots: virtual void setModel(QAbstractItemModel *model); @@ -42,29 +46,11 @@ public slots: void showContextMenu(const QPoint & pos); void startQuery(const QModelIndex & modelIndex); -private: - BufferInfo bufferInfoFromModelIndex(const QModelIndex & index); - QString nickFromModelIndex(const QModelIndex & index); - void executeCommand(const BufferInfo & bufferInfo, const QString & command); -}; - -// ****************************** -// NickViewDelgate -// ****************************** -#include - -class NickViewDelegate : public QStyledItemDelegate { - Q_OBJECT - -public: - NickViewDelegate(QObject *parent = 0); - -protected: - virtual void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const; +signals: + void selectionUpdated(); private: - QColor _FgOnlineStatus; - QColor _FgAwayStatus; + friend class NickListWidget; // needs selectedIndexes() }; #endif