Save/restore active bufferview
[quassel.git] / src / uisupport / bufferview.h
index 411cd89..b4fcbee 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  *
@@ -83,8 +83,6 @@ private slots:
   void on_configChanged();
   void on_layoutChanged();
 
-  void setCustomFont(const QVariant &font);
-
 private:
   QPointer<BufferViewConfig> _config;
 
@@ -116,6 +114,7 @@ protected:
 // ==============================
 class BufferViewDock : public QDockWidget {
   Q_OBJECT
+  Q_PROPERTY(bool active READ isActive WRITE setActive STORED true)
 
 public:
   BufferViewDock(BufferViewConfig *config, QWidget *parent);
@@ -123,9 +122,19 @@ public:
   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