00001 #ifndef OPIE_PROFILE_DIALOG_WIDGET_H
00002 #define OPIE_PROFILE_DIALOG_WIDGET_H
00003
00004 #include <qwidget.h>
00005
00006 #include "profile.h"
00007
00008 class ProfileDialogWidget : public QWidget {
00009 Q_OBJECT
00010 public:
00011 enum Type {
00012 Connection,
00013 Terminal,
00014 Keyboard
00015 };
00016 ProfileDialogWidget( const QString& name, QWidget* parent, const char* name = 0l);
00017 ~ProfileDialogWidget();
00018
00019
00020
00021
00022
00023 virtual void load( const Profile& ) = 0;
00024
00025
00026
00027
00028
00029 virtual void save( Profile& ) = 0;
00030
00031 virtual Type type()const = 0;
00032 };
00033 class ProfileDialogTerminalWidget : public ProfileDialogWidget {
00034 Q_OBJECT
00035 public:
00036 ProfileDialogTerminalWidget( const QString& name, QWidget* widget,
00037 const char* name =0l);
00038 ~ProfileDialogTerminalWidget();
00039 Type type()const;
00040 };
00041 class ProfileDialogConnectionWidget : public ProfileDialogWidget {
00042 Q_OBJECT
00043 public:
00044 ProfileDialogConnectionWidget( const QString& name, QWidget* parent,
00045 const char* name =0l);
00046 ~ProfileDialogConnectionWidget();
00047 Type type() const;
00048
00049 };
00050 class ProfileDialogKeyWidget : public ProfileDialogWidget {
00051 Q_OBJECT
00052 public:
00053 ProfileDialogKeyWidget( const QString &name, QWidget* parent,
00054 const char *name =0l);
00055 ~ProfileDialogKeyWidget();
00056 Type type() const;
00057 };
00058
00059 class NoOptions : public ProfileDialogWidget {
00060 Q_OBJECT
00061 public:
00062 NoOptions( const QString& name, QWidget* parent, const char* na );
00063 ~NoOptions() {}
00064 void load( const Profile& );
00065 void save( Profile& );
00066 Type type()const{ return Connection; };
00067 };
00068 #endif