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() ...@@ -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 // TODO: Find a new way to handle the status items as you can't do this with KParts yet
//filterLabel->setText(str); //filterLabel->setText(str);
emit filterStatusChanged(str);
} }
......
...@@ -60,6 +60,9 @@ public: ...@@ -60,6 +60,9 @@ public:
static KAboutData* createAboutData(); static KAboutData* createAboutData();
signals:
void filterStatusChanged(QString status);
public slots: public slots:
virtual bool openFile() { return true; } virtual bool openFile() { return true; }
virtual bool openURL( const KURL & ); virtual bool openURL( const KURL & );
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include "cervisiashell.h" #include "cervisiashell.h"
#include <qlabel.h>
#include <qtooltip.h>
#include <kapplication.h> #include <kapplication.h>
#include <kconfig.h> #include <kconfig.h>
#include <kedittoolbar.h> #include <kedittoolbar.h>
...@@ -36,6 +38,17 @@ CervisiaShell::CervisiaShell( const char *name ) ...@@ -36,6 +38,17 @@ CervisiaShell::CervisiaShell( const char *name )
setCentralWidget( part->widget() ); setCentralWidget( part->widget() );
setupActions(); 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 // Magic needed for status texts
...@@ -140,6 +153,11 @@ void CervisiaShell::slotConfigureToolBars() ...@@ -140,6 +153,11 @@ void CervisiaShell::slotConfigureToolBars()
createGUI( part ); createGUI( part );
} }
void CervisiaShell::slotChangeFilterStatus(QString status)
{
filterLabel->setText(status);
}
void CervisiaShell::slotExit() void CervisiaShell::slotExit()
{ {
(void) queryExit(); (void) queryExit();
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <kparts/mainwindow.h> #include <kparts/mainwindow.h>
class QLabel;
class CervisiaPart; class CervisiaPart;
class KRecentFilesAction; class KRecentFilesAction;
...@@ -40,6 +41,9 @@ public slots: ...@@ -40,6 +41,9 @@ public slots:
void slotConfigureKeys(); void slotConfigureKeys();
void slotConfigureToolBars(); void slotConfigureToolBars();
void slotExit(); void slotExit();
protected slots:
void slotChangeFilterStatus(QString status);
protected: protected:
void setupActions(); void setupActions();
...@@ -50,6 +54,7 @@ protected: ...@@ -50,6 +54,7 @@ protected:
private: private:
CervisiaPart *part; 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