CustusX  18.04-rc1
An IGT application
cxFileInputWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 #ifndef CXFILEINPUTWIDGET_H
12 #define CXFILEINPUTWIDGET_H
13 
14 #include "cxResourceWidgetsExport.h"
15 
16 #include <QWidget>
17 class QLabel;
18 class QLineEdit;
19 class QToolButton;
20 class QGridLayout;
21 class QAction;
22 
23 namespace cx
24 {
25 
34 class cxResourceWidgets_EXPORT FileInputWidget : public QWidget
35 {
36  Q_OBJECT
37 public:
38  FileInputWidget(QWidget* parent=0);
39 
40  void setDescription(QString text);
41  void setFilename(QString text);
42  void setHelp(QString text);
43  void setBrowseHelp(QString text);
44  QString getFilename() const;
45  QString getAbsoluteFilename() const;
46  void setBasePath(QString path);
47  void setUseRelativePath(bool on);
48 
49 signals:
50  void fileChanged();
51 
52 private slots:
53  void browse();
54  void updateColor();
55 private:
56  void updateHelpInternal();
57  void widgetHasBeenChanged();
58 
59  QString mBasePath;
60  bool mUseRelativePath;
61  QString mBaseHelp;
62 
63  QLabel* mDescription;
64  QLineEdit* mFilenameEdit;
65  QToolButton* mBrowseButton;
66  QGridLayout* mLayout;
67  QAction* mBrowseAction;
68 };
69 
70 
71 } // namespace cx
72 
73 #endif // CXFILEINPUTWIDGET_H
Namespace for all CustusX production code.