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
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</build> </build>
<make> <make>
<abortonerror>false</abortonerror> <abortonerror>false</abortonerror>
<numberofjobs>4</numberofjobs> <numberofjobs>16</numberofjobs>
<prio>0</prio> <prio>0</prio>
<dontact>false</dontact> <dontact>false</dontact>
<makebin/> <makebin/>
......
<?xml version = '1.0' encoding = 'UTF-8'?> <?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE KDevPrjSession> <!DOCTYPE KDevPrjSession>
<KDevPrjSession> <KDevPrjSession>
<DocsAndViews NumberOfDocuments="6" > <DocsAndViews NumberOfDocuments="8" >
<Doc0 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/widgets/glWidget/QtBaseViewer.cc" > <Doc0 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/Plugin-TextureControl/TextureData.cc" >
<View0 Encoding="" line="52" Type="Source" /> <View0 Encoding="" Type="Source" />
</Doc0> </Doc0>
<Doc1 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/widgets/coreWidget/CoreWidget.cc" > <Doc1 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/Plugin-TextureControl/TextureControl.cc" >
<View0 Encoding="" line="93" Type="Source" /> <View0 Encoding="" Type="Source" />
</Doc1> </Doc1>
<Doc2 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/Plugin-Merge/MergePlugin.hh" > <Doc2 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/ACG/Scenegraph/TextureNode.cc" >
<View0 Encoding="" line="0" Type="Source" /> <View0 Encoding="" Type="Source" />
</Doc2> </Doc2>
<Doc3 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/Plugin-Merge/MergePluginT.cc" > <Doc3 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/ACG/Scenegraph/EnvMapNode.hh" >
<View0 Encoding="" line="357" Type="Source" /> <View0 Encoding="" Type="Source" />
</Doc3> </Doc3>
<Doc4 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/widgets/coreWidget/keyHandling.cc" > <Doc4 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/Core/openFunctions.cc" >
<View0 Encoding="" line="164" Type="Source" /> <View0 Encoding="" Type="Source" />
</Doc4> </Doc4>
<Doc5 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/Plugin-TextureControl/TextureData.cc" > <Doc5 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/Core/Core.hh" >
<View0 Encoding="" line="61" Type="Source" /> <View0 Encoding="" Type="Source" />
</Doc5> </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> </DocsAndViews>
<pluginList> <pluginList>
<kdevdebugger> <kdevdebugger>
...@@ -41,7 +47,7 @@ ...@@ -41,7 +47,7 @@
<subversion base="" /> <subversion base="" />
</kdevsubversion> </kdevsubversion>
<kdevvalgrind> <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" /> <valgrind path="/usr/bin/valgrind" params=" --tool=memcheck --leak-check=yes" />
<calltree path="" params="" /> <calltree path="" params="" />
<kcachegrind path="" /> <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 @@ ...@@ -57,7 +57,6 @@
#include <OpenFlipper/BasePlugin/StatusbarInterface.hh> #include <OpenFlipper/BasePlugin/StatusbarInterface.hh>
#include <OpenFlipper/widgets/coreWidget/SideArea.hh> #include <OpenFlipper/widgets/coreWidget/SideArea.hh>
#include <OpenFlipper/widgets/coreWidget/ColorStatusBar.hh>
#include <OpenFlipper/widgets/glWidget/QtBaseViewer.hh> #include <OpenFlipper/widgets/glWidget/QtBaseViewer.hh>
#include <OpenFlipper/widgets/glWidget/QtGLGraphicsScene.hh> #include <OpenFlipper/widgets/glWidget/QtGLGraphicsScene.hh>
...@@ -766,7 +765,7 @@ public: ...@@ -766,7 +765,7 @@ public:
void setupStatusBar(); void setupStatusBar();
private : private :
ColorStatusBar* statusBar_; QStatusBar* statusBar_;
QLabel* statusIcon_; QLabel* statusIcon_;
......
...@@ -63,32 +63,26 @@ ...@@ -63,32 +63,26 @@
void void
CoreWidget:: CoreWidget::
slotLog(Logtype _type, QString _message) { slotLog(Logtype _type, QString _message) {
QColor textColor;
switch (_type) { switch (_type) {
case LOGINFO: case LOGINFO:
textColor = QColor(0,160,0); logWidget_->setTextColor(QColor(0,160,0));
break; break;
case LOGOUT: case LOGOUT:
textColor = QColor(0,0,0); logWidget_->setTextColor(QColor(0,0,0));
break; break;
case LOGWARN: case LOGWARN:
textColor = QColor(160,160,0); logWidget_->setTextColor(QColor(160,160,0));
break; break;
case LOGERR: case LOGERR:
textColor = QColor(250,0,0); logWidget_->setTextColor(QColor(250,0,0));
break; break;
} }
logWidget_->setTextColor( textColor );
logWidget_->append(_message); logWidget_->append(_message);
QScrollBar* bar = logWidget_->verticalScrollBar(); QScrollBar* bar = logWidget_->verticalScrollBar();
bar->setValue(bar->maximum()); bar->setValue(bar->maximum());
statusBar_->showMessage(_message,textColor, 4000);
// Make shure, we see the message // Make shure, we see the message
// QApplication::processEvents(); // QApplication::processEvents();
} }
......
...@@ -59,9 +59,7 @@ void CoreWidget::statusMessage(QString _message, int _timeout) { ...@@ -59,9 +59,7 @@ void CoreWidget::statusMessage(QString _message, int _timeout) {
void CoreWidget::setupStatusBar() void CoreWidget::setupStatusBar()
{ {
statusBar_ = new ColorStatusBar(); statusBar_ = statusBar();
setStatusBar( statusBar_ );
QPixmap pix; QPixmap pix;
pix.load(OpenFlipper::Options::iconDirStr() + pix.load(OpenFlipper::Options::iconDirStr() +
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment