Commit be9f8232 authored by Dominik Haumann's avatar Dominik Haumann

port to KCategoryDrawer

parent 173194c3
/***************************************************************************
* Copyright (C) 2009 by Rafael Fernández López <ereslibre@kde.org> *
* Copyright (C) 2013 by Dominik Haumann <dhaumann@kde.org> *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
......@@ -26,10 +27,8 @@
#include <QApplication>
#include <QStyleOption>
KateCategoryDrawer::KateCategoryDrawer() : KCategoryDrawerV3 (0)
KateCategoryDrawer::KateCategoryDrawer() : KCategoryDrawer (0)
{
//FIXME KF5 setLeftMargin( 7 );
//FIXME KF5 setRightMargin( 7 );
}
void KateCategoryDrawer::drawCategory(const QModelIndex &index,
......@@ -271,3 +270,13 @@ int KateCategoryDrawer::categoryHeight(const QModelIndex &index, const QStyleOpt
return fontMetrics.height() + 2 + 12 /* vertical spacing */;
}
int KateCategoryDrawer::leftMargin() const
{
return 7;
}
int KateCategoryDrawer::rightMargin() const
{
return 7;
}
\ No newline at end of file
......@@ -17,7 +17,7 @@
***************************************************************************/
// this code is taken from SystemSettings/icons/CategoryDrawer.{h,cpp}
// Rafael agreet to relicense it under LGPLv2 or LGPLv3, just as we need it,
// Rafael agreed to relicense it under LGPLv2 or LGPLv3, just as we need it,
// see: http://lists.kde.org/?l=kwrite-devel&m=133061943317199&w=2
#ifndef KATE_CATEGORYDRAWER_H
......@@ -29,7 +29,7 @@ class QPainter;
class QModelIndex;
class QStyleOption;
class KateCategoryDrawer : public KCategoryDrawerV3
class KateCategoryDrawer : public KCategoryDrawer
{
public:
KateCategoryDrawer();
......@@ -40,6 +40,11 @@ public:
QPainter *painter) const;
virtual int categoryHeight(const QModelIndex &index, const QStyleOption &option) const;
virtual int leftMargin() const Q_DECL_OVERRIDE;
virtual int rightMargin() const Q_DECL_OVERRIDE;
};
#endif
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