]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/YQDateField.h
68dd5e9e8417055ba96e7d5bc864faa8838d246d
[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 "YDateField.h"
25
26 class Q3DateEdit;
27 class YQWidgetCaption;
28
29
30 class YQDateField : public QFrame, public YDateField
31 {
32     Q_OBJECT
33
34 public:
35
36     /**
37      * Constructor.
38      **/
39     YQDateField( YWidget *      parent,
40                  const string & label );
41
42     /**
43      * Destructor.
44      **/
45     virtual ~YQDateField();
46
47     /**
48      * Get the current value (the text entered by the user or set from the
49      * outside) of this input field.
50      *
51      * Implemented from YSimpleInputField.
52      **/
53     virtual string value();
54
55     /**
56      * Set the current value (the text entered by the user or set from the
57      * outside) of this input field.
58      *
59      * Implemented from YSimpleInputField.
60      **/
61     virtual void setValue( const string & newValue );
62
63     /**
64      * Set the label (the caption above the input field).
65      *
66      * Reimplemented from YSimpleInputField.
67      **/
68     virtual void setLabel( const string & label );
69
70     /**
71      * Set enabled/disabled state.
72      *
73      * Reimplemented from YWidget.
74      **/
75     virtual void setEnabled( bool enabled );
76
77     /**
78      * Preferred width of the widget.
79      *
80      * Reimplemented from YWidget.
81      **/
82     virtual int preferredWidth();
83
84     /**
85      * Preferred height of the widget.
86      *
87      * Reimplemented from YWidget.
88      **/
89     virtual int preferredHeight();
90
91     /**
92      * Set the new size of the widget.
93      *
94      * Reimplemented from YWidget.
95      **/
96     virtual void setSize( int newWidth, int newHeight );
97
98     /**
99      * Accept the keyboard focus.
100      *
101      * Reimplemented from YWidget.
102      **/
103     virtual bool setKeyboardFocus();
104
105
106 protected:
107
108     YQWidgetCaption *   _caption;
109     Q3DateEdit *                _qt_dateEdit;
110 };
111
112
113 #endif // YQDateField_h