X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fbufferview.h;h=b4fcbee054319052fba74e9cf8ec2231f8a4b2f4;hb=83efa7dcd9771008e7600b4c35db0dde6e0bc995;hp=72fdc967905ef71e81e53774748d83869566b22b;hpb=ef48d209f03f02debf369ff689002f1b32165100;p=quassel.git diff --git a/src/uisupport/bufferview.h b/src/uisupport/bufferview.h index 72fdc967..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 @@ -80,6 +81,7 @@ private slots: void setExpandedState(const QModelIndex &networkIdx); void on_configChanged(); + void on_layoutChanged(); private: QPointer _config; @@ -95,7 +97,6 @@ private: // ****************************** // BufferViewDelgate // ****************************** -#include class BufferViewDelegate : public QStyledItemDelegate { Q_OBJECT @@ -105,30 +106,35 @@ public: bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index); protected: - virtual void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const; - -private: - QColor _FgColorInactiveActivity; - QColor _FgColorNoActivity; - QColor _FgColorHighlightActivity; - QColor _FgColorNewMessageActivity; - QColor _FgColorOtherActivity; + virtual void customEvent(QEvent *event); }; - // ============================== // BufferView Dock // ============================== class BufferViewDock : public QDockWidget { Q_OBJECT + Q_PROPERTY(bool active READ isActive WRITE setActive STORED true) public: BufferViewDock(BufferViewConfig *config, QWidget *parent); + 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