Reference documentation for deal.II version 8.4.1
browse_lineedit.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 BROWSELINEEDIT_H
18 #define BROWSELINEEDIT_H
19 
20 #include <QFrame>
21 #include <QLineEdit>
22 #include <QFileDialog>
23 #include <QPushButton>
24 
25 
26 namespace dealii
27 {
31  namespace ParameterGui
32  {
47  class BrowseLineEdit : public QFrame
48  {
49  Q_OBJECT
50 
51  public:
57  enum BrowseType {file = 0, directory = 1};
62  BrowseLineEdit (const BrowseType type = file,
63  QWidget *parent = 0);
64 
69  QSize sizeHint() const;
73  QSize minimumSizeHint() const;
77  QString text() const;
82 
83  public slots:
87  void setText(const QString &str);
88 
89  signals:
93  void editingFinished();
94 
95  private slots:
99  void editing_finished();
104  void browse();
105 
106  private:
110  QLineEdit * line_editor;
114  QPushButton * browse_button;
115  };
116  }
118 }
119 
120 
121 #endif
BrowseLineEdit(const BrowseType type=file, QWidget *parent=0)