blob: 2ad105c5a1284cbdc906ad74d970fc7ec0aebb56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
/*
* Copyright (C) 2002 SHARP CORPORATION All rights reserved.
*/
#ifndef __SLFILEDIALOG_H__
#define __SLFILEDIALOG_H__
#include <qdialog.h>
#include <qfileinfo.h>
#include <qvalidator.h>
#include <sl/slmisc.h>
class SlFileNameValidator : public QValidator
{
Q_OBJECT
public:
SlFileNameValidator( QWidget * parent, const char * name = 0 ) : QValidator(parent,name) {};
virtual State validate(QString&,int&) const;
virtual void fixup(QString&) const;
};
class SlFileDialogPrivate;
class SlFileDialog : public QDialog
{
Q_OBJECT
public:
SlFileDialog(bool bSaveAs = FALSE, QWidget * parent=0, const char * name=0, bool modal=TRUE, WFlags f=0 );
virtual ~SlFileDialog();
void setNewDirEnabled(bool);
void setDefaultFile( QString path );
void setDefaultName( QString name );
void setMimeType( QString mime );
void setComplementExt( QString ext );
void setIconViewType(bool isIcon);
QString &getFilePath();
QString &getFileName();
int exec();
protected slots:
virtual void accept();
void fileSelected(const QFileInfo &fInfo);
void slotNewDir();
void rotateChanged();
void keyPressed(QKeyEvent*,bool&);
protected:
void getDefaultColumnWidth(SlMisc::SlListColumnInfos &infos);
SlFileDialogPrivate *m_pD;
};
#endif
|