Commit 8392939f authored by Christian Loose's avatar Christian Loose

revived old filter status indicator in statusbar

svn path=/trunk/kdesdk/cervisia/; revision=168603
parent 67229cbb
......@@ -1533,6 +1533,7 @@ void CervisiaPart::setFilter()
// TODO: Find a new way to handle the status items as you can't do this with KParts yet
//filterLabel->setText(str);
emit filterStatusChanged(str);
}
......
......@@ -60,6 +60,9 @@ public:
static KAboutData* createAboutData();
signals:
void filterStatusChanged(QString status);
public slots:
virtual bool openFile() { return true; }
virtual bool openURL( const KURL & );
......
......@@ -14,6 +14,8 @@
#include "cervisiashell.h"
#include <qlabel.h>
#include <qtooltip.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kedittoolbar.h>
......@@ -37,6 +39,17 @@ CervisiaShell::CervisiaShell( const char *name )
setupActions();
// create the active filter indicator and add it to the statusbar
filterLabel = new QLabel("UR", statusBar());
filterLabel->setFixedSize(filterLabel->sizeHint());
filterLabel->setText("");
QToolTip::add(filterLabel, i18n("F - All files are hidden, the tree shows only directories\n"
"N - All up-to-date files are hidden\n"
"R - All removed files are hidden"));
statusBar()->addWidget(filterLabel, 0, true);
connect( part, SIGNAL( filterStatusChanged(QString) ),
this, SLOT( slotChangeFilterStatus(QString) ) );
//
// Magic needed for status texts
//
......@@ -140,6 +153,11 @@ void CervisiaShell::slotConfigureToolBars()
createGUI( part );
}
void CervisiaShell::slotChangeFilterStatus(QString status)
{
filterLabel->setText(status);
}
void CervisiaShell::slotExit()
{
(void) queryExit();
......
......@@ -17,6 +17,7 @@
#include <kparts/mainwindow.h>
class QLabel;
class CervisiaPart;
class KRecentFilesAction;
......@@ -41,6 +42,9 @@ public slots:
void slotConfigureToolBars();
void slotExit();
protected slots:
void slotChangeFilterStatus(QString status);
protected:
void setupActions();
......@@ -50,6 +54,7 @@ protected:
private:
CervisiaPart *part;
QLabel *filterLabel;
};
......
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