Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
browse_lineedit.h
1 // ---------------------------------------------------------------------
2 // @f$Id: browse_lineedit.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 BROWSELINEEDIT_H
19 #define BROWSELINEEDIT_H
20 
21 #include <QFrame>
22 #include <QLineEdit>
23 #include <QFileDialog>
24 #include <QPushButton>
25 
26 
27 namespace dealii
28 {
32  namespace ParameterGui
33  {
48  class BrowseLineEdit : public QFrame
49  {
50  Q_OBJECT
51 
52  public:
58  enum BrowseType {file = 0, directory = 1};
63  BrowseLineEdit (const BrowseType type = file,
64  QWidget *parent = 0);
65 
70  QSize sizeHint() const;
74  QSize minimumSizeHint() const;
78  QString text() const;
83 
84  public slots:
88  void setText(const QString &str);
89 
90  signals:
94  void editingFinished();
95 
96  private slots:
100  void editing_finished();
105  void browse();
106 
107  private:
111  QLineEdit * line_editor;
115  QPushButton * browse_button;
116  };
117  }
119 }
120 
121 
122 #endif
BrowseLineEdit(const BrowseType type=file, QWidget *parent=0)
void setText(const QString &str)