2008-05-05 07:46:19 +00:00
|
|
|
//
|
|
|
|
|
// C++ Implementation: MyLeftTabWidget
|
|
|
|
|
//
|
|
|
|
|
// Description:
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// Author: FThauer FHammer <f.thauer@web.de>, (C) 2007
|
|
|
|
|
//
|
|
|
|
|
// Copyright: See COPYING file that comes with this distribution
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
#include "mylefttabwidget.h"
|
|
|
|
|
|
|
|
|
|
MyLeftTabWidget::MyLeftTabWidget(QGroupBox *parent)
|
|
|
|
|
: QTabWidget(parent), chatBlinkTimer(0), myTabBar(0)
|
|
|
|
|
{
|
|
|
|
|
myTabBar = this->tabBar();
|
|
|
|
|
|
2009-03-31 20:31:28 +00:00
|
|
|
// chatBlinkTimer = new QTimer;
|
|
|
|
|
// connect(chatBlinkTimer, SIGNAL(timeout()), this, SLOT( blinkChatTab() ));
|
2008-05-05 07:46:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MyLeftTabWidget::~MyLeftTabWidget()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2009-03-31 20:31:28 +00:00
|
|
|
void MyLeftTabWidget::startBlinkChatTab() { /*chatBlinkTimer->start(500);*/ }
|
|
|
|
|
void MyLeftTabWidget::stopBlinkChatTab() { /*chatBlinkTimer->stop();*/ }
|
|
|
|
|
void MyLeftTabWidget::showDefaultChatTab() { /*myTabBar->setTabTextColor(1, QColor(240,240,240));*/ }
|
2008-05-05 07:46:19 +00:00
|
|
|
void MyLeftTabWidget::disableTab(int tabIndex, bool yesNo) { myTabBar->setTabEnabled(tabIndex, !yesNo); }
|
|
|
|
|
|
|
|
|
|
void MyLeftTabWidget::blinkChatTab() {
|
2009-03-31 20:31:28 +00:00
|
|
|
//TODO doesnt work while stylesheet is set :(
|
|
|
|
|
// if(myTabBar->tabTextColor(1).red() == 240) myTabBar->setTabTextColor(1, QColor(113,162,0));
|
|
|
|
|
// else myTabBar->setTabTextColor(1, QColor(240,240,240));
|
2008-05-05 07:46:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MyLeftTabWidget::paintEvent(QPaintEvent * event) {
|
|
|
|
|
|
|
|
|
|
QTabWidget::paintEvent(event);
|
|
|
|
|
|
|
|
|
|
}
|