contrib/parameter_gui/browse_lineedit.h

00001 //---------------------------------------------------------------------------
00002 //
00003 //    Copyright (C) 2010, 2011 by the deal.II authors
00004 //
00005 //    This file is subject to QPL and may not be  distributed
00006 //    without copyright and license information. Please refer
00007 //    to the file deal.II/doc/license.html for the  text  and
00008 //    further information on this license.
00009 //
00010 //---------------------------------------------------------------------------
00011 
00012 #ifndef BROWSELINEEDIT_H
00013 #define BROWSELINEEDIT_H
00014 
00015 #include <QFrame>
00016 #include <QLineEdit>
00017 #include <QFileDialog>
00018 #include <QPushButton>
00019 
00020 
00021 namespace dealii
00022 {
00026   namespace ParameterGui
00027   {
00042     class BrowseLineEdit : public QFrame
00043     {
00044       Q_OBJECT
00045 
00046       public:
00052         enum BrowseType {file = 0, directory = 1};
00057         BrowseLineEdit (const BrowseType  type = file,
00058                         QWidget          *parent = 0);
00059 
00064         QSize  sizeHint() const;
00068         QSize  minimumSizeHint() const;
00072         QString  text() const;
00076         BrowseType  browse_type;
00077 
00078       public slots:
00082         void setText(const QString &str);
00083 
00084       signals:
00088         void editingFinished();
00089 
00090       private slots:
00094         void editing_finished();
00099         void browse();
00100 
00101       private:
00105         QLineEdit * line_editor;
00109         QPushButton * browse_button;
00110     };
00111   }
00113 }
00114 
00115 
00116 #endif
00117 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Thu May 17 2012 20:04:31 by doxygen 1.7.3