diff options
Diffstat (limited to 'experimental/tqtinterface/qt4/tools/designer/examples/filechooser/widget/filechooser.h')
-rw-r--r-- | experimental/tqtinterface/qt4/tools/designer/examples/filechooser/widget/filechooser.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/experimental/tqtinterface/qt4/tools/designer/examples/filechooser/widget/filechooser.h b/experimental/tqtinterface/qt4/tools/designer/examples/filechooser/widget/filechooser.h new file mode 100644 index 000000000..0062e5b30 --- /dev/null +++ b/experimental/tqtinterface/qt4/tools/designer/examples/filechooser/widget/filechooser.h @@ -0,0 +1,48 @@ +#ifndef FILECHOOSER_H +#define FILECHOOSER_H + +#include <tqwidget.h> +#include <tqwidgetplugin.h> + +class TQLineEdit; +class TQPushButton; + +#ifdef FILECHOOSER_IS_WIDGET +#undef TQT_WIDGET_PLUGIN_EXPORT +#define TQT_WIDGET_PLUGIN_EXPORT +#endif + +class TQT_WIDGET_PLUGIN_EXPORT FileChooser : public TQWidget +{ + TQ_OBJECT + + TQ_ENUMS( Mode ) + Q_PROPERTY( Mode mode READ mode WRITE setMode ) + Q_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 Q_SLOTS: + void setFileName( const TQString &fn ); + void setMode( Mode m ); + +Q_SIGNALS: + void fileNameChanged( const TQString & ); + +private Q_SLOTS: + void chooseFile(); + +private: + TQLineEdit *lineEdit; + TQPushButton *button; + Mode md; + +}; + +#endif |