Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
parameter_delegate.h
1 // ---------------------------------------------------------------------
2 // @f$Id: parameter_delegate.h 31527 2013-11-03 09:58:45Z maier @f$
3 //
4 // Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 
18 #ifndef PARAMETERDELEGATE_H
19 #define PARAMETERDELEGATE_H
20 
21 #include <QItemDelegate>
22 #include <QModelIndex>
23 #include <QObject>
24 #include <QLineEdit>
25 #include <QComboBox>
26 #include <QFileDialog>
27 
28 #include "browse_lineedit.h"
29 
30 
31 namespace dealii
32 {
36  namespace ParameterGui
37  {
55  {
56  Q_OBJECT
57 
58  public:
63  ParameterDelegate (const int value_column, QObject *parent = 0);
68  QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option,
69  const QModelIndex &index) const;
73  QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
77  void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
81  void setEditorData(QWidget *editor, const QModelIndex &index) const;
85  void setModelData(QWidget *editor, QAbstractItemModel *model,
86  const QModelIndex &index) const;
87 
88  private slots:
93 
94  private:
104  double double_steps;
110  unsigned int int_steps;
116  unsigned int double_decimals;
117  };
118  }
120 }
121 
122 
123 #endif
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
ParameterDelegate(const int value_column, QObject *parent=0)
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
void setEditorData(QWidget *editor, const QModelIndex &index) const
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const