X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fbufferview.h;h=b4fcbee054319052fba74e9cf8ec2231f8a4b2f4;hp=b2d1e0edbde0402211c388230b5ef55d17c13254;hb=83efa7dcd9771008e7600b4c35db0dde6e0bc995;hpb=54afee59c56e1a75352b32200b9503150601bd90 diff --git a/src/uisupport/bufferview.h b/src/uisupport/bufferview.h index b2d1e0ed..b4fcbee0 100644 --- a/src/uisupport/bufferview.h +++ b/src/uisupport/bufferview.h @@ -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 * @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -82,8 +83,6 @@ private slots: void on_configChanged(); void on_layoutChanged(); - void setCustomFont(const QVariant &font); - private: QPointer _config; @@ -98,7 +97,6 @@ private: // ****************************** // BufferViewDelgate // ****************************** -#include class BufferViewDelegate : public QStyledItemDelegate { Q_OBJECT @@ -109,28 +107,14 @@ public: protected: virtual void customEvent(QEvent *event); - virtual void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const; - -private slots: - void colorsChanged(); - void loadColors(); - -private: - QColor _FgColorInactiveActivity; - QColor _FgColorNoActivity; - QColor _FgColorHighlightActivity; - QColor _FgColorNewMessageActivity; - QColor _FgColorOtherActivity; - - bool _updateColors; }; - // ============================== // BufferView Dock // ============================== class BufferViewDock : public QDockWidget { Q_OBJECT + Q_PROPERTY(bool active READ isActive WRITE setActive STORED true) public: BufferViewDock(BufferViewConfig *config, QWidget *parent); @@ -138,9 +122,19 @@ public: int bufferViewId() const; BufferViewConfig *config() const; inline BufferView *bufferView() const { return qobject_cast(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