Version: 9.16.0
QtxPathEdit.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20// File: QtxPathEdit.h
21// Author: Sergey TELKOV
22//
23#ifndef QTXPATHEDIT_H
24#define QTXPATHEDIT_H
25
26#include "Qtx.h"
27
28#include <QFrame>
29#include <QFileDialog>
30
31class QLineEdit;
32
34{
35 Q_OBJECT
36
37public:
38 QtxPathEdit( const Qtx::PathType, QWidget* = 0, bool = false );
39 QtxPathEdit( QWidget* = 0, bool = false );
40 virtual ~QtxPathEdit();
41
42 QString path() const;
43 void setPath( const QString& );
44
45 Qtx::PathType pathType() const;
46 void setPathType( const Qtx::PathType );
47
48 QString pathFilter() const;
49 void setPathFilter( const QString& );
50
51 QFileDialog::Options pathOptions() const;
52 void setPathOptions( const QFileDialog::Options );
53
54private slots:
55 void onBrowse( bool = false );
56
57protected:
58 QLineEdit* lineEdit() const;
59
60private:
61 void initialize();
62 void updateState();
63
64private:
67 QString myFilter;
68 QFileDialog::Options myOptions;
70};
71
72#endif
#define QTX_EXPORT
Definition: Qtx.h:36
The QtxPathEdit class represents a widget for file or directory path preference items editing.
Definition: QtxPathEdit.h:34
QFileDialog::Options myOptions
Definition: QtxPathEdit.h:68
QLineEdit * myPath
Definition: QtxPathEdit.h:65
bool myBrowse
Definition: QtxPathEdit.h:69
Qtx::PathType myType
Definition: QtxPathEdit.h:66
QString myFilter
Definition: QtxPathEdit.h:67
PathType
Path type, indicates required directory/file operation.
Definition: Qtx.h:91