Skip to content
Snippets Groups Projects
Commit 2f4cf842 authored by Jan Möbius's avatar Jan Möbius
Browse files

Revert Statusbar patch as it causes a horrible performance loss?!


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6083 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d835f935
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@
</build>
<make>
<abortonerror>false</abortonerror>
<numberofjobs>4</numberofjobs>
<numberofjobs>16</numberofjobs>
<prio>0</prio>
<dontact>false</dontact>
<makebin/>
......
<?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE KDevPrjSession>
<KDevPrjSession>
<DocsAndViews NumberOfDocuments="6" >
<Doc0 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/widgets/glWidget/QtBaseViewer.cc" >
<View0 Encoding="" line="52" Type="Source" />
<DocsAndViews NumberOfDocuments="8" >
<Doc0 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/Plugin-TextureControl/TextureData.cc" >
<View0 Encoding="" Type="Source" />
</Doc0>
<Doc1 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/widgets/coreWidget/CoreWidget.cc" >
<View0 Encoding="" line="93" Type="Source" />
<Doc1 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/Plugin-TextureControl/TextureControl.cc" >
<View0 Encoding="" Type="Source" />
</Doc1>
<Doc2 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/Plugin-Merge/MergePlugin.hh" >
<View0 Encoding="" line="0" Type="Source" />
<Doc2 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/ACG/Scenegraph/TextureNode.cc" >
<View0 Encoding="" Type="Source" />
</Doc2>
<Doc3 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/Plugin-Merge/MergePluginT.cc" >
<View0 Encoding="" line="357" Type="Source" />
<Doc3 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/ACG/Scenegraph/EnvMapNode.hh" >
<View0 Encoding="" Type="Source" />
</Doc3>
<Doc4 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/widgets/coreWidget/keyHandling.cc" >
<View0 Encoding="" line="164" Type="Source" />
<Doc4 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/Core/openFunctions.cc" >
<View0 Encoding="" Type="Source" />
</Doc4>
<Doc5 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/Plugin-TextureControl/TextureData.cc" >
<View0 Encoding="" line="61" Type="Source" />
<Doc5 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/Core/Core.hh" >
<View0 Encoding="" Type="Source" />
</Doc5>
<Doc6 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/Core/ParseObj.cc" >
<View0 Encoding="" Type="Source" />
</Doc6>
<Doc7 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/widgets/glWidget/QtBaseViewer.cc" >
<View0 Encoding="" line="372" Type="Source" />
</Doc7>
</DocsAndViews>
<pluginList>
<kdevdebugger>
......@@ -41,7 +47,7 @@
<subversion base="" />
</kdevsubversion>
<kdevvalgrind>
<executable path="/data/home1/moebius/projects/OpenFlipper/build-debug/Build/bin/OpenFlipper" params="" />
<executable path="" params="" />
<valgrind path="/usr/bin/valgrind" params=" --tool=memcheck --leak-check=yes" />
<calltree path="" params="" />
<kcachegrind path="" />
......
#include "ColorStatusBar.hh"
ColorStatusBar::ColorStatusBar(QWidget* parent) : QStatusBar(parent)
{
connect (this, SIGNAL(messageChanged(const QString&)), this, SLOT(slotMessageChanged(const QString &)) );
colored_ = false;
}
void ColorStatusBar::showMessage(const QString & message, int timeout)
{
QStatusBar::showMessage(message, timeout);
}
void ColorStatusBar::showMessage(const QString & message, QColor _color, int timeout)
{
QPalette pal = palette();
pal.setColor(QPalette::Active, QPalette::WindowText, _color );
setPalette(pal);
colored_ = true;
QStatusBar::showMessage(message, timeout);
}
void ColorStatusBar::slotMessageChanged(const QString & message)
{
if ( !colored_ ){
QPalette pal = palette();
pal.setColor(QPalette::Active, QPalette::WindowText, QColor(Qt::black) );
setPalette(pal);
} else
colored_ = false;
}
#ifndef COLORSTATUSBAR_HH
#define COLORSTATUSBAR_HH
#include <QStatusBar>
class ColorStatusBar : public QStatusBar
{
Q_OBJECT
public:
ColorStatusBar(QWidget* parent = 0 );
public slots:
void showMessage ( const QString& message, int timeout = 0 );
void showMessage ( const QString& message, QColor _color, int timeout = 0 );
private slots:
void slotMessageChanged ( const QString & message );
private:
bool colored_;
};
#endif //COLORSTATUSBAR_HH
......@@ -57,7 +57,6 @@
#include <OpenFlipper/BasePlugin/StatusbarInterface.hh>
#include <OpenFlipper/widgets/coreWidget/SideArea.hh>
#include <OpenFlipper/widgets/coreWidget/ColorStatusBar.hh>
#include <OpenFlipper/widgets/glWidget/QtBaseViewer.hh>
#include <OpenFlipper/widgets/glWidget/QtGLGraphicsScene.hh>
......@@ -766,7 +765,7 @@ public:
void setupStatusBar();
private :
ColorStatusBar* statusBar_;
QStatusBar* statusBar_;
QLabel* statusIcon_;
......
......@@ -63,32 +63,26 @@
void
CoreWidget::
slotLog(Logtype _type, QString _message) {
QColor textColor;
switch (_type) {
case LOGINFO:
textColor = QColor(0,160,0);
logWidget_->setTextColor(QColor(0,160,0));
break;
case LOGOUT:
textColor = QColor(0,0,0);
logWidget_->setTextColor(QColor(0,0,0));
break;
case LOGWARN:
textColor = QColor(160,160,0);
logWidget_->setTextColor(QColor(160,160,0));
break;
case LOGERR:
textColor = QColor(250,0,0);
logWidget_->setTextColor(QColor(250,0,0));
break;
}
logWidget_->setTextColor( textColor );
logWidget_->append(_message);
QScrollBar* bar = logWidget_->verticalScrollBar();
bar->setValue(bar->maximum());
statusBar_->showMessage(_message,textColor, 4000);
// Make shure, we see the message
// QApplication::processEvents();
}
......
......@@ -59,9 +59,7 @@ void CoreWidget::statusMessage(QString _message, int _timeout) {
void CoreWidget::setupStatusBar()
{
statusBar_ = new ColorStatusBar();
setStatusBar( statusBar_ );
statusBar_ = statusBar();
QPixmap pix;
pix.load(OpenFlipper::Options::iconDirStr() +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment