Commit cea5c2b3 authored by Harald Sitter's avatar Harald Sitter 🚔

port away from statusbarextension compat

parent b0a3d44b
......@@ -60,7 +60,6 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QList<QVariant>&)
: KXmlGuiWindow(parentWidget)
, m_summary(nullptr)
, m_ext(new BrowserExtension(this))
, m_statusbar(new StatusBarExtension(this))
, m_map(nullptr)
, m_started(false)
, m_widget(nullptr)
......@@ -90,7 +89,7 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QList<QVariant>&)
m_stateWidget->hide();
m_numberOfFiles = new QLabel();
m_statusbar->addStatusBarItem(m_numberOfFiles, 0, true);
statusBar()->addPermanentWidget(m_numberOfFiles);
KStandardAction::zoomIn(m_map, SLOT(zoomIn()), actionCollection());
KStandardAction::zoomOut(m_map, SLOT(zoomOut()), actionCollection());
......@@ -337,10 +336,6 @@ Part::mapChanged(const Folder *tree)
m_numberOfFiles->setText(text);
}
QStatusBar *Part::statusBar() {
return m_statusbar->statusBar();
}
void
Part::showSummary()
{
......@@ -361,31 +356,3 @@ bool Filelight::Part::openFile() {
} //namespace Filelight
#include "part.moc"
StatusBarExtension::StatusBarExtension(QObject *parent)
: QObject(parent)
, m_statusBar(new QStatusBar)
{
}
StatusBarExtension::~StatusBarExtension()
{
delete m_statusBar;
}
QStatusBar *StatusBarExtension::statusBar() const
{
return m_statusBar;
}
void StatusBarExtension::addStatusBarItem(QWidget *widget, int stretch, bool permanent)
{
// Q_ASSERT(false);
#warning port
}
void StatusBarExtension::removeStatusBarItem(QWidget *widget)
{
// Q_ASSERT(false);
#warning port
}
......@@ -29,23 +29,6 @@
class KJob;
class QLabel;
// COMPAT
//using KParts::StatusBarExtension;
class StatusBarExtension : public QObject
{
Q_OBJECT
public:
StatusBarExtension(QObject *parent = nullptr);
~StatusBarExtension();
QStatusBar *statusBar() const;
void addStatusBarItem(QWidget *widget, int stretch, bool permanent);
void removeStatusBarItem(QWidget *widget);
private:
QStatusBar *m_statusBar;
};
namespace RadialMap {
class Widget;
}
......@@ -105,13 +88,11 @@ private slots:
void mapChanged(const Folder*);
private:
QStatusBar *statusBar();
void showSummary();
QLayout *m_layout;
SummaryWidget *m_summary;
BrowserExtension *m_ext;
StatusBarExtension *m_statusbar;
RadialMap::Widget *m_map;
QWidget *m_stateWidget;
class ScanManager *m_manager;
......
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