Reference documentation for deal.II version 8.4.2
parameter_delegate.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 
17 #ifndef PARAMETERDELEGATE_H
18 #define PARAMETERDELEGATE_H
19 
20 #include <QItemDelegate>
21 #include <QModelIndex>
22 #include <QObject>
23 #include <QLineEdit>
24 #include <QComboBox>
25 #include <QFileDialog>
26 
27 #include "browse_lineedit.h"
28 
29 
30 namespace dealii
31 {
35  namespace ParameterGui
36  {
53  class ParameterDelegate : public QItemDelegate
54  {
55  Q_OBJECT
56 
57  public:
62  ParameterDelegate (const int value_column, QObject *parent = 0);
67  QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option,
68  const QModelIndex &index) const;
72  QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
76  void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
80  void setEditorData(QWidget *editor, const QModelIndex &index) const;
84  void setModelData(QWidget *editor, QAbstractItemModel *model,
85  const QModelIndex &index) const;
86 
87  private slots:
92 
93  private:
103  double double_steps;
109  unsigned int int_steps;
115  unsigned int double_decimals;
116  };
117  }
119 }
120 
121 
122 #endif
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
ParameterDelegate(const int value_column, QObject *parent=0)
void setEditorData(QWidget *editor, const QModelIndex &index) const
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const