summaryrefslogtreecommitdiff
path: root/libslcompat/slfiledialog.h
Unidiff
Diffstat (limited to 'libslcompat/slfiledialog.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libslcompat/slfiledialog.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/libslcompat/slfiledialog.h b/libslcompat/slfiledialog.h
new file mode 100644
index 0000000..2ad105c
--- a/dev/null
+++ b/libslcompat/slfiledialog.h
@@ -0,0 +1,70 @@
1/*
2 * Copyright (C) 2002 SHARP CORPORATION All rights reserved.
3 */
4#ifndef __SLFILEDIALOG_H__
5#define __SLFILEDIALOG_H__
6
7#include <qdialog.h>
8#include <qfileinfo.h>
9#include <qvalidator.h>
10#include <sl/slmisc.h>
11
12class SlFileNameValidator : public QValidator
13{
14 Q_OBJECT
15public:
16 SlFileNameValidator( QWidget * parent, const char * name = 0 ) : QValidator(parent,name) {};
17 virtual State validate(QString&,int&) const;
18 virtual void fixup(QString&) const;
19};
20
21class SlFileDialogPrivate;
22class SlFileDialog : public QDialog
23{
24 Q_OBJECT
25public:
26
27
28 SlFileDialog(bool bSaveAs = FALSE, QWidget * parent=0, const char * name=0, bool modal=TRUE, WFlags f=0 );
29
30
31 virtual ~SlFileDialog();
32
33
34 void setNewDirEnabled(bool);
35
36
37 void setDefaultFile( QString path );
38 void setDefaultName( QString name );
39
40
41 void setMimeType( QString mime );
42
43
44 void setComplementExt( QString ext );
45
46
47 void setIconViewType(bool isIcon);
48
49
50 QString &getFilePath();
51 QString &getFileName();
52
53 int exec();
54
55protected slots:
56 virtual void accept();
57
58 void fileSelected(const QFileInfo &fInfo);
59 void slotNewDir();
60 void rotateChanged();
61 void keyPressed(QKeyEvent*,bool&);
62
63protected:
64 void getDefaultColumnWidth(SlMisc::SlListColumnInfos &infos);
65
66 SlFileDialogPrivate *m_pD;
67
68};
69
70#endif