PageRenderTime 45ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/quassel-0.7.3/src/uisupport/nickview.h

#
C Header | 55 lines | 24 code | 11 blank | 20 comment | 0 complexity | 2a093fc480d7a37a64b87315b61a313d MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0
  1. /***************************************************************************
  2. * Copyright (C) 2005-09 by the Quassel Project *
  3. * devel@quassel-irc.org *
  4. * *
  5. * This program is free software; you can redistribute it and/or modify *
  6. * it under the terms of the GNU General Public License as published by *
  7. * the Free Software Foundation; either version 2 of the License, or *
  8. * (at your option) version 3. *
  9. * *
  10. * This program is distributed in the hope that it will be useful, *
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  13. * GNU General Public License for more details. *
  14. * *
  15. * You should have received a copy of the GNU General Public License *
  16. * along with this program; if not, write to the *
  17. * Free Software Foundation, Inc., *
  18. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
  19. ***************************************************************************/
  20. #ifndef NICKVIEW_H_
  21. #define NICKVIEW_H_
  22. #include <QTreeView>
  23. #include "bufferinfo.h"
  24. class NickView : public QTreeView {
  25. Q_OBJECT
  26. public:
  27. NickView(QWidget *parent = 0);
  28. protected:
  29. virtual void rowsInserted(const QModelIndex &parent, int start, int end);
  30. virtual void customEvent(QEvent *event);
  31. //! This reimplementation ensures that the current index is first in list
  32. virtual QModelIndexList selectedIndexes() const;
  33. public slots:
  34. virtual void setModel(QAbstractItemModel *model);
  35. virtual void setRootIndex(const QModelIndex &index);
  36. void init();
  37. void showContextMenu(const QPoint & pos);
  38. void startQuery(const QModelIndex & modelIndex);
  39. signals:
  40. void selectionUpdated();
  41. private:
  42. friend class NickListWidget; // needs selectedIndexes()
  43. };
  44. #endif