Improve marker line behavior; allow manual setting (Ctrl+R)
[quassel.git] / src / uisupport / abstractbuffercontainer.h
index 747b885..474e10a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-09 by the Quassel Project                          *
+ *   Copyright (C) 2005-2010 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -39,6 +39,7 @@ public:
 
 signals:
   void currentChanged(BufferId);
+  void currentChanged(const QModelIndex &);
 
 protected:
   //! Create an AbstractChatView for the given BufferId and add it to the UI if necessary
@@ -51,9 +52,15 @@ protected:
    */
   virtual void removeChatView(BufferId) = 0;
 
+  //! If true, the marker line will be set automatically on buffer switch
+  /** \return Whether the marker line should be set on buffer switch
+   */
+  virtual inline bool autoMarkerLine() const { return true; }
+
 protected slots:
   virtual void currentChanged(const QModelIndex &current, const QModelIndex &previous);
   virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
+  virtual void rowsInserted(const QModelIndex &parent, int start, int end);
 
   //! Show the given chat view
   /** This method is called when the given chat view should be displayed. Use this e.g. for