Commit d815b453 authored by Volker Krause's avatar Volker Krause
Browse files

Remove unused CategoryHierarchyReaderQTreeWidget

parent 0793ec3c
Pipeline #155352 passed with stage
in 52 seconds
......@@ -9,8 +9,6 @@
#include <QComboBox>
#include <QTreeWidget>
using namespace CalendarSupport;
inline QString &quote(QString &string)
......@@ -104,38 +102,3 @@ int CategoryHierarchyReaderQComboBox::depth() const
{
return mCurrentDepth;
}
#ifndef QT_NO_TREEWIDGET
void CategoryHierarchyReaderQTreeWidget::clear()
{
mTree->clear();
}
void CategoryHierarchyReaderQTreeWidget::goUp()
{
Q_ASSERT(mItem);
mItem = mItem->parent();
--mCurrentDepth;
}
void CategoryHierarchyReaderQTreeWidget::addChild(const QString &label, const QVariant &userData)
{
Q_UNUSED(userData)
if (mItem) {
mItem = new QTreeWidgetItem(mItem, QStringList() << label);
} else {
mItem = new QTreeWidgetItem(mTree, QStringList() << label);
}
mItem->setExpanded(true);
++mCurrentDepth;
}
int CategoryHierarchyReaderQTreeWidget::depth() const
{
return mCurrentDepth;
}
#endif
......@@ -12,9 +12,6 @@
class QComboBox;
class QTreeWidget;
class QTreeWidgetItem;
namespace CalendarSupport
{
class CALENDARSUPPORT_EXPORT CategoryHierarchyReader
......@@ -55,27 +52,4 @@ private:
int mCurrentDepth = 0;
};
#ifndef QT_NO_TREEWIDGET
class CALENDARSUPPORT_EXPORT CategoryHierarchyReaderQTreeWidget : public CategoryHierarchyReader
{
public:
explicit CategoryHierarchyReaderQTreeWidget(QTreeWidget *tree)
: mTree(tree)
{
}
~CategoryHierarchyReaderQTreeWidget() override = default;
protected:
void clear() override;
void goUp() override;
void addChild(const QString &label, const QVariant &userData = QVariant()) override;
int depth() const override;
private:
QTreeWidget *mTree = nullptr;
QTreeWidgetItem *mItem = nullptr;
int mCurrentDepth = 0;
};
#endif
}
Supports Markdown
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