summaryrefslogtreecommitdiffstats
path: root/kommander/editor/filechooser.h
blob: df518db625c4d49cfcdc2d963d0822de41391f3a (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
#ifndef FILECHOOSER_H
#define FILECHOOSER_H

#include <tqwidget.h>

class TQLineEdit;
class TQPushButton;

class FileChooser : public TQWidget
{
    Q_OBJECT
  TQ_OBJECT

    Q_ENUMS( Mode )
    TQ_PROPERTY( Mode mode READ mode WRITE setMode )
    TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName )

public:
    FileChooser( TQWidget *tqparent = 0, const char *name = 0);

    enum Mode { File, Directory };

    TQString fileName() const;
    Mode mode() const;

public slots:
    void setFileName( const TQString &fn );
    void setMode( Mode m );

signals:
    void fileNameChanged( const TQString & );

private slots:
    void chooseFile();

private:
    TQLineEdit *lineEdit;
    TQPushButton *button;
    Mode md;

};

#endif