]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/YQDumbTab.h
don't reset the changes file
[duncan/yast2-qt4.git] / src / YQDumbTab.h
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:       YQDumbTab.h
14
15   Author:     Stefan Hundhammer <sh@suse.de>
16
17 /-*/
18
19
20 #ifndef YQDumbTab_h
21 #define YQDumbTab_h
22
23 #include <qwidget.h>
24 #include "YDumbTab.h"
25
26 class QTabBar;
27 class QPaintEvent;
28
29
30 class YQDumbTab : public QWidget, public YDumbTab
31 {
32     Q_OBJECT
33
34 public:
35
36     /**
37      * Constructor.
38      **/
39     YQDumbTab( YWidget * parent );
40
41     /**
42      * Destructor.
43      **/
44     virtual ~YQDumbTab();
45
46     /**
47      * Add an item (a tab page).
48      *
49      * Reimplemented from YDumbTab.
50      **/
51     virtual void addItem( YItem * item );
52
53     /**
54      * Select or deselect an item.
55      *
56      * Reimplemented from YSelectionWidget.
57      **/
58     virtual void selectItem( YItem * item, bool selected = true );
59
60     /**
61      * Deselect all items.
62      *
63      * Reimplemented from YSelectionWidget.
64      **/
65     virtual void deselectAllItems();
66
67     /**
68      * Delete all items (all tab pages).
69      *
70      * Reimplemented from YSelectionWidget.
71      **/
72     virtual void deleteAllItems();
73     
74     /**
75      * Set enabled/disabled state.
76      *
77      * Reimplemented from YWidget.
78      **/
79     virtual void setEnabled( bool enabled );
80
81     /**
82      * Preferred width of the widget.
83      *
84      * Reimplemented from YWidget.
85      **/
86     virtual int preferredWidth();
87
88     /**
89      * Preferred height of the widget.
90      *
91      * Reimplemented from YWidget.
92      **/
93     virtual int preferredHeight();
94
95     /**
96      * Set the new size of the widget.
97      *
98      * Reimplemented from YWidget.
99      **/
100     virtual void setSize( int newWidth, int newHeight );
101
102 public slots:
103
104     /**
105      * Send an event that the tab with the specified index is selected.
106      **/
107     void slotSelected( int index );
108
109 protected:
110
111     QTabBar * _tabBar;
112 };
113
114 #endif // YQDumbTab_h