-QColor BufferItem::foreground(int column) const {
- Q_UNUSED(column)
- // for the time beeing we ignore the column :)
- if(activity & Buffer::Highlight) {
- return QColor(Qt::red);
- } else if(activity & Buffer::NewMessage) {
- return QColor(Qt::darkYellow);
- } else if(activity & Buffer::OtherActivity) {
- return QColor(Qt::darkGreen);
- } else {
- if(buf->isActive())
- return QColor(Qt::black);
- else
- return QColor(Qt::gray);
- }
+BufferItem::Type BufferItem::bufferType() const {
+ return _type;
+}
+
+bool BufferItem::isActive() const {
+ if(bufferType() == ChannelType)
+ return _ircChannel;
+ else
+ return qobject_cast<NetworkItem *>(parent())->isActive();
+}
+
+BufferItem::ActivityLevel BufferItem::activity() const {
+ return _activity;
+}
+
+void BufferItem::setActivity(const ActivityLevel &level) {
+ _activity = level;
+}
+
+void BufferItem::addActivity(const ActivityLevel &level) {
+ _activity |= level;