Commit 2d54669e authored by Rolf Eike Beer's avatar Rolf Eike Beer
Browse files

remove unneeded crap and implement column headers

svn path=/branches/work/kgpg2/; revision=753044
parent 5894574b
......@@ -4,6 +4,7 @@
#include "core/kgpgkey.h"
#include <KDebug>
#include <KLocale>
using namespace KgpgCore;
......@@ -66,14 +67,19 @@ GroupEditProxyModel::data(const QModelIndex &index, int role) const
return QVariant();
}
void
GroupEditProxyModel::beginChange()
QVariant
GroupEditProxyModel::headerData(int section, Qt::Orientation orientation, int role) const
{
emit layoutAboutToBeChanged();
}
if (role != Qt::DisplayRole)
return QVariant();
void
GroupEditProxyModel::endChange()
{
emit layoutChanged();
if (orientation != Qt::Horizontal)
return QVariant();
switch (section) {
case 0: return QString(i18n("Name"));
case 1: return QString(i18n("Email"));
case 2: return QString(i18n("ID"));
default: return QVariant();
}
}
......@@ -18,6 +18,7 @@ public:
KGpgNode *nodeForIndex(const QModelIndex &index) const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
protected:
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
......@@ -27,10 +28,6 @@ private:
KGpgItemModel *m_model;
bool m_invert;
QList<KGpgNode *> *m_ids;
public Q_SLOTS:
void beginChange();
void endChange();
};
#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