SciDAVis
1.D4
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
scidavis
src
ExtensibleFileDialog.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : ExtensibleFileDialog.h
3
Project : SciDAVis
4
--------------------------------------------------------------------
5
Copyright : (C) 2007 by Knut Franke
6
Email (use @ for *) : knut.franke*gmx.de
7
Description : QFileDialog plus generic extension support
8
9
***************************************************************************/
10
11
/***************************************************************************
12
* *
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
17
* *
18
* This program is distributed in the hope that it will be useful, *
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21
* GNU General Public License for more details. *
22
* *
23
* You should have received a copy of the GNU General Public License *
24
* along with this program; if not, write to the Free Software *
25
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26
* Boston, MA 02110-1301 USA *
27
* *
28
***************************************************************************/
29
#ifndef EXTENSIBLE_FILE_DIALOG_H
30
#define EXTENSIBLE_FILE_DIALOG_H
31
32
#include <QFileDialog>
33
#include <QPushButton>
34
36
44
class
ExtensibleFileDialog
:
public
QFileDialog
45
{
46
Q_OBJECT
47
48
public
:
50
55
ExtensibleFileDialog
(QWidget *parent=0,
bool
extended =
true
, Qt::WFlags flags=0);
57
void
setExtensionWidget
(QWidget *extension);
58
60
bool
isExtendable
(){
return
d_extension
!= NULL;};
61
bool
isExtended
(){
return
d_extension_toggle
->isChecked();};
62
void
setExtended
(
bool
extended){
d_extension_toggle
->setChecked(extended);};
63
64
protected
:
66
QPushButton *
d_extension_toggle
;
67
68
private
slots:
70
void
resize
(
bool
extension_on);
71
72
private
:
74
QWidget *
d_extension
;
76
int
d_extension_row
;
77
};
78
79
#endif // ifndef EXTENSIBLE_FILE_DIALOG_H
Generated by
1.8.1