Commit 4f298247 authored by Gerrit Erichsen's avatar Gerrit Erichsen
Browse files

some clean-up

parent c7771ed1
......@@ -1038,9 +1038,8 @@ void DataTableModel::clearData()
/// DELEGATE IMPLEMENTATION ///////////////////////////////////////////////////////////////////
//////////////////////////////////////////
DataTableDelegate::DataTableDelegate(
Preferences * preferences,
QObject * parent) : QItemDelegate(parent),
DataTableDelegate::DataTableDelegate(const Preferences * preferences, QObject * parent) :
QItemDelegate(parent),
m_preferences(preferences)
{
}
......
......@@ -146,17 +146,25 @@ class DataTableDelegate : public QItemDelegate
{
Q_OBJECT
public:
DataTableDelegate(Preferences * preferences, QObject * parent = nullptr);
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const;
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
DataTableDelegate(const Preferences * preferences,
QObject * parent = nullptr);
virtual QWidget * createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index) const;
virtual void setEditorData(QWidget *editor,
const QModelIndex &index) const;
virtual void setModelData(QWidget *editor,
QAbstractItemModel *model,
const QModelIndex &index) const;
virtual void updateEditorGeometry(QWidget *editor,
const QStyleOptionViewItem &option,
const QModelIndex &index) const;
private:
Preferences * m_preferences;
const Preferences * m_preferences;
};
#endif // DATATABLEMODEL_H
......@@ -58,8 +58,6 @@ public slots:
void enableAll();
private:
Preferences * m_preferences;
QTableView * m_viewWind;
QTableView * m_viewSolar;
QTableView * m_viewTemperature;
......
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