]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/YQDateField.h
Qt3support--
[duncan/yast2-qt4.git] / src / YQDateField.h
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:         YQDateField.h
14
15   Author:       Stefan Hundhammer <sh@suse.de>
16
17 /-*/
18
19
20 #ifndef YQDateField_h
21 #define YQDateField_h
22
23 #include <QFrame>
24 #include <Qt3Support/Q3DateEdit>
25
26 #include "YDateField.h"
27
28 class YQWidgetCaption;
29
30
31 class YQDateField : public QFrame, public YDateField
32 {
33     Q_OBJECT
34
35 public:
36
37     /**
38      * Constructor.
39      **/
40     YQDateField( YWidget *      parent,
41                  const string & label );
42
43     /**
44      * Destructor.
45      **/
46     virtual ~YQDateField();
47
48     /**
49      * Get the current value (the text entered by the user or set from the
50      * outside) of this input field.
51      *
52      * Implemented from YSimpleInputField.
53      **/
54     virtual string value();
55
56     /**
57      * Set the current value (the text entered by the user or set from the
58      * outside) of this input field.
59      *
60      * Implemented from YSimpleInputField.
61      **/
62     virtual void setValue( const string & newValue );
63
64     /**
65      * Set the label (the caption above the input field).
66      *
67      * Reimplemented from YSimpleInputField.
68      **/
69     virtual void setLabel( const string & label );
70
71     /**
72      * Set enabled/disabled state.
73      *
74      * Reimplemented from YWidget.
75      **/
76     virtual void setEnabled( bool enabled );
77
78     /**
79      * Preferred width of the widget.
80      *
81      * Reimplemented from YWidget.
82      **/
83     virtual int preferredWidth();
84
85     /**
86      * Preferred height of the widget.
87      *
88      * Reimplemented from YWidget.
89      **/
90     virtual int preferredHeight();
91
92     /**
93      * Set the new size of the widget.
94      *
95      * Reimplemented from YWidget.
96      **/
97     virtual void setSize( int newWidth, int newHeight );
98
99     /**
100      * Accept the keyboard focus.
101      *
102      * Reimplemented from YWidget.
103      **/
104     virtual bool setKeyboardFocus();
105
106
107 protected:
108
109     YQWidgetCaption *   _caption;
110     Q3DateEdit *                _qt_dateEdit;
111 };
112
113
114 #endif // YQDateField_h